The following logic will be added to the Create Sales Order Process (for both Stock and MOD orders):
- Write the shopping cart name to SOHDR.USR<81> (create dictionary and update SYSFILES)
- When c/e (or anyone from Laddawn) creates the order, write the order source to SOHDR<15> as follows. If a customer is creating the order, leave the order source as "WEB":
- If c/e request source = 01 (phone), write order source as "100"
- If c/e request source = 02 (fax), write order source as "005"
- If c/e request source = 03 (email), write order source as "EML"
- If any other request source (other), write order source as "100"
- See NOTES below for info on c/e request source
- 1% web discount - if c/e is converting the quote or creating a stock order on behalf of the customer, no web discount% s/b written to SODET<7>. If customer, continue to write the web discount to the order. You will know if it's c/e by the info in Operator Initials (see below).
- If c/e, write the operator initials (SYSTBL "OER") to SOHDR<82>. If not, continue to write "WEB".
- When creating a new 'shipto' customer during order creation, make sure that the Ship Via in CUSTMST<6> gets set to "BW" (regardless of the ship via on the order being created).
NOTES:
- Before you will be able to code some of this logic, you will need to write a separate program that John will provide specs for that will carry around Avante info that the web will need (ie, c/e request#, c/e request source, Operator Initials, etc). There will be something in the Wiki under programming called "Programming Specs - Avante Web Interface" for you use.
12/2/13 - Add'l Order Updating:
- For both Stock and MOD Orders - set the FOB Code in SOHDR<52> = "CPU" when SHOPPINGCART.USR<43> = 1 (CPU Flag).
- For Stock Orders Only - Must Ship Today Logic:
- Write internal TIME() to a new SOHDR.USR field - this is the time that the order was created
- When looping through new bundling fields to create stock orders, check the bundle ship date (field 48 defined below). If the bundle ship date = Today, set the 'must ship today' flag in SOHDR.USR<10> as follows:
- If TIME() <= 11:00am, set the flag = 2 (automated flag)
- If TIME() > 11:00am, set the flag = 1 (user manually chose to ship today)
- 12/19 - Replace the hardcoded 11:00 with AM Cutoff Time from SYSCON "SHIP.CUTOFF.LAD" field 3, which is by warehouse. Check the bundle warehouse's cutoff time to determine the cutoff time for the auto setting of must ship today flag.
- Create new DICT's in SHOPPINGCART.USR for the bundling screen (Janice will write these fields when bundling is okayed):
File: SHOPPINGCART.USR
F47.M: Bundle Number
F48.M: Bundle Date
F49.M: Bundle Date Type (Arrive On / Ship On)
F50.M: Bundle Warehouse Number
F51.M: Bundle Ship Via
F52.M: Bundle Shipping Paid By (FOB Code)
F53.M.m: Bundle Item IDs
F54.M.m: Bundle Item Qty
M=Multi-valued; m=Sub-valued (associated with each multi-valued field)
12/19/13 - Add'l logic:
- In RPC$CREATE_STOCKORDER, change the DATE.TYPE logic from a hardcoded 0 to:
- If SHOPPINGCART.USR<59,bundle#> = '', then set DATE.TYPE = 0 else set DATE.TYPE = <59,bundle#>