Form Kitting
- Unit name: Forms.Kitting
- Form name: KittingForm
- Old form name: Unit89 (Form89)
Synopsis
Form to manage kit creation orders.
Functionalities
The form allows to create kits of articles. For this it displays 1. A supplier selection combobox. When supplier is selected, article combo box is cleared and focused. 2. An article editable combox box. As soon as a supplier is selected, a list of compound articles is retrieved for the supplier. 3. When supplier and article are chosen, a list of previous kit creations for the selected combination is shown in a grid. (view CGROUP in order of descending time) 4. A button allows to execute AddNewKit Action. 5. A button allows to execute DeleteKit action. 7. Below the grid with current/previous orders, the details of the selected order are displayed: 1. A grid with KitOrderDetails records. 2. A grid with KitSourceDetails records. (linked through the ID field of CGROUP)
- A report 'KittingStockInProduction' can be printed.
- A report 'KitLabels' can be printed. The current CGROUP ID is passed on as KitID and the number of copies is Qty from Cgroup, divided by 64.
- A button allows to execute MarkAsChecked action.
- A button allows to execute ModifyKitQuantity action.
- A button allows to execute ModifyKitArticleQuantity action.
Actions
AddNewKit.
Adds a new kit for the selected supplier/article.
1. Only active if a supplier/article is chosen.
2. When executed, a dialog pops up that asks for the following parameters:
* Quantity
* Stock code (dropdown)
* Location (optional, dropdown)
* Comments
3. When the user clicks OK, the Kitting.CheckKitOrderPossible service call is executed:
1. If errors are reported: they are displayed to the user.
2. No errors are reported: the Kitting.CreateKitOrder call is executed.
3. When the call succeeds, the CGroup view is refreshed and the grid is placed on the newly created order.
DeleteKit
Delete the kit order.
1. Only active if a kit order is selected/active.
2. When executed, a dialog is displayed asking confirmation and whether the user wants to move the remaining components to a new location:
Move remaining parts of the kit to a new location ?
MarkAsChecked
'Mark as checked' verifies current line. 1. Only active if a detail line is active and it is not checked yet. 2. Asks the user for confirmation 3. If user confirms, executes the service call Kitting.MarkAsVerified.
ModifyKitQuantity
'Modify Kit Quantity' modifies the quantity of the kit. 1. Only active when a kit is selected. 2. When executed, it asks for a new quantity using inputquery:
Enter new kit quantity:
ModifyKitArticleQuantity
"Modify article Quantity' modifies the article quantity for the current article. 1. Only active when an article line is active. 2. When executed, asks for a new quantity using inputquery:
Enter new kit article ":Artcode" quantity:
Tables/Views
- SUPPLIERS for the supplier combobox (global lookup)
- KittingArticles for the article combobox (global lookup)
- CGROUP for the list of previous orders.
- LOCATION for a list locations (popup new kit, popup delete kit)
- KitOrderDetails is the following view:
Select A.LINKEDARTCODE as ArtCode, A.QTY as UnitQTY, sum(B.QTY) AS TQTY, sum(B.QTYCF) AS T_PK_QTY FROM ARTICLELINK A, INNER JOIN OUTDETAILS B ON (A.LINKEDARTCODE=B.ARTCODE) AND (B.AVIZNO='KG'+:ID) WHERE (A.ARTCODE=:ArtCode) GROUP BY A.LINKEDARTCODE , A.QTY ORDER BY LINKEDARTCODE ASC
- KitSourceDetails is the following view:
SELECT DISTINCT B.ArtCode, B.StockCode, A.Location, A.ExpiryDATE, A.Lotno, B.QTY, B.QTYCF as PKQTY, B.ID FROM INVDETAILS A, INNER JOIN OUTDETAILS B ON (A.ID=B.INVOICENO) WHERE (B.AVIZNO='KG'+:ID) ORDER BY B.ARTCODE, A.LOCATION ASC
Needed Service Calls
Kitting.CheckKitOrderPossible
To check whether an order is possible, article code, stock code and quantity must be passed. Returns an array of error conditions.
Kitting.CreateKitOrder
Create a new kit order in the database. Supplier, article code, stock code, comments optional location and quantity must be passed. Returns the ID of the newly created CGROUP record.
Kitting.DeleteKitOrder
Delete a new kit order in the database.
Kitting.ChangeKitQuantity
Delete a new kit order in the database.