netsuite 0.8.5 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/main.yml +20 -0
  3. data/.ruby-version +1 -1
  4. data/.tool-versions +1 -0
  5. data/Gemfile +1 -5
  6. data/HISTORY.md +32 -0
  7. data/README.md +48 -21
  8. data/Rakefile +1 -1
  9. data/lib/netsuite/configuration.rb +21 -4
  10. data/lib/netsuite/records/accounting_period.rb +2 -2
  11. data/lib/netsuite/records/assembly_unbuild.rb +1 -3
  12. data/lib/netsuite/records/classification.rb +4 -1
  13. data/lib/netsuite/records/contact.rb +1 -1
  14. data/lib/netsuite/records/cost_category.rb +28 -0
  15. data/lib/netsuite/records/credit_memo.rb +1 -1
  16. data/lib/netsuite/records/currency_rate.rb +1 -1
  17. data/lib/netsuite/records/custom_field_list.rb +9 -3
  18. data/lib/netsuite/records/custom_record.rb +1 -1
  19. data/lib/netsuite/records/customer.rb +2 -1
  20. data/lib/netsuite/records/customer_credit_cards.rb +36 -0
  21. data/lib/netsuite/records/customer_credit_cards_list.rb +10 -0
  22. data/lib/netsuite/records/customer_deposit.rb +5 -5
  23. data/lib/netsuite/records/customer_payment.rb +6 -2
  24. data/lib/netsuite/records/customer_payment_credit.rb +17 -0
  25. data/lib/netsuite/records/customer_payment_credit_list.rb +12 -0
  26. data/lib/netsuite/records/employee.rb +1 -1
  27. data/lib/netsuite/records/estimate.rb +42 -0
  28. data/lib/netsuite/records/estimate_item.rb +40 -0
  29. data/lib/netsuite/records/estimate_item_list.rb +11 -0
  30. data/lib/netsuite/records/inventory_item.rb +62 -1
  31. data/lib/netsuite/records/invoice.rb +97 -4
  32. data/lib/netsuite/records/invoice_item.rb +1 -1
  33. data/lib/netsuite/records/item_fulfillment.rb +1 -1
  34. data/lib/netsuite/records/item_fulfillment_item.rb +1 -1
  35. data/lib/netsuite/records/item_receipt_item.rb +1 -1
  36. data/lib/netsuite/records/member_list.rb +0 -2
  37. data/lib/netsuite/records/non_inventory_purchase_item.rb +1 -1
  38. data/lib/netsuite/records/non_inventory_resale_item.rb +2 -1
  39. data/lib/netsuite/records/non_inventory_sale_item.rb +1 -1
  40. data/lib/netsuite/records/opportunity.rb +2 -2
  41. data/lib/netsuite/records/partner.rb +7 -5
  42. data/lib/netsuite/records/phone_call.rb +1 -1
  43. data/lib/netsuite/records/serialized_assembly_item.rb +3 -2
  44. data/lib/netsuite/records/service_resale_item.rb +2 -2
  45. data/lib/netsuite/records/service_sale_item.rb +1 -1
  46. data/lib/netsuite/records/transfer_order_item.rb +1 -1
  47. data/lib/netsuite/records/vendor.rb +6 -5
  48. data/lib/netsuite/records/vendor_currency.rb +26 -0
  49. data/lib/netsuite/records/vendor_currency_list.rb +9 -0
  50. data/lib/netsuite/support/fields.rb +17 -0
  51. data/lib/netsuite/support/records.rb +1 -1
  52. data/lib/netsuite/support/search_result.rb +23 -4
  53. data/lib/netsuite/utilities.rb +2 -1
  54. data/lib/netsuite/version.rb +1 -1
  55. data/lib/netsuite.rb +10 -0
  56. data/netsuite.gemspec +5 -3
  57. data/spec/netsuite/actions/search_spec.rb +22 -0
  58. data/spec/netsuite/configuration_spec.rb +93 -6
  59. data/spec/netsuite/records/basic_record_spec.rb +8 -1
  60. data/spec/netsuite/records/classification_spec.rb +10 -1
  61. data/spec/netsuite/records/cost_category_spec.rb +105 -0
  62. data/spec/netsuite/records/custom_field_list_spec.rb +46 -6
  63. data/spec/netsuite/records/custom_record_spec.rb +1 -1
  64. data/spec/netsuite/records/customer_credit_cards_list_spec.rb +23 -0
  65. data/spec/netsuite/records/customer_payment_credit_list_spec.rb +26 -0
  66. data/spec/netsuite/records/customer_payment_spec.rb +1 -6
  67. data/spec/netsuite/records/customer_spec.rb +22 -1
  68. data/spec/netsuite/records/employee_spec.rb +2 -2
  69. data/spec/netsuite/records/estimate_item_list_spec.rb +26 -0
  70. data/spec/netsuite/records/estimate_item_spec.rb +40 -0
  71. data/spec/netsuite/records/estimate_spec.rb +216 -0
  72. data/spec/netsuite/records/inventory_item_spec.rb +65 -0
  73. data/spec/netsuite/records/invoice_spec.rb +94 -0
  74. data/spec/netsuite/records/non_inventory_resale_item_spec.rb +165 -0
  75. data/spec/netsuite/records/partner_spec.rb +143 -0
  76. data/spec/netsuite/records/service_resale_item_spec.rb +134 -0
  77. data/spec/netsuite/records/vendor_spec.rb +1 -1
  78. data/spec/netsuite/support/fields_spec.rb +36 -1
  79. data/spec/support/fixtures/custom_fields/multi_select.xml +47 -0
  80. data/spec/support/fixtures/search/saved_search_item.xml +55 -0
  81. data/spec/support/fixtures/search/saved_search_joined_custom_customer.xml +15 -1
  82. data/spec/support/search_only_field_matcher.rb +7 -0
  83. metadata +68 -12
  84. data/circle.yml +0 -17
