Pricing Scheme Ignored
Hey guys,
I have an obscure issue (but instead of getting personal, lets talk programming!) ...
When an invoice is imported into JIWA from the Job Manager utility the pricing scheme is ignored. Also once the invoice is imported into JIWA and we manually add additional items to the invoice the pricing scheme is also ignored.
(c# strong typing specific code removed to make more readable)
This is implemented in an external EXE, referencing JiwaApplication,JiwaODBC,JiwaSales. It would appear that sales orders created through this do not observe the pricing scheme applied.
Cheers,
Neil
I have an obscure issue (but instead of getting personal, lets talk programming!) ...
When an invoice is imported into JIWA from the Job Manager utility the pricing scheme is ignored. Also once the invoice is imported into JIWA and we manually add additional items to the invoice the pricing scheme is also ignored.
- Code: Select all
Manager.Instance.Logon(Servername, Database, database.AuthenticationModes.JiwaAuthentication, Username, password);
var salesOrder = Manager.Instance.BusinessLogicFactory.CreateBusinessLogic<SalesOrder>(null);
var inventory = new JiwaFinancials.Jiwa.JiwaApplication.Entities.Inventory.Inventory();
[CLIP]
var debtor = new JiwaFinancials.Jiwa.JiwaApplication.Entities.Debtor.Debtor();
debtor.ReadRecord(debtorId);
[CLIP]
salesOrder.CreateNew(JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder.NewSalesOrderTypes.e_NewSalesOrder, debtor.DebtorID);
salesOrder.OrderNo = jobs.Project;
salesOrder.InitiatedDate = initiatedDate;
salesOrder.WholeSaleInvoice = false;
[CLIP]
foreach (var row in rows)
{
inventory.ReadRecordFromPartNo(row["JobCode"].ToString());
salesOrder.SalesOrderLines.AddInventoryItem(inventory.InventoryID, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes.e_SalesOrderLineInventoryID, ref newKey);
salesOrder.SalesOrderLines[newKey].ScheduledDate = DateTime.Parse(row["AppointmentTime"]);
salesOrder.SalesOrderLines[newKey].QuantityOrdered = Decimal.Parse(row["BilledHours"]);
salesOrder.SalesOrderLines[newKey].DoLineCalculationsFromExGSTSellPrice();
var details = row["Description"].Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
foreach (string detail in details) salesOrder.SalesOrderLines.AddCommentLine(detail, ref newKey);
}
salesOrder.Save();
(c# strong typing specific code removed to make more readable)
This is implemented in an external EXE, referencing JiwaApplication,JiwaODBC,JiwaSales. It would appear that sales orders created through this do not observe the pricing scheme applied.
Cheers,
Neil