lp1905028 lost items and price versus acq cost user/gcollum/lp1905028-acq-price-signoff
authorJason Etheridge <jason@EquinoxOLI.org>
Tue, 29 Jun 2021 19:07:53 +0000 (15:07 -0400)
committerGarry Collum <gcollum@gmail.com>
Wed, 7 Jul 2021 19:20:12 +0000 (15:20 -0400)
forgot to commit the upgrade script :-)

Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905028.item_value_fields.sql [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905028.item_value_fields.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905028.item_value_fields.sql
new file mode 100644 (file)
index 0000000..b27de60
--- /dev/null
@@ -0,0 +1,45 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT into config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'circ.primary_item_value_field',
+        'circ',
+        oils_i18n_gettext(
+            'circ.primary_item_value_field',
+            'Use Item Price or Cost as Primary Item Value',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'circ.primary_item_value_field',
+            'Expects "price" or "cost" and defaults to price.  This refers to the corresponding field on the item record and gets used in such contexts as notices, max fine values when using item price caps (setting or fine rules), and long overdue, damaged, and lost billings.',
+            'coust',
+            'description'
+        ),
+        'string'
+    );
+
+INSERT into config.org_unit_setting_type
+    (name, grp, label, description, datatype)
+    VALUES (
+        'circ.secondary_item_value_field',
+        'circ',
+        oils_i18n_gettext(
+            'circ.secondary_item_value_field',
+            'Use Item Price or Cost as Backup Item Value',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'circ.secondary_item_value_field',
+            'Expects "price" or "cost", but defaults to neither.  This refers to the corresponding field on the item record and is used as a second-pass fall-through value when determining an item value.  If needed, Evergreen will still look at the "Default Item Price" setting as a final fallback.',
+            'coust',
+            'description'
+        ),
+        'string'
+    );
+
+COMMIT;