I am developing a DI API Addon that generates Invoices Draft.
After have attached a new line with this code:
objInv.ItemCode = objDel.Lines.ItemCode
objInv.Lines.Quantity = objDel.Lines.Quantity
I would like to have che Weight1 and the LineTotal but they are 0.
When are they calculated?
These properties are calculated by inner SAP logic, so you shouldn't set them on your own.
You can find a good sample how to create docs based on other at ..\SAP Business One SDK\Samples\COM DI\VB.NET\5.OrderAndInvoice\
if you really need that data <i>before</i> you add document, then you should simulate SAPlogic, i.e. calculate them on your own and make some supplements
I have to collect the total weigh of the invoice and the total before taxation for then apply two different kinds of supplement but all these field are at 0.
Do they come populated when I add it?
I would like to add the lines of supplement (that are particular articles ) before saving the entire document.