LP#1980257: Patron bucket money summary
authorBill Erickson <berickxx@gmail.com>
Wed, 29 Jun 2022 18:44:12 +0000 (14:44 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 12 Jul 2022 13:28:33 +0000 (09:28 -0400)
This patch adds the patron's balance owed as a column
in the user bucket grid.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/templates/staff/circ/patron/bucket/t_view.tt2

index d036e9d..61753df 100644 (file)
@@ -7827,7 +7827,7 @@ SELECT  usr,
                        <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
                </links>
        </class>
-       <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
+       <class id="mus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
                <fields oils_persist:primary="usr" oils_persist:sequence="">
                        <field name="balance_owed" reporter:datatype="money" />
                        <field name="total_owed" reporter:datatype="money" />
@@ -7837,6 +7837,13 @@ SELECT  usr,
                <links>
                        <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
+               <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+                       <actions>
+                               <retrieve permission="VIEW_USER">
+                                       <context link="usr" field="home_ou"/>
+                               </retrieve>
+                       </actions>
+               </permacrud>
        </class>
        <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
                <fields oils_persist:primary="code" oils_persist:sequence="">
index a5d6a9c..22241fc 100644 (file)
@@ -57,6 +57,7 @@ progress {
   <eg-grid-field label="[% l('Middle Name') %]" path="second_given_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Last Name') %]" path="family_name" visible></eg-grid-field>
   <eg-grid-field label="[% l('Home Library') %]"    path="home_ou.name" visible></eg-grid-field>
+  <eg-grid-field label="[% l('Balance Owed') %]" path="money_summary.balance_owed" visible></eg-grid-field>
   <eg-grid-field path="mailing_address.*" hidden></eg-grid-field>
   <eg-grid-field path="billing_address.*" hidden></eg-grid-field>