Sales Order Pricing  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Sales Order Pricing

Postby SBarnes » Thu Jan 31, 2019 11:53 am

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Sales Order Pricing

Postby SBarnes » Thu Jan 31, 2019 1:19 pm

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);
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Sales Order Pricing  Topic is solved

Postby Mike.Sheen » Fri Feb 01, 2019 3:54 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Sales Order Pricing

Postby SBarnes » Fri Feb 01, 2019 3:56 pm

Thanks, I already worked it out by opening the DLL in Just Decompile, you have confirmed that what I have done is correct.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests