Sha256: 5fc35126204ec2c2d63e427832d68e6b99e9414078b39911a0013bd11041faba
Contents?: true
Size: 733 Bytes
Versions: 18
Compression:
Stored size: 733 Bytes
Contents
module Crm class InvoiceProduct < ActiveRecord::Base 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
18 entries across 18 versions & 1 rubygems