[OPEN-ILS-GENERAL] Fine Migration Question

Martha Driscoll driscoll at noblenet.org
Wed May 9 10:27:23 EDT 2012


Hmm.  I am putting data in money.billing.  Here is my script that inserts
the fine info:

BEGIN;

INSERT INTO money.grocery
(id,usr,xact_start,xact_finish,billing_location,note)
      SELECT DISTINCT
        s.id AS id,
        s.pnumber AS usr,
        s.date_due AS xact_start,
        s.date_ret AS xact_finish,
        CASE
           WHEN s.charge_loc like 'beb%' THEN 3  -- BEB
           WHEN s.charge_loc like 'bef%' THEN 4  -- BEF
           WHEN s.charge_loc like 'bev%' THEN 5  -- BEV
           WHEN s.charge_loc like 'bhc%' THEN 7  -- BHC
           WHEN s.charge_loc like 'blc%' THEN 9  -- BLC
           WHEN s.charge_loc like 'dan%' THEN 11 -- DAN
           WHEN s.charge_loc like 'end%' THEN 13 -- END
        END AS billing_location,
      s.descript AS note
      FROM staging.iii_fines s
    ;

INSERT INTO money.billing (xact,amount,billing_type,btype,note)
      SELECT DISTINCT
        s.id AS xact,
        s.amount_owed AS amount,
        'III Fines' AS billing_type,
        102 AS btype,
        s.descript AS note
      FROM staging.iii_fines s
    ;

SELECT SETVAL('money.billable_xact_id_seq', (SELECT MAX(id) FROM
money.billable_xact));

If anything looks crazy or wrong, let me know.

-- 
Martha Driscoll, Systems Manager
North of Boston Library Exchange (NOBLE)
driscoll at noblenet.org


> Quoting Martha Driscoll <driscoll at noblenet.org>:
>
>> I am working on migrating fine data from our legacy circulation
>> system.  I have inserted the fine data into the money.grocery table.
>>  If I pull up a patron in the client there is no '(Has Bills)'
>> indicator under the name or an amount under the Bills button.  If I
>> click on the Bills button I do see the charge that I added. I did
>> try running the fine_generator.
>>
>> When I ran this by Thomas Berezansky he thought the
>> money.open_usr_summary view has to be updated.  Is that all that
>> needs to be done?  That's a view and I'm not sure how to populate
>> that so any advice would be appreciated.
>
> During our migration, I put grocery bill information in both
> money.billing and money.grocery. That seemed to work.
>
> HtH,
> Jason
>
>
>>
>> --
>> Martha Driscoll
>> Systems Manager
>> North of Boston Library Exchange
>> Danvers, Massachusetts
>> www.noblenet.org
>>
>>
>
>
>
> --
> Jason Stephenson
> Assistant Director for Technology Services
> Merrimack Valley Library Consortium
> Chief Bug Wrangler, Evergreen ILS
>




More information about the Open-ils-general mailing list