[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. bfdd5924587d3fa1ac42121374ee5e047848023c

Evergreen Git git at git.evergreen-ils.org
Mon Mar 14 17:02:32 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_10 has been updated
       via  bfdd5924587d3fa1ac42121374ee5e047848023c (commit)
       via  339c0a8b7da30f750796d3d85f6728e89f36b89c (commit)
       via  4c532f1ef5606e9b5ddadf91cb4f1e4233ff6376 (commit)
      from  e31994a7dd7620ae0c82d73daf719aad42b6d158 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bfdd5924587d3fa1ac42121374ee5e047848023c
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 14 17:01:16 2016 -0400

    LP#1551447: stamp database update
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 36cdbc8..533c306 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0972', :eg_version); -- jstompro/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0973', :eg_version); -- tmccanna/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql b/Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql
similarity index 95%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
rename to Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql
index 3e6f5d7..8cad6d4 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0973', :eg_version); -- tmccanna/gmcharlt
 
 UPDATE action_trigger.event_definition SET template = 
 $$

commit 339c0a8b7da30f750796d3d85f6728e89f36b89c
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 14 16:48:50 2016 -0400

    LP#1551447: don't update already-customized format.selfcheck.fines
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
index 84837be..3e6f5d7 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
@@ -31,6 +31,35 @@ $$
     [% END %]
     </ol>
 </div>
-$$ WHERE id=13;
+$$ WHERE id=13
+AND template = 
+$$
+[%- USE date -%]
+[%- SET user = target -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR xact IN user.open_billable_transactions_summary %]
+        <li>
+            <div>Details: 
+                [% IF xact.xact_type == 'circulation' %]
+                    [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+                [% ELSE %]
+                    [%- xact.last_billing_type -%]
+                [% END %]
+            </div>
+            <div>Total Billed: [% xact.total_owed %]</div>
+            <div>Total Paid: [% xact.total_paid %]</div>
+            <div>Balance Owed : [% xact.balance_owed %]</div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+$$
+;
 
-COMMIT;
\ No newline at end of file
+COMMIT;

commit 4c532f1ef5606e9b5ddadf91cb4f1e4233ff6376
Author: Terran McCanna <tmccanna at georgialibraries.org>
Date:   Tue Mar 1 17:35:28 2016 -0500

    LP#1551447 Selfcheck: Printing Fines Prints All Open Transactions
    
    This corrects the behavior of the selfcheck fines receipt print template.
    Prior to this, it printed all open billable transactions (eg, every item
    that the patron had checked out) regardless of whether or not it had bills
    associated with it. This adds a small bit of logic to the template to
    check for a balance due. It also updates the javascript to check for a
    balance on the account before launching the print function to prevent the
    system from taking unnecessary action.
    
    This includes a SQL upgrade script to update the Self-Checked Fines
    Receipt template for systems that are already in production, as well as
    including an update to the seed data.
    
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Jennifer Pringle <jennifer.pringle at bc.libraries.coop>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 9e9e09a..b69d9dc 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -10392,21 +10392,24 @@ $$
     <div>[% date.format %]</div>
     <br/>
 
+	Fines for:<br/>
     [% user.family_name %], [% user.first_given_name %]
     <ol>
     [% FOR xact IN user.open_billable_transactions_summary %]
-        <li>
-            <div>Details: 
-                [% IF xact.xact_type == 'circulation' %]
-                    [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
-                [% ELSE %]
-                    [%- xact.last_billing_type -%]
-                [% END %]
-            </div>
-            <div>Total Billed: [% xact.total_owed %]</div>
-            <div>Total Paid: [% xact.total_paid %]</div>
-            <div>Balance Owed : [% xact.balance_owed %]</div>
-        </li>
+        [% IF xact.balance_owed > 0 %]
+            <li>
+                <div>Details: 
+                    [% IF xact.xact_type == 'circulation' %]
+                        [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+                    [% ELSE %]
+                        [%- xact.last_billing_type -%]
+                    [% END %]
+                </div>
+                <div>Total Billed: [% xact.total_owed %]</div>
+                <div>Total Paid: [% xact.total_paid %]</div>
+                <div>Balance Owed : [% xact.balance_owed %]</div>
+            </li>
+        [% END %]
     [% END %]
     </ol>
 </div>
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
new file mode 100644
index 0000000..84837be
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql
@@ -0,0 +1,36 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action_trigger.event_definition SET template = 
+$$
+[%- USE date -%]
+[%- SET user = target -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>   
+	Fines for:<br/>
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR xact IN user.open_billable_transactions_summary %]
+        [% IF xact.balance_owed > 0 %]
+            <li>
+                <div>Details: 
+                    [% IF xact.xact_type == 'circulation' %]
+                        [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+                    [% ELSE %]
+                        [%- xact.last_billing_type -%]
+                    [% END %]
+                </div>
+                <div>Total Billed: [% xact.total_owed %]</div>
+                <div>Total Paid: [% xact.total_paid %]</div>
+                <div>Balance Owed : [% xact.balance_owed %]</div>
+            </li>
+        [% END %]
+    [% END %]
+    </ol>
+</div>
+$$ WHERE id=13;
+
+COMMIT;
\ No newline at end of file
diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
index 27745f6..62f78d2 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -1518,10 +1518,11 @@ SelfCheckManager.prototype.printPaymentReceipt = function(response, callback) {
 }
 
 /**
- * Print a receipt for this user's items out
+ * Print a receipt for this user's fines
  */
 SelfCheckManager.prototype.printFinesReceipt = function(callback) {
 
+    if(!this.creditPayableBalance.length) return;
     progressDialog.show(true);
 
     var params = [
diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_fines.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_fines.adoc
new file mode 100644
index 0000000..8093e26
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_fines.adoc
@@ -0,0 +1,6 @@
+Self-Check Printing
+^^^^^^^^^^^^^
+Corrections were made to the Self-Check Fines printing functionality
+to prevent open transactions with no balance on them from printing. 
+The change requires that the Self-Checkout Fines Receipt action 
+trigger template be updated in order to work properly. 

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   27 +++++----
 .../upgrade/0973.data.selfcheck_fines_printing.sql |   65 ++++++++++++++++++++
 .../web/js/ui/default/circ/selfcheck/selfcheck.js  |    3 +-
 .../Circulation/selfcheck_printing_fines.adoc      |    6 ++
 5 files changed, 89 insertions(+), 14 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0973.data.selfcheck_fines_printing.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_fines.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list