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
Revision as of 14:42, 10 February 2016 by Woozle (talk | contribs) (fields to set; removing isForSale)
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