From: edoceo Date: Tue, 11 Dec 2012 04:35:59 +0000 (-0800) Subject: Allows to print a single item receipt from the list of items out. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8da9f6e8903be1705625ffd0514d3cf6ded67b99;p=working%2FEvergreen.git Allows to print a single item receipt from the list of items out. There is a new button below the lists and a context menu item Signed-off-by: edoceo --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 4957a7d06a..087ec606c7 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -3490,6 +3490,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js index 65e36b7a65..f91f81f17f 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}); } ], @@ -292,6 +294,32 @@ patron.items.prototype = { } }, + 'items_print_selected': function(which) { + + var obj = this; + JSAN.use('patron.util'); + JSAN.use('util.functional'); + + var ui_list = ( which == 2 ? obj.list2 : obj.list); + var id_list = ( which == 2 ? obj.retrieve_ids2 : obj.retrieve_ids ); + + // Had to merge to make the right data for print + for (var i=0; i < id_list.length; i++) { + var x = id_list[i].circ_id; + var r = obj.list_circ_map[x].row.my; + id_list[i].title = r.mvr.title(); + id_list[i].due_date = r.circ.due_date(); + } + + var params = { + 'list': id_list, + 'patron' : patron.util.retrieve_fleshed_au_via_id(ses(),obj.patron_id), + 'printer_context' : 'receipt', + 'template' : 'items_out' + }; + ui_list.print( params ); + }, + '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 baa00c7a78..0da6b2c4ab 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 @@ + @@ -40,6 +41,7 @@ + @@ -59,6 +61,7 @@ + @@ -81,6 +84,7 @@ + @@ -139,6 +143,7 @@ + @@ -169,6 +174,7 @@ + @@ -199,12 +205,14 @@ +