LP#1679246: Patron billing add staff user
authorSkye Howard <showard@catalyte.io>
Tue, 10 Oct 2017 20:58:45 +0000 (20:58 +0000)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 7 Nov 2017 15:53:04 +0000 (10:53 -0500)
Added column to match XUL client of 'Accepting User' to display
username(barcode) @ home org unit

Signed-off-by: Alex Cautley <acautley@catalyte.io>
modified:   Open-ILS/examples/fm_IDL.xml
modified:   Open-ILS/src/templates/staff/circ/patron/t_xact_details.tt2

Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/templates/staff/circ/patron/t_xact_details.tt2

index 4e4e969..8750cfe 100644 (file)
@@ -7594,7 +7594,7 @@ SELECT  usr,
                        </actions>
                </permacrud>
        </class>
-       <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
+       <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
                <fields oils_persist:primary="id" oils_persist:sequence="">
                        <field reporter:label="Amount" name="amount" reporter:datatype="money" />
                        <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
@@ -7625,6 +7625,13 @@ SELECT  usr,
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
                        <link field="accepting_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_TRANSACTIONS">
+                    <context link="xact" jump="usr" field="home_ou"/>
+                </retrieve>
+                       </actions>
+               </permacrud>
        </class>
        <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
                <fields oils_persist:primary="id" oils_persist:sequence="">
index 032a726..8a8057c 100644 (file)
 <!-- NOTE: sorting disabled since payments are fetched via non-sortable API -->
 <br/>
 <eg-grid
-  main-label="[% l('Payments') %]"
-  idl-class="mp"
-  id-field="id"
-  auto-fields="true"
-  grid-controls="paymentGridControls"
-  page-size="10"
-  dateformat="{{$root.egDateAndTimeFormat}}">
-  <eg-grid-action 
-    label="[% l('Edit Note') %]" handler="editPaymentNotes"></eg-grid-action>
+ main-label="[% l('Payments') %]"
+ idl-class="mbp"
+ id-field="id"
+ grid-controls="paymentGridControls"
+ page-size="10"
+ dateformat="{{$root.egDateAndTimeFormat}}">
+ <eg-grid-action 
+   label="[% l('Edit Note') %]" handler="editPaymentNotes"></eg-grid-action>
+
+<eg-grid-field path="cash_payment.cash_drawer.name" parent-idl-class="mbp"
+   label="[% l('Cash Drawer') %]"></eg-grid-field>
+
+ <eg-grid-field path="accepting_usr">{{item.staff_name}} ({{item.staff_barcode}}) @ {{item.staff_org}}</eg-grid-field>
+
+ <eg-grid-field path="amount"></eg-grid-field>
+ <eg-grid-field path="id"></eg-grid-field>
+ <eg-grid-field path="note"></eg-grid-field>
+ <eg-grid-field path="payment_ts"></eg-grid-field>
+ <eg-grid-field path="payment_type"></eg-grid-field>
+ <eg-grid-field path="xact"></eg-grid-field>
+ <eg-grid-field path="voided"></eg-grid-field>
+
+ <eg-grid-field path="accepting_usr.family_name" name="staff_name"
+   label="[% l('Staff Last Name') %]" hidden required></eg-grid-field>
+
+ <eg-grid-field path="accepting_usr.card.barcode" name="staff_barcode"
+   label="[% l('Staff Barcode') %]" hidden required></eg-grid-field>
 
-  <eg-grid-field path="cash_payment.cash_drawer.name" 
-    label="[% l('Cash Drawer') %]"></eg-grid-field>
+ <eg-grid-field path="accepting_usr.home_ou.shortname" name="staff_org"
+   label="[% l('Staff Org Unit') %]" hidden required></eg-grid-field>
 
 </eg-grid>