Fix: Bug creating invoice from a contract