@@ -18,7 +18,7 @@ module NetSuite
18
18
 
19
19
  field :custom_field_list, CustomFieldList
20
20
 
21
- record_refs :custom_form, :owner, :rec_type
21
+ record_refs :custom_form, :owner, :rec_type, :parent
22
22
 
23
23
  attr_reader :internal_id
24
24
  attr_accessor :external_id
@@ -13,7 +13,7 @@ module NetSuite
13
13
 
14
14
  fields :account_number, :aging, :alt_email, :alt_name, :alt_phone, :bill_pay,
15
15
  :buying_reason, :buying_time_frame, :campaign_category, :click_stream, :comments, :company_name,
16
- :consol_aging, :consol_days_overdue, :contrib_pct, :credit_cards_list, :credit_hold_override,
16
+ :consol_aging, :consol_days_overdue, :contrib_pct, :credit_hold_override,
17
17
  :credit_limit, :date_created, :days_overdue, :default_address,
18
18
  :download_list, :email, :email_preference, :email_transactions, :end_date, :entity_id,
19
19
  :estimated_budget, :fax, :fax_transactions, :first_name, :first_visit, :give_access, :global_subscription_status,
@@ -28,6 +28,7 @@ module NetSuite
28
28
  :vat_reg_number, :visits, :web_lead
29
29
 
30
30
  field :addressbook_list, CustomerAddressbookList
31
+ field :credit_cards_list, CustomerCreditCardsList
31
32
  field :custom_field_list, CustomFieldList
32
33
  field :contact_roles_list, ContactAccessRolesList
33
34
  field :currency_list, CustomerCurrencyList
