I am trying to create and book invoice - I do it in two steps
1) On first step I create invoice with CurrentInvoice_CreateFromDataArray
2) On second step I do CurrentInvoice_Book with ID I am getting from CurrentInvoice_CreateFromDataArrayResult
But my invoice draft (created in first step) is not valid, probably because NetAmount is zero so I am getting this error on second step:
Cannot book the current invoice: One or more invoices contain no valid invoice lines.
But why NetAmount is zero in e-conomics (I am sending precise amount, which is not zero, but 2000.00 ) ?
$createinvoice = $client->CurrentInvoice_CreateFromDataArray(
'CurrentInvoiceData' => array (
'DebtorHandle' => array('Number' => 555),
'DebtorName' => "Iris Martin",
'TermOfPaymentHandle' => array('Id' => 1 ),
'Date' => date("c"),
'DueDate' => date('c', strtotime("+".$daysToAdd." days")),
'CurrencyHandle' => array('Code' => 'DKK' ),
'ExchangeRate' => '1.00',
'IsVatIncluded' => false,
'DeliveryDate' => date("c"),
'NetAmount' => 2000.00,
'VatAmount' => 0.00,
'GrossAmount' => 2000.00,
'Margin' => 30.00,
'MarginAsPercent' => 5.00
So what is not okay with request? Why Net Amount is Zero here (see img below)? while I am sending NetAmount as 2000.00 ?