[OPEN-ILS-GENERAL] Action::Trigger money_summary

Josh Stompro stomproj at exchange.larl.org
Thu Sep 8 14:46:11 EDT 2016


I have sort of figured it out, but not completely.  The mus.balance_owed is being inserted as a value, not as a data structure when it is being fleshed.  So if I use

Total Account Balance: $[% user.money_summary | format('%.2f')

I get the mus.balanced_owed value for that patron.  

I should have mentioned that I'm doing this on a 2.10.5 system. 

The data dump does show a usr value that equals either the balance_owed or total_owed, but from looking at the Field Mapper, I cannot spot what field would just have the total owed in the AU object.  I haven't figured out how to get the TT Dumper to output keys, so it is a little hard to read.  When I remove the "usr.money_summary" field path, that value goes away.  So it is just adding in one of the MUS fields instead of the whole thing.  I did notice that the Money Summary is the only virtual link with a "might_have" relationship.  Is that the normal behavior for might_have?

                 undef,
                 'f',
                 '2016-09-07T14:14:58-0500',
                 undef,
                 'f',
                 undef,
                 undef,
                 undef,
                 '154.00'  <--- seems to be the mus.balance_owed value
               ], 'Fieldmapper::actor::user' );

So should I be getting the whole 'Fieldmapper::money::usr_summary object when In include usr.money_summary in the environment field path?  Why would my test system be behaving incorrectly?  How does it determine which value from mus that it is including?  Is that just because balance_owed is the first field listed in the id="mus" fieldmapper definition?

If I wanted the mus.total_owed or mus.total_paid, how would I grab those?

Josh Stompro - LARL IT Director


-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Josh Stompro
Sent: Tuesday, September 06, 2016 4:30 PM
To: Evergreen Discussion Group
Subject: Re: [OPEN-ILS-GENERAL] Action::Trigger money_summary

Thanks for testing it Jason.  I'll keep poking at it tomorrow to try and figure out what I'm doing wrong.

Josh Stompro - LARL IT Director


-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Jason Etheridge
Sent: Tuesday, September 06, 2016 4:13 PM
To: Evergreen Discussion Group
Subject: Re: [OPEN-ILS-GENERAL] Action::Trigger money_summary

> Don't you have to include the money.usr_summary object, mus, in the 
> trigger environment before the virtual link will work?

Doesn't look like it.  I added this to the stock "Circ History CSV"
template (easiest one I could find to test with):

Environment:
usr.money_summary

Template:
[% user = target.0.usr %]
[% user.money_summary.total_owed %]

And it worked.

--
Jason Etheridge
| Community and Migration Manager
| Equinox Software - Open Your Library
| 1-877-OPEN-ILS (673-6457)
| jason at esilibrary.com
| http://www.esilibrary.com


More information about the Open-ils-general mailing list