@@ -0,0 +1,36 @@
1
+ module NetSuite
2
+ module Records
3
+ class CustomerCreditCards
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+
8
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2017_1/schema/other/customercreditcards.html?mode=package
9
+
10
+ fields :cc_default, :cc_expire_date, :cc_memo, :cc_name, :cc_number, :debitcard_issue_no, :state_from, :validfrom
11
+ record_refs :card_state, :payment_method
12
+
13
+ attr_reader :internal_id
14
+
15
+ def initialize(attributes_or_record = {})
16
+ case attributes_or_record
17
+ when self.class
18
+ initialize_from_record(attributes_or_record)
19
+ when Hash
20
+ initialize_from_attributes_hash(attributes_or_record)
21
+ end
22
+ end
23
+
24
+ def initialize_from_record(obj)
25
+ self.cc_default = obj.cc_default
26
+ self.cc_expire_date = obj.cc_expire_date
27
+ self.cc_memo = obj.cc_memo
28
+ self.cc_name = obj.cc_name
29
+ self.cc_number = obj.cc_number
30
+ self.debitcard_issue_no = obj.debitcard_issue_no
31
+ self.state_from = obj.state_from
32
+ self.validfrom = obj.validfrom
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,10 @@
1
+ module NetSuite
2
+ module Records
3
+ class CustomerCreditCardsList < Support::Sublist
4
+ include Namespaces::ListRel
5
+
6
+ sublist :credit_cards, CustomerCreditCards
7
+ alias :credit_card :credit_cards
8
+ end
9
+ end
10
+ end
@@ -21,11 +21,11 @@ module NetSuite
21
21
  field :apply_list, CustomerDepositApplyList
22
22
  # accountingBookDetailList
23
23
 
24
- record_refs :customer, :sales_order, :account, :department, :payment_method,
25
- :custom_form, :currency, :posting_period, :subsidiary, :location,
26
-
27
- # only available in an advanced search result
28
- :deposit_transaction
24
+ record_refs :customer, :sales_order, :account, :department,
25
+ :payment_method, :payment_option, :custom_form, :currency,
26
+ :posting_period, :subsidiary, :location,
27
+ # only available in an advanced search result
28
+ :deposit_transaction
29
29
 
30
30
  attr_reader :internal_id
31
31
  attr_accessor :external_id
@@ -17,14 +17,18 @@ module NetSuite
17
17
 
18
18
  field :custom_field_list, CustomFieldList
19
19
  field :apply_list, CustomerPaymentApplyList
20
+ field :credit_list, CustomerPaymentCreditList
20
21
 
21
22
  read_only_fields :applied, :balance, :pending, :total, :unapplied
22
23
 
23
- record_refs :account, :ar_acct, :credit_card, :credit_card_processor, :custom_form, :customer, :department, :klass,
24
- :location, :payment_method, :posting_period, :subsidiary, :currency
24
+ record_refs :account, :ar_acct, :credit_card, :credit_card_processor,
25
+ :custom_form, :customer, :department, :klass, :location,
26
+ :payment_method, :payment_option, :posting_period, :subsidiary,
27
+ :currency
25
28
 
26
29
  attr_reader :internal_id
27
30
  attr_accessor :external_id
31
+ attr_accessor :search_joins
28
32
 
29
33
  def initialize(attributes = {})
30
34
  @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
@@ -0,0 +1,17 @@
1
+ module NetSuite
2
+ module Records
3
+ class CustomerPaymentCredit
4
+ include Support::Fields
5
+ include Support::Records
6
+ include Namespaces::TranCust
7
+
8
+ fields :amount, :applied_to, :apply, :credit_date, :currency, :doc, :due, :line,
9
+ :ref_num, :total, :type
10
+
11
+ def initialize(attributes = {})
12
+ initialize_from_attributes_hash(attributes)
13
+ end
14
+
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,12 @@
1
+ module NetSuite
2
+ module Records
3
+ class CustomerPaymentCreditList < Support::Sublist
4
+ include Namespaces::TranCust
5
+
6
+ sublist :credit, CustomerPaymentCredit
7
+
8
+ alias :credits :credit
9
+
10
+ end
11
+ end
12
+ end
@@ -19,7 +19,7 @@ module NetSuite
19
19
  :phonetic_name, :purchase_order_approval_limit, :purchase_order_approver, :purchase_order_limit, :release_date,
20
20
  :resident_status, :salutation, :social_security_number, :visa_exp_date, :visa_type
21
21
 
22
- record_refs :currency, :department, :location, :subsidiary, :employee_type, :employee_status, :supervisor
22
+ record_refs :currency, :department, :location, :sales_role, :subsidiary, :employee_type, :employee_status, :supervisor
23
23
 
