For tracking order shipments, create a new program to return to the UI all shipment info about a master order. We will start with a copy of the current site's tracking program, then will make the new program master-order aware.
Modify LDLIB RPC$SHIPMENTITEM_GETBYFILTER (timeline 21-1):
- Modify existing mobile site program RPC$SHIPMENTITEM_GETBYFILTER (the mobile site is now obsolete and no longer runs, so we can reuse this program). Make sure this gets tracked on PRC.
- Master Order logic that you see in this program relates to 'ship with' logic, where one order (the master) contains all tracking info and the orders that shipped with the master don't have any shipping info. This logic stays.
- For the new master order logic, you must put the master order back together by part number (or MOD Item#) using file MSTRORDDET.USR (see LD.INCLUDES ORDER.ITEM to see how this is done). Basically if a stock item was split between two orders, present it as a single line item again, listing all of its shipments with tracking info. John would like us to avoid including ORDER.READ or ORDERITEM.READ because by the time they click on 'tracking' in order history, the UI side already has all of this info. So this program will need to read all info needed for just the tracking screen without including any .READS.
- The UI will not be passing an individual line number, so you can remove that logic. It always wants all shipment info for the entire master order.
- This program needs to gather all shipment info: from SHIPTRN/SHIPTRN.USR for today's shipments and from ICEHDRHST/USR for prior day's invoiced shipments. This program currently only has ICEHDRHST shipments ... see RPC$SHIPMENT_GETBYFILTER for the SHIPTRN logic that will need to exist in this program.
- The UI will pass you the Master Order# in ORDER.NBR
- You can refer to the wireframe in Order History/Tracking to see what the screen looks like. Here's the info that you need to pass back to the UI in DATAFIELDS:
- Order Date (SOHDR<9>)
- P/O number (SOHDR<28>)
- Order Name (MSTRORDHDR.USR<2>)
- Stock Item Number or MOD Item# (SODET<1> to ITMMST<1>)
- You do not need to pass the item description. The UI side will have that info and will only require the part# to find it.
- Total Order Qty for the Item# (summing from all individual orders that this item is on)
- Shipped Qty for each shipment (SODET<16,X>). If shipped from two warehouses, these should show separately.
- Uom (SODET<2>)
- Ship Date (SODET<18,X>)
- Carrier Name (using ship via in SODET<17,X> get from SYSTBL "VIA*")
- Tracking# (from SHIPTRN.USR or ICEHDRHST.USR) – if no shipments yet, pass back 'expected ship date' from SOHDR<12>
- Pass all info back in DATAFIELDS