Sha256: 3bc357b3d322c48a2f1779f072d688b7d0f8144fa7b2b02d069fcce19ddb01a9

Contents?: true

Size: 1.34 KB

Versions: 13

Compression:

Stored size: 1.34 KB

Contents

require 'gecko/record/base'

module Gecko
  module Record
    class PurchaseOrder < Base
      has_many :purchase_order_line_items
      has_many :procurements

      belongs_to :company
      belongs_to :supplier_address,   class_name: "Address"
      belongs_to :stock_location,     class_name: "Location"
      belongs_to :billing_address,    class_name: "Location"

      belongs_to :currency
      # belongs_to :default_price_list, class_name: "PriceList"
      attribute :default_price_list_id, String

      attribute :order_number,          String
      attribute :reference_number,      String
      attribute :email,                 String
      attribute :due_at,                Date
      attribute :received_at,           Date

      attribute :status,                String
      attribute :procurement_status,    String,     readonly: true
      attribute :notes,                 String
      attribute :tax_treatment,         String

      attribute :document_url,          String,     readonly: true

      attribute :total,                 BigDecimal, readonly: true
      attribute :cached_quantity,       BigDecimal, readonly: true

      attribute :tags,                  Array[String]

      # DEPRECATED
      # attribute :cached_total,          BigDecimal, readonly: true
    end

    class PurchaseOrderAdapter < BaseAdapter

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gecko-ruby-0.9.1 lib/gecko/record/purchase_order.rb
gecko-ruby-0.9.0 lib/gecko/record/purchase_order.rb
gecko-ruby-0.8.0 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.6 lib/gecko/record/purchase_order.rb
gecko-ruby-0.7.1 lib/gecko/record/purchase_order.rb
gecko-ruby-0.7.0 lib/gecko/record/purchase_order.rb
gecko-ruby-0.6.0 lib/gecko/record/purchase_order.rb
gecko-ruby-0.5.0 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.5 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.4 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.3 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.2 lib/gecko/record/purchase_order.rb
gecko-ruby-0.2.0 lib/gecko/record/purchase_order.rb