Expose vendor item code for purchase credits
also, fix some issues with mobile receiving logic
This commit is contained in:
parent
91bb38573b
commit
90f0fcfea6
|
@ -50,6 +50,7 @@ class PurchaseCreditView(MasterView):
|
||||||
'invoice_number',
|
'invoice_number',
|
||||||
'invoice_date',
|
'invoice_date',
|
||||||
'upc',
|
'upc',
|
||||||
|
'vendor_item_code',
|
||||||
'brand_name',
|
'brand_name',
|
||||||
'description',
|
'description',
|
||||||
'size',
|
'size',
|
||||||
|
@ -81,6 +82,7 @@ class PurchaseCreditView(MasterView):
|
||||||
|
|
||||||
g.set_label('invoice_number', "Invoice No.")
|
g.set_label('invoice_number', "Invoice No.")
|
||||||
g.set_label('upc', "UPC")
|
g.set_label('upc', "UPC")
|
||||||
|
g.set_label('vendor_item_code', "Item Code")
|
||||||
g.set_label('brand_name', "Brand")
|
g.set_label('brand_name', "Brand")
|
||||||
g.set_label('cases_shorted', "Cases")
|
g.set_label('cases_shorted', "Cases")
|
||||||
g.set_label('units_shorted', "Units")
|
g.set_label('units_shorted', "Units")
|
||||||
|
|
|
@ -116,14 +116,6 @@ class ReceivingBatchView(PurchasingBatchView):
|
||||||
'status_code',
|
'status_code',
|
||||||
]
|
]
|
||||||
|
|
||||||
row_form_fields = [
|
|
||||||
'vendor',
|
|
||||||
'department',
|
|
||||||
'complete',
|
|
||||||
'executed',
|
|
||||||
'executed_by',
|
|
||||||
]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def batch_mode(self):
|
def batch_mode(self):
|
||||||
return self.enum.PURCHASE_BATCH_MODE_RECEIVING
|
return self.enum.PURCHASE_BATCH_MODE_RECEIVING
|
||||||
|
@ -291,7 +283,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
||||||
if self.request.has_perm('{}.create_row'.format(self.get_permission_prefix())):
|
if self.request.has_perm('{}.create_row'.format(self.get_permission_prefix())):
|
||||||
update_form = forms.Form(schema=ReceivingForm(), request=self.request)
|
update_form = forms.Form(schema=ReceivingForm(), request=self.request)
|
||||||
if update_form.validate(newstyle=True):
|
if update_form.validate(newstyle=True):
|
||||||
row = update_form.validated['row']
|
row = self.Session.merge(update_form.validated['row'])
|
||||||
mode = update_form.validated['mode']
|
mode = update_form.validated['mode']
|
||||||
cases = update_form.validated['cases']
|
cases = update_form.validated['cases']
|
||||||
units = update_form.validated['units']
|
units = update_form.validated['units']
|
||||||
|
@ -334,6 +326,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
||||||
credit.invoice_date = batch.invoice_date
|
credit.invoice_date = batch.invoice_date
|
||||||
credit.product = row.product
|
credit.product = row.product
|
||||||
credit.upc = row.upc
|
credit.upc = row.upc
|
||||||
|
credit.vendor_item_code = row.vendor_code
|
||||||
credit.brand_name = row.brand_name
|
credit.brand_name = row.brand_name
|
||||||
credit.description = row.description
|
credit.description = row.description
|
||||||
credit.size = row.size
|
credit.size = row.size
|
||||||
|
@ -397,9 +390,9 @@ class ReceivingForm(colander.MappingSchema):
|
||||||
# 'mispick',
|
# 'mispick',
|
||||||
]))
|
]))
|
||||||
|
|
||||||
cases = colander.SchemaNode(colander.Decimal(), missing=colander.null)
|
cases = colander.SchemaNode(colander.Decimal(), missing=None)
|
||||||
|
|
||||||
units = colander.SchemaNode(colander.Decimal(), missing=colander.null)
|
units = colander.SchemaNode(colander.Decimal(), missing=None)
|
||||||
|
|
||||||
expiration_date = colander.SchemaNode(colander.Date(), missing=colander.null)
|
expiration_date = colander.SchemaNode(colander.Date(), missing=colander.null)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue