BOM Maintenance Last Cost of inputs and output(s)

Discussions relating to plugin development, and the Jiwa API.

BOM Maintenance Last Cost of inputs and output(s)

Postby DannyC » Fri Sep 27, 2024 10:35 am

In Bill of Materials Maintenance, the Inputs pane shows Last Cost, which is the IN_Main.Lost value.
And in the Outputs pane, there are 2 Cost columns...1 shows the IN_Main.LCost and the other is the SUM of Inputs last cost.

All OK there however...when an input is a BOM also, my client wants the Input last cost to be the subassembly's Output cost being the SUM of that subs inputs. Not the IN_Main.LCost of the BOM inventory component.
This client can have a main BOM which has components going 4 levels deep of sub-BOMs. Each input Last Cost ideally they want to see the BOM output Cost from it's sum of components.

I have added a custom field on Inputs to perform some magic (I'm running a stored procedure that calcs the BOM cost going 4 levels deep) that shows the desired figures for each component of a BOM, but would prefer (not essential) that it shows in the Last Cost column.

More importantly, I'd like the Cost column in Outputs to be the sum of my custom field. When I try to populate the Cost column, it never sticks. Jiwa always is displaying the sum of inputs last cost.
I am hooking into the ReadEnd event of each BOM maintenance.
Is there a better event?

Like the Inputs grid with a custom field, I've also added a custom field to Outputs that I am populating the total BOM cost but really want it to show in the Cost column not my custom field.

They want to see a consistent Cost in the
i) outputs grid
ii) the Stages grid because that also shows Total Input Cost
iii) down the bottom left where it shows Inputs and Outputs.
iv) The printout when the print the BOM maintenance. This has already been customised so no need for this post to delve into the crystal side of things. Mainly just the 3 points above.
Attachments
Plugin Attkey Bill Maint SubBoM Cost.xml
(38 KiB) Downloaded 16 times
User avatar
DannyC
Senpai
Senpai
 
Posts: 658
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests