VbzCart/docs/pieces/catalog/building/2016/rules: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (saving this here -- probably should list all fields to update) |
imported>Woozle (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: | ** 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 | ==Fields to Set== | ||
* (rules) → {{l/vc/table|cat_items|LCItem}}: isForSale, isInPrint, isCloseOut, isCurrent (as above) | |||
* {{l/vc/table|ctg_groups|SCGroup}} → {{l/vc/table|cat_items|LCItem}}: GrpCode, GrpSort, GrpDescr | * {{l/vc/table|ctg_groups|SCGroup}} → {{l/vc/table|cat_items|LCItem}}: GrpCode, GrpSort, GrpDescr | ||
* {{l/vc/table|ctg_titles|SCTitle}} → {{l/vc/table|cat_titles|LCTitle}}: WhenDiscont | * {{l/vc/table|ctg_titles|SCTitle}} → {{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
- (rules) → Template:L/vc/table: isForSale, isInPrint, isCloseOut, isCurrent (as above)
- Template:L/vc/table → Template:L/vc/table: GrpCode, GrpSort, GrpDescr
- Template:L/vc/table → Template:L/vc/table: WhenDiscont