tminifie
Programmer
- Sep 22, 2006
- 1
Hi
I'm working on a Inventory/Sales order system and I am having difficulty adding multiple records to a tableframe. Below is an example of the result that I am getting.
Sales Order Form
Order Lot Cut Description UpDn Grade Cnt Price
1234 1234 109 Export Ribs Up CAB 10
5678 5678 109 Export Ribs Up CAB 7
8916 5678 109 Export Ribs Up CAB
The idea here is that the user fills in the "Cut"(109 in this example), the "Description" is defaulted, the user fills in the "UpDn", the user fills in the "Grade" and the user fills in the "Cnt". In this example the user filled in 20 under "Cnt". I have code in the changeValue() of the "Cnt" field. The code essentially checks inventory to see if there is enough product in this case "109 Export Ribs" to satisfy the order of amount of 20. In this case there was only 10 cartons remaining under "Order" 1234 so you see 10 under "Cnt" above taken from "Order" 1234. Then on the next line you see that "Order" 5678 has 7 under "Cnt". That leaves us with 3 more Cartons to fill the Sales Order. "Order" 8916 has 3 cartons remaining but you don't see 3 under "Cnt" above. That is the bug I'm trying to resolve. I see 3 under "Cnt" field for a split second but the focus moves to the "Price" field on the first record and the "Cnt" field goes blank on the third record. I'm using uiSalesItm.attach(SALESITM)
uiSalesItm.action(DataNextRecord)
to move and insert a new record in the tableframe. When I attempt to walk through my code with the debugger I get the following error message:
Warning: record already locked in this session
I don't know if the action(DataNextRecord) method is the right approach???
Any suggestions would be appreciated.
Thanks
Todd
I'm working on a Inventory/Sales order system and I am having difficulty adding multiple records to a tableframe. Below is an example of the result that I am getting.
Sales Order Form
Order Lot Cut Description UpDn Grade Cnt Price
1234 1234 109 Export Ribs Up CAB 10
5678 5678 109 Export Ribs Up CAB 7
8916 5678 109 Export Ribs Up CAB
The idea here is that the user fills in the "Cut"(109 in this example), the "Description" is defaulted, the user fills in the "UpDn", the user fills in the "Grade" and the user fills in the "Cnt". In this example the user filled in 20 under "Cnt". I have code in the changeValue() of the "Cnt" field. The code essentially checks inventory to see if there is enough product in this case "109 Export Ribs" to satisfy the order of amount of 20. In this case there was only 10 cartons remaining under "Order" 1234 so you see 10 under "Cnt" above taken from "Order" 1234. Then on the next line you see that "Order" 5678 has 7 under "Cnt". That leaves us with 3 more Cartons to fill the Sales Order. "Order" 8916 has 3 cartons remaining but you don't see 3 under "Cnt" above. That is the bug I'm trying to resolve. I see 3 under "Cnt" field for a split second but the focus moves to the "Price" field on the first record and the "Cnt" field goes blank on the third record. I'm using uiSalesItm.attach(SALESITM)
uiSalesItm.action(DataNextRecord)
to move and insert a new record in the tableframe. When I attempt to walk through my code with the debugger I get the following error message:
Warning: record already locked in this session
I don't know if the action(DataNextRecord) method is the right approach???
Any suggestions would be appreciated.
Thanks
Todd