Quote/Sales price selection disparity  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Quote/Sales price selection disparity

Postby pricerc » Mon Jul 03, 2023 4:09 pm

When picking a price using a price scheme in Sales Orders, the price selected is applied to both the "Price" and "Price Ex" fields.

In Quotes, the price is only applied to the "Price" field, not the "Price Ex" field.

dotPeek reveals that the S/O logic has this code, which is missing from Quotes:
Code: Select all
salesOrderLine.DiscountGiven = 0M;


in between setting SellPriceExGST (or SellPriceIncGST) and setting PriceSelected.

1) Is this intentional, and
b) is there a quick 'fix' I can implement to make quotes behave the same as orders? (Maybe using the GotPrice event?)
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Quote/Sales price selection disparity  Topic is solved

Postby Mike.Sheen » Fri Jul 07, 2023 2:46 pm

pricerc wrote:1) Is this intentional,


I'm not sure - it may be the intent was to make the price of the quote stay fixed and put the difference into the discount (which is what it does now). I've logged DEV-10102 for us to take a look and if it wasn't intentional, to make it consistent with sales orders.

pricerc wrote:and b) is there a quick 'fix' I can implement to make quotes behave the same as orders? (Maybe using the GotPrice event?)


You can't use the GotPrice event, as that's raised not just when the selected price is selected, but whenever the system has applied a price - such as changing the quantity, and also when just doing things like changing the debtor or price scheme itself.

Instead you can listen to the PropertyChanged event of the SalesQuoteLines and react only where the PropertyName is "PriceSelected".

The attached plugin does this - try it to see if it does what you need.
Attachments
Plugin Quotes - Reset Discount.xml
(7.07 KiB) Downloaded 47 times
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: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 31 guests