record the billing_last and billing_first fields from bill_cc_info.xul into cc_first_...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Jul 2010 15:25:15 +0000 (15:25 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 8 Jul 2010 15:25:15 +0000 (15:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16883 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul

index a722609..4df2031 100644 (file)
@@ -1464,6 +1464,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field name="amount_collected" reporter:datatype="money" />
                        <field name="approval_code" reporter:datatype="text"/>
                        <field name="cash_drawer" reporter:datatype="link"/>
+                       <field name="cc_first_name" reporter:datatype="text"/>
+                       <field name="cc_last_name" reporter:datatype="text"/>
                        <field name="cc_number" reporter:datatype="text"/>
                        <field name="cc_type" reporter:datatype="text"/>
                        <field name="cc_processor" reporter:datatype="text"/>
index 7d8595e..a4edcf8 100644 (file)
@@ -51,8 +51,8 @@ __PACKAGE__->register_method(
                         number          (for call to payment processor)
                         expire_month    (for call to payment processor)
                         expire_year     (for call to payment processor)
-                        billing_first   (for call to payment processor)
-                        billing_last    (for call to payment processor)
+                        billing_first   (for out-of-band payments and for call to payment processor)
+                        billing_last    (for out-of-band payments and for call to payment processor)
                         billing_address (for call to payment processor)
                         billing_city    (for call to payment processor)
                         billing_state   (for call to payment processor)
@@ -334,6 +334,8 @@ sub make_payments {
         $payment->approval_code($approval_code) if $approval_code;
         $payment->cc_type($cc_type) if $cc_type;
         $payment->cc_processor($cc_processor) if $cc_processor;
+        $payment->cc_first_name($cc_args->{'billing_first'}) if $cc_args->{'billing_first'};
+        $payment->cc_last_name($cc_args->{'billing_last'}) if $cc_args->{'billing_last'};
         if (!$e->$create_money_method($payment)) {
             return _recording_failure(
                 $e, "$create_money_method failed", $payment, $cc_payload
index f52fe8e..1c78639 100644 (file)
@@ -48,8 +48,8 @@
             "cc_number":        show['int'],
             "expire_month":     show['int'],
             "expire_year":      show['int'],
-            "billing_first":    show['int'],
-            "billing_last":     show['int'],
+            "billing_first":    show['ext'] + show['int'],
+            "billing_last":     show['ext'] + show['int'],
             "billing_address":  show['int'],
             "billing_city":     show['int'],
             "billing_state":    show['int'],
         function populate_address_fields() {
             $('billing_first').value = patron.first_given_name();
             $('billing_last').value = patron.family_name();
-            $('billing_address').value = patron.billing_address().street1();
-            var street2 = patron.billing_address().street2();
-            if (street2) {
-                $('billing_address').value += (' ' + street2);
+            if (patron.billing_address()) {
+                $('billing_address').value = patron.billing_address().street1();
+                var street2 = patron.billing_address().street2();
+                if (street2) {
+                    $('billing_address').value += (' ' + street2);
+                }
+                $('billing_city').value = patron.billing_address().city();
+                $('billing_state').value = patron.billing_address().state();
+                $('billing_zip').value = patron.billing_address().post_code();
             }
-            $('billing_city').value = patron.billing_address().city();
-            $('billing_state').value = patron.billing_address().state();
-            $('billing_zip').value = patron.billing_address().post_code();
         }
 
         function info_init() {