VbzCart/docs/pieces/catalog/building/2016/rules

From Woozle Writes Code
< VbzCart‎ | docs‎ | pieces‎ | catalog‎ | building‎ | 2016
Revision as of 14:29, 10 February 2016 by imported>Woozle (saving this here -- probably should list all fields to update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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: 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}).
  • Any Supplier for which some activations are generated should have all *other* items marked isCurrent, not-in-print; isForSale as above.

Fields to Copy