[open-ils-commits] r14196 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/locale/en-US xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 29 01:46:53 EDT 2009
Author: phasefx
Date: 2009-09-29 01:46:49 -0400 (Tue, 29 Sep 2009)
New Revision: 14196
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js
trunk/Open-ILS/xul/staff_client/server/patron/bill_details.xul
Log:
Action in bill details interface for editing notes on billings
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-09-29 05:44:09 UTC (rev 14195)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-09-29 05:46:49 UTC (rev 14196)
@@ -2418,10 +2418,8 @@
<!ENTITY staff.patron.bill_check_info.submit.label "Submit this Information">
<!ENTITY staff.patron.bill_check_info.submit.accesskey "S">
<!ENTITY staff.patron.bill_details.bills.label "Bills">
-<!ENTITY staff.patron.bill_details.save_columns.label "Save Columns">
-<!ENTITY staff.patron.bill_details.copy_to_clipboard.label "Copy to Clipboard">
-<!ENTITY staff.patron.bill_details.print_export.label "Print Export">
<!ENTITY staff.patron.bill_details.void_selection.label "Void selected billings">
+<!ENTITY staff.patron.bill_details.edit_notes.label "Edit note">
<!ENTITY staff.patron.bill_details.payments.label "Payments">
<!ENTITY staff.patron.bill_details.show_in_catalog.label "Show in Catalog">
<!ENTITY staff.patron.bill_details.show_in_catalog.accesskey "S">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-29 05:44:09 UTC (rev 14195)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-29 05:46:49 UTC (rev 14196)
@@ -197,6 +197,7 @@
'FM_MB_RETRIEVE_VIA_MBTS_ID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.retrieve.all' },
'FM_MB_RETRIEVE_VIA_MBTS_ID.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.retrieve.all.authoritative' },
'FM_MB_VOID' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.void' },
+ 'FM_MB_NOTE_EDIT' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billing.note.edit' },
'FM_MBTS_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billable_xact_summary.retrieve' },
'FM_MBTS_RETRIEVE.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.billable_xact_summary.retrieve.authoritative' },
'FM_MBTS_IDS_RETRIEVE_ALL' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.history' },
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-09-29 05:44:09 UTC (rev 14195)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-09-29 05:46:49 UTC (rev 14196)
@@ -11,6 +11,10 @@
staff.patron.barcode_entry.patron_display_error=spawning patron display
staff.patron.barcode_entry.user_perm_display_error=spawning user perm editor
staff.patron.bill_details.my_init.error=bill_details.xul, my_init:
+staff.patron.bill_details.handle_edit_bill_note.note_dialog.title=Replacement Note
+staff.patron.bill_details.handle_edit_bill_note.note_dialog.prompt=Enter new note:
+staff.patron.bill_details.handle_edit_bill_note.note_dialog.default_value=
+staff.patron.bill_details.handle_edit_bill_note.failure=Note for selected bills not likely updated.
staff.patron.bill_details.handle_void.voided_billings.alert=All selected billings have already voided.
staff.patron.bill_details.handle_void.confirm_void_billing=Are you sure you would like to void $%1$s worth of line-item billings?
staff.patron.bill_details.handle_void.confirm_void_billing_title=Voiding Bills
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js 2009-09-29 05:44:09 UTC (rev 14195)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_details.js 2009-09-29 05:46:49 UTC (rev 14196)
@@ -129,6 +129,7 @@
function(o) { return o.getAttribute('retrieve_id'); }
);
$('void').disabled = g.bill_list_selection.length == 0;
+ $('edit_bill_note').disabled = g.bill_list_selection.length == 0;
},
} );
@@ -224,11 +225,42 @@
false
);
+ $('edit_bill_note').addEventListener(
+ 'command',
+ handle_edit_bill_note,
+ false
+ );
+
} catch(E) {
try { g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bill_details.my_init.error'),E); } catch(F) { alert(E); }
}
}
+function handle_edit_bill_note() {
+ try {
+ var mb_list = util.functional.map_list(g.bill_list_selection, function(o){return g.mb_list[o].id();});
+ if (mb_list.length == 0) return;
+ var new_note = window.prompt(
+ $("patronStrings").getString('staff.patron.bill_details.handle_edit_bill_note.note_dialog.prompt'),
+ $("patronStrings").getString('staff.patron.bill_details.handle_edit_bill_note.note_dialog.default_value'),
+ $("patronStrings").getString('staff.patron.bill_details.handle_edit_bill_note.note_dialog.title')
+ );
+ if (new_note) {
+ var r = g.network.simple_request('FM_MB_NOTE_EDIT',[ ses(), new_note ].concat(mb_list));
+ if (r == 1 /* success */) {
+ g.bill_list.clear();
+ retrieve_mb();
+ } else {
+ if (r.ilsevent != 5000 /* PERM_FAILURE */) {
+ alert( $("patronStrings").getString('staff.patron.bill_details.handle_edit_bill_note.failure') );
+ }
+ }
+ }
+ } catch(E) {
+ try { g.error.standard_unexpected_error_alert('bill_details.xul, handle_edit_bill_note:',E); } catch(F) { alert(E); }
+ }
+};
+
function handle_void() {
try {
var mb_list = util.functional.map_list(g.bill_list_selection, function(o){return g.mb_list[o];});
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_details.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_details.xul 2009-09-29 05:44:09 UTC (rev 14195)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_details.xul 2009-09-29 05:46:49 UTC (rev 14196)
@@ -51,6 +51,7 @@
<hbox>
<hbox id="bill_list_actions" />
<spacer flex="1"/>
+ <button id="edit_bill_note" label="&staff.patron.bill_details.edit_notes.label;" disabled="true"/>
<button id="void" label="&staff.patron.bill_details.void_selection.label;" disabled="true"/>
</hbox>
</groupbox>
More information about the open-ils-commits
mailing list