Updating an incorrect kit calculation via plugin  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Updating an incorrect kit calculation via plugin

Postby DannyC » Fri Aug 04, 2017 3:05 pm

Hi,

I have a client currently on 7.0.157 but will need to upgrade them soon.
Several of their sales orders are entered via the File Watcher and the items may be kits.
Once in a while, the kit will be calculated incorrectly in the totals grid - it is calculating from the component items instead of the kit header. See example attached.

DeleteMe.png


Just wondering if there is some plugin code I could write so that when the sales order is opened on screen, it can
a) Check if the sales order has been calculated correctly.
b) If not, recalculate. Would the sub salesOrder.ReCalculatedPrices() do that?

Cheers

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

Re: Updating an incorrect kit calculation via plugin

Postby DannyC » Fri Aug 18, 2017 1:39 pm

gentle bump
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Updating an incorrect kit calculation via plugin  Topic is solved

Postby Mike.Sheen » Sat Aug 19, 2017 2:15 pm

DannyC wrote:Once in a while, the kit will be calculated incorrectly in the totals grid - it is calculating from the component items instead of the kit header.


It has to show the totals as a sum of the components because that is what is used to post to the GL and debtors ledger. Each component potentially may have different inventory value, tax and so on accounts - so the kit header is not actually a factor for the posting - it's simply a mechanism to adjust the component values in a convenient way.

If in your screenshot you say the kit header values are correct and what you want the totals to match, so that means then the component lines need to be adjusted - there is most likely a simple way to do that - but I'll need to try to reproduce the issue first, and then I can try to come up with a plugin solution.

Have you raised a ticket with support about this? There may already be a known solution - it would be best to check with support first.
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 14 guests