Refactor how batch editing is done; don't include rows for that sometimes

Various other fixes also..for sake of new purchase batches
This commit is contained in:
Lance Edgar 2016-11-08 12:56:12 -06:00
parent da8ef9ebd8
commit 7454e611c5
7 changed files with 85 additions and 26 deletions

View file

@ -5,6 +5,7 @@
${parent.head_tags()}
<script type="text/javascript">
$(function() {
$('#order-form').click(function() {
% if vendor_cost_count > 199:
if (! confirm("This vendor has ${'{:,d}'.format(vendor_cost_count)} cost records.\n\n" +
@ -14,14 +15,15 @@
}
% endif
$(this).button('disable').button('option', 'label', "Working, please wait...");
location.href = '${url('purchases.batch.order_form', uuid=instance.uuid)}';
location.href = '${url('purchases.batch.order_form', uuid=batch.uuid)}';
});
});
</script>
</%def>
<%def name="leading_buttons()">
% if not instance.executed and request.has_perm('purchases.batch.order_form'):
% if not batch.complete and not batch.executed and request.has_perm('purchases.batch.order_form'):
<button type="button" id="order-form">View as Order Form</button>
% endif
</%def>