[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. 66f14b6e9d8c1b1ceba9332a37db0d9c2ff3a24e

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_9 has been updated
       via  66f14b6e9d8c1b1ceba9332a37db0d9c2ff3a24e (commit)
       via  73b9f0cb41b3bc191f2f072cf2de144cc387832a (commit)
       via  c658bd0d5dd7ae5855d1c140b1c770551217b707 (commit)
      from  61cb8e54e3161a3bc2d78afe8e86a16bb09eed8c (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 66f14b6e9d8c1b1ceba9332a37db0d9c2ff3a24e
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 b38ef83..f48e18d 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 73b9f0cb41b3bc191f2f072cf2de144cc387832a
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 c658bd0d5dd7ae5855d1c140b1c770551217b707
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 c944452..00a5721 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -8972,21 +8972,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 61ec139..9a02abe 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -1517,10 +1517,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