Update some enum references, render all purchase batch cases/units fields as quantity

This commit is contained in:
Lance Edgar 2016-12-20 16:10:22 -06:00
parent feef8a5ecc
commit 0b10021942
3 changed files with 18 additions and 8 deletions

View file

@ -6,7 +6,7 @@
<script type="text/javascript">
function show_mode(mode) {
if (mode == ${enum.PURCHASE_BATCH_MODE_NEW}) {
if (mode == ${enum.PURCHASE_BATCH_MODE_ORDERING}) {
$('.field-wrapper.store_uuid').show();
$('.field-wrapper.purchase_uuid').hide();
$('.field-wrapper.department_uuid').show();
@ -81,7 +81,7 @@
$('.field-wrapper.purchase_uuid select').selectmenu();
$('.field-wrapper.department_uuid select').selectmenu();
show_mode(${form.fieldset.model.mode or enum.PURCHASE_BATCH_MODE_NEW});
show_mode(${form.fieldset.model.mode or enum.PURCHASE_BATCH_MODE_ORDERING});
});

View file

@ -33,7 +33,7 @@
</%def>
<%def name="leading_buttons()">
% if batch.mode == enum.PURCHASE_BATCH_MODE_NEW and not batch.complete and not batch.executed and request.has_perm('purchases.batch.order_form'):
% if batch.mode == enum.PURCHASE_BATCH_MODE_ORDERING and not batch.complete and not batch.executed and request.has_perm('purchases.batch.order_form'):
<button type="button" id="order-form">Ordering Form</button>
% elif batch.mode == enum.PURCHASE_BATCH_MODE_RECEIVING and not batch.complete and not batch.executed and request.has_perm('purchases.batch.receiving_form'):
<button type="button" id="receive-form">Receiving Form</button>