Tweak the "auto-receive all" tool for Chrome browser
also split out each helper section
This commit is contained in:
parent
b9c5f6a869
commit
af14216eea
|
@ -283,9 +283,7 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="object_helpers()">
|
||||
${self.render_status_breakdown()}
|
||||
|
||||
<%def name="render_po_vs_invoice_helper()">
|
||||
% if use_buefy and master.handler.has_purchase_order(batch) and master.handler.has_invoice_file(batch):
|
||||
<div class="object-helper">
|
||||
<h3>PO vs. Invoice</h3>
|
||||
|
@ -294,9 +292,9 @@
|
|||
</div>
|
||||
</div>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
${self.render_execute_helper()}
|
||||
|
||||
<%def name="render_auto_receive_helper()">
|
||||
% if master.has_perm('auto_receive') and master.can_auto_receive(batch):
|
||||
|
||||
<div class="object-helper">
|
||||
|
@ -329,8 +327,9 @@
|
|||
|
||||
<section class="modal-card-body">
|
||||
<p class="block">
|
||||
You can automatically mark all items as having been
|
||||
received normally.
|
||||
You can automatically set the "received" quantity to
|
||||
match the "shipped" quantity for all items, based on
|
||||
the invoice.
|
||||
</p>
|
||||
<p class="block">
|
||||
Would you like to do so?
|
||||
|
@ -341,12 +340,11 @@
|
|||
<b-button @click="autoReceiveShowDialog = false">
|
||||
Cancel
|
||||
</b-button>
|
||||
${h.form(url('{}.auto_receive'.format(route_prefix), uuid=batch.uuid))}
|
||||
${h.form(url('{}.auto_receive'.format(route_prefix), uuid=batch.uuid), **{'@submit': 'autoReceiveSubmitting = true'})}
|
||||
${h.csrf_token(request)}
|
||||
<b-button type="is-primary"
|
||||
native-type="submit"
|
||||
:disabled="autoReceiveSubmitting"
|
||||
@click="autoReceiveSubmitting = true"
|
||||
icon-pack="fas"
|
||||
icon-left="check">
|
||||
{{ autoReceiveSubmitting ? "Working, please wait..." : "Auto-Receive All Items" }}
|
||||
|
@ -359,6 +357,13 @@
|
|||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="object_helpers()">
|
||||
${self.render_status_breakdown()}
|
||||
${self.render_po_vs_invoice_helper()}
|
||||
${self.render_execute_helper()}
|
||||
${self.render_auto_receive_helper()}
|
||||
</%def>
|
||||
|
||||
<%def name="modify_this_page_vars()">
|
||||
${parent.modify_this_page_vars()}
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in a new issue