Laddawn.com : Programming Doc - Can we make MOD?

Can we make this MOD Item?

Filename: BP

Program Name: WEB.MODITEM.CHECK

Return: Error Code and Message:

We can make it: Error Code=0; Error Msg = ''

Mandatory Field(s) are null – can't make: Code=1; Error Msg="Incomplete Data"

Data outside Ranges/Acceptable Choices – can't make: Code=2; Error Msg="Incompatible Data"

  1. Marketplace Rules for rulesets 201,205,207 - determine whether MP MOD item can be offered based on the following rules:
    1. Is the Width between 3" and 24"?
    2. Is the Depth <= 0?
    3. If Width and Length < 4", allowable gauge is 2-4mil; otherwise 2-6mil
    4. Must be Full Gauge
    5. Materials allowed: only Standard and Anti Static. If Static Shielding, don't create MP
    6. Color: Clear for any material. Pink if Material is Anti-Static. Don't create MP for any other selections.
    7. No printing or Venting
    8. Packaging - cases only (no polylining)
    9. Freight must always be Prepaid (Paid by Laddawn)
    10. If Zip Code is null, we cannot produce a Marketplace MOD result
    11. If an exact stock match is found, we will only create a MOD Marketplace quote if the MOD Price AND Availability are better than the stock option. ***ASSUME WEB HAS ALREADY DETERMINED THIS, OR SHOULD WEB PASS THIS INFO ALONG?
  2. Bags, Sheeting, Tubing, Perforated Sheets, Furniture Bags - determine whether a MOD item can be offered based on the following rules:
    1. If any of the following rulesets, we cannot produce a MOD result:
      1. 104 - Bubble Bag
      2. 106 - Garment Bag
      3. 108 - Newspaper Bag
      4. 111 - Polypro Bag
      5. 112 - Pre-opened Bag
      6. 113 - Silverware Bag
      7. 114 - Shrink Bag
      8. 117 - Wicketed Bag
      9. 120 - Vacuum Pouches
      10. 201 – Zip Top (handled in Marketplace above)
      11. 202 - Slider Top Bag
      12. 203 - Recloseable Bubble Bag
      13. 204 - Recloseable Medical
      14. 205 – Zip Top Static Control (handled in Marketplace above)
      15. 206 - ZipTop Parts Bag
      16. 207 – Zip Top w/Hang Holes (handled in Marketplace above)
      17. 208 - ZipTop w/White Block
      18. 209 - ZipTop Static Shielding
      19. 404 thru 406 - C&A
      20. Any ruleset starting with 5 (Misc)
    2. Width:
      1. Is Width > 0? If so, continue with following checks. If not, we cannot produce a MOD result.
      2. If Furniture Bag, is width within range of 25"-9999" ?
      3. If Printed = Y (all items except furn bags), is width within range of 9-98"?
      4. Bags/Tubing/Centerfold Sheeting: If (Material=LLD and LayflatorGusseted=Layflat) OR (Material=Anti Static and Anti Static Resin Base=Linear Low Density and LayflatorGusseted=Layflat) or (Centerfold Sheeting and Material=LLD) OR (Centerfold Sheeting and Material=Anti Static and Anti Static Resin Base=Linear Low Density) - Is Width within range of 8" - 98"?
      5. Gussted Bags/Gusseted Tubing/Gusseted Sheeting: If LayflatorGusseted = Gusseted, is width within range of 4" - 96"?
      6. Continuous and Perforated Sheeting - If Singlewound, is range within 24" - 98"? If Centerfold, is width within range of 4" - 98"?
    3. Depth:
      1. If Gusseted and Depth <= 0, we cannot produce a MOD result.
    4. Length:
      1. Is Length > 0 (for all items except continuous sheeting and tubing)? If so, continue with following checks. If not, we cannot produce a MOD result.
      2. If Furniture Bag, is length within range of 24" - 98"?
      3. If Perforated Singlewound Sheets, is length within range of 10" - 400"?
      4. If Perforated Centerfold Sheets and Width < 24" and Printed, is length within range of 8" - 400"?
      5. If Perforated Centerfold Sheets and Width < 24", is length within range of 4" - 400"?
      6. If Perforated Centerfold Sheets and Width >=24" < 34", is length within range of 8" - 400"?
      7. If Perforated Centerfold Sheets and Width >= 34", is length within range of 8" - 1200"?
      8. If Perforated Gusseted Sheets and Width+Depth < 34", is length within range of 8" - 400"?
      9. If Perforated Gusseted Sheets and Width+Depth >= 34", is length within range of 8" - 1200"?
      10. If Ziptop Bags, is length within range of 3" - 24"? *** THIS IS ALREADY INCLUDED IN MARKETPLACE RULES ABOVE
      11. If Printed and (Depth > 0" OR Width >= 24" OR Sleeves), is length within range of 8" - 288"?
      12. If Printed and Depth <=0 and Width < 24", is length within range of 4" - 288"
      13. If Printed, is length within range of 8" - 999"
      14. Should add'l draw length tests for BAGS be moved to this program (see WEB.DRAW.LENGTH called by WEB.VALIDATE.ALL)??? Yes, I told Janice to comment in WEB.VALIDATE.ALL and put logic into this program. If draw length error, we cannot produce.
    5. Gauge:
      1. Is Gauge > 0? If so, continue with following checks. If not, we cannot produce a MOD result.
      2. See Function Specs-Shop #27 and associated code in BP WEB.GAUGE.VALIDATE. Use this code (including 'Apply Exceptions' logic).
    6. Material/Additives:
      1. If Material = '', we cannot produce a MOD result.
      2. If UVI/UVA selected but UVI% = '', we cannot produce a MOD result
      3. If Metallocene selected but Metallocene% = '', we cannot produce a MOD result
      4. If Material = Polypropylene, we cannot produce a MOD result
      5. If Material = Trans Shielding, we cannot produce a MOD result
    7. Zip Code:
      1. If Prepaid Freight and Zip Code is null, we cannot produce a MOD result
    8. Color:
      1. If Color = '', we cannot produce a MOD result.
      2. If Color # '' and Color # "Clear" and Opacity = '', we cannot produce a MOD result.
    9. Packaging:
      1. If Packaging = '', we cannot produce a MOD result.


Stock Ranges from Spreadsheet:

  1. Modify WEB9001 – subscreen F8-Defaults as follows:
    1. Change Fkey from 'Defaults' to 'Dflt/Valid'
    2. Add a second set of multi-values below the default set for 3 columns to store Validation Ranges: Ruleset, Low Range, High Range. Write to WEBCRITERIA.USR fields 30-32.
    3. For the variables S.WIDTH, S.LENGTH, and S.GAUGE, add each ruleset (not catalog code) to the multi-valued list along with the low/high range. The rulesets are in SYSTBL CFG.RULES.LAD.
  2. When you are adding code to the VALIDATE programs for width/length/gauge, read these low/high ranges based on RULESET from WEBCRITERIA.USR by locating the ruleset in <30> and extracting low/high from <31>/<32> instead of hard-coding the ranges. This should make the coding much easier. Leave the CASE 1 statements in each of these programs just in case something is missed.