Pickingjobs
Form PickingJobs
- Unit name: Forms.PickingJobs
- Form name: PickingJobsForm
- Old form name: unit3 (form3)
Synopsis
Form to select article pick job
Functionalities
- Combobox with clients for orders of the last 32 day (PickingRecentClients) On change, execute DisplayOrders action.
- Checkbox for NOT
- Button to execute ClearComboboxes action.
- Edit to enter order (or scan) On change, execute DisplayOrders action.
- Radiogroup to switch between sort orders 'country','Rows, Articles', 'Rows,Location'
- Grid with orders (PickingJobCandidates view). Must allow selecting multiple rows.
- Button to execute ContinuePicking action.
- Radiogroup to select picking order: 0 -> 99 or 99->0.
Actions
ClearComboboxes
- Active when either of the comboboxes is non-empty.
- When executed, clear both comboboxes, and display orders.
Displayorders
- Always active.
- Fetch records from view PickingJobs and display them in the grid.
- Filter records based on
- Combobox 1: Only records from Client. or NOT if checkbox is set.
- Edit with scan order: only this order is shown (from the selected client.)
- Sort records based on radiogroup setting.
ContinuePicking
- Active as soon as at least 1 row is selected.
- When executed, the selected invoices are added to the picking job using service call DeliveryControl.AddToPickJob The jobID is saved.
- PickItems form is shown. It is passed the following data:
- Picking job ID.
- The form is passed the sort order.
- PickingType is ptSingle if there is only 1 item, ptTrolley otherwise.
Tables/Views
-
PickingJobCandidates
Select BlockNo as Block, A.Country as Ct, Data as ImpDate, AVIZ as OrderNo, COUNT(distinct B.ARTCODE) as Rows, max(B.ARTCODE) as ART, max(D.Location) as Loc, isnull(c.SQ, 99) AS MySQ, F.SQPK from OUT A left outer join COUNTRYORDER C on (DATEPART(WeekDay, A.DATA) = C.DayOfWeek) AND (A.COUNTRY = C.COUNTRY) LEFT OUTER JOIN SUPPLIERS F ON A.CLIENT = F.NAME inner join OUTDETAILS B ON (A.AVIZ = B.AVIZNO) inner join INVDETAILS D on B.INVOICENO = D.ID and B.ARTCODE = D.ARTCODE WHERE (DATA >= dateadd(day, - 32, getdate()) and isnull(B.TRANSACTIONTYPE, '') = 'ORD' -- {CustomFilter} group by BlockNo, A.Country, Data, AVIZ, FileName, isnull(c.SQ, 99), F.SQPK having sum(CASE WHEN ISNULL(PICKEDBY, '') = '' THEN 1 ELSE 0 END) > 0 ORDER BY -- {CustomSort}
-
PickingRecentClients
Select distinct A.CLIENT from OUT A INNER JOIN OUTDETAILS B on (A.AVIZ=B.AVIZNO) WHERE (DATA>=dateadd(day, -32, getdate())) AND (TRANSACTIONTYPE='ORD') AND (PICKEDBY='') ORDER BY A.CLIENT