Form AddOrderArticle
- Unit name: Forms.Details.AddOrderArticle
- Form name: TOrderArticleForm
- Old form name: (unit3)
Synopsis
Form to add an article to an order.
Functionalities
- Article edit + search button. On enter key, ASearch action is executed, and focus is put on quantity spinedit
- Article description label.
- Quantity spinedit.
- Stockcode dropdown.
- Customs clearance radio group: Duty free/Duty cleared. (can be empty)
- Comments edit.
- Checkbox "Only consider articles from this client"
- Checkbox 'Customized picking'. On check, enabled and fill location grid. (ArticleStockPerLocation) The stock is filled on Customer (supplier) and on stockcode if a stockcode was selected.
- Location grid with checkboxes. A label displays the totally selected quantity. Disabled unless Checkbox is checked
- Warehouse stock grid, showing selected article stock (ArticleStock).
- Customs stock grid, showing selected article customs stock (ArticleCustomsStock)
Actions
Search
Search the requested article in the list of articles. 1. Active if the article edit is non-empty. 1. When executed, searches the article in the list of articles. 1. If the article is not found, an error is shown:
Article :Article is not found.
OK
- Not active unless a valid article was selected, all fields are filled (Qty>0), and if customized picking was selected, the sum of picked quantities equals or is larger than the asked quantity for the article.
- When executed, the following checks are done: Stockcode 25 may not be used, 75 must be used instead. Stockcode 99 may not be used, 75 must be used instead. If stockcode = 75, then customs clearance must have a value. (i.e itemindex may not be -1)
-
if customized picking was selected, a new custompickjob id is requested, and the selected locations are inserted using the custom pick job ID in Table CustomPickJob.
-
Action calls DeliveryControL.AddArticleToOrder
- The form is closed.
Cancel
Always active.
Tables/Views
- Article (global lookup)
- ArticleStock
SELECT STOCKCODE AS STC, SUM(QTYIN-ISNULL(QTYOUT, 0)) AS QTY, ORDID FROM FSTOCTOTAL(:ArticleID) A left join STOCKCODE B on (A.STOCKCODE=B.NAME ) WHERE -- {CustomFilter} GROUP BY STOCKCODE, ORDID HAVING SUM(QTYIN-ISNULL(QTYOUT, 0))>0 ORDER BY ORDID asc
- ArticleCustomsStock
SELECT STOCKCODE AS STC, SUM(QTY) AS QTY FROM FSTOCTOTALCC(:ArticleID) GROUP BY STOCKCODE HAVING SUM(QTY)>0 ORDER BY stockcode asc
- ArticleStockPerLocation
SELECT STOCKCODE AS STC, LOCATION, ExpiryDate, LotNo, SUM(QTYIN-ISNULL(QTYOUT, 0)) AS QTY, ORDID FROM FSTOCTOTAL(:ArticleID) A left join STOCKCODE B ON (A.STOCKCODE=B.NAME) WHERE -- {CustomFilter} GROUP BY STOCKCODE, LOCATION, ExpiryDate, Lotno, ORDID HAVING SUM(QTYIN-ISNULL(QTYOUT, 0))>0 ORDER BY ORDID asc
Needed Service Calls
None.