Page 1 of 1

Sales Order Line prices

PostPosted: Thu Aug 13, 2020 11:12 am
by Mark Shipman
Hi,

(another newbie question)

Environment is Jiwa 7.2.1 and MS SQL Server 2019.

I create a Jiwa Sales Order business object and add lines to the SalesOrderLineCollection using the AddInventoryItem() method with either a SalesOrderLineInventorySeedTypes.e_SalesOrderLineInventoryID or SalesOrderLineInventorySeedTypes.e_SalesOrderLinePartNo seed.
Code: Select all
if (!string.IsNullOrEmpty(inventoryId))
{
    salesOrderLines.AddInventoryItem(
        inventoryId,
        JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes.e_SalesOrderLineInventoryID,
        ref newOrderLineKey);
}
else if (!string.IsNullOrEmpty(orderLineItem.sku))
{
    salesOrderLines.AddInventoryItem(
        orderLineItem.sku,
        JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes.e_SalesOrderLinePartNo,
        ref newOrderLineKey);
}

Jiwa very nicely populates the PriceIncGST and SellPriceIncGST properties for the order-line.

I want to check if the price we are importing is different to the Jiwa price and, if so, override the Jiwa price.

Which price do I use to:
  • Check if the price is different;
  • Override the calculated Jiwa selling price (including tax)?
Many thanks,

Re: Sales Order Line prices  Topic is solved

PostPosted: Thu Aug 13, 2020 1:34 pm
by SBarnes
Hi Mark,

Providing no price will make Jiwa price the products itself like in the sales order screen, the code below is how you tell Jiwa to ignore its pricing and go with what you provide, as ex tax.

Code: Select all
                        //
                        salesorder.SalesOrderLines[(KeyToGetBackHere as string)].FixPrice = true;
                        salesorder.SalesOrderLines[(KeyToGetBackHere as string)].FixSellPrice = true;
                        salesorder.SalesOrderLines[(KeyToGetBackHere as string)].DiscountedPrice = (decimal)line.UnitPrice;

Re: Sales Order Line prices

PostPosted: Thu Aug 13, 2020 3:14 pm
by Scott.Pearce
Price Ex. on the Sales order screen maps to SalesOrderLine.DiscountedPrice in the business logic. This is the ex tax price, after discounts etc have been applied. This is what is normally edited by the user on screen if they want to change the ex price.

Price Inc. on the Sales order screen maps to SalesOrderLine.PriceIncGST in the business logic. This is the inc tax price, after discounts etc have been applied. This is what is normally edited by the user on screen if they want to change the inc price. This is what you would change if you wanted to override the calculated Jiwa selling price (including tax).

Sell Price on the sales order screen maps to SalesOrderLine.SellPriceExGST for normal items, or SalesOrderLine.SellPriceIncGST for items that have their SellPriceIsIncTax flag set. This is the price of the item as far as Jiwa is concerned, before it is changed by the user (via SalesOrderLine.DiscountedPrice or SalesOrderLine.PriceIncGST). It is readonly. I believe this is what you would want to look at to compare prices with the other system (Check if the price is different).


Edit #1 - add Sell Price info.
Edit #2 - add (Check if the price is different) answer.