From 7483c5e354bbee171bbb9c6996ae9a56e9517ea6 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 3 Jun 2016 17:45:04 -0700 Subject: calculate unitrecur on sql_external packages with quantity details, #40558 --- FS/FS/cust_main/Billing.pm | 1 + FS/FS/part_pkg/sql_external.pm | 3 +-- 2 files changed, 2 insertions(+), 2 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+$/ ) { -- cgit v1.2.1 From 6008454279572ec1de69cf7c9c55a5f55afec4ed Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 3 Jun 2016 20:18:13 -0500 Subject: RT#42347: Add IDT transaction ID to payment information [display order_number for all payby] --- httemplate/view/cust_pay.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 @@ <% $cust_pay->auth %> -% if ( $cust_pay->order_number ) { - - <% mt('Order #') |h %> - <% $cust_pay->order_number %> - -% } +% } +% # API allows setting this for any payby +% if ( $cust_pay->order_number ) { + + <% mt('Order #') |h %> + <% $cust_pay->order_number %> + % } % if ( $cust_pay->payby eq 'CASH' && $cust_pay->payinfo ) { -- cgit v1.2.1