[open-ils-commits] r16883 - in trunk/Open-ILS: examples src/perlmods/OpenILS/Application/Circ xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 8 11:25:18 EDT 2010
Author: phasefx
Date: 2010-07-08 11:25:15 -0400 (Thu, 08 Jul 2010)
New Revision: 16883
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
Log:
record the billing_last and billing_first fields from bill_cc_info.xul into cc_first_name and cc_last_name on money.credit_card_payment, even for out-of-band (externally processed) payments. Also protect the bill_cc_info dialog from patrons with no billing address (such as admin)
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-07-08 15:16:51 UTC (rev 16882)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-07-08 15:25:15 UTC (rev 16883)
@@ -1464,6 +1464,8 @@
<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"/>
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2010-07-08 15:16:51 UTC (rev 16882)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm 2010-07-08 15:25:15 UTC (rev 16883)
@@ -51,8 +51,8 @@
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 @@
$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
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul 2010-07-08 15:16:51 UTC (rev 16882)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul 2010-07-08 15:25:15 UTC (rev 16883)
@@ -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'],
@@ -79,14 +79,16 @@
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() {
More information about the open-ils-commits
mailing list