[freeside-commits] branch master updated. f00c16b7e3e6306723ea8b3029e061cff100b901

Mark Wells mark at 420.am
Wed Feb 20 16:49:22 PST 2013


The branch, master has been updated
       via  f00c16b7e3e6306723ea8b3029e061cff100b901 (commit)
       via  d7135a628c2e30cb31ce062d730b4288c38cae98 (commit)
      from  ed30348c21d00246e3e5fd4d98ec6ef1f8efb20b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f00c16b7e3e6306723ea8b3029e061cff100b901
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Feb 20 16:48:48 2013 -0800

    save changes to credit card billing address, #940

diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 506e266..981614e 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -210,7 +210,15 @@ if ( $cgi->param('save') ) {
     $new->set( 'paycvv' => '');
   }
 
-  $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
+  if ( $payby eq 'CARD' ) {
+    my $bill_location = FS::cust_location->new;
+    $bill_location->set( $_ => $cgi->param($_) )
+      foreach @{$payby2fields{$payby}};
+    $new->set('bill_location' => $bill_location);
+    # will do nothing if the fields are all unchanged
+  } else {
+    $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}};
+  }
 
   my $error = $new->replace($cust_main);
   errorpage("payment processed successfully, but error saving info: $error")

commit d7135a628c2e30cb31ce062d730b4288c38cae98
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Feb 20 16:46:07 2013 -0800

    decimal places

diff --git a/httemplate/elements/tr-select-discount_term.html b/httemplate/elements/tr-select-discount_term.html
index e9faeb2..d4218f8 100644
--- a/httemplate/elements/tr-select-discount_term.html
+++ b/httemplate/elements/tr-select-discount_term.html
@@ -24,7 +24,9 @@ function change_discount_term(what) {
         id      => 'discount_term',
         options => [ '', @discount_term ],
         labels  => { '' => mt('1 month'), 
-                     map { $_ => mt('[_1] months', $_) } @discount_term },
+                     map { $_ => mt('[_1] months', sprintf('%.0f', $_)) }
+                      @discount_term
+                   },
         curr_value => '',
         onchange => $amount_id ? 'change_discount_term(this)' : '',
       &>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/tr-select-discount_term.html |    4 +++-
 httemplate/misc/process/payment.cgi              |   10 +++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list