24
24
  field :custom_field_list, CustomFieldList
25
25
  field :roles_list, RoleList
@@ -0,0 +1,42 @@
1
+ module NetSuite
2
+ module Records
3
+ class Estimate
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Support::Actions
8
+ include Namespaces::TranSales
9
+
10
+ actions :get, :get_list, :add, :initialize, :delete, :update, :upsert, :search
11
+
12
+ fields :alt_handling_cost, :alt_sales_total, :alt_shipping_cost, :balance,
13
+ :bill_address, :billing_schedule, :bill_is_residential,
14
+ :created_date, :currency_name, :discount_rate, :email, :end_date,
15
+ :est_gross_profit, :exchange_rate, :handling_cost, :handling_tax1_rate, :is_taxable,
16
+ :last_modified_date, :memo, :message, :other_ref_num, :ship_date, :shipping_cost,
17
+ :shipping_tax1_rate, :source, :start_date, :status, :sync_partner_teams, :sync_sales_teams,
18
+ :to_be_emailed, :to_be_faxed, :to_be_printed, :total_cost_estimate, :tran_date, :tran_id,
19
+ :linked_tracking_numbers, :is_multi_ship_to
20
+
21
+ field :shipping_address, Address
22
+ field :billing_address, Address
23
+
24
+ field :item_list, EstimateItemList
25
+ field :custom_field_list, CustomFieldList
26
+
27
+ record_refs :bill_address_list, :created_from, :currency, :custom_form, :department, :discount_item, :entity,
28
+ :handling_tax_code, :job, :klass, :lead_source, :location, :message_sel, :opportunity, :partner,
29
+ :promo_code, :sales_group, :sales_rep, :ship_method, :shipping_tax_code, :subsidiary, :terms
30
+
31
+ attr_reader :internal_id
32
+ attr_accessor :external_id
33
+ attr_accessor :search_joins
34
+
35
+ def initialize(attributes = {})
36
+ @internal_id = attributes.delete(:internal_id) || attributes.delete(:@internal_id)
37
+ @external_id = attributes.delete(:external_id) || attributes.delete(:@external_id)
38
+ initialize_from_attributes_hash(attributes)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,40 @@
1
+ module NetSuite
2
+ module Records
3
+ class EstimateItem
4
+ include Support::Fields
5
+ include Support::RecordRefs
6
+ include Support::Records
7
+ include Namespaces::TranSales
8
+
9
+ fields :amount, :cost_estimate,
10
+ :cost_estimate_type, :defer_rev_rec, :description,
11
+ :is_taxable, :line, :quantity,
12
+ :rate, :tax_rate1
13
+
14
+ field :custom_field_list, CustomFieldList
15
+
16
+ record_refs :item, :job, :price, :tax_code, :units
17
+
18
+ def initialize(attributes_or_record = {})
19
+ case attributes_or_record
20
+ when Hash
21
+ initialize_from_attributes_hash(attributes_or_record)
22
+ when self.class
23
+ initialize_from_record(attributes_or_record)
24
+ end
25
+ end
26
+
27
+ def initialize_from_record(record)
28
+ self.attributes = record.send(:attributes)
29
+ end
30
+
31
+ def to_record
32
+ rec = super
33
+ if rec["#{record_namespace}:customFieldList"]
34
+ rec["#{record_namespace}:customFieldList!"] = rec.delete("#{record_namespace}:customFieldList")
35
+ end
36
+ rec
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,11 @@
1
+ module NetSuite
2
+ module Records
3
+ class EstimateItemList < Support::Sublist
4
+ include Namespaces::TranSales
5
+
6
+ sublist :item, EstimateItem
7
+
8
+ alias :items :item
9
+ end
10
+ end
11
+ end
@@ -45,13 +45,74 @@ module NetSuite
45
45
  :total_value, :track_landed_cost, :transfer_price, :upc_code, :url_component, :use_bins, :use_marginal_rates,
46
46
  :vendor_name, :vsoe_deferral, :vsoe_delivered, :vsoe_permit_discount, :vsoe_price, :weight, :weight_unit, :weight_units
