Skip to content

Commit

Permalink
Invoice shipping_tax_code should be a record_ref (#573)
Browse files Browse the repository at this point in the history
Per the NetSuite schema browser the Invoice shipping_tax_code should be a
record_ref, since at least API version 2014_1.
  • Loading branch information
stevewoodcock committed Feb 25, 2023
1 parent 37787c3 commit 33a5659
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/netsuite/records/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Invoice
:other_ref_num, :partners_list, :rev_rec_end_date,
:rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
:sales_group, :sales_team_list, :ship_date, :ship_group_list,
:shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
:shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :source, :start_date,
:status, :sync_partner_teams, :sync_sales_teams, :tax_2_total,
:tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
:time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
Expand Down Expand Up @@ -138,7 +138,8 @@ class Invoice

record_refs :account, :bill_address_list, :custom_form, :department, :entity, :klass, :partner,
:posting_period, :ship_address_list, :terms, :location, :sales_rep, :tax_item, :created_from,
:ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status, :job, :discount_item
:ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status, :job, :discount_item,
:shipping_tax_code

attr_reader :internal_id
attr_accessor :external_id
Expand Down
5 changes: 3 additions & 2 deletions spec/netsuite/records/invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:other_ref_num, :partners_list, :rev_rec_end_date,
:rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
:sales_group, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
:shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
:shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :source, :start_date,
:status, :sync_partner_teams, :sync_sales_teams, :tax_2_total,
:tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
:time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
Expand Down Expand Up @@ -151,7 +151,8 @@
it 'has the right record_refs' do
[
:account, :bill_address_list, :job, :custom_form, :department, :entity, :klass, :posting_period, :ship_address_list, :terms,
:created_from, :location, :sales_rep, :ship_method, :tax_item, :partner, :lead_source, :promo_code, :subsidiary, :discount_item
:created_from, :location, :sales_rep, :ship_method, :tax_item, :partner, :lead_source, :promo_code, :subsidiary, :discount_item,
:shipping_tax_code
].each do |record_ref|
expect(invoice).to have_record_ref(record_ref)
end
Expand Down

0 comments on commit 33a5659

Please sign in to comment.