class Skr::PoReceipt

Is a record of an inventory receipt A {PurchaseOrder} can have one or more of them

Public Instance Methods

purchase_order=(po) click to toggle source
Calls superclass method
# File lib/skr/models/po_receipt.rb, line 26
def purchase_order=(po)
    super
    self.location   ||= purchase_order.location
    self.vendor     = purchase_order.vendor
end

Private Instance Methods

record_freight() click to toggle source
# File lib/skr/models/po_receipt.rb, line 34
def record_freight
    GlTransaction.current.add_posting( amount: self.freight,
      debit: GlAccount.default_for( :inventory_receipts_clearing ),
      credit: vendor.gl_freight_account
    )
end