Difference between revisions of "VbzCart/pieces/catalog/building/2016/rules"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | pieces‎ | catalog‎ | building‎ | 2016
Jump to navigation Jump to search
(saving this here -- probably should list all fields to update)
 
(fields to set; removing isForSale)
Line 8: Line 8:
 
* Each activated item from a closeout catalog should be marked isForSale, out-of-print, isCurrent.
 
* Each activated item from a closeout catalog should be marked isForSale, out-of-print, isCurrent.
 
==Deactivations==
 
==Deactivations==
* Any Supplier for which no activations are generated should have all of its items marked not-current (isCurrent = FALSE) and isForSale should be TRUE only if there is stock. The isInPrint flag should be disregarded when isCurrent is FALSE.
+
* Any Supplier for which no activations are generated should have all of its items marked not-current (isCurrent = FALSE) and isForSale should be TRUE only if there is stock.
** FUTURE: Maybe there should be separate flags for isAvailable and isInStock so gone items can be not-for-sale as soon as stock runs out? Although the Title's WhenDiscont timestamp kind of serves as isAvailable already... so maybe isForSale should be eliminated, and IsForSale() should be ({qty_in_stk > 0} && {WhenDiscont > NOW or IS NULL}).
+
** The isInPrint flag should be disregarded when isCurrent is FALSE.
 +
** FUTURE: In order to ensure that gone items are considered not-for-sale as soon as stock runs out, perhaps isForSale should be eliminated, and IsForSale() should be ({item.qty_in_stk > 0} OR {Title.WhenDiscont > NOW or IS NULL}). (Title.WhenDiscont could be cached to minimize db lookups.)
 
* Any Supplier for which some activations are generated should have all *other* items marked isCurrent, not-in-print; isForSale as above.
 
* Any Supplier for which some activations are generated should have all *other* items marked isCurrent, not-in-print; isForSale as above.
==Fields to Copy==
+
==Fields to Set==
 +
* (rules) &rarr; {{l/vc/table|cat_items|LCItem}}: isForSale, isInPrint, isCloseOut, isCurrent (as above)
 
* {{l/vc/table|ctg_groups|SCGroup}} &rarr; {{l/vc/table|cat_items|LCItem}}: GrpCode, GrpSort, GrpDescr
 
* {{l/vc/table|ctg_groups|SCGroup}} &rarr; {{l/vc/table|cat_items|LCItem}}: GrpCode, GrpSort, GrpDescr
 
* {{l/vc/table|ctg_titles|SCTitle}} &rarr; {{l/vc/table|cat_titles|LCTitle}}: WhenDiscont
 
* {{l/vc/table|ctg_titles|SCTitle}} &rarr; {{l/vc/table|cat_titles|LCTitle}}: WhenDiscont

Revision as of 14:42, 10 February 2016

Matching

  • If LCTitle has no Items, then we look across all Titles for matching CatNums. If any are found, this is a situation to resolve before proceeding.
  • If LCTitle has Items, then for each proposed item we try to find matches in this order:
    a) Look for any items across all Titles whose CatNum matches the calculated CatNum of the proposed item
    b) Look for any items within this Title whose CatSfx matches the calculated CatSfx for the proposed item

Activations

  • Each activated item from a regular catalog should be marked isForSale, inPrint, and isCurrent.
  • Each activated item from a closeout catalog should be marked isForSale, out-of-print, isCurrent.

Deactivations

  • Any Supplier for which no activations are generated should have all of its items marked not-current (isCurrent = FALSE) and isForSale should be TRUE only if there is stock.
    • The isInPrint flag should be disregarded when isCurrent is FALSE.
    • FUTURE: In order to ensure that gone items are considered not-for-sale as soon as stock runs out, perhaps isForSale should be eliminated, and IsForSale() should be ({item.qty_in_stk > 0} OR {Title.WhenDiscont > NOW or IS NULL}). (Title.WhenDiscont could be cached to minimize db lookups.)
  • Any Supplier for which some activations are generated should have all *other* items marked isCurrent, not-in-print; isForSale as above.

Fields to Set