Ga naar inhoud

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.

  1. A groupbox allows to select a filter for orders:
  2. Checkbox: Not picked
  3. Frame with Period: From Date, To date, with Presets: Today, This week, Last week, this month, last month, this year
  4. Combobox : Customers - show orders for this customer
  5. Combobox : Customers - Do not show orders for this customer
  6. Edit: Order Number (used in like) The settings make up the CustomFilter, FromDate and ToDate parameters for view PickPackOrderOverview.
  7. A read-only grid ("Order list") displays the results of PickPackOrderOverview
  8. Grid has a popup menu for the DeleteSelectedBlock MarkAsPickedAndChecked CancelOrder and ConfirmationFile actions.
  9. Labels for order count, picked count, not picked count.
  10. A second read-only grid ("Content of the selected order") below grid displays the results of PickPackOrderDetails. This grid is multi-select.
  11. Button for executing the ShowData action. (actual button). Default button!
  12. Button for executing the ResetOrderPickPack action.
  13. Button for executing the MarkAsPickedAndChecked action.
  14. Button for executing the CancelOrder action.
  15. Button for executing the ConfirmationFile action.
  16. Button for executing the ResetPickingScan action.
  17. Button for executing the ResetCheckingScan action.
  18. Button for executing the ResetPickingAndCheckingScan action.
  19. Button for executing the GenerateXML action.
  20. Button for executing the NutriInvoice action.
  21. Button for executing the CommercialInvoice action.
  22. Reports, see below.

Actions

ShowData

  1. Only enabled if a period was chosen.
  2. When executed, composes the filter and opens the PickPackOrderOverview
  3. Displays the total counts in the appropriate label:
  4. Count is record count.
  5. NotPickedCount is number of records where NotPk>0.
  6. PickedCount is number of records where NotPk=0.

ResetOrderPickPack

  1. Enabled when an order is selected.
  2. When executed, ask for confirmation.
  3. On confirm execute DeliveryControl.ResetOrderPickedChecked service call.
  4. After service call, refresh the PickPackOrderOverview view.

MarkAsPickedAndChecked

  1. Enabled when an order is selected.
  2. When executed, ask for confirmation, displaying the data from the DeliveryControl.GetOrderPickedCheckedCounts service call..
  3. On confirm execute DeliveryControl.MarkOrderPickedChecked service call.
  4. After service call, refresh the PickPackOrderOverview view.

CancelOrder

  1. Enabled when an order is selected.
  2. When executed, ask for confirmation.
  3. On confirm execute DeliveryControl.DeleteOrder service call.
  4. After service call, refresh the PickPackOrderOverview view.

ConfirmationFile

  1. Only enabled when there are orders.
  2. On execute, show ConfirmOrders form.

ResetPickingScan

  1. Active if there are 1 or more rows selected in the details grid.
  2. On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroPick operation.

ResetCheckingScan

  1. Active if there are 1 or more rows selected in the details grid.
  2. On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroCheck operation.

ResetPickingAndCheckingScan

  1. Active if there are 1 or more rows selected in the details grid.
  2. On Execute, calls DeliveryControl.OrderResetScanPickCheck with the order id, IDs of selected rows and the sroBoth operation.

GenerateXML

  1. Displayed as 'Generate XML for current order'
  2. Only enabled if an order is selected.
  3. When executed, Generate XML for current order. This writes the following XML:
    <?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>
    
    Where
  4. OrderNo is the order number of the current order.
  5. TrackingNumber is obtained through DeliveryControl.GetOrderTrackingNumber

NutriInvoice

  1. Alleen actief als de klant van de huidige order nutri is.
  2. Bij execute wordt OrderType van de order in tabel OUT opgehaald. Dit is de OrderKey.
  3. 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.
  4. 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

  1. OrderPickingList
  2. OrderPickPackList
  3. OrderDetails
  4. Displayed as "This order details"
  5. CustomFilter macro is passed as
    (A.AVIZ = :OrderNo)
    
    OrderNo is the order to be sent.
  6. OrderDetails
  7. Displayed as "Today's orders"
  8. CustomFilter macro is passed as
    (A.Data = GetDate()) AND (B.TRANSACTIONTYPE = 'ORD')
    
  9. ArticlesToBeCleared
    • Displayed as "Articles to be cleared"
  10. PackingListGeneralPurpose
  11. Displayed as "Packing list for current order"
  12. OrderContent
  13. Displayed as "Detailed content for current order"
  14. NorwexDeliveryNote
  15. Displayed as "Norwex delivery note"
  16. Before print, the service call deliverycontrol.MarkOrdersAsPrinted is called, passing it the current order ID (OrderID)