VbzCart/docs/pieces/catalog/building/2016/rules
Jump to navigation
Jump to search
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