Set WholeSaleUnit to altUnit if Extra1 is not set. Fix webUserName.
This commit is contained in:
parent
0af38e286e
commit
ee902ee733
3 changed files with 33 additions and 16 deletions
|
|
@ -115,7 +115,6 @@ class OrderHead(StoredProcedure):
|
|||
# self['c_Saljare'] = None # 600 # From API profile, or default
|
||||
|
||||
# Unique ID added to 'kpw' when invoicing is allowed.
|
||||
print(web_user_name)
|
||||
self['c_webUserName'] = web_user_name
|
||||
|
||||
# self['LangID'] = 0 # Default to Swedish
|
||||
|
|
@ -141,7 +140,7 @@ class OrderRow(StoredProcedure):
|
|||
AltEnhetKod logic needs to have been added to the procedure"""
|
||||
|
||||
def __init__(self, company_no, order_no, item_no,
|
||||
qty=None, qty_alt_unit=None, alt_unit='', pers_sign='biz'):
|
||||
qty=None, qty_alt_unit=None, alt_unit=None, pers_sign='biz'):
|
||||
super(OrderRow, self).__init__('Jeeves_Esales_AddOrderRow')
|
||||
|
||||
self['c_CompanyNo'] = str(company_no)
|
||||
|
|
@ -149,7 +148,7 @@ class OrderRow(StoredProcedure):
|
|||
self['c_ItemNo'] = str(item_no)
|
||||
self['c_Qty'] = float(qty) if qty else None
|
||||
self['c_QtyAltEnh'] = float(qty_alt_unit) if qty_alt_unit else None
|
||||
self['c_AltEnhetKod'] = str(alt_unit)
|
||||
self['c_AltEnhetKod'] = str(alt_unit) if alt_unit else None
|
||||
self['c_PersSign'] = str(pers_sign)
|
||||
|
||||
# Used to set date for delivery (c_OrdBegLevDat) and (c_OrdBerLevDat)
|
||||
|
|
@ -194,7 +193,7 @@ class PlaceOrder(StoredProcedure):
|
|||
"""Mapping for the Jeeves_Esales_PlaceOrder stored procedure parameters
|
||||
webapp031 and WEBAPP003 determines default order status"""
|
||||
|
||||
def __init__(self, company_no, order_no, payment_method='card', data={}):
|
||||
def __init__(self, company_no, order_no, web_user_name=None, payment_method='card', data={}):
|
||||
super(PlaceOrder, self).__init__('Jeeves_Esales_PlaceOrder')
|
||||
|
||||
self['c_CompanyNo'] = str(company_no)
|
||||
|
|
@ -219,6 +218,9 @@ class PlaceOrder(StoredProcedure):
|
|||
# 1 = card, else invoice. Card requires manual update.
|
||||
self['c_PaymentType'] = '1' if payment_method is 'card' else '0'
|
||||
|
||||
# Unique ID added to 'kpw' when invoicing is allowed.
|
||||
self['c_webUserName'] = web_user_name
|
||||
|
||||
self['c_LevSattKod'] = 2 # 2 = Schenker, 4 = Collect
|
||||
self['c_orderStatus'] = None # Override orderStatusCode when using invoicing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue