[open-ils-commits] [GIT] Evergreen ILS branch master updated. e5ab813eecef8c7b832200885ad15c8a6b9f7409

Evergreen Git git at git.evergreen-ils.org
Fri Jul 12 16:45:54 EDT 2013


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, master has been updated
       via  e5ab813eecef8c7b832200885ad15c8a6b9f7409 (commit)
       via  e7814461d7747e679c2b44d8ae33d71efd5e8fd0 (commit)
      from  1c5edfe9546ab79685f1024e3b3e924ab75fecda (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 e5ab813eecef8c7b832200885ad15c8a6b9f7409
Author: Ben Shum <bshum at biblio.org>
Date:   Fri Jul 12 16:44:44 2013 -0400

    Add release note for Print Single Item Receipt
    
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt b/docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
new file mode 100644
index 0000000..a616309
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
@@ -0,0 +1,7 @@
+Print Single Item Receipt
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Add ability to print a receipt for just a single selected item from the patron 
+interface for Items Out or Lost, Claims Returned, Long Overdue, Has Unpaid 
+Billings. This can be used via right-click or using the 'Actions for Selected 
+Items' button.

commit e7814461d7747e679c2b44d8ae33d71efd5e8fd0
Author: edoceo <code at edoceo.com>
Date:   Thu Apr 25 10:52:43 2013 -0700

    Adds the option to print a single item from the Items Out.
    A new button and right-click option are created.
    
    Signed-off-by: edoceo <code at edoceo.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index eb827f5..e9f9f1c 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -3691,6 +3691,7 @@
 <!ENTITY staff.patron.items_overlay.show_noncats.label "Show Non-Cataloged Circulations in List Above">
 <!ENTITY staff.patron.items_overlay.show_noncats.accesskey "N">
 <!ENTITY staff.patron.items_overlay.items_export.label "Export">
+<!ENTITY staff.patron.items_overlay.print_one.label "Print Item Receipt">
 <!ENTITY staff.generic.list_actions.label "List Actions">
 <!ENTITY staff.generic.list_actions.accesskey "L">
 <!ENTITY staff.generic.list_actions.sel_clip.label "Copy to Clipboard">
diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js
index a2fc061..afe6dcd 100644
--- a/Open-ILS/xul/staff_client/server/patron/items.js
+++ b/Open-ILS/xul/staff_client/server/patron/items.js
@@ -149,6 +149,8 @@ patron.items.prototype = {
                     ],
                     'cmd_items_print' : [ ['command'], function() { obj.items_print(1); } ],
                     'cmd_items_print2' : [ ['command'], function() { obj.items_print(2); } ],
+                    'cmd_items_print_selected' : [ ['command'], function() { obj.items_print_selected(1); } ],
+                    'cmd_items_print_selected2' : [ ['command'], function() { obj.items_print_selected(2); } ],
                     'cmd_items_export' : [ ['command'], function() { obj.items_export(1); } ],
                     'cmd_items_export2' : [ ['command'], function() { obj.items_export(2); } ],
                     'cmd_items_renew' : [ ['command'], function() { obj.items_renew({which_list:1}); } ],
@@ -299,7 +301,38 @@ patron.items.prototype = {
             obj.error.standard_unexpected_error_alert('printing 1',E);
         }
     },
+    'items_print_selected': function(which) {
+        var obj = this;
+        try {
+            JSAN.use('patron.util');
+            // JSAN.use('util.functional');
+            var list = ( which == 2 ? obj.list2 : obj.list);
+            // Selected Rows
+            var list_dump = list.dump_with_keys();
+            var pick_list = ( which == 2 ? obj.retrieve_ids2 : obj.retrieve_ids );
+            if (!pick_list || pick_list.length == 0) return;
+
+            // I don't know a better way to just get all the data from one row
+            for (var i=0; i<pick_list.length; i++) {
+                var bc = pick_list[i].barcode;
+                for (var j=0; j<list_dump.length; j++) {
+                    if (pick_list[i].barcode == list_dump[j].barcode) {
+                        pick_list[i] = list_dump[j];
+                    }
+                }
+            }
 
+            var params = {
+                'list': pick_list,
+                'patron' : patron.util.retrieve_fleshed_au_via_id(ses(),obj.patron_id),
+                'printer_context' : 'receipt',
+                'template' : 'items_out'
+            };
+            list.print( params );
+        } catch(E) {
+            obj.error.standard_unexpected_error_alert('items_print_selected has failed',E);
+        }
+    },
     'items_export' : function(which) {
         var obj = this;
         try {
diff --git a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul
index baa00c7..0da6b2c 100644
--- a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul
+++ b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul
@@ -16,6 +16,7 @@
     <command id="sel_patron"/>
     <command id="cmd_triggered_events"/>
     <command id="cmd_items_print" />
+    <command id="cmd_items_print_selected" />
     <command id="cmd_items_export" />
     <command id="cmd_items_renew" />
     <command id="cmd_items_renew_all" />
@@ -40,6 +41,7 @@
     <command id="sel_patron2"/>
     <command id="cmd_triggered_events2"/>
     <command id="cmd_items_print2" />
+    <command id="cmd_items_print_selected2" />
     <command id="cmd_items_export2" />
     <command id="cmd_items_renew2" />
     <command id="cmd_items_renew_with_date2" />
@@ -59,6 +61,7 @@
 <popupset id="items_popupset">
     <menupopup id="items_actions" position="at_pointer"> 
         <menuitem command="sel_clip" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;"/>
+        <menuitem command="cmd_items_print_selected" label="&staff.patron.items_overlay.print_one.label;"/>
         <menuitem command="sel_bucket" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
         <menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog" />
         <menuitem command="sel_copy_details" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
@@ -81,6 +84,7 @@
     </menupopup>
     <menupopup id="items_actions2" position="at_pointer"> 
         <menuitem command="sel_clip2" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;" />
+        <menuitem command="cmd_items_print_selected2" label="&staff.patron.items_overlay.print_one.label;"/>
         <menuitem command="sel_bucket2" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
         <menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog2" />
         <menuitem command="sel_copy_details2" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
@@ -139,6 +143,7 @@
         <menu label="&staff.patron.items_overlay.actions_for_selected_items.label;" accesskey="&staff.patron.items_overlay.actions_for_selected_items.accesskey;">
             <menupopup>
                 <menuitem command="sel_clip" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;"/>
+                <menuitem command="cmd_items_print_selected" label="&staff.patron.items_overlay.print_one.label;" />
                 <menuitem command="sel_bucket" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
                 <menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog" />
                 <menuitem command="sel_copy_details" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
@@ -169,6 +174,7 @@
         <menu label="&staff.patron.items_overlay.actions_for_selected_items.label;" old_accesskey="&staff.patron.items_overlay.actions_for_selected_items.accesskey;">
             <menupopup>
                 <menuitem command="sel_clip2" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;" />
+                <menuitem command="cmd_items_print_selected2" label="&staff.patron.items_overlay.print_one.label;" />
                 <menuitem command="sel_bucket2" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
                 <menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog2" />
                 <menuitem command="sel_copy_details2" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
@@ -199,12 +205,14 @@
     <checkbox id="checkin_auto_print_slips" oils_persist="checked" 
         label="&staff.circ.checkin_overlay.checkin_auto_print_slips.label;"
         accesskey="&staff.circ.checkin_overlay.checkin_auto_print_slips.accesskey;"/>
+    <button id="item_print_single" label="&staff.patron.items_overlay.print_one.label;" command="cmd_items_print_selected" />
     <button id="items_print" label="&staff.patron_display.items.print_receipt.label;" command="cmd_items_print" accesskey="&staff.patron_display.items.print_receipt.accesskey;" />
     <button id="items_export" label="&staff.patron.items_overlay.items_export.label;" command="cmd_items_export" accesskey=""/>
 </hbox>
 
 <hbox id="items_bottom_ui2" flex="1">
     <spacer flex="1"/>
+    <button id="item_print_single2" label="&staff.patron.items_overlay.print_one.label;" command="cmd_items_print_selected2" />
     <button id="items_print2" label="&staff.patron_display.items.print_receipt.label;" command="cmd_items_print2" old_accesskey="&staff.patron_display.items.print_receipt.accesskey;" />
     <button id="items_export2" label="&staff.patron.items_overlay.items_export.label;" command="cmd_items_export2" accesskey=""/>
 </hbox>

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

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    1 +
 Open-ILS/xul/staff_client/server/patron/items.js   |   33 ++++++++++++++++++++
 .../staff_client/server/patron/items_overlay.xul   |    8 +++++
 .../Circulation/print-single-receipt.txt           |    7 ++++
 4 files changed, 49 insertions(+), 0 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list