diff --git a/tailbone/views/purchases/credits.py b/tailbone/views/purchases/credits.py index 0d4b46ad..ef6cd497 100644 --- a/tailbone/views/purchases/credits.py +++ b/tailbone/views/purchases/credits.py @@ -50,6 +50,7 @@ class PurchaseCreditView(MasterView): 'invoice_number', 'invoice_date', 'upc', + 'vendor_item_code', 'brand_name', 'description', 'size', @@ -81,6 +82,7 @@ class PurchaseCreditView(MasterView): g.set_label('invoice_number', "Invoice No.") g.set_label('upc', "UPC") + g.set_label('vendor_item_code', "Item Code") g.set_label('brand_name', "Brand") g.set_label('cases_shorted', "Cases") g.set_label('units_shorted', "Units") diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index 1f882f70..97ff6cbe 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -116,14 +116,6 @@ class ReceivingBatchView(PurchasingBatchView): 'status_code', ] - row_form_fields = [ - 'vendor', - 'department', - 'complete', - 'executed', - 'executed_by', - ] - @property def batch_mode(self): 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())): update_form = forms.Form(schema=ReceivingForm(), request=self.request) if update_form.validate(newstyle=True): - row = update_form.validated['row'] + row = self.Session.merge(update_form.validated['row']) mode = update_form.validated['mode'] cases = update_form.validated['cases'] units = update_form.validated['units'] @@ -334,6 +326,7 @@ class ReceivingBatchView(PurchasingBatchView): credit.invoice_date = batch.invoice_date credit.product = row.product credit.upc = row.upc + credit.vendor_item_code = row.vendor_code credit.brand_name = row.brand_name credit.description = row.description credit.size = row.size @@ -397,9 +390,9 @@ class ReceivingForm(colander.MappingSchema): # '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)