Page 1 of 1

Sales Order Pricing

PostPosted: Thu Jan 31, 2019 11:53 am
by SBarnes
How do you set the price for a sales order line to be the final price and have Jiwa ignore things such as Debtor specific,Qty breaks etc?

At the moment I am setting DiscountedPrice for the line but then a Qty break is being applied to my price which I don't want.

Re: Sales Order Pricing

PostPosted: Thu Jan 31, 2019 1:19 pm
by SBarnes
I believe I have figured this out and following should work?

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

Re: Sales Order Pricing  Topic is solved

PostPosted: Fri Feb 01, 2019 3:54 pm
by Mike.Sheen
SBarnes wrote:How do you set the price for a sales order line to be the final price and have Jiwa ignore things such as Debtor specific,Qty breaks etc?

At the moment I am setting DiscountedPrice for the line but then a Qty break is being applied to my price which I don't want.


The the last property you set is the DiscountedPrice, then that is what will be used. Changing the quantity after setting the DiscountedPrice will cause the price scheme to be invoked to return a price. If you want to be able to alter the quantity and not have the price altered, then setting either FixPrice or FixSellPrice to true will cause the price recalculation to be skipped.

Re: Sales Order Pricing

PostPosted: Fri Feb 01, 2019 3:56 pm
by SBarnes
Thanks, I already worked it out by opening the DLL in Just Decompile, you have confirmed that what I have done is correct.