Create CurrentInvoice

Forum for .PHP developers using the E-conomic API.
Exchange your ideas, tip and tricks using the API.
Best Practices

Create CurrentInvoice

Postby china li » Wed Nov 09, 2011 12:11 pm

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
)
);
-
china li
 
Posts: 5
Joined: Mon Apr 18, 2011 5:10 am

Return to PHP



cron