This new program will look for and return the MOD Item Number(s) that are:
- A close match to data entered in the Shop Widget (for the MOD Item Search - Godzilla)
- An exact match to data entered in the Shop Widget (when return MOD results, switch the generic 'made on demand' to the actual MOD Item# that they've searched for in the past)
Add Missing MOD.ITMMST.USR fields:
Before writing the new program, add missing fields to MOD.ITMMST.USR (FD and SYS3002) and update when creating a new MOD Item:
- Add four new fields to MOD.ITMMST.USR:
- QTY.PER.CSRL in <42> from SHOP.PACKOUT
- PACKAGING in <43> from SHOP.PKG
- High Slip in <44> from SHOP.HIGHSLIP
- Sheet Slit in <45> from SHOP.SHEETSLIT
- Modify LDLIB RPC$CONTACTITEM_SAVE and RPC$MODITEM_CREATE to update these new fields when creating a new MOD Item.
New BP WEB.MODITEM.MATCH:
We will start with the MOD.ITMMST.USR records for the billto customer, comparing it against the SHOP. variables to see if we have close matches or an exact match. The calling program will pass an 'exact match' flag if it requires an exact match. If the flag isn't set, then a list of close matches will be returned.
- Accept two argument passes:
- EXACT.MATCH - this will be set to "1" if only an exact match is needed
- MODREC - this should be sent in as null. This program will pass info back to the calling program in this variable.
- SELECT MOD.ITMMST.USR with:
- BILLTO.NBR = BILLTO.NBR (NAMED PARAM)
- CATALOG.GROUP = PROD.TYPE[1,1] *** MUST CREATE A NEW CATALOG.GROUP DICT THAT STRIPS OFF FIRST CHARACTER OF CATALOG.CD
- WIDTH = SHOP.WIDTH
- DEPTH = SHOP.DEPTH
- LENGTH = SHOP.LENGTH
- Read each selected record and look for matches on the remainder of the shop widget fields. If the EXACT.MATCH is set, you can stop searching once an exact match is found. If not looking for an exact match, you must return a list of the MOD Items, noting the differences for each MOD item. These are sequenced so that the more important options are first. This way you can rule out an exact match quicker without having to go through the secondary fields.
- MOD.ITMMST.USR<11> = SHOP.GAUGE
- MOD.ITMMST.USR<12> = SHOP.FULLGAUGE
- MOD.ITMMST.USR<13> = SHOP.MATERIAL
- MOD.ITMMST.USR<23> = SHOP.COLOR
- MOD.ITMMST.USR<24> = SHOP.OPACITY
- MOD.ITMMST.USR<25> = SHOP.PLATENBR
- MOD.ITMMST.USR<32> = SHOP.HOLETYPE
- MOD.ITMMST.USR<42> = SHOP.PACKOUT(when called by MODITEM_GETBYFILTER, SHOP.PACKOUT will be the default quantity at first. If packout is changed, this search s/b re-executed).
- MOD.ITMMST.USR<43> = SHOP.PKG
- MOD.ITMMST.USR< 39> = SHOP.FOLDED
- MOD.ITMMST.USR<14> = SHOP.ASRESIN
- MOD.ITMMST.USR<15> = SHOP.SPECAS
- MOD.ITMMST.USR<16> = SHOP.MILSPEC
- MOD.ITMMST.USR<17> = SHOP.ASPCT
- MOD.ITMMST.USR<18> = SHOP.METALLOCENE
- MOD.ITMMST.USR<19> = SHOP.METALPCT
- MOD.ITMMST.USR<20> = SHOP.ANTIBLOCK
- MOD.ITMMST.USR<21> = SHOP.UVI
- MOD.ITMMST.USR<22> = SHOP.UVIPCT
- MOD.ITMMST.USR<44> = SHOP.HIGHSLIP
- MOD.ITMMST.USR<45> = SHOP.SHEETSLIT
- MOD.ITMMST.USR<26> = SHOP.PLATEDESC
- MOD.ITMMST.USR<27> = SHOP.IMAGEHGT
- MOD.ITMMST.USR<28> = SHOP.IMAGEWID
- MOD.ITMMST.USR<29> = SHOP.INKCOLOR
- MOD.ITMMST.USR< 31> = SHOP.READORIENT
- MOD.ITMMST.USR< 33> = SHOP.HOLEPLACE
- MOD.ITMMST.USR< 34> = SHOP.HOLESIDE
- MOD.ITMMST.USR< 35> = SHOP.NBRHOLES
- MOD.ITMMST.USR< 36> = SHOP.FROMBTM
- MOD.ITMMST.USR< 37> = SHOP.FROMSIDE
- MOD.ITMMST.USR< 38> = SHOP.BTWNHOLES
- Return in MODREC:
- If 'exact match' was requested and one was found, set MODREC<1> = MOD Item# and return to calling program. The UI side will display this MOD Item# in the results area instead of the generic 'Made of Demand'. If no exact match is found, leave MODREC=''
- If exact.match is not "1", pass back a list of the MOD Item(s) that were a close match, listing their differences from the shop widget data:
- MODREC<1> = mv list of MOD Item Nbrs
- MODREC<2> = sub-mv list of differences (in # form) for each MOD Item in field 1. This is a summary of the differences that the UI will display. The calling process will turn these numbers into something readable after inserting more differences ** see below
- *** DON'T NEED TO DO THIS ANY LONGER *** MODREC<3> = mv list of SHOP. variables that were different, comma-delimited. The UI side will use this information to highlight the detailed differences when the user hovers over the differences column in Godzilla. When going through the MOD.ITMMST.USR to SHOP. comparisons above, start accumulating the SHOP. variables when there is a difference. Strip off the SHOP. prefix and just pass the suffix. For example, if SHOP.FULLGAUGE # MOD.ITMMST.USR<12>, add FULLGAUGE to the MODREC< 3,X>. If SHOP.COLOR # MOD.ITMMST.USR<23>, add ",COLOR".
** Differences:
Differences will be listed in the following order, delimited by a comma.
- Gauge & Full Gauge: If MOD.ITMMST.USR<11> # SHOP.GAUGE or MOD.ITMMST.USR<12> # SHOP.FULLGAUGE then difference = 2
- Count per Case/Roll (packout): If MOD.ITMMST.USR<42> # SHOP.PACKOUT then difference = 4
- Materials/Additives: If any differences found in Material, Antistatic fields, Metallocene fields, Antiblock, UVI fields, or High Slip, then difference = 6
- Color/Opacity: If any differences found in Color or Opacity, difference = 7
- Printing/Plate#: If any differences found in Plate/Print fields, difference = 8
- Venting: If any differences found in Hole fields, difference =9
- Packaging/Folded in Half: If any differences found in Packaging or Folding, difference = 10
When done, you may end up with something like: 3^10 (subvalued)
LD.INCLUDES PRODUCTITEM.READ:
Call this new matching program from LD.INCLUDES PRODUCTITEM.READ before it sets PART.NBR to "MOD". If we found an exact match, this program should send this MOD part# back to the UI for display. If none found, the UI will continue to display the generic "Made on Demand":
- Before calling the SYSCON "CONFIG.SETTINGS.LAD" (around line 34), add a call to WEB.MODITEM.MATCH passing EXACT.MATCH=1 and MODREC='' in the argument list.
- If MODREC<1> # "", set PARTNBR to MODREC<1>. If MODREC<1> = '', execute the SYSCON logic as it does today.
- The program already sets named param PART.NBR = PARTNBR, so no further changes should be needed.