Sha256: 9d028cb10b49c875c838de73ec762dcf41464e9d3c2e14d6a9fe496f5a581498

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

class Skr.Models.Sku extends Skr.Models.Base


    props:
        id:                  {"type":"integer","required":true}
        default_vendor_id:   {"type":"integer","required":true}
        gl_asset_account_id: {"type":"integer","required":true, default: ->
            Skr.Models.GlAccount.default_ids.asset
        }
        default_uom_code:    {"type":"string","required":true}
        code:                {"type":"string","required":true}
        description:         {"type":"string","required":true}
        is_other_charge:     {"type":"boolean","required":true,"default":"false"}
        does_track_inventory:{"type":"boolean","required":true,"default":"false"}
        can_backorder:       {"type":"boolean","required":true,"default":"false"}

    associations:
        default_vendor:   { model: "Vendor" }
        gl_asset_account: { model: "GlAccount", default: ->
            Skr.Models.GlAccount.fetchById(this.gl_asset_account_id)
        }
        sku_locs:         { collection: "SkuLoc" }
        sku_vendors:      { collection: "SkuVendor" }
        uoms:             { collection: "Uom" }

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stockor-0.1.9 client/skr/models/Sku.coffee
stockor-0.1.8 client/skr/models/Sku.coffee