Form PickAndPack
- Unit name: Forms.PickAndPack
- Form name: PickAndPackForm
- Old form name: unit121 (form121)
Synopsis
Form to manage picking & packing outgoing orders.
Functionalities
Show a list of outgoing orders (deliveries), and allow small corrections on these orders.
- A groupbox allows to select a filter for orders:
- Checkbox: Not picked
- Frame with Period: From Date, To date, with Presets: Today, This week, Last week, this month, last month, this year
- Combobox : Customers - show orders for this customer
- Combobox : Customers - Do not show orders for this customer
- Edit: Order Number (used in like) The settings make up the CustomFilter, FromDate and ToDate parameters for view PickPackOrderOverview.
- A read-only grid ("Order list") displays the results of PickPackOrderOverview
- Grid has a popup menu for the DeleteSelectedBlock MarkAsPickedAndChecked CancelOrder and ConfirmationFile actions.
- Labels for order count, picked count, not picked count.
- A second read-only grid ("Content of the selected order") below grid displays the results of PickPackOrderDetails. This grid is multi-select.
- Button for executing the ShowData action. (actual button). Default button!
- Button for executing the ResetOrderPickPack action.
- Button for executing the MarkAsPickedAndChecked action.
- Button for executing the CancelOrder action.
- Button for executing the ConfirmationFile action.
- Button for executing the ResetPickingScan action.
- Button for executing the ResetCheckingScan action.
- Button for executing the ResetPickingAndCheckingScan action.
- Button for executing the GenerateXML action.
- Button for executing the NutriInvoice action.
- Button for executing the CommercialInvoice action.
- Reports, see below.
Actions
ShowData
- Only enabled if a period was chosen.
- When executed, composes the filter and opens the PickPackOrderOverview
- Displays the total counts in the appropriate label:
- Count is record count.
- NotPickedCount is number of records where NotPk>0.
- PickedCount is number of records where NotPk=0.
ResetOrderPickPack
- Enabled when an order is selected.
- When executed, ask for confirmation.
- On confirm execute DeliveryControl.ResetOrderPickedChecked service call.
- After service call, refresh the PickPackOrderOverview view.
MarkAsPickedAndChecked
- Enabled when an order is selected.
- When executed, ask for confirmation, displaying the data from the DeliveryControl.GetOrderPickedCheckedCounts service call..
- On confirm execute DeliveryControl.MarkOrderPickedChecked service call.
- After service call, refresh the PickPackOrderOverview view.
CancelOrder
- Enabled when an order is selected.
- When executed, ask for confirmation.
- On confirm execute DeliveryControl.DeleteOrder service call.
- After service call, refresh the PickPackOrderOverview view.
ConfirmationFile
- Only enabled when there are orders.
- On execute, show ConfirmOrders form.
ResetPickingScan
- Active if there are 1 or more rows selected in the details grid.
- On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroPick operation.
ResetCheckingScan
- Active if there are 1 or more rows selected in the details grid.
- On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroCheck operation.
ResetPickingAndCheckingScan
- Active if there are 1 or more rows selected in the details grid.
- On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroBoth operation.
GenerateXML
- Displayed as 'Generate XML for current order'
- Only enabled if an order is selected.
- When executed, Generate XML for current order. This writes the following XML:
Where
<?xml version="1.0" encoding="UTF-8" ?> <!-- Note: created by Warta - LCW --> <order_status> <order_id>%orderno%</order_id> <status>shipped</status> <trackandtrace>%TrackingNumber%</trackandtrace> </order_status>
- OrderNo is the order number of the current order.
- TrackingNumber is obtained through DeliveryControl.GetOrderTrackingNumber
NutriInvoice
- Alleen actief als de klant van de huidige order nutri is.
- Bij execute wordt OrderType van de order in tabel OUT opgehaald. Dit is de OrderKey.
- Er wordt een check gedaan dat de length van de key 4 of groter is. Indien niet wordt een message getoond en wordt bevestiging gevraagd of er voortgegaan moet worden.
- Volgende URL wordt geopend in de browser (orderkey!):
http://www.nutri-direct.com/order_xml_data.php?pdf=1&oxid=:OrderKey&doc=invoice'
CommercialInvoice
Show PrintCommercialInvoice form.
Tables/Views
- Out voor order key nutri.
- PickPackOrderOverview voor grid 1.
Select
BlockNo,
Country,
Data as ImpDate,
A.AVIZ as OrderNo,
FileName,
A.CLIENT,
A.TrackingNumber,
A.FirstArticle as F_Article,
A.ArticleCount as A_COUNT,
CFGEN AS CF_GEN1,
CFGEN1 AS CF_GEN2,
CFGEN2 AS CF_GEN3,
sum(CASE
WHEN ISNULL(PICKEDBY, '') = '' THEN 1
ELSE 0
END) AS NotPk,
sum(CASE
WHEN ISNULL(PICKEDBY, '') = '' THEN 0
ELSE 1
END) AS Pk,
Min(TimeCF) AS StartPk,
Max(TimeCF) AS LastPk,
sum(CASE
WHEN ISNULL(CHECKEDBY, '') = '' THEN 1
ELSE 0
END) AS NotCk,
sum(CASE
WHEN ISNULL(CHECKEDBY, '') = '' THEN 0
ELSE 1
END) AS Ck,
Min(CHECKEDTIME) AS StartCk,
Max(CHECKEDTIME) AS LastCk
from
OUT A
INNER JOIN ON OUTDETAILS B ON (A.AVIZ = B.AVIZNO)
WHERE
(B.TRANSACTIONTYPE = 'ORD')
AND (Data Between (:FromDate and :ToDate))
-- {CustomFilter}
GROUP BY
BlockNo,
Country,
Data,
A.AVIZ,
FileName,
A.ORDERTYPE,
A.CLIENT,
A.TrackingNumber,
A.FirstArticle,
A.ArticleCount,
A.CFGEN,
A.CFGEN1,
A.CFGEN2
-- {CustomGroup}
ORDER BY
BLOCKNO DESC,
A.CLIENT,
OrderNo
- PickPackOrderDetails
SELECT
A.*,
B.LOCATION,
B.EXPIRYDATE,
B.LOTNO,
SQWPK,
HeavyFlag =(CASE
WHEN (isnull(WEIGHT, 0) > E.UWEIGHT or isnull(VOL, 0) >
E.UVOLUME or (A.qty * VOL) > E.TVOLUME) THEN 1
ELSE 0
END)
FROM
OUTDETAILS A
INNER JOIN INVDETAILS B ON (B.ID = A.INVOICENO)
LEFT OUTER JOIN ARTICLE C on A.ARTCODE = C.NAME
LEFT OUTER JOIN Location D ON B.LOCATION = D.LOCATION
PickingParams E
WHERE
(AVIZNO = :OrderID)
ORDER BY
HeavyFlag DESC,
D.sqwpk,
A.artcode
Needed Service Calls
DeliveryControl.ResetOrderPickedChecked
Called by ResetOrderPickPack action
DeliveryControl.GetOrderPickedCheckedCounts
Called by MarkAsPickedAndChecked action.
DeliveryControl.MarkOrderPickedChecked
Called by MarkAsPickedAndChecked action.
DeliveryControl.DeleteOrder
Called by CancelOrder action.
DeliveryControl.OrderResetScanPickCheck
Called by ResetPickingScan, ResetCheckingScan and ResetPickingAndCheckingScan Actions.
DeliveryControl.MarkOrdersAsPrinted
Called before printing NorwexDeliveryNote.
Reports
- OrderPickingList
- OrderPickPackList
- OrderDetails
- Displayed as "This order details"
- CustomFilter macro is passed as
OrderNo is the order to be sent.
(A.AVIZ = :OrderNo)
- OrderDetails
- Displayed as "Today's orders"
- CustomFilter macro is passed as
(A.Data = GetDate()) AND (B.TRANSACTIONTYPE = 'ORD')
- ArticlesToBeCleared
- Displayed as "Articles to be cleared"
- PackingListGeneralPurpose
- Displayed as "Packing list for current order"
- OrderContent
- Displayed as "Detailed content for current order"
- NorwexDeliveryNote
- Displayed as "Norwex delivery note"
- Before print, the service call deliverycontrol.MarkOrdersAsPrinted is called, passing it the current order ID (OrderID)