Use 'today' as fallback date for ordering worksheet
This commit is contained in:
parent
79b1502920
commit
fde5398455
|
@ -224,12 +224,12 @@ ${h.end_form()}
|
||||||
% endfor
|
% endfor
|
||||||
% if not ignore_cases:
|
% if not ignore_cases:
|
||||||
<th>
|
<th>
|
||||||
${batch.date_ordered.strftime('%m/%d')}<br />
|
${order_date.strftime('%m/%d')}<br />
|
||||||
Cases
|
Cases
|
||||||
</th>
|
</th>
|
||||||
% endif
|
% endif
|
||||||
<th>
|
<th>
|
||||||
${batch.date_ordered.strftime('%m/%d')}<br />
|
${order_date.strftime('%m/%d')}<br />
|
||||||
Units
|
Units
|
||||||
</th>
|
</th>
|
||||||
<th>PO Total</th>
|
<th>PO Total</th>
|
||||||
|
|
|
@ -170,8 +170,12 @@ class OrderingBatchView(PurchasingBatchView):
|
||||||
history = list(reversed(history))
|
history = list(reversed(history))
|
||||||
|
|
||||||
title = self.get_instance_title(batch)
|
title = self.get_instance_title(batch)
|
||||||
|
order_date = batch.date_ordered
|
||||||
|
if not order_date:
|
||||||
|
order_date = localtime(self.rattail_config).date()
|
||||||
return self.render_to_response('worksheet', {
|
return self.render_to_response('worksheet', {
|
||||||
'batch': batch,
|
'batch': batch,
|
||||||
|
'order_date': order_date,
|
||||||
'instance': batch,
|
'instance': batch,
|
||||||
'instance_title': title,
|
'instance_title': title,
|
||||||
'instance_url': self.get_action_url('view', batch),
|
'instance_url': self.get_action_url('view', batch),
|
||||||
|
|
Loading…
Reference in a new issue