]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/RELEASE_NOTES_NEXT/Administration/aged-money.adoc
82bc38a6c2bd8f9bc00263ac536b18ff76bce30c
[Evergreen.git] / docs / RELEASE_NOTES_NEXT / Administration / aged-money.adoc
1 Aged Money Changes
2 ^^^^^^^^^^^^^^^^^^
3
4 Two new global flag settings have been added to control if/when billings and
5 payments are aged.  Both settings are disabled by default.
6
7 * 'history.money.age_with_circs' 
8  ** Age billings and payments linked to circulations when the cirulcation 
9     is aged.
10 * 'history.money.retention_age'
11   ** Age billings and payments based on the age of the finish date for
12      the linked transaction.
13   ** To age money based on this setting, there is a new srfsh script
14      at (by default) /openils/bin/age_money.srfsh.
15
16 Aged Payment Additional Fields
17 ++++++++++++++++++++++++++++++
18
19 The aged payment table now has accepting_usr, cash_drawer, and billing
20 columns to improve reporting of aged money.
21
22 Manual Data Migration of Aged Money
23 +++++++++++++++++++++++++++++++++++
24
25 For users that wish to age money along with circulations (global flag 
26 'history.money.age_with_circs' is set to true), it's necessary to manaully
27 age money for circulations which have already been aged.  This can be
28 done directly in the database with SQL:
29
30 NOTE: This SQL can take a very long time to run on large databases, so
31 it may be necessary to process aged circulations in batches instead
32 of all at once.
33
34 [source,sql]
35 -------------------------------------------------------------------------
36 SELECT money.age_billings_and_payments_for_xact(circ.id)
37 FROM action.aged_circulation circ
38 -- limit to aged circs with billings
39 JOIN money.billing mb ON mb.xact = circ.id;
40 -------------------------------------------------------------------------
41
42