Tweak the "create" screen for purchase batches, for more customization
Also add some fields to the batch row fieldset
This commit is contained in:
parent
01ed68a3fe
commit
e9dd44fa39
|
@ -48,7 +48,7 @@
|
||||||
alert(data.error);
|
alert(data.error);
|
||||||
} else {
|
} else {
|
||||||
$.each(data.purchases, function(i, purchase) {
|
$.each(data.purchases, function(i, purchase) {
|
||||||
purchases.append($('<option value="' + purchase.uuid + '">' + purchase.display + '</option>'));
|
purchases.append($('<option value="' + purchase.key + '">' + purchase.display + '</option>'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -253,7 +253,7 @@ class PurchaseBatchView(BatchMasterView):
|
||||||
purchases = purchases.filter(model.Purchase.status == self.enum.PURCHASE_STATUS_RECEIVED)\
|
purchases = purchases.filter(model.Purchase.status == self.enum.PURCHASE_STATUS_RECEIVED)\
|
||||||
.order_by(model.Purchase.date_received, model.Purchase.created)
|
.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]}
|
for p in purchases]}
|
||||||
|
|
||||||
def render_eligible_purchase(self, purchase):
|
def render_eligible_purchase(self, purchase):
|
||||||
|
@ -395,6 +395,7 @@ class PurchaseBatchView(BatchMasterView):
|
||||||
fs.units_expired.set(renderer=forms.renderers.QuantityFieldRenderer)
|
fs.units_expired.set(renderer=forms.renderers.QuantityFieldRenderer)
|
||||||
fs.cases_mispick.set(renderer=forms.renderers.QuantityFieldRenderer)
|
fs.cases_mispick.set(renderer=forms.renderers.QuantityFieldRenderer)
|
||||||
fs.units_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_unit_cost.set(label="PO Unit Cost", renderer=forms.renderers.CurrencyFieldRenderer)
|
||||||
fs.po_total.set(label="PO Total", renderer=forms.renderers.CurrencyFieldRenderer)
|
fs.po_total.set(label="PO Total", renderer=forms.renderers.CurrencyFieldRenderer)
|
||||||
fs.invoice_unit_cost.set(renderer=forms.renderers.CurrencyFieldRenderer)
|
fs.invoice_unit_cost.set(renderer=forms.renderers.CurrencyFieldRenderer)
|
||||||
|
@ -447,8 +448,10 @@ class PurchaseBatchView(BatchMasterView):
|
||||||
fs.units_expired,
|
fs.units_expired,
|
||||||
fs.cases_mispick,
|
fs.cases_mispick,
|
||||||
fs.units_mispick,
|
fs.units_mispick,
|
||||||
|
fs.po_line_number,
|
||||||
fs.po_unit_cost,
|
fs.po_unit_cost,
|
||||||
fs.po_total,
|
fs.po_total,
|
||||||
|
fs.invoice_line_number,
|
||||||
fs.invoice_unit_cost,
|
fs.invoice_unit_cost,
|
||||||
fs.invoice_total,
|
fs.invoice_total,
|
||||||
fs.status_code,
|
fs.status_code,
|
||||||
|
|
Loading…
Reference in a new issue