API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Create CurrentInvoice

0
Hi,

I want to create CurrentInvoice,this is my code. there is only the product number in the CurrentInvoiceLine,But why could not add the product in CurrentInvoiceLine, thanks

$cino = array(Number = $number);
$newCurrentInvoiceHandle = $client-CurrentInvoice_Create(
        array(
            'debtorHandle' = $cino
            )
                )-CurrentInvoice_CreateResult;
       $client-CurrentInvoice_SetOtherReference(
          array(
            'currentInvoiceHandle' = $newCurrentInvoiceHandle,
            'value' = $order_number
            )
                  );
    $newCurrentInvoiceLineHandle = $client-CurrentInvoiceLine_Create(
        array(
            'invoiceHandle' = $newCurrentInvoiceHandle
            )
                )-CurrentInvoiceLine_CreateResult;

    $productHandles = $client-product_GetAll()-Product_GetAllResult-ProductHandle;
    $firstProduct = $productHandles[0];
       
    
    $client-CurrentInvoiceLine_SetProduct(
        array(
            'currentInvoiceLineHandle' = $newCurrentInvoiceLineHandle,
            'valueHandle' = $firstProduct
            )
                );
created Nov 9, 2011 by china li
0% Accept Rate
Q 5 A 0 C 0

Visma e-conomic A/S
...