[open-ils-commits] r14416 - in trunk/Open-ILS/xul/staff_client/server: patron skin (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Oct 14 05:56:21 EDT 2009


Author: phasefx
Date: 2009-10-14 05:56:15 -0400 (Wed, 14 Oct 2009)
New Revision: 14416

Modified:
   trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
   trunk/Open-ILS/xul/staff_client/server/patron/bill2.xul
   trunk/Open-ILS/xul/staff_client/server/skin/circ.css
Log:
semi-functional mockup of new billing interface, hidden away in Alternate View for now.  Will I18N'ize after it stabilizes.

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2009-10-14 07:52:56 UTC (rev 14415)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2009-10-14 09:56:15 UTC (rev 14416)
@@ -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 @@
             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 @@
         $('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 @@
             ].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 @@
         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); }

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill2.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill2.xul	2009-10-14 07:52:56 UTC (rev 14415)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill2.xul	2009-10-14 09:56:15 UTC (rev 14416)
@@ -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,14 +119,84 @@
                         </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>
 

Modified: trunk/Open-ILS/xul/staff_client/server/skin/circ.css
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/skin/circ.css	2009-10-14 07:52:56 UTC (rev 14415)
+++ trunk/Open-ILS/xul/staff_client/server/skin/circ.css	2009-10-14 09:56:15 UTC (rev 14416)
@@ -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; }



More information about the open-ils-commits mailing list