Sha256: 8091bff88d9467aec4a4ffe15b37937453482aa725cfc9ddd58e940ed239f183

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

class Skr.Models.SoLine extends Skr.Models.Base

    mixins: [ Skr.Models.Mixins.SkuLine ]

    props:
        id:            {type:"integer"}
        sales_order_id:{type:"integer"}
        sku_loc_id:    {type:"integer"}
        price:         {type:"bigdec"}
        sku_code:      {type:"string"}
        description:   {type:"string"}
        uom_code:      {type:"string",  default: 'EA'}
        uom_size:      {type:"integer", default: 1}
        position:      {type:"integer"}
        qty:           {type:"bigdec",  default:"0"}
        qty_allocated: {type:"bigdec",  default:"0"}
        qty_picking:   {type:"bigdec",  default:"0"}
        qty_invoiced:  {type:"bigdec",  default:"0"}
        qty_canceled:  {type:"bigdec",  default:"0"}
        is_revised:    {type:"boolean", default:false}

    session:
        sku_id:     {type: 'integer'}

    associations:
        sales_order: { model: "SalesOrder"  }

    modelForAccess: ->
        @sales_order || this

    dataForSave: ->
        # so lines should never send associations
        super(excludeAssociations: true)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stockor-0.5.0 client/skr/models/SoLine.coffee
stockor-0.4.0 client/skr/models/SoLine.coffee
stockor-0.3.0 client/skr/models/SoLine.coffee
stockor-0.2 client/skr/models/SoLine.coffee