DoLineCalculations() for Non-InventoryItems
Posted: Tue Aug 25, 2020 11:55 am
Hey guys,
I had the following code, which worked well ...
Then the client wanted the line items to be non-inventory, so I changed the first line to ...
Since that change, the DoLineCalculations() no longer seems to work correctly, and now all line items are processed as "PriceIncGST".
Can you advise?
Cheers,
Neil
I had the following code, which worked well ...
- Code: Select all
salesOrder.SalesOrderLines.AddInventoryItem(inventory.InventoryID, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes.e_SalesOrderLineInventoryID, ref newKey);
var salesOrderLine = salesOrder.SalesOrderLines[newKey.ToString()];
salesOrderLine.PriceIncGST = orderLine.UnitPrice;
salesOrderLine.DoLineCalculations(orderLine.Gst ? "PriceIncGST" : "SellPriceExGST");
Then the client wanted the line items to be non-inventory, so I changed the first line to ...
- Code: Select all
salesOrder.SalesOrderLines.AddNonInventoryItem(orderLine.CostAccount, orderLine.UnitPrice, 0, ref newKey);
Since that change, the DoLineCalculations() no longer seems to work correctly, and now all line items are processed as "PriceIncGST".
Can you advise?
Cheers,
Neil