File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,27 @@ the api connection.
108108 // List items with filter
109109 $item = new Item($connection);
110110 $item->filter("Code eq '$productcode'"); // Uses filters as described in Exact API docs (odata filters)
111-
111+
112+ // Create new invoice with invoice lines
113+ $items[] = [
114+ 'Item' => $itemId,
115+ 'Quantity' => $orderproduct['amount'],
116+ 'UnitPrice' => $orderproduct['price']
117+ ];
118+
119+ $salesInvoice = new SalesInvoice($this->connection());
120+ $salesInvoice->InvoiceTo = $customer_code;
121+ $salesInvoice->OrderedBy = $customer_code;
122+ $salesInvoice->YourRef = $orderId;
123+ $salesInvoice->SalesInvoiceLines = $items;
124+
125+
126+
112127Check [ src/Picqer/Financials/Exact] ( src/Picqer/Financials/Exact ) for all available entities.
113128
114129## Code example
115130See for example: [ example/example.php] ( example/example.php )
116131
117-
118132## TODO
119133- Switch administration (now uses default)
120134- Current entities do not contain all available properties. Feel free to submit a PR with added or extended entities if you require them.
You can’t perform that action at this time.
0 commit comments