From e9c9c88c01787a6d36d94c51e94e76402d0e6b3c Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 29 Oct 2009 15:29:35 +0000 Subject: [PATCH] combined patch from Lebbeous Fogle-Weekley to add option of overriding the default billing address and first/last when creating CC payments and converts a pile of tabs to 4-char spaces git-svn-id: svn://svn.open-ils.org/ILS/trunk@14676 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Circ/Money.pm | 14 +- .../OpenILS/Application/CreditCard.pm | 5 +- Open-ILS/web/opac/locale/en-US/lang.dtd | 6 + .../server/patron/bill_cc_info.xul | 234 +++++++++++------- .../xul/staff_client/server/patron/bills.js | 3 +- .../server/skin/patron_display.css | 2 + 6 files changed, 176 insertions(+), 88 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm index 778055d2c4..0102f4ee73 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm @@ -50,6 +50,12 @@ __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_address (for call to payment processor) + billing_city (for call to payment processor) + billing_state (for call to payment processor) + billing_zip (for call to payment processor) note (if payments->{note} is blank, use this) }, check_number @@ -208,7 +214,13 @@ sub make_payments { $cc_args->{expire_month}, $cc_args->{expire_year} ), - "ou" => $this_ou + "ou" => $this_ou, + "first_name" => $cc_args->{billing_first}, + "last_name" => $cc_args->{billing_last}, + "address" => $cc_args->{billing_address}, + "city" => $cc_args->{billing_city}, + "state" => $cc_args->{billing_state}, + "zip" => $cc_args->{billing_zip}, } ); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/CreditCard.pm b/Open-ILS/src/perlmods/OpenILS/Application/CreditCard.pm index c43b8dec9b..55e3b5c13a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/CreditCard.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/CreditCard.pm @@ -95,7 +95,7 @@ __PACKAGE__->register_method( action: optional (default: Normal Authorization) first_name: optional (default: patron's first_given_name field) last_name: optional (default: patron's family_name field) - address: optional (default: patron's street1 field) + address: optional (default: patron's street1 field + street2) city: optional (default: patron's city field) state: optional (default: patron's state field) zip: optional (default: patron's zip field) @@ -201,6 +201,9 @@ sub prepare_bop_content { # mapping of fields for different payment processors, particularly ones # in other countries? $content{address} ||= $patron->mailing_address->street1; + $content{address} .= ", " . $patron->mailing_address->street2 + if $patron->mailing_address->street2; + $content{city} ||= $patron->mailing_address->city; $content{state} ||= $patron->mailing_address->state; $content{zip} ||= $patron->mailing_address->post_code; diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 87fcf00c84..687f6e78e6 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2428,6 +2428,12 @@ + + + + + + diff --git a/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul b/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul index 808242a7c3..f52fe8ebc5 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul @@ -19,20 +19,20 @@ + orient="vertical" style="overflow: auto" + onload="try{info_init(); font_helper();refresh_fields();}catch(E){alert(E);}" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - - + + - - - - - - - - - - - - -