From efc8e13120adf1e6890357523175235d03d1f973 Mon Sep 17 00:00:00 2001 From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Wed, 14 Oct 2009 09:56:15 +0000 Subject: [PATCH] semi-functional mockup of new billing interface, hidden away in Alternate View for now. Will I18N'ize after it stabilizes. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14416 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/bill2.js | 29 ++++- Open-ILS/xul/staff_client/server/patron/bill2.xul | 138 ++++++++++++++++++---- Open-ILS/xul/staff_client/server/skin/circ.css | 1 + 3 files changed, 137 insertions(+), 31 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 2334b4b56b..d2a1963a9e 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -1,5 +1,9 @@ function $(id) { return document.getElementById(id); } +function default_focus() { + try { $('payment').focus(); } catch(E) { alert('Error in default_focus(): ' + E); } +} + function tally_selected() { try { JSAN.use('util.money'); @@ -45,9 +49,11 @@ function tally_all() { var bill = g.bill_map[retrieve_ids[i]]; if (!bill) { $('checked_owed').setAttribute('value', '???'); + $('checked_owed2').setAttribute('value', '???'); $('checked_billed').setAttribute('value', '???'); $('checked_paid').setAttribute('value', '???'); $('total_owed').setAttribute('value', '???'); + $('total_owed2').setAttribute('value', '???'); $('total_billed').setAttribute('value', '???'); $('total_paid').setAttribute('value', '???'); return; @@ -67,9 +73,11 @@ function tally_all() { $('checked_billed').setAttribute('value', '$' + util.money.cents_as_dollars( checked_billed ) ); $('checked_paid').setAttribute('value', '$' + util.money.cents_as_dollars( checked_paid ) ); $('checked_owed').setAttribute('value', '$' + util.money.cents_as_dollars( checked_balance ) ); + $('checked_owed2').setAttribute('value', '$' + util.money.cents_as_dollars( checked_balance ) ); $('total_billed').setAttribute('value', '$' + util.money.cents_as_dollars( total_billed ) ); $('total_paid').setAttribute('value', '$' + util.money.cents_as_dollars( total_paid ) ); $('total_owed').setAttribute('value', '$' + util.money.cents_as_dollars( total_balance ) ); + $('total_owed2').setAttribute('value', '$' + util.money.cents_as_dollars( total_balance ) ); } catch(E) { alert('Error in bill2.js, tally_all(): ' + E); } @@ -117,12 +125,18 @@ function init_lists() { ].concat( patron.util.mbts_columns({ 'xact_finish' : { 'hidden' : xul_param('current') ? true : false } - }).concat( - circ.util.columns({ - 'title' : { 'hidden' : false, 'flex' : '3' } - }) - ) - ), + } + ).concat( + circ.util.columns({ + 'title' : { 'hidden' : false, 'flex' : '3' } + } + ).concat( + [ + { + 'id' : 'payment_pending', 'editable' : false, 'label' : 'Payment Pending', 'sort_type' : 'money', 'render' : function(my) { return '$0.00'; }, + } + ] + ))), 'map_row_to_columns' : patron.util.std_map_row_to_columns(' '), 'on_select' : function(ev) { JSAN.use('util.functional'); @@ -243,6 +257,9 @@ function my_init() { JSAN.use('util.exec'); var exec = new util.exec(20); exec.on_error = function(E) { alert(E); return true; } exec.timer(g.funcs,100); + + default_focus(); + } catch(E) { var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill2.xul', E]); try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); } diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.xul b/Open-ILS/xul/staff_client/server/patron/bill2.xul index af45d86ac5..e22175d4ab 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill2.xul @@ -59,37 +59,55 @@ <hbox> <grid> <columns> - <column /> - <column /> + <column/> + <column/> </columns> <rows> - <row> - <spacer /> - <label id="owed_label" value="Owed" control="total_owed" class="emphasis1"/> - <label id="billed_label" value="Billed" control="total_billed" class="emphasis2"/> - <label id="paid_label" value="Paid" control="total_paid" class="emphasis2"/> - </row> - <row> - <label id="total_label" value="Total:" control="total_owed" class="emphasis1"/> - <textbox id="total_owed" readonly="true" context="clipboard"/> - <textbox id="total_billed" readonly="true" context="clipboard"/> - <textbox id="total_paid" readonly="true" context="clipboard"/> - </row> - <row> - <label id="checked_label" value="Checked:" control="checked_owed" class="emphasis2"/> - <textbox id="checked_owed" readonly="true" context="clipboard"/> - <textbox id="checked_billed" readonly="true" context="clipboard"/> - <textbox id="checked_paid" readonly="true" context="clipboard"/> - </row> + <row><label value="Total Owed:" class="big_emphasis1" /><label id="total_owed2" class="big_emphasis1"/></row> + <row><label value="Total Checked:" class="big_emphasis1" /><label id="checked_owed2" class="big_emphasis1"/></row> </rows> </grid> + <spacer flex="1"/> + <groupbox> + <caption label="Pay Bill"/> + <grid> + <columns> + <column/> + <column/> + </columns> + <rows> + <row> + <label value="Payment Type:" class="emphasis1" accesskey="T" control="payment_type"/> + <menulist id="payment_type"> + <menupopup id="payment_type_menupopup"> + <menuitem id="payment_type_menuitem1" label="&staff.patron.bills_overlay.cash.label;" value="cash_payment"/> + <menuitem id="payment_type_menuitem2" label="&staff.patron.bills_overlay.check.label;" value="check_payment"/> + <menuitem id="payment_type_menuitem3" label="&staff.patron.bills_overlay.credit_card.label;" value="credit_card_payment"/> + <menuitem id="payment_type_menuitem4" label="Patron Credit" value="credit_payment" /> + <menuitem id="payment_type_menuitem5" label="&staff.patron.bills_overlay.word.label;" value="work_payment"/> + <menuitem id="payment_type_menuitem6" label="&staff.patron.bills_overlay.forgive.label;" value="forgive_payment"/> + <menuitem id="payment_type_menuitem7" label="&staff.patron.bills_overlay.goods.label;" value="goods_payment"/> + </menupopup> + </menulist> + </row> + <row> + <label value="Payment Received:" class="emphasis1" /> + <hbox><textbox id="payment" size="6"/></hbox> + </row> + </rows> + </grid> + <hbox> + <checkbox id="annotate_payment" label="&staff.patron.bills_overlay.annotate_payment.label;" accesskey="n" oils_persist="checked" checked="false" oncommand="default_focus();"/> + <button label="See Distribution" accesskey="D" oncommand="default_focus();"/> + <button label="Apply Payment" accesskey="P"/> + </hbox> + </groupbox> </hbox> + <splitter /> <hbox> - <label value='&staff.patron.bill_interface.voided_this_session.label;' class="emphasis2"/> - <label id="paid_tally" /> - <spacer flex="1"/> <button label="Bill Patron" accesskey="" /> <button label="History" accesskey="" /> + <spacer flex="1"/> <menubar> <menu label="Actions for Selected Rows" accesskey="A"> <menupopup> @@ -101,13 +119,83 @@ </menupopup> </menu> </menubar> - </hbox> <tree id="bill_tree" flex="1" enableColumnDrag="true" seltype="multiple" editable="true" context="actions_popup"/> <hbox> <hbox id="bill_list_actions" /> - <button id="print" label="&staff.patron.bill_interface.print.label;" accesskey="&staff.patron.bill_interface.print.accesskey;" oncommand="print_bills();"/> + <button label="Check All" oncommand="g.bill_list._toggle_checkbox_column({'id':'select'},'on');"/> + <button label="Uncheck All" oncommand="g.bill_list._toggle_checkbox_column({'id':'select'},'off');"/> + <button id="print" label="Print Bills" oncommand="print_bills();"/> + <spacer flex="1"/> + <button label="Receipt Options" type="menu"> + <menupopup> + <menuitem type="checkbox" label="Receipt Upon Payment" checked="true"/> + <menuitem type="checkbox" label="Printer Prompt" /> + <hbox style="border: solid thin black"> + <vbox pack="center"> + <label value="Number of Copies:" /> + </vbox> + <vbox pack="center"> + <textbox id="num_of_receipts" value="1" type="number" min="0" size="2"/> + </vbox> + </hbox> + </menupopup> + </button> + </hbox> + <splitter /> + <hbox> + <vbox> + <hbox> + <label value='&staff.patron.bill_interface.voided_this_session.label;' class="emphasis1"/><label id="currently_voided" value="$0.00"/> + <label value='Credit Available:' class="emphasis1"/><label id="credit_forward" value="$0.00"/> + </hbox> + <hbox><label value='Change Due Upon Payment:' class="big_emphasis1"/><label id="change_due" value="$0.00" class="big_emphasis1"/></hbox> + </vbox> <spacer flex="1"/> + <grid> + <columns> + <column /> + <column /> + </columns> + <rows> + <row> + <spacer /> + <label id="pending_payment_label" value="Payment" class="emphasis1" /> + <label id="pending_change_label" value="Change" class="emphasis1" /> + </row> + <row> + <label id="pending_label" value="Pending" class="emphasis1" /> + <hbox><textbox id="pending_payment" readonly="true" context="clipboard" size="6" value='$0.00'/></hbox> + <hbox><textbox id="pending_change" readonly="true" context="clipboard" size="6" value='$0.00'/></hbox> + </row> + </rows> + </grid> + <grid> + <columns> + <column /> + <column /> + </columns> + <rows> + <row> + <spacer /> + <label id="owed_label" value="Owed" control="total_owed" class="emphasis1"/> + <label id="billed_label" value="Billed" control="total_billed" class="emphasis2"/> + <label id="paid_label" value="Paid" control="total_paid" class="emphasis2"/> + </row> + <row> + <label id="total_label" value="Total:" control="total_owed" class="emphasis1"/> + <hbox><textbox id="total_owed" readonly="true" context="clipboard" size="6"/></hbox> + <hbox><textbox id="total_billed" readonly="true" context="clipboard" size="6"/></hbox> + <hbox><textbox id="total_paid" readonly="true" context="clipboard" size="6"/></hbox> + </row> + <row> + <label id="checked_label" value="Checked:" control="checked_owed" class="emphasis2"/> + <hbox><textbox id="checked_owed" readonly="true" context="clipboard" size="6"/></hbox> + <hbox><textbox id="checked_billed" readonly="true" context="clipboard" size="6"/></hbox> + <hbox><textbox id="checked_paid" readonly="true" context="clipboard" size="6"/></hbox> + </row> + </rows> + </grid> </hbox> </groupbox> </vbox> diff --git a/Open-ILS/xul/staff_client/server/skin/circ.css b/Open-ILS/xul/staff_client/server/skin/circ.css index 1ee430c817..75fa06fb91 100644 --- a/Open-ILS/xul/staff_client/server/skin/circ.css +++ b/Open-ILS/xul/staff_client/server/skin/circ.css @@ -16,5 +16,6 @@ #amnesty_mode_indicator { border: thick solid white; background-color: red; color: white; font-size: large; font-weight: bold; padding: 10px; padding-bottom: 25px; margin: 10px; } #checkin_auto_print_slips_indicator { background-color: -moz-dialog; color: -moz-dialog-text; font-size: large; font-weight: bold; } +.big_emphasis1 { font-weight: bold; font-size: x-large; } .emphasis1 { font-weight: bold; } .emphasis2 { font-weight: normal; } -- 2.11.0