Various improvements to batch worksheets, index links etc.
This commit is contained in:
parent
00027b09f6
commit
0171f3ebba
|
@ -7,6 +7,10 @@
|
||||||
## ##############################################################################
|
## ##############################################################################
|
||||||
<%inherit file="/mobile/base.mako" />
|
<%inherit file="/mobile/base.mako" />
|
||||||
|
|
||||||
<%def name="title()">${model_title_plural}</%def>
|
<%def name="title()">${index_title}</%def>
|
||||||
|
|
||||||
|
% if master.mobile_creatable and request.has_perm('{}.create'.format(permission_prefix)):
|
||||||
|
${h.link_to("New {}".format(model_title), url('mobile.{}.create'.format(route_prefix)), class_='ui-btn ui-corner-all')}
|
||||||
|
% endif
|
||||||
|
|
||||||
${grid.render_complete()|n}
|
${grid.render_complete()|n}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
## -*- coding: utf-8; -*-
|
|
||||||
<%inherit file="/mobile/master/index.mako" />
|
|
||||||
|
|
||||||
<%def name="title()">Receiving</%def>
|
|
||||||
|
|
||||||
% if request.has_perm('receiving.create'):
|
|
||||||
${h.link_to("New Receiving Batch", url('mobile.receiving.create'), class_='ui-btn ui-corner-all')}
|
|
||||||
% endif
|
|
||||||
|
|
||||||
${parent.body()}
|
|
|
@ -1,7 +1,7 @@
|
||||||
## -*- coding: utf-8; -*-
|
## -*- coding: utf-8; -*-
|
||||||
<%inherit file="/base.mako" />
|
<%inherit file="/base.mako" />
|
||||||
|
|
||||||
<%def name="title()">Purchase Order Form</%def>
|
<%def name="title()">Ordering Worksheet</%def>
|
||||||
|
|
||||||
<%def name="extra_javascript()">
|
<%def name="extra_javascript()">
|
||||||
${parent.extra_javascript()}
|
${parent.extra_javascript()}
|
||||||
|
@ -237,8 +237,8 @@ ${h.end_form()}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
% for cost in subdepartment._order_costs:
|
% for i, cost in enumerate(subdepartment._order_costs, 1):
|
||||||
<tr data-uuid="${cost.product_uuid}">
|
<tr data-uuid="${cost.product_uuid}" class="${'even' if i % 2 == 0 else 'odd'}">
|
||||||
${self.order_form_row(cost)}
|
${self.order_form_row(cost)}
|
||||||
% for data in history:
|
% for data in history:
|
||||||
<td class="scratch_pad">
|
<td class="scratch_pad">
|
||||||
|
@ -270,7 +270,7 @@ ${h.end_form()}
|
||||||
<td class="current-order">
|
<td class="current-order">
|
||||||
${h.text('units_ordered_{}'.format(cost.uuid), value=int(cost._batchrow.units_ordered or 0) if cost._batchrow else None)}
|
${h.text('units_ordered_{}'.format(cost.uuid), value=int(cost._batchrow.units_ordered or 0) if cost._batchrow else None)}
|
||||||
</td>
|
</td>
|
||||||
<td class="po-total">${'${:0,.2f}'.format(cost._batchrow.po_total) if cost._batchrow else ''}</td>
|
<td class="po-total">${'${:0,.2f}'.format(cost._batchrow.po_total or 0) if cost._batchrow else ''}</td>
|
||||||
${self.extra_td(cost)}
|
${self.extra_td(cost)}
|
||||||
</tr>
|
</tr>
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<%def name="leading_buttons()">
|
<%def name="leading_buttons()">
|
||||||
% if not batch.complete and not batch.executed and request.has_perm('ordering.order_form'):
|
% if not batch.complete and not batch.executed and request.has_perm('ordering.order_form'):
|
||||||
<button type="button" id="order-form">Ordering Form</button>
|
<button type="button" id="order-form">Edit as Worksheet</button>
|
||||||
% endif
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
## -*- coding: utf-8; -*-
|
|
||||||
<%inherit file="/master/index.mako" />
|
|
||||||
|
|
||||||
<%def name="context_menu_items()">
|
|
||||||
${parent.context_menu_items()}
|
|
||||||
% if request.has_perm('purchases.batch.list'):
|
|
||||||
<li>${h.link_to("Go to Purchasing Batches", url('purchases.batch'))}</li>
|
|
||||||
% endif
|
|
||||||
</%def>
|
|
||||||
|
|
||||||
${parent.body()}
|
|
|
@ -50,6 +50,7 @@ class OrderingBatchView(PurchasingBatchView):
|
||||||
url_prefix = '/ordering'
|
url_prefix = '/ordering'
|
||||||
model_title = "Ordering Batch"
|
model_title = "Ordering Batch"
|
||||||
model_title_plural = "Ordering Batches"
|
model_title_plural = "Ordering Batches"
|
||||||
|
index_title = "Ordering"
|
||||||
|
|
||||||
row_grid_columns = [
|
row_grid_columns = [
|
||||||
'sequence',
|
'sequence',
|
||||||
|
@ -144,8 +145,7 @@ class OrderingBatchView(PurchasingBatchView):
|
||||||
'batch': batch,
|
'batch': batch,
|
||||||
'instance': batch,
|
'instance': batch,
|
||||||
'instance_title': title,
|
'instance_title': title,
|
||||||
'index_title': "{}: {}".format(self.get_model_title(), title),
|
'instance_url': self.get_action_url('view', batch),
|
||||||
'index_url': self.get_action_url('view', batch),
|
|
||||||
'vendor': batch.vendor,
|
'vendor': batch.vendor,
|
||||||
'departments': departments,
|
'departments': departments,
|
||||||
'history': history,
|
'history': history,
|
||||||
|
|
|
@ -88,6 +88,7 @@ class ReceivingBatchView(PurchasingBatchView):
|
||||||
url_prefix = '/receiving'
|
url_prefix = '/receiving'
|
||||||
model_title = "Receiving Batch"
|
model_title = "Receiving Batch"
|
||||||
model_title_plural = "Receiving Batches"
|
model_title_plural = "Receiving Batches"
|
||||||
|
index_title = "Receiving"
|
||||||
creatable = False
|
creatable = False
|
||||||
rows_deletable = False
|
rows_deletable = False
|
||||||
mobile_creatable = True
|
mobile_creatable = True
|
||||||
|
|
Loading…
Reference in a new issue