The Order History Main Page and Re-Order Page are currently showing individual order numbers (with alph suffix) instead of showing one line per 'master order'. The following programs will be modified to return information for the master order instead of returning individual order info. For some information, this will require summing up data from the individual orders:
- Order History Main Page - RPC$ORDER_GETBYFILTER should return the summary order information for the master order:
- SELECT will be changed to go off of the MASTERORDER.USR file instead of SOHDR. MASTERORDER.USR<1> is a multi-valued list of the individual order numbers with the alpha suffix. We will need the following new dictionaries for the MASTERORDER.USR file, using the order# from the first multi-value of field 1:
- STATUS - SOHDR<41>
- BILL.CNO - SOHDR<2>
- TAC.CODE - SOHDR<39>
- DATE - SOHDR<9>
- PO.NUM - SOHDR<28>
- ORDER.NBR - MASTER ORDER#
- CONTACT.NBR - SOHDR.USR<17>
- SLSORG - CUSTMST.USR<18> using BILL.CNO
- Return to the UI the list of Master Order Numbers meeting the selection criteria (instead of the individual order numbers):
- Modify LD.INCLUDES ORDER.READ to be master order# aware by getting static info (order date, po number, etc) from the first order# in the master order record but looking through all individual orders for the master order to arrive at a TOTAL.AMT. ORDER.READ can assume that KEY will always be the master order#.
- RPC$ORDER_GETBYFILTER should send KEY = Master Order#
- UNIT.COUNT calculation must sum the quantity ordered from all of the order numbers under this master order#
- Order Creation (Stock and MOD) - write the Master Order# (without suffix) to a new field in SOHDR.USR.
- RPC$ORDER_GETBYID:
- Should be setting KEY = Master Order# before including ORDER.READ. Investigate where this is getting called from so that we can ensure that this is happening. Worst case we would have to read the master order# from SOHDR.USR
- RPC$ORDER_GETBYCUSTID:
- SELECT will be changed to go off of the MASTERORDER.USR file instead of SOHDR. KEY should be set to the master order# before including ORDER.READ
- Saving 'order name' to MSTRORDHDR.USR:
- Setup new NAMED PARAM: ORDER.NAME
- Add field 2 to MSTRORDHDR.USR to store ORDER.NAME
- When creating stock and MOD orders, write order name passed to you in ORDER.NAME into MSTRORDHDR.USR<2>
- Remove DICT SOHDR.USR SHOP.CART.NAME (field 81) and modify order creation (stock and mod) to remove this updating
- In LD.INCLUDES ORDER.READ: Extract order name from MSTRORDHSR.USR<2> and pass to UI as NAME= (currently passing the shipto customer name)
- Order History Re-Order Page/Order Item Search: RPC$ORDERITEM_GETBYFILTER should return unique item numbers with the total qty ordered instead of showing the same part# multiple times with a partial quantity if it was split onto multiple orders (ie, ship and backorder):
- Modify SELECT in RPC$ORDERITEM_GETBYFILTER to use the new MSTRORDDET.USR file. You will need to create some new dictionaries for your select. Use the first order# from field 1 to get info like Customer#, Contact#, Slsorg, Order Date, Order Status. The dimensions (width, depth, length, gauge) would come from ITMMST if stock or MOD.ITMMST.USR if MOD. KEY should be set to Master Order# before INCLUDE ORDERITEM.READ
- LD.INCLUDES ORDERITEM.READ will need to work with the master order instead of an individual order. All programs using this include will use this master order logic:
- KEY will now be the MSTRORDDET.USR key (Master Order# * CPN/MOD Item#). Read the MSTRORDDET.USR record to get the individual SODET key(s) for the item.
- Remove 'line nbr' from DATAFIELDS return
- Retrieve Uom and Price from first SODET record (would be the same for the CPN/MOD#)
- Retrieve Config# from the only order under this master order that has this MOD#
- Qty Ordered: sum all SODET<3> (for all SODET Id's in this MSTRORDDET.USR)
- Qty Shipped: sum all SODET<4> (for all SODET id's in this MSTRORDDET.USR)
- Order Number = Master Order Number
- Status - return status (SODET<11>) of all SODET records ":" delimited
- Whs - return warehouse (SODET<32> of all SODET records ":" delimited
- Modify RPC$ORDERITEM_GETBYID to be master order aware:
- The UI side will be changed to pass the PART.NBR to you instead of the LINE.NBR (this hasn't been done yet). Change this routine to set KEY = Master Order# * PART.NBR before the ORDERITEM.READ INCLUDE.