47
47
 
48
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/search/itemsearchrowbasic.html?mode=package
49
+ search_only_fields :acc_book_rev_rec_forecast_rule, :accounting_book,
50
+ :accounting_book_amortization, :accounting_book_create_plans_on,
51
+ :accounting_book_rev_rec_rule, :accounting_book_rev_rec_schedule,
52
+ :allowed_shipping_method, :atp_lead_time, :atp_method, :base_price,
53
+ :bin_number, :bin_on_hand_avail, :bin_on_hand_count, :bom_quantity,
54
+ :build_entire_assembly, :build_time, :buy_it_now_price, :category,
55
+ :category_preferred, :component_yield, :correlated_item,
56
+ :correlated_item_correlation, :correlated_item_count,
57
+ :correlated_item_lift, :correlated_item_purchase_rate,
58
+ :cost_accounting_status, :created, :create_job,
59
+ :cust_return_variance_account, :date_viewed, :days_before_expiration,
60
+ :default_shipping_method, :deferred_expense_account,
61
+ :departmentnohierarchy, :display_ine_bay_store, :e_bay_item_description,
62
+ :e_bay_item_subtitle, :e_bay_item_title, :ebay_relisting_option,
63
+ :effective_bom_control, :effective_date, :effective_revision,
64
+ :end_auctions_when_out_of_stock, :feed_description, :feed_name,
65
+ :froogle_product_feed, :fx_cost, :generate_accruals,
66
+ :gift_cert_auth_code, :gift_cert_email, :gift_cert_expiration_date,
67
+ :gift_cert_from, :gift_cert_message, :gift_cert_original_amount,
68
+ :gift_cert_recipient, :hierarchy_node, :hierarchy_version, :hits,
69
+ :image_url, :interco_expense_account, :inventory_location,
70
+ :is_available, :is_fulfillable, :is_lot_item, :is_serial_item,
71
+ :is_special_work_order_item, :is_vsoe_bundle, :is_wip, :item_url,
72
+ :last_quantity_available_change, :liability_account, :listing_duration,
73
+ :location_allow_store_pickup, :location_atp_lead_time,
74
+ :location_average_cost, :location_bin_quantity_available,
75
+ :location_build_time, :location_cost, :location_cost_accounting_status,
76
+ :location_default_return_cost, :location_demand_source,
77
+ :location_demand_time_fence, :location_fixed_lot_size,
78
+ :location_inventory_cost_template, :location_invt_classification,
79
+ :location_invt_count_interval, :location_last_invt_count_date,
80
+ :location_lead_time, :location_next_invt_count_date,
81
+ :location_periodic_lot_size_days, :location_periodic_lot_size_type,
82
+ :location_preferred_stock_level, :location_qty_avail_for_store_pickup,
83
+ :location_quantity_available, :location_quantity_back_ordered,
84
+ :location_quantity_committed, :location_quantity_in_transit,
85
+ :location_quantity_on_hand, :location_quantity_on_order,
86
+ :location_re_order_point, :location_reschedule_in_days,
87
+ :location_reschedule_out_days, :location_safety_stock_level,
88
+ :location_store_pickup_buffer_stock, :location_supply_lot_sizing_method,
89
+ :location_supply_time_fence, :location_supply_type,
90
+ :location_total_value, :loc_backward_consumption_days,
91
+ :loc_forward_consumption_days, :manufacturing_charge_item, :member_item,
92
+ :member_quantity, :modified, :moss_applies, :nextag_product_feed,
93
+ :num_active_listings, :number_allowed_downloads, :num_currently_listed,
94
+ :obsolete_date, :obsolete_revision, :online_customer_price,
95
+ :online_price, :other_prices, :other_vendor, :overhead_type,
96
+ :preferred_bin, :primary_category, :prod_price_variance_acct,
97
+ :prod_qty_variance_acct, :reserve_price,
98
+ :same_as_primary_book_amortization,
99
+ :same_as_primary_book_rev_rec, :scrap_acct, :sell_on_ebay,
100
+ :serial_number, :serial_number_location, :shipping_carrier,
101
+ :shipping_rate, :shopping_product_feed, :shopzilla_product_feed,
102
+ :starting_price, :subsidiary, :sub_type,
103
+ :thumb_nail_url, :type, :unbuild_variance_account, :use_component_yield,
104
+ :vendor_code, :vendor_cost, :vendor_cost_entered,
105
+ :vendor_price_currency, :vendor_schedule, :vend_return_variance_account,
106
+ :web_site, :wip_acct, :wip_variance_acct, :yahoo_product_feed
107
+
48
108
  record_refs :alternate_demand_source_item, :asset_account, :bill_exch_rate_variance_acct, :bill_price_variance_acct,
