diff --git a/tailbone/templates/purchases/batches/create.mako b/tailbone/templates/purchases/batches/create.mako index a26bb954..0cea8c6a 100644 --- a/tailbone/templates/purchases/batches/create.mako +++ b/tailbone/templates/purchases/batches/create.mako @@ -48,7 +48,7 @@ alert(data.error); } else { $.each(data.purchases, function(i, purchase) { - purchases.append($('')); + purchases.append($('')); }); } }); diff --git a/tailbone/views/purchases/batch.py b/tailbone/views/purchases/batch.py index 8fe32e11..85099900 100644 --- a/tailbone/views/purchases/batch.py +++ b/tailbone/views/purchases/batch.py @@ -253,7 +253,7 @@ class PurchaseBatchView(BatchMasterView): purchases = purchases.filter(model.Purchase.status == self.enum.PURCHASE_STATUS_RECEIVED)\ .order_by(model.Purchase.date_received, model.Purchase.created) - return {'purchases': [{'uuid': p.uuid, 'display': self.render_eligible_purchase(p)} + return {'purchases': [{'key': p.uuid, 'display': self.render_eligible_purchase(p)} for p in purchases]} def render_eligible_purchase(self, purchase): @@ -395,6 +395,7 @@ class PurchaseBatchView(BatchMasterView): fs.units_expired.set(renderer=forms.renderers.QuantityFieldRenderer) fs.cases_mispick.set(renderer=forms.renderers.QuantityFieldRenderer) fs.units_mispick.set(renderer=forms.renderers.QuantityFieldRenderer) + fs.po_line_number.set(label="PO Line Number") fs.po_unit_cost.set(label="PO Unit Cost", renderer=forms.renderers.CurrencyFieldRenderer) fs.po_total.set(label="PO Total", renderer=forms.renderers.CurrencyFieldRenderer) fs.invoice_unit_cost.set(renderer=forms.renderers.CurrencyFieldRenderer) @@ -447,8 +448,10 @@ class PurchaseBatchView(BatchMasterView): fs.units_expired, fs.cases_mispick, fs.units_mispick, + fs.po_line_number, fs.po_unit_cost, fs.po_total, + fs.invoice_line_number, fs.invoice_unit_cost, fs.invoice_total, fs.status_code,