Laddawn.com : Programming Specs-User Preference Defaults for Shipping/CE

In order to send user preference defaults to processes like User Profile Setup and Bundling and to update CUSTMST.USR with preference settings, the following programs will be established.  The database program may be called directly (ie, from bundling) and will also be called by the CUSTOMER.READ INCLUDE so that all shipping default info is available to any process using this INCLUDE (ie, User Profile).

 

Establish the following new fields in CUSTMST.USR, starting with the next available field.  Also update SYS3002 (timeline 57-2): 

SHIPPING & CE SCREENS - Individual Locations:

Shipping Screen: Carrier Selections (Individual Locations - including billto):

  • Default Carrier Code - Large Shipments (LTL.CARR.PREF - 3A/N)
  • Default Freight Terms Code- Large Shipments (LTL.FOB.PREF - 3A/N)
  • Freight Account# - Large Shipments (LTL.FRTACCT.PREF - 16A/N)
  • Freight Address 1-4 - Large Shipments (LTL.FRTADD1.PREF through LTL.FRTADD4.PREF - all 25A/N)  *** 4/15/14 - added 3 new fields to store CITY, STATE, ZIP separately (leaving ADD3 for display of 3 fields together when needed)
  • Default Carrier Code - Small Shipments (SPKG.CARR.PREF - 3A/N)
  • Default Freight Terms Code- Small Shipments (SPKG.FOB.PREF - 3A/N)
  • Freight Account# - Small Shipments (SPKG.FRTACCT.PREF - 16A/N)
  • Freight Address 1-4 - Small Shipments (SPKG.FRTADD1.PREF through SPKG.FRTADD4.PREF - all 25A/N)  *** 4/15/14 - added 3 new fields to store CITY, STATE, ZIP separately (leaving ADD3 for display of 3 fields together when needed)

