Page 1 of 1

Updating an incorrect kit calculation via plugin

PostPosted: Fri Aug 04, 2017 3:05 pm
by DannyC
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

Re: Updating an incorrect kit calculation via plugin

PostPosted: Fri Aug 18, 2017 1:39 pm
by DannyC
gentle bump

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

PostPosted: Sat Aug 19, 2017 2:15 pm
by Mike.Sheen
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.