]> git.evergreen-ils.org Git - Evergreen.git/commit
lp1905028 lost items and price versus acq cost
authorJason Etheridge <jason@EquinoxOLI.org>
Fri, 28 May 2021 20:25:22 +0000 (16:25 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 15 Sep 2021 14:29:02 +0000 (10:29 -0400)
commitaaad4807a982edfe968585e6398906dccde4cfde
tree1a6c88497504de0eeb1947a6618e6a1fb4101663
parent44c451131a1d43cb04bd069fe0b5372073c1f8d3
lp1905028 lost items and price versus acq cost

This feature adds two new library settings:

    Use Item Price or Cost as Primary Item Value
    Use Item Price or Cost as Backup Item Value

which intersect the behavior of these existing settings:

    Charge lost on zero
    Default Item Price
    Minimum Item Price
    Maximum Item Price

Each of these settings affect how item price is used in
various contexts and is not limited to "lost" items, but
can affect notices, fine rules, and billings for long
overdue and damaged items (as well as lost items).

By default, the price field on items is the only field
considered by these various uses, but if we set, for
example, "Use Item Price or Cost as Primary Item Value" to
"cost", then we'll use the cost field instead of the price
field.

Alternately, if we set the "Backup Item Value" to "cost"
and either leave the "Primary Item Value" setting unset or
set to "price", then we'll consider the price field first,
and if it is either unset/null or equal to 0 (and
"Charge lost on zero" is true), then it'll fall-through to
the cost field.  We can also flip the behavior with these
settings and consider cost first and then price second.

Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
Open-ILS/src/perlmods/lib/OpenILS/Const.pm
Open-ILS/src/perlmods/live_t/33-lp1905028-price-vs-cost.t [new file with mode: 0644]
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905028.item_value_fields.sql [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Circulation/acq_price.adoc [new file with mode: 0644]