49
109
  :bill_qty_variance_acct, :billing_schedule, :cogs_account, :cost_category, :custom_form, :deferred_revenue_account,
50
110
  :demand_source, :department, :expense_account, :gain_loss_account, :income_account, :issue_product, :klass, :location,
51
111
  :parent, :preferred_location, :pricing_group, :purchase_price_variance_acct, :purchase_tax_code, :purchase_unit,
52
112
  :quantity_pricing_schedule, :rev_rec_schedule, :sale_unit, :sales_tax_code, :ship_package, :soft_descriptor,
53
113
  :stock_unit, :store_display_image, :store_display_thumbnail, :store_item_template, :supply_lot_sizing_method,
54
- :supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor
114
+ :supply_replenishment_method, :supply_type, :tax_schedule, :units_type, :vendor, :create_revenue_plans_on,
115
+ :revenue_recognition_rule, :rev_rec_forecast_rule
55
116
 
56
117
  field :pricing_matrix, PricingMatrix
57
118
  field :custom_field_list, CustomFieldList
@@ -11,8 +11,8 @@ module NetSuite
11
11
 
12
12
  actions :get, :get_deleted, :get_list, :initialize, :add, :update, :delete, :upsert, :upsert_list, :search
13
13
 
14
- fields :balance, :bill_address,
15
- :billing_schedule, :contrib_pct, :created_date, :currency_name, :custom_field_list,
14
+ fields :balance,
15
+ :billing_schedule, :contrib_pct, :created_date, :currency_name,
16
16
  :deferred_revenue, :discount_amount, :discount_date, :discount_rate,
17
17
  :due_date, :email, :end_date, :est_gross_profit, :est_gross_profit_percent, :exchange_rate,
18
18
  :exclude_commission, :exp_cost_disc_amount, :exp_cost_disc_print, :exp_cost_disc_rate, :exp_cost_disc_tax_1_amt,
@@ -24,13 +24,13 @@ module NetSuite
24
24
  :linked_tracking_numbers, :memo, :message, :message_sel, :on_credit_hold, :opportunity,
25
25
  :other_ref_num, :partners_list, :rev_rec_end_date,
26
26
  :rev_rec_on_rev_commitment, :rev_rec_schedule, :rev_rec_start_date, :revenue_status, :sales_effective_date,
27
- :sales_group, :sales_team_list, :ship_address, :ship_date, :ship_group_list,
27
+ :sales_group, :sales_team_list, :ship_date, :ship_group_list,
28
28
  :shipping_cost, :shipping_tax_1_rate, :shipping_tax_2_rate, :shipping_tax_code, :source, :start_date,
29
29
  :status, :sync_partner_teams, :sync_sales_teams, :tax_2_total,
30
30
  :tax_total, :time_disc_amount, :time_disc_print, :time_disc_rate, :time_disc_tax_1_amt, :time_disc_taxable,
31
31
  :time_discount, :time_list, :time_tax_code, :time_tax_rate_1, :time_tax_rate_2, :to_be_emailed, :to_be_faxed,
32
32
  :to_be_printed, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
33
- :transaction_bill_address, :transaction_ship_address, :vat_reg_num, :vsoe_auto_calc, :tax_rate
33
+ :vat_reg_num, :vsoe_auto_calc, :tax_rate
34
34
 
35
35
  field :transaction_bill_address, BillAddress
36
36
  field :transaction_ship_address, ShipAddress
