Sha256: 8e05cd45a3a913f0703749e961daa91bdf0721acb699aedcfa1dbb02c01984f9
Contents?: true
Size: 734 Bytes
Versions: 11
Compression:
Stored size: 734 Bytes
Contents
module Crm class InvoiceProduct < ::ApplicationRecord self.table_name = "InvoiceDetail" self.primary_key = "InvoiceDetailId" belongs_to :invoice, foreign_key: 'InvoiceId', crm_key: 'invoiceid' belongs_to :product, foreign_key: 'ProductId', crm_key: 'productid' belongs_to :currency, foreign_key: 'TransactionCurrencyId', crm_key: 'transactioncurrencyid' belongs_to :original_currency, foreign_key: 'new_OriginalCurrency', crm_key: 'new_originalcurrency', class_name: 'Crm::Currency' belongs_to :uom, foreign_key: 'UoMId', crm_key: 'uomid' validates :invoice, presence: true validates :product, presence: true validates :uom, presence: true validates :Quantity, presence: true end end
Version data entries
11 entries across 11 versions & 1 rubygems