Shipping Screen: Pallets (Individual Locations - including billto):

  • 40x48 4-way (this is customer comment# 005, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field
  • Max Pallet Height (this is customer comment# 008, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field
  • Export Pallet (this is customer comment# 006, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field

Shipping Screen: Paperwork (Individual Locations - including billto):

  • Print P/O on Paperwork (PPRWORK.PO.PREF - 0=NO;1=YES)
  • Print Customer P/O on Paperwork (PPRWORK.CUSTPO.PREF - 0=NO; 1=YES)

Shipping Screen: Labels (Individual Locations - including billto):

  • Print P/O on Labels (LABEL.PO.PREF - 0=NO; 1=YES)
  • Print Customer P/O on Labels (LABEL.CUSTPO.PREF - 0=NO; 1=YES)

Shipping Screen: Delivery (Individual Locations - including billto):

  • Call for Delivery Appointment (this is customer comment# 108, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>)  *** Doesn't require a new field 
  • Receiving Hours (this is customer comment# 109, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>)  *** Doesn't require a new field

Shipping Screen: Carrier Options (Individual Locations - including billto):

  • Inside Delivery (this is customer comment# 105, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>)  *** Doesn't require a new field
  • Lift Gate Delivery (this is customer comment# 107, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>)  *** Doesn't require a new field
  • Tailgate Delivery (this is customer comment# 106, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>)  *** Doesn't require a new field 

Shipping Screen: Comments Preference Override (Individual Locations - including billto):

This field will hold a multi-valued list of global comment#(s) that the individual location doesn't want (ie, this is like 'unchecking' the comment box)

  •  Bypass Global Comment# (BYPASS.GLBL.COMM - 3A/N - MULTIVALUED)

 

CE Screen: Do not Ship Via (Individual Locations - including billto):

  • Do not Ship Via Carrier Codes *** Doesn't require a new field - USE EXISTING FIELD 95 IN CUSTMST.USR

CE Screen: Backorder Situations (Individual Locations - including billto):

  • Backorder Handling (BO.HNDL.PREF - 0=Let Laddawn Decide; 1=Always Ship Complete; 2=Always Ship & B/O)

CE Screen: Special Instructions (Individual Locations - incuding billto):

  • Bill of Lading Free-Form Comment (this is customer comment# 133, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field
  • Attach Load Tags to Pallet (this is customer comment# 111????, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field
  • Attach Documents (this is customer comment# ????, that lives in CUSTMST<53> and CUSTMST.USR<63>-<65>) *** Doesn't require a new field
  • No MOD Overruns (NO.OVERRUN.PREF - Allow O/Run? 1=yes; 0=no for consistency with QUHDR.USR<5>)

CE Screen (CE Managers Only) - Individual Locations including billto:  *** added 4/15/14 - these are new individual location fields.

INSERT THESE FIELDS AT END OF INDIVIDUAL LOCATION AND PUSH THE RESERVED FIELDS DOWN

  • Always Quote Full Gauge - (ALWAYS.FG - 0=NO; 1=YES)
  • No Cradlepack - (NO.CRADLEPACK - 0=NO; 1=YES)
  • Ship Only Via - Large Shipments  -  (LTL.SHIPONLY.VIA - 3A/N)
  • Ship Only Via - Small Shipments - (SPKG.SHIPONLY.VIA - 3A/N)
  • Bypass Global Free Form Comments - (BYPASS.GLBL.BLANKCOMM - 3A/N) ***4/17/14 - delete this dictionary  The individual location free-form comment numbers will go into CUSTMST<53>/CUSTMST.USR<63>-<65>) - no new field reqd. 11/25/14: If 000 comments are changed on an individual shipto, the entire set of 000 comments are written to the individual customer.  If all 000 are deleted on an individual shipto, a single "000" will be written to the global override field 126.

   

****   RESERVE 10 FIELDS HERE FOR EXPANSION OF 'INDIVIDUAL LOCATIONS' BEFORE STARTING 'GLOBAL' 

  

SHIPPING & CE SCREENS - Global (All Locations)

Note: All global fields will be stored in the Billto Customer's user record.  The billto customer will also have 'individual location' fields like any other customer.

Shipping Screen: Carrier Selections (Global - All Locations):

  • Global Carrier Code - Large Shipments (GLBL.LTL.CARR.PREF - 3A/N)
  • Global Freight Terms Code- Large Shipments (GLBL.LTL.FOB.PREF - 3/AN)
  • Global Freight Account# - Large Shipments (GLBL.LTL.FRTACCT.PREF - 16A/N)
  • Global Freight Address 1-4 - Large Shipments (GLBL.LTL.FRTADD1.PREF through GLBL.LTL.FRTADD4.PREF - 25A/N) *** 4/15/14 - added 3 new fields to store CITY, STATE, ZIP separately (leaving ADD3 for display of 3 fields together when needed)
  • Global Carrier Code - Small Shipments (GLBL.SPKG.CARR.PREF - 3A/N)
  • Global Freight Terms Code- Small Shipments (GLBL.SPKG.FOB.PREF - 3A/N)
  • Global Freight Account# - Small Shipments (GLBL.SPKG.FRTACCT.PREF - 16A/N)
  • Global Freight Address 1-4 - Small Shipments (GLBL.SPKG.FRTADD1.PREF through GLBL.SPKG.FRTADD4.PREF - 25A/N) *** 4/15/14 - added 3 new fields to store CITY, STATE, ZIP separately (leaving ADD3 for display of 3 fields together when needed)

Shipping Screen: Pallets (Global - All Locations):

Setup 3 new fields to hold Global Comment Numbers and their associated Inputs: 

  • Global Comment Numbers (GLBL.COMM.NBR - 3A/N)
  • Global Comment Input1 (GLBL.COMM.INPUT1 - 10A/N)
  • Global Comment Input2 (GLBL.COMM.INPUT2 - 10A/N)

These are the two global pallet comments that will be allowed: 

  • 40x48 4-way (this is customer comment# 005 - no inputs)
  • Max Pallet Height (this is customer comment# 008 - has input1)

Shipping Screen: Paperwork (Global - All Locations):

  • Print P/O on Paperwork (GLBL.PPRWORK.PO.PREF - 1=Yes; 0=No)
  • Print Customer P/O on Paperwork (GLBL.PPRWORK.CUSTPO.PREF - 1=Yes; 0=No)

Shipping Screen: Labels (Global - All Locations):

  • Print P/O on Labels (GLBL.LABEL.PO.PREF - 1=Yes; 0=No)
  • Print Customer P/O on Labels (GLBL.LABEL.CUSTPO.PREF - 1=Yes; 0=No)

  

CE Screen: Do not Ship Via (Global - All Locations):

  • Do not Ship Via Carrier Codes (GLBL.CARR.EXCEPT - 3A/N)

CE Screen: Backorder Situations (Global - All Locations):

  • Backorder Handling (GLBL.BO.HNDL.PREF - 0=Let Laddawn Decide; 1=Always Ship Complete; 2=Always Ship & B/O)

CE Screen: Special Instructions (Global - All Locations):

These global comments will live in the global comments field setup above:

  • Bill of Lading Free-Form Comment (this is customer comment# 133)
  • Attach Load Tags to Pallet (this is customer comment# 111????)
  • Attach Documents (this is customer comment# ????)

CE Screen: Price Discrepancy (Global - All Locations):

  • Do not call for price discrepancy (GLBL.PRICE.DISCREP.PREF - 1=Yes (don't call); 0=default - call)

 

CE Screen (CE Managers Only) - Global - All Locations:  *** added 4/15/14 - these are new global fields for ce managers:

INSERT THESE FIELDS AT END OF THE EXISTING GLOBAL FIELDS

  • No MOD Overruns (GLBL.NO.OVERRUN.PREF - Allow O/Run? 1=yes; 0=no for consistency with QUHDR.USR<5>)  *** NOTE: The individual location setting of this field has already been defined and programmed
  • Always Quote Full Gauge - (GLBL.ALWAYS.FG - 0=NO; 1=YES)
  • No Cradlepack - (GLBL.NO.CRADLEPACK - 0=NO; 1=YES DON'T CHOOSE CRADLEPACK)
  • Ship Only Via - Large Shipments  -  (GLBL.LTL.SHIPONLY.VIA - 3A/N)
  • Ship Only Via - Small Shipments - (GLBL.SPKG.SHIPONLY.VIA - 3A/N)
  • NOTE: Global free-form comments will be stored as 000 comments in the new global comments fields defined above

 

Establish named params for all new fields (timeline 57-3):

Create a named param for the following.  We only need a single set of named params since we will either be working on 'individual' OR 'global', never both at the same time.  After the named params have been created, RUN IIUTIL MAKE.NAMED.PARAMS then recompile all BP and LDLIB programs that contain INCLUDE BP.INCLUDES LAD.COMMON:

  • SHIPVIALTL (LTL carrier code)
  • FREIGHTPAYLTL (LTL FOB Code)
  • SHIPVIA (Small Pkg carrier code)
  • FREIGHTPAY (Small Pkg FOB Code)
  • FREIGHTPAYLTLACCT (Freight Account#)
  • POONLABEL (Print P/O on Label)
  • DSPOONLABEL (Print Customer P/O on Label)
  • POONPSLIP (Print P/O on Paperwork)
  • DSPOONPSLIP (Print Customer P/O on Paperwork)
  • DONOTSHIPVIA (Do not Ship via)
  • BOHANDLING (Backorder Handling)
  • NOOVERRUN (No Overrun)
  • New set of LTL fields for TPTY fields (4/15/14)
  • Two new sets of City, State, Zip fields (LTL and SPKG)
  • New fields added 4/15 *** ONLY NEED SINGLE SET BECAUSE WILL ONLY BE WORKING ON INDIVIDUAL LOCATION OR GLOBAL
  • 4/17/14 - add GLBL.VIEWCOMM  (these are the 000 comments that are stored on the billto's record in the 'global comments' fields - no input1/input2 required) *** these comments are for viewing only by c/e reps
  • 4/17/14 - add INDIV.VIEWCOMM (these are the 000 comments that are stored on the individual location's comments field - no input1/input2 required) *** these comments are for viewing only by c/e reps

Note:  CUST.NBR will either be set to "ALL" if working with global settings or the individual Shipto Customer#.  BILLTO.NBR will always be set to the billto customer#.

Note:  Freight Address named params already exist (TPTY.CONAME, TPTY.ADD1, TPTY.ADD2, TPTY.ADD3).  We will use existing PKGCOMM.NBR, PKG.INPUT1, PKG.INPUT2 to handle pallet comments, delivery comments, carrier comments, and special instructions.

 

New BP WEB.GET.PREFDEFAULTS (timeline 57-4):

This new program will be available to any back-end program to establish customer preferences.  It will setup the global preferences first, then look for overrides on the individual shipto location.  If the corresponding field in the individual shipto isn't null, this indicates an override to the global preference.  For comments, we have added a 'bypass' field so that the global comment can be ignored. All preferenes will be passed in/out via the argument list in an array format.

  • Accept an empty array in argument list
  • UI will always send you the following named params:
    • CUST.NBR - this will either be the shipto customer# (if from bundling) or the 'Individual Location' (if from Profile) or "ALL" (if global preference)
    • BILLTO.NBR - this will always be the billto number
  • If CUST.NBR = "ALL", read the billto customer record and user record.  Extract and return all global preferences.  This option would only be used from the My Account-Profile 'global preference' screen.
  • If CUST.NBR # "ALL", read the shipto customer record/user record as well as the billto customer record/user record (as long as billto isn't the same as the shipto).  If the billto# is the same as the shipto#, they are either shipping to themselves (from bundling) or they are setting up indivual location preferences for the billto (not global - only applies to the billto customer)
  • Load up array** (see below) with all preferences (see dictionaries created above), starting with Global Preferences from the billto customer record first
  • Once the global preferences have been written, override the global preferences with the 'shipto' preferences ONLY IF THEY AREN'T NULL.  Note that the billto customer could also be the shipto customer.  In this case you are overriding the global with the billto's individual location preferences.  It doesn't matter what kind of customer is in CUST.NBR ... always override the global preferences with the CUST.NBR preferences.  For global comment fields, don't return the global comment# if the comment# is found in the 'bypass comment' field of the individual location.  4/17/14 - don't include "000" comments in this list
  • 4/17/14 - using BILLTO.NBR - read all '000' comments out of the 'global comments' for the billto.  using SHIPTO.NBR (if not null) - read all '000' comments out of the individual location's comments field.
  • The array will be returned to the calling program via the argument list.

** Array Updating:

  • First load up the array with 'global' settings.  You will find this on the billto customer# (BILLTO.NBR) in the global fields.
  • If CUST.NBR = "ALL" (working on global settings), you are all done.  Just return the array to the calling process.
  • If CUST.NBR # "ALL":  Read shipto customer using CUST.NBR (note: if CUST.NBR=BILLTO.NBR, you've already read the record)
  • Loop through the shipto customer's individual location settings in fields 96-116 looking for overrides to the global settings
  • IF NOT A COMMENT FIELD: If the individual shipto location's field isn't null, overlay the global setting in the array.  If the field is null, don't do anything (leave the global setting in the array)
  • If a comment field: loop through 'bypass global comments' in the shipto customer's field 114.  Remove all of these comments from array 15-17.  Then add any comments from the shipto USR record comment fields <63>-<65> that don't already exist in 15-17 ***only comment numbers 005, 006, 008, 105, 106, 107, 108, or 109.  *** 4/17/14 - bypass "000" comments here.

 Array layout:

  • <1> = Carrier Code - Large Shipments (Global field 127; individual location field 96)  *** 5/30/14 - THIS WILL BE OVERRIDDEN W/CE 'SHIP ONLY VIA' LARGE/SMALL CHOICE IF ONE EXISTS (Global 167; indiv field 124)
  • <2> = Freight Terms Code- Large Shipments (Global field 128; indiv loc field 97)
  • <3> = Freight Account# - Large Shipments (Global field 129; indiv loc field 98)
  • <4> = Freight Address 1 - Large Shipments  (Global field 130; indiv loc field 99)
  • <5> = Freight Address 2 - Large Shipments  (Global field 131; indiv loc field 100)
  • <6> = Freight Address 3 - Large Shipments  (Global field 132; indiv loc field 101)
  • <7> = Freight Address 4 - Large Shipments  (Global field 133; indiv loc field 102)
  • <8> = Carrier Code - Small Shipments (Global field 134; indiv loc field 103)   *** 5/30/14 - THIS WILL BE OVERRIDDEN W/CE 'SHIP ONLY VIA' LARGE/SMALL CHOICE IF ONE EXISTS (Global 168; indiv field 125)
  • <9> = Freight Terms Code- Small Shipments (Global field 135; indiv loc field 104)
  • <10>=Freight Account# - Small Shipments (Global field 136; indiv loc field 105)
  • <11>=Freight Address 1 - Small Shipments (Global field 137; indiv loc field 106)
  • <12>=Freight Address 2 - Small Shipments (Global field 138; indiv loc field 107)
  • <13>=Freight Address 3 - Small Shipments (Global field 139; indiv loc field 108)
  • <14>=Freight Address 4 - Small Shipments (Global field 140; indiv loc field 109)
  • <15>=Comment Numbers  (Global field 141; indiv loc fields from CUSTMST.USR <63-65>)
  • <16>=Comment Input1 (Global field 142; indiv loc fields from CUSTMST.USR <63>-<65>)
  • <17>=Comment Input2 (Global field 143; indiv loc fields from CUSTMST.USR <63-65>)
  • <18>=Print P/O on Paperwork (Global field 144; indiv loc field 110)
  • <19>=Print Customer P/O on Paperwork (Global field 145; indiv loc field 111)
  • <20>=Print P/O on Labels (Global field 146; indiv loc field 112)
  • <21>=Print Customer P/O on Labels (Global field 147; indiv loc field 113)
  • <22>=Do not Ship Via Carrier Codes (Global field 148; indiv loc field 95)
  • <23>=Backorder Handling (Global field 149; indiv loc field 115)
  • <24>=No Overrun (indiv only - field 116)
  • <25>=Do not call for price discrepancy (global only - 150)
  • <26>=Global Free Form Comments (000 comments) *** added 4/17/14
  • <27>=Individual Location Free Form Comments (000 comments) *** add 4/17/14

 

Modify BP.INCLUDES CUSTOMER.READ to return Customer Preferences (timeline 57-5): 

  • Call BP WEB.GET.PREFDEFAULTS
  • Return all preference fields to the UI in DATAFIELDS (use same name in RETURN.VALUE that you used in named params where possible)
  • Check all programs using this INCLUDE and make sure that all still compile.  If not, make needed changes. 
  • 4/17/14 - when sending along fields 26 and 27 to the UI, change value marks to line feed (CHAR(10))

Note: The UI will call RPC$CUSTOMER_GETBYID, which has the CUSTOMER.READ INCLUDE so will get all preference info via DATAFIELDS

 

New LDLIB RPC$CUSTOMER_PREFSAVE (timeline 57-7):

Create a new LDLIB RPC$CUSTOMER_PREFSAVE that the UI will call when the user selects SAVE from the My Account-Profile Shipping & CE Preferences Screens.  Using the named params established above, update the CUSTMST.USR record with selected preferences.

The UI will pass this information back via named params when user selects Save/Continue on Profile Preferences screen.

  • Do not put any lock logic into this program yet.  We are in the process of designing the web lock logic, so this program will have lock logic added once the new program is in place.
  • If CUST.NBR = "ALL", you are updating the 'global' preference fields in the billto customer record using BILLTO.NBR.  Update only the global fields in the billto customer's record.  For global comments, remove comments from <141>-<143> the comment# isn't passed back in PKGCOMM.NBR.  This means they have unchecked the global comment.  Write customer record and you are done.
  • If CUST.NBR # "ALL", you are updating the 'individual location' preferences for the customer# in CUST.NBR.
  • When updating an individual location, do not write any fields whose contents match the global preference.  This is because when the preferences were originally extracted and sent to the UI, we first set the global preferences and then overlay them with any exceptions from the individual shipto customer.  When saving individual location preferences, we only want to save the location-specific preferences, not the ones where they have accepted the global preferences.  To do this, read the global preferences from CUSTMST.USR for the BILLTO.NBR, then compare the global preferences to the individual location preferences that were returned to you in named params.  Where they match, do not write that field to the shipto customer record.  This is for any field that is not a comment.
  • 4/17/14 - Using param GLBL.VIEWCOMM, change line feed (CHAR(10)) to value mark and replace all '000' comments in the 'global comments' field with these comments.  Before writing, make sure no single comment is greater than 65 characters.  If so, split into multiple  '000' comments of 65 characters max by breaking on the word before the 65 character point.
  • 4/17/14 - Using param INDIV.VIEWCOMM, change line feed (CHAR(10)) to value mark and replace all '000' comments in the 'ndividual location's comments field with these comments.Before writing, make sure no single comment is greater than 65 characters.  If so, split into multiple  '000' comments of 65 characters max by breaking on the word before the 65 character point.
  • When updating an individual location - COMMENTS FIELD: Determine which global comments they unchecked on the individual location, and which comments that are not in the global may have been added to the individual location:

Input params from the UI - these are colon delimited, holding the comment nbr and associated input1/input2: PKGCOMM.NBR, PKG.INPUT1, PKG.INPUT2

  • READ GLOBAL.COMMENTS  FROM CUSTMST, BILLTO.NBR,  FIELD 141
  • BYPASS.COMMENTS = GLOBAL.COMMENTS
  • LOCATION.COMMENTS = PKGCOMM.NBR - change ":" to VM
  • FOR X = 1 TO DCOUNT(LOCATION.COMMENTS, VM)    ;* Loop through comments that were sent from UI - these were still checked on the screen
  •    LOCATE LOCATION.COMMENT<1,X> IN GLOBAL.COMMENTS THEN  ;* this means that the global comment wasn't 'unchecked' on the screen for the indivdiual location
  •       LOCATE AND DELETE LOCATION.COMMENT<1,X> FROM BYPASS.COMMENTS   ;* we aren't going to set this as a global bypass because it's still checked on the screen
  •       DELETE LOCATION.COMMENT<1,X>   ;* We aren't going to store this in individual location because it's a global comment
  •    END ELSE
  •      *DIDN’T FIND THE LOCATION IN THE GLOBAL COMMENTS, DO NOTHING   ;* this was a comment that isn't in the global field... the preference is specific to this individual shipto customer.
  •    END
  • NEXT I

Example1 - global has 3 comments, 111, 222, 333.  The UI returns that only 222 is still checked (111 and 333 were unchecked).

GLOBAL.COMMENTS = 111]222]333

BYPASS.COMMENTS = 111]222]333

LOCATION.COMMENTS = 222   ;* SCREEN RETURNS JUST 222  (THEY UNCHECKED 111 AND 333)

START THE 'FOR X' LOGIC

BYPASS.COMMENTS = 111]222]333    ;* These are the comments that need to be written to the field 114 (bypass global comments) because they were unchecked on the screen.  222 has been deleted (see strikethrough)

LOCATION.COMMENTS = ‘’   ;* MEANS WE HAVE NOTHING TO WRITE TO LOCATION

SHIPTO<114> = BYPASS.COMMENTS  (111]333)

  

Example2 - global has 3 comments, 111,222,333.  The UI returns 222 and 555 (222 is the global, 555 is shipto-specific preference) 

GLOBAL.COMMENTS = 111]222]333

BYPASS.COMMENTS = 111]222]333

LOCATION.COMMENTS = 222]555   ;* from UI PKGCOMM.NBR

START THE 'FOR X' LOGIC

BYPASS.COMMENTS = 111]222]333  *** These are the comments that need to be written to the field 114 (bypass global comments) because they were unchecked on the screen.  222 has been deleted (see strikethrough)

LOCATION.COMMENTS = 222]555   ;* What's left in this variable is the shipto-specific preference to be written to SHIPTO<63>-<65>

SHIPTO<114> = BYPASS.COMMENTS (111]333)

SHIPTO<63> = LOCATION.COMMENTS (555)  (ADD TO THE FIELD IF 555 DOESN'T EXIST, DON'T REPLACE FIELD)

SHIPTO<64> = ASSOCIATED INPUT1 (from PKG.INPUT1)

SHIPTO<65> = ASSOCIATED INPUT2 (from PKG.INPUT2)

 

04/22/14 - New Global Pgm to split text into multiple lines:

Create new BP WEB.SPLIT.TEXT that will accept a string of text and the max number of characters that should be on each line.  Return to the calling process the text split into multiple lines:

  • Input in Argument List:  TXT, MAXCHAR, SPLITTXT
  • TXT = string of text that they want split
  • MAXCHAR = maximum #char per line (ie, 65)
  • SPLITTXT = TEXT split into xx char per line - send back as multi-valued

Program should split on a space (not in the middle of a word).  You can call the argument variables anything that you want.

= = = = = = = = =

Possible 000 comments handling:

  • Allow multiple 000 comments with associated text in Input1 at the global level
  • Display multiple 000 comments at the individual level.  Allow Input1 to be changed on any.  Allow individual 000 comment to be unchecked
  • UI would need to tell us which 000 comment(s) were unchecked (we can tell which Input 1 text was changed)
  • If any 000 Input was changed or any 000 comment was unchecked:
    • Add 000 to the 'bypass global comments' field - add just once
    • Write 000 comments that are still checked to the individual location's customer comments (65-67 in CUSTMST.USR)

  

04/25/14 - Shop Widget Default for 'Always Full Gauge':

Modify BP FCT.FULLGAUGE.DEFAULT.VALUE as follows (timeline 57-25):

  • Call WEB.GET.PREFDEFAULTS (for billto customer - BILLTO.NBR should already be set)
  • 'Always Quote Full Gauge' Preference is in ARG<26> - s/b a "1" if we are forcing full gauge
  • Right before the CASE1, add a CASE statement that if customer's preference is 1 then DEFAULT.VALUE = 1
  • Final test on the site ... as soon as a category is selected, you should see 'Mil, Full' to the right of the Gauge box

Modify BP WEB.PACKING.OPTIONS as follows (timeline 57-26):

  • ONLY IF CE (OPERATOR # "") *** NOTE: site may not be sending you OPERATOR yet. There is an open task to complete this on the UI side
    • Call WEB.GET.PREFDEFAULTS (for billto customer - BILLTO.NBR should already be set) 
    • 'Do Not Cradlepack' Preference is in ARG<27> - s/b a "1" if we should disable the cradlepack packaging option
    • If preference = 1, set ENABLED=0 in the 'Rolls, Cradlepacked' section

 

5/7/14 - Update Shipping Address (from SHIPPING Profile screen):

Write a new RPC that the UI can call that calls BP WEB.CREATE.CUSTOMER to do the address updating.  There is already code in this program to handle address updating from the checkout address screen, but it is using info from the SHOPPINGCART.USR record.  Since the preferences screen isn't working with a shopping cart record, you will need to modify the create customer program to add the address fields to the variable DSHOPPINGCART.USR when cart.name is null so that the updating can continue.

  1. BP WEB.CREATE.CUSTOMER:
    1. In the area where CART.NAME = "" (starting at line 80), assign DSHOPPINGCART.USR address fields 14 thru 16 and 62 thru 64 to the contents of the named params that the UI is returning to you from the preferences (ie, ADDRESS.1).
  2. New LDLIB RPC$CUSTOMER_SAVE: write a new RPC that the UI can call to update addresses ... it should call BP WEB.CREATE.CUSTOMER.  RETURN.VALUE would only contain status and error codes/messages (if any).

5/27/14 - Residential Delivery/Limited Access (timeline 57-34):

Read/Update the customer Residential Delivery or Limited Access comment.  This comment is checked on the 'update shipping address' popup.  The user has a choice of: Business, Residential Delivery, OR Limitied Access.  Only one of these can be chosen.  If Residential Delivery or LImited Access is chosen, that comment# must be written to customer's record:

  • Add new named param ADDRESS.TYPE  *** make sure to recompile all programs
  • In LD.INCLUDES CUSTOMER.READ (recompile all pgms that have this include): Look for comment# 160 (residential delivery) in CUSTMST.USR<63>.  If found, return ADDRESS.TYPE as "1".  If comment#161 (limited access) is found in CUSTMST.USR<63>, return ADDRESS.TYPE as "2".  If neither found, return ADDRESS.TYPE as "0".
  • When saving the address screen in RPC$CUSTOMER_SAVE, update the address type as follows:
    • If named param ADDRESS.TYPE = 1; make sure residential comment# 160 is in customer comments (CUSTMST.USR<63> and CUSTMST<53>.  Make sure comment#161 isn't there.
    • If named param ADDRESS.TYPE = 2; make sure limited access comment #161 is in customer comments (CUSTMST.USR<63> and CUSTMST<53>.  Make sure comment#160 isn't there
    • If named param ADDRESS.TYPE = 0; make sure neither 160 nor 161 are in comments
  • The easiest way to do this may be to remove both 160 and 161 from comments, then reload if address.type is a 1 or 2.  I'll leave this up to you. 

  

6/3/14 - Profile Screen - Default Zip Code in grey box:

  1. Add two new fields to SLSCONTACT.USR (Dict & SYS3002): (timeline 57-38)
    1. DFLT.ZIPTYPE - note in SYS3002: 0=No Zip Default; 1=Default Zip Code; 2=Customer Pickup at nearest warehouse
    2. DFLT.ZIPCODE - this will only have data for default zipcode type 1
  2. Modify CONTACT.READ to pass new info to UI via DATAFIELDS and recompile all programs that have this INCLUDE (timeline 57-38):
    1. DFLT.ZIPTYPE=   **** after you retrieve this field from SLSCONTACT.USR, do a +0 (so that a null will be returned to the site as a 0)
    2. DFLT.ZIPCODE=
  3. Modify CONTACT.READ to pass to UI the nearest Laddawn warehouse to the contact's zip code (timeline 57-38):
    1. Read SYSTBL WZIP
    2. Locate contact's zip code (SLSCONTACT.USR<8>) in the WZIP table, and extract closest warehouse from SYSTBL<2>"G0,1"  *** see code in LDLIB RPC$SHIPMENTBUNDLING_GETBYFILTER starting at line 404
    3. Return DFLT.WHS=
  4. Create a new LD.INCLUDE WAREHOUSE.READ (timeline 57-39):
    1. Using KEY, read WHSMST and return the following info in DATAFIELDS:
      1. Warehouse Name (<1>)  (WHS.NAME=)
      2. Address1 (<2>)                (WHS.ADDR1=)
      3. Address 2 (<3>)               (WHS.ADDR2=)
      4. Address 3 (<15>)             (WHS.ADDR3=)
      5. City (<4>)                         (WHS.CITY=)
      6. State (<5>)                       (WHS.STATE=)
      7. Zip (<6>)                           (WHS.ZIP=)
      8. Phone (<8>)                     (WHS.PHONE=)
  5. Create two new programs to retrieve Laddawn warehouse's for the UI (timeline 57-40):
    1. LDLIB RPC$WAREHOUSE_GETBYFILTER:
      1. SSelect WHSMST
      2. Loop through warehouses, Set KEY, then INCLUDE WAREHOUSE.READ
    2. LDLIB RPC$WAREHOUSE_GETBYID
      1. Using input from UI (NAMED PARAM available to you is WHS.CD)
      2. Set KEY, INCLUDE WAREHOUSE.READ
  6. Create two new named params (timeline 57-41):
    1. DFLT.ZIPTYPE
    2. DFLT.ZIPCODE
  7. Modify LDLIB RPC$CONTACT_SAVE (timeline 57-41):
    1. Using new named params, update SLSCONTACT.USR (update two new fields that you created above) 

 

 

6/5/14 - My Account Area - Workflow Screen :

  1. Add four new fields to SLSCONTACT.USR (Dict & SYS3002): (timeline 57-42)
    1. DFLT.SHARE.CC (multivalued)- note in SYS3002: Default 'copy to' email addresses for sharing emails
    2. DFLT.ORDER.CC (multivalued)  - note in SYS3002: Default 'copy to' email addresses for order confirmation
    3. HIDE.MY.WORK (multivalued) - note in SYS3002: don't show my work to these contacts  *** Workshare screen will use this to populate the screen
    4. HIDE.OTHERS.WORK (multivalued)  - note in SYS3002: contact(s) whose work I can't see  *** get by filter programs will use this to remove others work that I can't see
  2. Modify CONTACT.READ to pass new info to UI via DATAFIELDS and recompile all programs that have this INCLUDE (timeline 57-12):
    1. DFLT.SHARE.CC - colon delimited format
    2. DFLT.ORDER.CC - colon delimited format
    3. HIDE.MY.WORK - colon delimited format
    4. HIDE.OTHERS.WORK  - colon delimited format **** UI doesn't really need this but put into CONTACT.READ
  3. Create three new named params (timeline 57-14):
    1. DFLT.SHARE.CC
    2. DFLT.ORDER.CC
    3. HIDE.MY.WORK
  4. Modify LDLIB RPC$CONTACT_SAVE (timeline 57-14):
    1. Using new named params, update SLSCONTACT.USR:
      1. UI will return DFLT.SHARE.CC and DFLT.ORDER.CC as colon-delimited string.  Change to multi-values
      2. UI will return HIDE.MY.WORK as colon-delimited string of contact numbers:
        1. Write this multi-valued to the HIDE.MY.WORK field
        2. Read each of the contacts in HIDE.MY.WORK, and add the contact# that you are working on into their 'HIDE.OTHERS.WORK' field. Make sure contact isn't already there (don't dupe).
      3. Example:  I am contact 12345.  On the workshare screen, I list contacts 33333 and 45678 as people who I don't want to see my work (my saved items, my carts, etc)
      4. UI returns 33333:45678 in HIDE.MY.WORK
      5. Write 33333]45678 to the new HIDE.MY.WORK field (these are contacts that I want to hide my work from)
      6. Read contact 01*33333 and write 12345 (my contact#) to the new HIDE.OTHERS.WORK field *** make sure 12345 isn't already in that field
      7. Read contact 01*45678 and write 12345 (my contact#) to the new HIDE.OTHERS.WORK field *** make sure 12345 isn't already in that field
  5. Godzilla - make the following changes (timeline 57-15):
    1. When selecting carts, saved items, and order history, don't include any data for contacts in my HIDE.OTHERS.WORK field.
  6.  Modify the following GETBYFILTERS to bypass selection of data that belongs to contacts that I can't see data for (using the HIDE.OTHERS.WORK field).  Add to selection: AND WITH CONTACT # (LOOP THROUGH HIDE.OTHERS.WORK) (timeline 57-16):

    1.  Saved Items

    2. Saved Carts

    3. Order History (check w/Wayne on all order history getbyfilters) 

       
       

 

 

 

***WILL NEED A CONVERSION PROGRAM FOR SHIP VIA/FOB CODE PREFERENCES

 

***Global Comments - need to rework any program that is looking for comments (ie, bundling defaults, create order) to look for global comments on the billto record if the comment# isn't found in the comment# field of the shipto or billto customer.  Also check the 'bypass global comment' field in case this comment was 'unchecked' for the individual location.