From 93a57dc5afb2962d675c51504ecdb3afa34a95a7 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sat, 3 Feb 2018 21:17:02 -0500 Subject: Show whether or not there are any related invoices on the summary page Also prevent the generation of duplicate invoices based on the date of invoice and the current user. --- .../templates/dispatch/drivers/summary.html | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'app/dispatch/templates') diff --git a/app/dispatch/templates/dispatch/drivers/summary.html b/app/dispatch/templates/dispatch/drivers/summary.html index 82df917..55d0854 100644 --- a/app/dispatch/templates/dispatch/drivers/summary.html +++ b/app/dispatch/templates/dispatch/drivers/summary.html @@ -91,7 +91,8 @@ -{% if not can_invoice %} + +{% if not can_invoice and related_invoices|length == 0 %}
Note:
@@ -101,6 +102,32 @@

+{% elif related_invoices|length >= 1 %} +
+
+
Note:
+

+ There are Invoices related to these loads + + + + + + + + + + + {% for r in related_invoices %} + + + + + {% endfor %} + +
Invoice NumberInvoice AmountInvoice Paid
{{r.invoice_id}}{{r.total}}{{r.paid}}View
+

+
{% endif %} -- cgit v1.2.3