Introduce support for "children first" truck dump receiving
still needs more testing to see what's left...
This commit is contained in:
parent
4af971b83c
commit
a45ce2ced2
7 changed files with 201 additions and 34 deletions
|
@ -48,13 +48,24 @@
|
|||
$('.field-wrapper.invoice_date').show();
|
||||
$('.field-wrapper.invoice_number').show();
|
||||
|
||||
} else if (batch_type == 'truck_dump') {
|
||||
$('.field-wrapper.truck_dump_batch_uuid').show();
|
||||
$('.field-wrapper.invoice_file').show();
|
||||
$('.field-wrapper.invoice_parser_key').show();
|
||||
$('.field-wrapper.vendor_uuid').hide();
|
||||
} else if (batch_type == 'truck_dump_children_first') {
|
||||
$('.field-wrapper.truck_dump_batch_uuid').hide();
|
||||
$('.field-wrapper.invoice_file').hide();
|
||||
$('.field-wrapper.invoice_parser_key').hide();
|
||||
$('.field-wrapper.vendor_uuid').show();
|
||||
$('.field-wrapper.date_ordered').hide();
|
||||
$('.field-wrapper.date_received').hide();
|
||||
$('.field-wrapper.date_received').show();
|
||||
$('.field-wrapper.po_number').hide();
|
||||
$('.field-wrapper.invoice_date').hide();
|
||||
$('.field-wrapper.invoice_number').hide();
|
||||
|
||||
} else if (batch_type == 'truck_dump_children_last') {
|
||||
$('.field-wrapper.truck_dump_batch_uuid').hide();
|
||||
$('.field-wrapper.invoice_file').hide();
|
||||
$('.field-wrapper.invoice_parser_key').hide();
|
||||
$('.field-wrapper.vendor_uuid').show();
|
||||
$('.field-wrapper.date_ordered').hide();
|
||||
$('.field-wrapper.date_received').show();
|
||||
$('.field-wrapper.po_number').hide();
|
||||
$('.field-wrapper.invoice_date').hide();
|
||||
$('.field-wrapper.invoice_number').hide();
|
||||
|
|
|
@ -54,6 +54,22 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="object_helpers()">
|
||||
${parent.object_helpers()}
|
||||
% if not request.rattail_config.production() and not batch.executed and not batch.complete and request.has_perm('admin') and batch.is_truck_dump_parent() and batch.truck_dump_children_first:
|
||||
<div class="object-helper">
|
||||
<h3>Development Tools</h3>
|
||||
<div class="object-helper-content">
|
||||
${h.form(url('{}.auto_receive'.format(route_prefix), uuid=batch.uuid), class_='autodisable')}
|
||||
${h.csrf_token(request)}
|
||||
${h.submit('submit', "Auto-Receive All Items")}
|
||||
${h.end_form()}
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
|
||||
${parent.body()}
|
||||
|
||||
% if master.allow_truck_dump and request.has_perm('{}.edit_row'.format(permission_prefix)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue