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
|
||||
% if not ignore_cases:
|
||||
<th>
|
||||
${batch.date_ordered.strftime('%m/%d')}<br />
|
||||
${order_date.strftime('%m/%d')}<br />
|
||||
Cases
|
||||
</th>
|
||||
% endif
|
||||
<th>
|
||||
${batch.date_ordered.strftime('%m/%d')}<br />
|
||||
${order_date.strftime('%m/%d')}<br />
|
||||
Units
|
||||
</th>
|
||||
<th>PO Total</th>
|
||||
|
|
|
@ -170,8 +170,12 @@ class OrderingBatchView(PurchasingBatchView):
|
|||
history = list(reversed(history))
|
||||
|
||||
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', {
|
||||
'batch': batch,
|
||||
'order_date': order_date,
|
||||
'instance': batch,
|
||||
'instance_title': title,
|
||||
'instance_url': self.get_action_url('view', batch),
|
||||
|
|
Loading…
Reference in a new issue