@@ -42,6 +42,99 @@ module NetSuite
42
42
  read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid,
43
43
  :alt_shipping_cost, :gift_cert_applied, :handling_cost, :alt_handling_cost
44
44
 
45
+ # https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/schema/search/transactionsearchrowbasic.html?mode=package
46
+ search_only_fields :abbrev, :account_type, :acct_corp_card_exp,
47
+ :actual_production_end_date, :actual_production_start_date,
48
+ :actual_ship_date, :alt_sales_amount, :alt_sales_net_amount, :amount,
49
+ :amount_unbilled, :applied_to_foreign_amount,
50
+ :applied_to_is_fx_variance, :applied_to_link_amount,
51
+ :applied_to_link_type, :applied_to_transaction,
52
+ :applying_foreign_amount, :applying_is_fx_variance,
53
+ :applying_link_amount, :applying_link_type, :applying_transaction,
54
+ :auth_code, :auto_calculate_lag, :avs_street_match, :avs_zip_match,
55
+ :billable, :bill_address, :bill_address1, :bill_address2,
56
+ :bill_address3, :bill_addressee, :bill_attention, :bill_city,
57
+ :bill_country, :bill_country_code, :billed_date, :billing_amount,
58
+ :billing_transaction, :bill_phone, :bill_state, :bill_variance_status,
59
+ :bill_zip, :bin_number, :bin_number_quantity, :bom_quantity,
60
+ :build_entire_assembly, :build_variance, :built,
61
+ :can_have_stackable_promotions, :catch_up_period, :cc_customer_code,
62
+ :cc_exp_date, :cc_holder_name, :cc_number, :cc_street, :cc_zip_code,
63
+ :cleared, :closed, :close_date, :cogs_amount,
64
+ :commission_effective_date, :commit, :component_yield,
65
+ :confirmation_number, :contribution, :contribution_primary,
66
+ :cost_component_amount, :cost_component_category, :cost_component_item,
67
+ :cost_component_quantity, :cost_component_standard_cost, :cost_estimate,
68
+ :cost_estimate_rate, :cost_estimate_type, :created_by, :credit_amount,
69
+ :csc_match, :custom_gl, :cust_type, :date_created, :days_open,
70
+ :days_overdue, :debit_amount, :defer_rev_rec, :deposit_date,
71
+ :deposit_transaction, :doc_unit, :dr_account, :effective_rate,
72
+ :entity_status, :est_gross_profit_pct, :exclude_from_rate_request,
73
+ :expected_close_date, :expected_receipt_date, :expense_category,
74
+ :expense_date, :firmed, :forecast_type, :fulfilling_transaction,
75
+ :fx_account, :fx_amount, :fx_cost_estimate, :fx_cost_estimate_rate,
76
+ :fx_est_gross_profit, :fx_tran_cost_estimate, :fx_vsoe_allocation,
77
+ :fx_vsoe_amount, :fx_vsoe_price, :gco_availabel_to_charge,
78
+ :gco_available_to_refund, :gco_avs_street_match, :gco_avs_zip_match,
79
+ :gco_buyer_account_age, :gco_buyer_ip, :gco_charge_amount,
80
+ :gco_chargeback_amount, :gco_confirmed_charged_total,
81
+ :gco_confirmed_refunded_total, :gco_creditcard_number, :gco_csc_match,
82
+ :gco_financial_state, :gco_fulfillment_state, :gco_order_id,
83
+ :gco_order_total, :gco_promotion_amount, :gco_promotion_name,
84
+ :gco_refund_amount, :gco_shipping_total, :gco_state_changed_detail,
85
+ :gift_cert, :gross_amount, :include_in_forecast, :incoterm,
86
+ :interco_status, :interco_transaction, :inventory_location,
87
+ :inventory_subsidiary, :in_vsoe_bundle, :is_allocation, :is_backflush,
88
+ :is_gco_chargeback, :is_gco_charge_confirmed,
89
+ :is_gco_payment_guaranteed, :is_gco_refund_confirmed,
90
+ :is_inside_delivery, :is_inside_pickup, :is_intercompany_adjustment,
91
+ :is_in_transit_payment, :is_multi_ship_to, :is_reversal,
92
+ :is_rev_rec_transaction, :is_scrap, :is_ship_address,
93
+ :is_transfer_price_costing, :is_wip, :item, :item_fulfillment_choice,
94
+ :item_revision, :landed_cost_per_line, :line, :line_sequence_number,
95
+ :line_unique_key, :location_auto_assigned, :main_line, :main_name,
96
+ :manufacturing_routing, :match_bill_to_receipt, :memo_main, :memorized,
97
+ :merchant_account, :multi_subsidiary, :net_amount, :net_amount_no_tax,
98
+ :next_bill_date, :no_auto_assign_location, :non_reimbursable,
99
+ :one_time_total, :options, :order_allocation_strategy, :order_priority,
100
+ :originator, :overhead_parent_item,
101
+ :override_installments, :package_count, :paid_amount, :paid_transaction,
102
+ :partner_contribution, :partner_role, :partner_team_member,
103
+ :paying_amount, :paying_transaction, :payment_approved,
104
+ :payment_event_date, :payment_event_hold_reason,
105
+ :payment_event_purchase_card_used, :payment_event_purchase_data_sent,
106
+ :payment_event_result, :payment_event_type, :payment_hold,
107
+ :payment_method, :payment_option, :pay_pal_pending, :pay_pal_status,
108
+ :pay_pal_tran_id, :payroll_batch, :pn_ref_num, :po_rate, :posting,
109
+ :price_level, :print, :probability, :projected_amount, :project_task,
110
+ :purchase_order, :quantity, :quantity_billed, :quantity_committed,
111
+ :quantity_packed, :quantity_picked, :quantity_rev_committed,
112
+ :quantity_ship_recv, :quantity_uom, :rate,
113
+ :realized_gain_posting_transaction, :recur_annually_total,
114
+ :recur_monthly_total, :recur_quarterly_total, :recur_weekly_total,
115
+ :ref_number, :requested_date, :rev_commit_status,
116
+ :rev_committing_transaction, :reversal_date, :reversal_number,
117
+ :rg_account, :rg_amount, :sales_order, :sales_team_member,
118
+ :sales_team_role, :scheduling_method, :serial_number,
119
+ :serial_number_cost, :serial_number_cost_adjustment,
120
+ :serial_number_quantity, :serial_numbers, :ship_address, :ship_address1,
121
+ :ship_address2, :ship_address3, :ship_addressee, :ship_attention,
122
+ :ship_carrier, :ship_city, :ship_complete, :ship_country,
123
+ :ship_country_code, :ship_group, :ship_phone, :shipping_amount,
124
+ :ship_recv_status_line, :ship_state, :ship_to, :ship_zip,
125
+ :signed_amount, :subscription, :subscription_line, :tax_amount,
126
+ :tax_code, :tax_line, :tax_period, :term_in_months, :terms_of_sale,
127
+ :title, :to_subsidiary, :tran_est_gross_profit,
128
+ :tran_fx_est_gross_profit, :transaction_discount,
129
+ :transaction_line_type, :transaction_number, :transfer_location,
130
+ :transfer_order_item_line, :transfer_order_quantity_committed,
131
+ :transfer_order_quantity_packed, :transfer_order_quantity_picked,
132
+ :transfer_order_quantity_received, :transfer_order_quantity_shipped,
133
+ :type, :unit, :unit_cost_override, :vend_type, :visible_to_customer,
134
+ :vsoe_allocation, :vsoe_amount, :vsoe_deferral, :vsoe_delivered,
135
+ :vsoe_permit_discount, :vsoe_price, :web_site
136
+ # TODO: Add record_type, conflicts with Support::Records#record_type, returns "invoice" versus "tranSales:Invoice"
137
+
45
138
  record_refs :account, :bill_address_list, :custom_form, :department, :entity, :klass, :partner,
46
139
  :posting_period, :ship_address_list, :terms, :location, :sales_rep, :tax_item, :created_from,
47
140
  :ship_method, :lead_source, :promo_code, :subsidiary, :currency, :approval_status, :job, :discount_item