From d0a5e79430d0a6f068f78fad5f6d8cb4418810e9 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Fri, 12 Mar 2021 14:21:41 +0000
Subject: [PATCH] Bug 26734: (QA follow-up) Add 'tendered' and 'change' to
 notice

We include 'tendered' and 'change' parameters in the call to
GetPreparedLetter for the fee receipt slip.. we may as well include them
in the sample notice ;)
---
 installer/data/mysql/atomicupdate/bug_26734.perl     | 11 +++++++++++
 installer/data/mysql/en/mandatory/sample_notices.yml | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/installer/data/mysql/atomicupdate/bug_26734.perl b/installer/data/mysql/atomicupdate/bug_26734.perl
index faabb6b91b..048f9368fe 100644
--- a/installer/data/mysql/atomicupdate/bug_26734.perl
+++ b/installer/data/mysql/atomicupdate/bug_26734.perl
@@ -136,6 +136,17 @@ if ( CheckVersion($DBversion) ) {
     <td class="debit">[% debit.amountoutstanding | $Price %]</td>
   </tr>
 
+  [% IF ( tendered ) %]
+    <tr>
+      <td colspan="3">Amount tendered: </td>
+      <td>[% tendered | $Price %]</td>
+    </tr>
+    <tr>
+      <td colspan="3">Change given: </td>
+      <td>[% change | $Price %]</td>
+    </tr>
+  [% END %]
+
   <tfoot>
     <tr>
       <td colspan="4">Total outstanding dues as on date: </td>
diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml
index 1f85e0b56e..f8b4b09778 100644
--- a/installer/data/mysql/en/mandatory/sample_notices.yml
+++ b/installer/data/mysql/en/mandatory/sample_notices.yml
@@ -95,6 +95,17 @@ tables:
             - "    <td class=\"credit\">[% credit.amount | $Price %]</td>"
             - " </tr>"
             - ""
+            - "[% IF ( tendered ) %]"
+            - "  <tr>"
+            - "    <td colspan=\"3\">Amount tendered: </td>"
+            - "    <td>[% tendered | $Price %]</td>"
+            - "  </tr>"
+            - "  <tr>"
+            - "    <td colspan=\"3\">Change given: </td>"
+            - "    <td>[% change | $Price %]</td>"
+            - "  </tr>"
+            - "[% END %]"
+            - ""
             - "<tfoot>"
             - "  <tr>"
             - "    <td colspan=\"3\">Total outstanding dues as on date: </td>"
-- 
2.20.1