Issue with pallet buys  Topic is solved

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

Re: Issue with pallet buys

Postby Scott.Pearce » Fri Jan 23, 2026 9:24 am

OK, I *think* I understand what you're asking. Correct me if I'm off the mark.

You are extracting data from Jiwa and using it on a website for things like building quotes. The quote built on the website can then be pushed back into Jiwa as a quote, which in turn may be turned into a sales order in Jiwa.

The problem comes when you are dealing with kits. A "kit" in Jiwa is an inventory item with IN_Main.BOMObject = 3. For such an inventory item, when you add it to a quote in Jiwa, the code sees that a kit inventory item is being added, so it adds it (known as the "kit header"), then looks for "component" inventory items associated with it. These components can be found in a table called IN_Components where IN_Components.InventoryID = the InventoryID/RecID of the kit inventory item. The IN_Components.ComponentID points to the InventoryID of the component inventory item. These component items are then also added to the quote underneath the kit header and a relationship established via QO_Lines.KitLineID. This is probably better illustrated by actually doing one in a Jiwa demo database:

1. Create a fresh Jiwa demo database and log in (admin/password).
2. Go to Inventory->Maintenance.
3. Create a new inventory item (big "New" button in the ribbon menu, top left).
4. Give it a part no. of Component1 and save.
5. Create a new inventory item.
6. Give it a part no. of Component2 and save.
7. Create a new inventory item.
8. Give it a part no. of KitHeader.
9. On the Main tab, change the "Kit Style" drop-down to "Kit".
10. Go to the Alternate->Components tab, and use the lookup button in the grid on that tab to add part nos. "Component1" and "Component2" (you may have to resize the search screen and its panes as it's default sizing is screwy).
11. Set the quantity of "Component1" and "Component2" to be 1 and 2, respectively.
12. Save.

Right. Now we have created a kit. The kit header is really an abstract part and does not have SOH (stock on hand) as such. It is the component items that are "real" inventory items and can have SOH. The kit header dictates the pricing of the kit, but it is the components that actually exist as stock. If we wanted to be able to sell this kit, we would first have to transfer in some stock of Component1 and Component2. More specifically, to sell qty 1 of KitHeader, we would have to transfer in quantity 1 of Component1, and quantity 2 of Component2. But we are not going to sell this kit, we just want to create a quote - so let's do that below.

1. Go to Sales->Quoting.
2. Create a new quote.
3. Choose debtor 1001.
4. In the lines grid, use the look up button to choose the part no. "KitHeader".
5. Save.

Now look at the quote. See the colours? Blue for the kit header, and pink for its components. This colourisation occurs because when we added the kit header, its components were also pulled onto the quote and a relationship established between them and the kit header they belong to. Let's go look at the QO_Lines table for our quote:

Code: Select all
SELECT QO_Lines.*
FROM QO_Main
JOIN QO_History ON QO_Main.InvoiceID = QO_History.InvoiceID
JOIN QO_Lines ON QO_History.InvoiceHistoryID = QO_Lines.InvoiceHistoryID
WHERE QO_Main.InvoiceNo = '100009'
AND QO_History.HistoryNo = QO_Main.CurrentHistoryNo
ORDER BY QO_Lines.LineNum


Of particular interest in the result set are the fields KittingStatus and KitLineID, so I've dumb-ed down the query a little to focus on those:

Code: Select all
SELECT QO_Lines.InvoiceLineID, PartNo, KittingStatus, KitLineID
FROM QO_Main
JOIN QO_History ON QO_Main.InvoiceID = QO_History.InvoiceID
JOIN QO_Lines ON QO_History.InvoiceHistoryID = QO_Lines.InvoiceHistoryID
WHERE QO_Main.InvoiceNo = '100009'
AND QO_History.HistoryNo = QO_Main.CurrentHistoryNo
ORDER BY QO_Lines.LineNum


here is the result set:

Code: Select all
InvoiceLineID,PartNo,KittingStatus,KitLineID
73e23e5a721948a995cd,KitHeader,1,                   
984409b237ad4c3f8584,Component1,2,73e23e5a721948a995cd
c9fe5df3a5a449a29c3f,Component2,2,73e23e5a721948a995cd
d85a61d5f33b49618134,Round,0,73e23e5a721948a995cd


You can see that the KitHeader part has a KittingStatus of 1 which denotes a kit header, whilst the Component1 and Component2 lines have a kitting status of 2 denoting a kit component. Here is the enumeration from the code:

Code: Select all
Public Enum SalesOrderKitLineTypes
   e_SalesOrderNormalLine = 0
   e_SalesOrderKitHeader = 1
   e_SalesOrderKitComponent = 2
End Enum


Critically, and I suspect the piece you are missing, are the values in the KitLineID column. You can see that the KitHeader part has a blank value (because it is the kit header, it needs point to nothing else), but the component lines "Component1" and "Component2" contain a value which points to the InvoiceLineID of the KitHeader line.

So, I think the answer to your question is, when adding an IN_Main.BOMObject = 3 type inventory item to your web-based quote, you need to go get its component lines from IN_Components and add those after it AND place the InvoiceLineID of the header into the KitLineID of the components. Of course, your system may have different IDs, etc. but what is important is that you establish the relationship between header and its components, and if pushing the quote into Jiwa ensuring this relation remains intact.

Let me know if this helps, if I'm on the right track, and then we can get into specifics as required.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Issue with pallet buys

Postby JuiceyBrucey » Thu Feb 05, 2026 3:18 pm

Thank you very much for this reply.
Very detailed and much appreciated.
I have been snowed under with other tasks and have not had the chance to come back to this.
I will come back to it as soon as other tasks are completed.
Thank you very much.
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Issue with pallet buys

Postby Mike.Sheen » Thu Feb 05, 2026 3:34 pm

JuiceyBrucey wrote:can someone tell me if there is any intention of answering this support query?


You've been asked twice by two different people to reproduce the problem in Demo data and provide us with the steps required.

If you do that, we will be able to solve the problem and tell you what you need to do.

These forums are not our official support channel. We have a helpdesk ticket system for official support requests. These forums are community support forums, intended for developers to assist one another outside of our official support channels.

Nobody is under any obligation to respond to any questions posted on these forums, so a little cordiality goes a long way in motivating an effort from any reader of your posts to troubleshoot and respond.

I think you should create a ticket on our helpdesk. We'll likely ask you to upload a database which exhibits the problem and provide steps to reproduce - so if you can do that instead of working out how to replicate it in our demo data, that will be a quicker result for you.
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

Re: Issue with pallet buys

Postby JuiceyBrucey » Fri Feb 06, 2026 10:48 am

Would that be the same ticket system that I used to submit formal requests for quotes on your people specific jobs and I got no reply?
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Issue with pallet buys

Postby JuiceyBrucey » Mon Feb 23, 2026 3:26 pm

Hi Scott,
Thank you again for your very detailed answer.
I am having an issue though.

I got to this part:
4. In the lines grid, use the look up button to choose the part no. "KitHeader".
5. Save.

But the KitHeader does not come up when I search for it. I search for it in inventory search, and KitHeader is there and set as specified, but when searching from Sales Quote creation->Main tab searching from Part No tab and searching for KitHeader in Part No field, it does not appear.
I am pretty sure I have followed the instructions correctly and have checked more than once.
Not sure what I have missed.
Cheers :?
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Issue with pallet buys

Postby Scott.Pearce » Mon Feb 23, 2026 3:37 pm

Strange.

In the lines grid, use the look up button to search for the part no. "KitHeader". At the point where you are not getting a result but feel you should be, click the "SQL" button in the ribbon menu of the search screen - this will show you the SQL being used. Copy and then paste the SQL text here - this may reveal a clue...
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Issue with pallet buys

Postby JuiceyBrucey » Mon Feb 23, 2026 3:51 pm

The SQL:
SELECT IN_Main.InventoryID, IN_UnitOfMeasure.PartNo [IN_UnitOfMeasure_PartNo], IN_UnitOfMeasure.Name, IN_Main.PartNo, IN_Main.Description, Cat1.Description, Cat2.Description, Cat3.Description, IN_Classification.Description , IN_Main.DefaultPrice, IN_Main.DecimalPlaces , IN_Main.LCost, IN_Main.SCost, IN_Main.UseSerialNo, IN_UnitOfMeasure.RecID [IN_UnitOfMeasure_RecID] FROM IN_Main JOIN IN_Category1 AS Cat1 ON (IN_Main.Catagory1ID = Cat1.Category1ID) JOIN IN_Category2 AS Cat2 ON (IN_Main.Catagory2ID = Cat2.Category2ID) JOIN IN_Category3 AS Cat3 ON (IN_Main.Catagory3ID = Cat3.Category3ID) JOIN IN_Classification ON (IN_Main.ClassificationID = IN_Classification.InventoryClassificationID) JOIN IN_UnitOfMeasure ON (IN_Main.InventoryID = IN_UnitOfMeasure.IN_Main_InventoryID) WHERE Status <> 2
AND ( IN_Main.PartNo LIKE '%KitHeader%')

ORDER BY IN_UnitOfMeasure.PartNo
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Issue with pallet buys

Postby Scott.Pearce » Mon Feb 23, 2026 3:57 pm

Right. Change the value of the "Select a Query..." combo-box on the search screen ribbon to be "Part Number" and then try searching for "KitHeader" again.

It appears as though my version of the demo data (7.2.1.25) has a different default search query for quote line part lookup; hence I did not explicitly mention changing it in the steps.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Issue with pallet buys

Postby JuiceyBrucey » Mon Feb 23, 2026 4:01 pm

thanks Scott.
That got it.
Moving on with the rest now.
Cheers
JuiceyBrucey
Frequent Contributor
Frequent Contributor
 
Posts: 188
Joined: Tue Aug 18, 2020 7:19 pm
Topics Solved: 1

Re: Issue with pallet buys

Postby Mike.Sheen » Mon Feb 23, 2026 4:02 pm

JuiceyBrucey wrote:Would that be the same ticket system that I used to submit formal requests for quotes on your people specific jobs and I got no reply?


There are two tickets in our system with you as the reporter - JIWA-13792 and JIWA-13438 - both have had responses from our support team - which one are you claiming that you never got a response from?
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

PreviousNext

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest