LP 1198465: Add virtual link to void_payment from money.billing.
authorJason Stephenson <jason@sigio.com>
Fri, 21 Feb 2014 02:02:07 +0000 (21:02 -0500)
committerJason Stephenson <jason@sigio.com>
Fri, 21 Feb 2014 02:02:07 +0000 (21:02 -0500)
Add a virtual link in the fm_IDL.xml entry for class mb (money.billing)
to point to mvp (money.void_payment).

Alter open-ils.circ.money.billing.retrieve.all to flesh the void_payment
field added to money.billing when it retrieves bills.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm

index adab4b3..f393e74 100644 (file)
@@ -6917,10 +6917,12 @@ SELECT  usr,
                        <field reporter:label="Note" name="note" reporter:datatype="text"/>
                        <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
                        <field reporter:label="Type" name="btype" reporter:datatype="link"/>
+                       <field reporter:label="Void Payment" name="void_payment" oils_persist:virtual="true" reporter:datatype="link"/>
                </fields>
                <links>
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
                        <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
+                       <link field="void_payment" reltype="might_have" key="billing" map="" class="mvp"/>
                </links>
        </class>
        <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
index cc19fdb..619ae40 100644 (file)
@@ -810,9 +810,10 @@ sub billing_items {
         $evt = $U->check_perms($staff->id, $staff->home_ou, 'VIEW_TRANSACTION');
         return $evt if $evt;
     }
-    
+
     return $apputils->simplereq( 'open-ils.cstore',
-        'open-ils.cstore.direct.money.billing.search.atomic', { xact => $transid } )
+        'open-ils.cstore.direct.money.billing.search.atomic', { xact => $transid },
+                             {flesh=>1, flesh_fields=>{mb=>['void_payment']}})
 }