Remove "case quantity" field from Ordering Batch download as Excel file

This commit is contained in:
Lance Edgar 2017-05-25 12:34:12 -05:00
parent da0f5cb63c
commit 95418ab459

View file

@ -237,11 +237,11 @@ class OrderingBatchView(PurchasingBatchView):
worksheet.append(["Store", "Vendor", "Date ordered"]) worksheet.append(["Store", "Vendor", "Date ordered"])
worksheet.append([batch.store.name, batch.vendor.name, batch.date_ordered.strftime('%m/%d/%Y')]) worksheet.append([batch.store.name, batch.vendor.name, batch.date_ordered.strftime('%m/%d/%Y')])
worksheet.append([]) worksheet.append([])
worksheet.append(['vendor_code', 'upc', 'brand_name', 'description', 'case_quantity', 'cases_ordered', 'units_ordered']) worksheet.append(['vendor_code', 'upc', 'brand_name', 'description', 'cases_ordered', 'units_ordered'])
for row in batch.active_rows(): for row in batch.active_rows():
worksheet.append([row.vendor_code, six.text_type(row.upc), row.brand_name, worksheet.append([row.vendor_code, six.text_type(row.upc), row.brand_name,
'{} {}'.format(row.description, row.size), '{} {}'.format(row.description, row.size),
row.case_quantity, row.cases_ordered, row.units_ordered]) row.cases_ordered, row.units_ordered])
# write Excel file to batch data dir # write Excel file to batch data dir
filedir = batch.filedir(self.rattail_config) filedir = batch.filedir(self.rattail_config)