Debtor or Debtor Class price rounding  Topic is solved

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

Debtor or Debtor Class price rounding

Postby DannyC » Wed Jun 01, 2016 3:37 pm

In inventory maintenance, the Debtor Pricing and Debtor Class Pricing New Price is a calculated field.

I've been posed the question, is it possible to round it to the nearest, say dollar, or 50c? As the New Price isn't saved in a database field, I'm not sure it is possible. It if was, I'd probs just write a SQL query to round it.

So I guess the question is twofold:
1. A plugin would work on Inventory.ReadEnd to change the visual display of the New Price to the rounded value?
2. When applying the price to sales orders, I am suspecting I might be able to modify the stored procs which work out the end price, correct?

Am I on the right path, and are there other things to watch out for?

Cheers

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Debtor or Debtor Class price rounding  Topic is solved

Postby Mike.Sheen » Sat Jun 04, 2016 5:19 pm

DannyC wrote:In inventory maintenance, the Debtor Pricing and Debtor Class Pricing New Price is a calculated field.

I've been posed the question, is it possible to round it to the nearest, say dollar, or 50c? As the New Price isn't saved in a database field, I'm not sure it is possible. It if was, I'd probs just write a SQL query to round it.

So I guess the question is twofold:
1. A plugin would work on Inventory.ReadEnd to change the visual display of the New Price to the rounded value?
2. When applying the price to sales orders, I am suspecting I might be able to modify the stored procs which work out the end price, correct?

Am I on the right path, and are there other things to watch out for?

Cheers

Danny


Danny,

Yes - just copy the stored procedure used to calculate debtor specific pricing and debtor classification pricing, have that round to the desired degree, and then modify your price schemes to use your stored proc instead of the standard one.

The display of the new price in inventory maintenance doesn't call the stored procedure, so as you've already asserted you'd need a plugin to replicate the rounding and present the user with the new price rounded in the same fashion. There's probably some twists and turns there, but I'm sure it's do-able.

Mike
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


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest