Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLD-669-vendorcredit-record-refs] #7

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions lib/netsuite/records/vendor_credit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,8 @@ class VendorCredit
:currency_name, :tran_date, :exchange_rate,
:memo

field :custom_form, RecordRef
field :account, RecordRef
field :bill_address_list, RecordRef
field :created_from, RecordRef
field :entity, RecordRef
field :currency, RecordRef
field :posting_period, RecordRef
field :department, RecordRef
field :klass, RecordRef
field :location, RecordRef
field :subsidiary, RecordRef
record_refs :custom_form, :account, :bill_address_list, :created_from, :entity, :currency, :post_period, :department, :klass, :location, :subsidiary

field :billing_address, Address
field :expense_list, VendorCreditExpenseList
field :item_list, VendorCreditItemList
Expand Down
11 changes: 3 additions & 8 deletions lib/netsuite/records/vendor_credit_expense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module NetSuite
module Records
class VendorCreditExpense
include Support::Fields
include Support::RecordRefs
include Support::Records
include Namespaces::TranPurch

Expand All @@ -12,16 +13,10 @@ class VendorCreditExpense
:amortization_end_date,
:amortization_residual

field :category, RecordRef
field :taxCode, RecordRef
field :account, RecordRef
field :department, RecordRef
field :klass, RecordRef
field :amortizationSched, RecordRef
field :location, RecordRef
field :customer, RecordRef
field :custom_field_list, CustomFieldList

record_refs :account, :category, :customer, :department, :item, :location, :units, :tax_code

def initialize(attributes = {})
initialize_from_attributes_hash(attributes)
end
Expand Down
17 changes: 7 additions & 10 deletions lib/netsuite/records/vendor_credit_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module NetSuite
module Records
class VendorCreditItem
include Support::Fields
include Support::RecordRefs
include Support::Records
include Namespaces::TranPurch

Expand All @@ -14,16 +15,12 @@ class VendorCreditItem
:amortization_end_date,
:amortization_residual

field :item, RecordRef
field :units, RecordRef
field :department, RecordRef
field :customer, RecordRef
field :location, RecordRef
field :tax_code, RecordRef
field :serial_numbers_list, RecordRefList
field :inventory_detail, InventoryDetail
field :custom_field_list, CustomFieldList
field :options, CustomFieldList
field :serial_numbers_list, RecordRefList
field :inventory_detail, InventoryDetail
field :custom_field_list, CustomFieldList
field :options, CustomFieldList

record_refs :item, :units, :department, :customer, :location, :tax_code

def initialize(attributes = {})
initialize_from_attributes_hash(attributes)
Expand Down