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

Tax override for Expense Report #131

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 10 additions & 0 deletions netsuitesdk/api/expense_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ def post(self, data) -> OrderedDict:

er['expenseList'] = self.ns_client.ExpenseReportExpenseList(expense=expense_list)

if 'nexus' in data:
er['nexus'] = self.ns_client.RecordRef(**(data['nexus']))

if 'taxDetailsList' in data:
tax_details_list = []
for tdl in data['taxDetailsList']['taxDetails']:
tax_details_list.append(self.ns_client.TaxDetails(**tdl))
er['taxDetailsList'] = self.ns_client.TaxDetailsList(taxDetails=tax_details_list)


if 'expenseReportCurrency' in data:
er['expenseReportCurrency'] = self.ns_client.RecordRef(**(data['expenseReportCurrency']))

Expand Down
6 changes: 3 additions & 3 deletions netsuitesdk/internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class NetSuiteClient:
"""The Netsuite client class providing access to the Netsuite
SOAP/WSDL web service"""

WSDL_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/wsdl/v2019_1_0/netsuite.wsdl'
DATACENTER_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/services/NetSuitePort_2019_1'
WSDL_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/wsdl/v2019_2_0/netsuite.wsdl'
DATACENTER_URL_TEMPLATE = 'https://{account}.suitetalk.api.netsuite.com/services/NetSuitePort_2019_2'

_search_preferences = None
_passport = None
Expand Down Expand Up @@ -79,7 +79,7 @@ def __init__(self, account=None, caching=True, caching_timeout=2592000, caching_

# default service points to wrong data center. need to create a new service proxy and replace the default one
self._service_proxy = self._client.create_service(
'{urn:platform_2019_1.webservices.netsuite.com}NetSuiteBinding', self._datacenter_url)
'{urn:platform_2019_2.webservices.netsuite.com}NetSuiteBinding', self._datacenter_url)

# Parse all complex types specified in :const:`~netsuitesdk.netsuite_types.COMPLEX_TYPES`
# and store them as attributes of this instance. Same for simple types.
Expand Down
Loading