Bug 22521: Update UI to use accountlines.status
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 29 Mar 2019 14:31:22 +0000 (14:31 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 17 Apr 2019 16:49:36 +0000 (16:49 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
opac/opac-user.pl

index 504d1ab..ee1a90f 100644 (file)
@@ -1,29 +1,28 @@
 [%- BLOCK account_type_description -%]
     [%- SWITCH account.accounttype -%]
-        [%- CASE 'Pay'   -%]<span>Payment, thanks</span>
-        [%- CASE 'Pay00' -%]<span>Payment, thanks (cash via SIP2)</span>
-        [%- CASE 'Pay01' -%]<span>Payment, thanks (VISA via SIP2)</span>
-        [%- CASE 'Pay02' -%]<span>Payment, thanks (credit card via SIP2)</span>
-        [%- CASE 'VOID'  -%]<span>Voided</span>
-        [%- CASE 'N'     -%]<span>New card</span>
-        [%- CASE 'F'     -%]<span>Fine</span>
-        [%- CASE 'A'     -%]<span>Account management fee</span>
-        [%- CASE 'M'     -%]<span>Sundry</span>
-        [%- CASE 'L'     -%]<span>Lost item</span>
-        [%- CASE 'W'     -%]<span>Writeoff</span>
-        [%- CASE 'FU'    -%]<span>Accruing fine</span>
-        [%- CASE 'HE'    -%]<span>Hold waiting too long</span>
-        [%- CASE 'Rent'  -%]<span>Rental fee</span>
-        [%- CASE 'FOR'   -%]<span>Forgiven</span>
+        [%- CASE 'Pay'     -%]<span>Payment, thanks</span>
+        [%- CASE 'Pay00'   -%]<span>Payment, thanks (cash via SIP2)</span>
+        [%- CASE 'Pay01'   -%]<span>Payment, thanks (VISA via SIP2)</span>
+        [%- CASE 'Pay02'   -%]<span>Payment, thanks (credit card via SIP2)</span>
+        [%- CASE 'VOID'    -%]<span>Voided</span>
+        [%- CASE 'N'       -%]<span>New card</span>
+        [%- CASE 'OVERDUE' -%]<span>Fine[%- PROCESS account_status_description account=account -%]</span>
+        [%- CASE 'A'       -%]<span>Account management fee</span>
+        [%- CASE 'M'       -%]<span>Sundry</span>
+        [%- CASE 'L'       -%]<span>Lost item</span>
+        [%- CASE 'W'       -%]<span>Writeoff</span>
+        [%- CASE 'HE'      -%]<span>Hold waiting too long</span>
+        [%- CASE 'Rent'    -%]<span>Rental fee</span>
+        [%- CASE 'FOR'     -%]<span>Forgiven</span>
         [%- CASE 'FFOR'  -%]<span>Fine forgiven</span>
-        [%- CASE 'LR'    -%]<span>Lost item fee refund</span>
+        [%- CASE 'LR'      -%]<span>Lost item fee refund</span>
         [%- CASE 'PF'    -%]<span>Lost item processing fee</span>
-        [%- CASE 'PAY'   -%]<span>Payment</span>
-        [%- CASE 'WO'    -%]<span>Writeoff</span>
-        [%- CASE 'C'     -%]<span>Credit</span>
-        [%- CASE 'CR'    -%]<span>Credit</span>
-        [%- CASE 'Res'   -%]<span>Hold fee</span>
-        [%- CASE         -%][% account.accounttype | html %]
+        [%- CASE 'PAY'     -%]<span>Payment</span>
+        [%- CASE 'WO'      -%]<span>Writeoff</span>
+        [%- CASE 'C'       -%]<span>Credit</span>
+        [%- CASE 'CR'      -%]<span>Credit</span>
+        [%- CASE 'Res'     -%]<span>Hold fee</span>
+        [%- CASE           -%][% account.accounttype | html %]
     [%- END -%]
 [%- END -%]
 
         [%- CASE                  -%][% account_offset.type | html %]
     [%- END -%]
 [%- END -%]
+
+[%- BLOCK account_status_description -%]
+    [%- SWITCH account.status -%]
+        [%- CASE 'UNRETURNED' -%]<span> (Accruing)</span>
+        [%- CASE 'RETURNED'   -%]<span> (Returned)</span>
+        [%- CASE 'FORGIVEN'   -%]<span> (Forgiven)</span>
+        [%- CASE              -%]
+    [%- END -%]
+[%- END -%]
index 672c4cb..2136410 100644 (file)
@@ -79,7 +79,7 @@
     [% INCLUDE 'str/members-menu.inc' %]
     [% Asset.js("js/members-menu.js") | $raw %]
     <script>
-        var type_fees = {'L':'','F':'','A':'','N':'','M':''};
+        var type_fees = {'L':'','OVERDUE':'','A':'','N':'','M':''};
         [% FOREACH invoice_types_loo IN invoice_types_loop %]
             type_fees['[% invoice_types_loo.authorised_value | html %]'] = "[% invoice_types_loo.lib | html %]";
         [% END %]
index e5c6b8e..4c722d2 100644 (file)
                           , [% account.description | html %]
                       [% END %]
                       &nbsp;
-                      [% IF ( account.itemnumber AND account.accounttype != 'F' AND account.accounttype != 'FU' ) %]
+                      [% IF ( account.itemnumber AND account.accounttype != 'OVERDUE' ) %]
                           <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&amp;itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>
                       [% END %]
                   </td>
index 0974880..58a58ee 100644 (file)
                         [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
                         [% CASE 'VOID' %]Voided
                         [% CASE 'N' %]New card
-                        [% CASE 'F' %]Fine
+                        [% CASE 'OVERDUE' %]Fine[%- PROCESS account_status_description account=account -%]
                         [% CASE 'A' %]Account management fee
                         [% CASE 'M' %]Sundry
                         [% CASE 'L' %]Lost item
                         [% CASE 'W' %]Writeoff
-                        [% CASE 'FU' %]Accruing fine
                         [% CASE 'HE' %]Hold waiting too long
                         [% CASE 'Rent' %]Rental fee
                         [% CASE 'FOR' %]Forgiven
 [% ELSE %]
     <h4>You have no fines or charges</h4>
 [% END %]
+
+[%- BLOCK account_status_description -%]
+    [%- SWITCH account.status -%]
+        [%- CASE 'UNRETURNED' -%]<span> (Accruing)</span>
+        [%- CASE 'RETURNED'   -%]<span> (Returned)</span>
+        [%- CASE 'FORGIVEN'   -%]<span> (Forgiven)</span>
+        [%- CASE              -%]
+    [%- END -%]
+[%- END -%]
index 265136d..c6f6cc7 100644 (file)
@@ -68,6 +68,7 @@
 
                     [% PROCESS 'account-table.inc' ACCOUNT_LINES = ACCOUNT_LINES, ENABLE_OPAC_PAYMENTS = ENABLE_OPAC_PAYMENTS, plugins = plugins %]
 
+
                 </div> <!-- / #useraccount -->
             </div> <!-- / .span10 -->
         </div> <!-- / .row-fluid -->
index cae3981..4ef0fb3 100755 (executable)
@@ -185,7 +185,7 @@ if ( $pending_checkouts->count ) { # Useless test
             {
                 borrowernumber    => $patron->borrowernumber,
                 amountoutstanding => { '>' => 0 },
-                accounttype       => [ 'F', 'L' ],
+                accounttype       => [ 'OVERDUE', 'L' ],
                 itemnumber        => $issue->{itemnumber}
             },
         );