diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-06-03 18:26:05 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-06-03 18:26:05 -0700 |
commit | 9c2854f48fb79a5534bbb35c4b7c12b2e6acc0a4 (patch) | |
tree | 7404d17a5d93a405b9a58dc3e23b19ece3fcea6a | |
parent | f35818a77c0b825df553618f09c728c95cf3dc29 (diff) | |
parent | 6008454279572ec1de69cf7c9c55a5f55afec4ed (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
-rw-r--r-- | FS/FS/cust_main/Billing.pm | 1 | ||||
-rw-r--r-- | FS/FS/part_pkg/sql_external.pm | 3 | ||||
-rw-r--r-- | httemplate/view/cust_pay.html | 13 |
3 files changed, 9 insertions, 8 deletions
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index 47a3dc2d4..d95376798 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -1172,6 +1172,7 @@ sub _make_lines { if ( $param{'override_quantity'} ) { $override_quantity = $param{'override_quantity'}; + $unitrecur = $recur / $override_quantity; } if ( $increment_next_bill ) { diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm index 676063460..9bf107b7d 100644 --- a/FS/FS/part_pkg/sql_external.pm +++ b/FS/FS/part_pkg/sql_external.pm @@ -96,8 +96,7 @@ sub calc_recur { die "sql_external query returned non-numeric amount: $row->{amount}"; } } - if (exists $row->{quantity}) { - $quantity ||= 0; + if (defined $row->{quantity}) { if ( $row->{quantity} eq '' ) { # treat as zero } elsif ( $row->{quantity} =~ /^\d+$/ ) { diff --git a/httemplate/view/cust_pay.html b/httemplate/view/cust_pay.html index b34a90818..ba4cfdafc 100644 --- a/httemplate/view/cust_pay.html +++ b/httemplate/view/cust_pay.html @@ -91,13 +91,14 @@ <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->auth %></B></TD> </TR> -% if ( $cust_pay->order_number ) { - <TR> - <TD ALIGN="right"><% mt('Order #') |h %></TD> - <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->order_number %></B></TD> - </TR> -% } +% } +% # API allows setting this for any payby +% if ( $cust_pay->order_number ) { + <TR> + <TD ALIGN="right"><% mt('Order #') |h %></TD> + <TD BGCOLOR="#FFFFFF"><B><% $cust_pay->order_number %></B></TD> + </TR> % } % if ( $cust_pay->payby eq 'CASH' && $cust_pay->payinfo ) { |