[freeside-commits] branch FREESIDE_4_BRANCH updated. f86ff9578c93589fe5326ae9e048f593ac7217ac

Ivan Kohler ivan at freeside.biz
Wed May 27 13:44:37 PDT 2020


The branch, FREESIDE_4_BRANCH has been updated
       via  f86ff9578c93589fe5326ae9e048f593ac7217ac (commit)
      from  0232a330e041efd16f56fb81095f655e50957c5b (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 f86ff9578c93589fe5326ae9e048f593ac7217ac
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed May 27 13:44:36 2020 -0700

    fix top subtotals on refund reports

diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html
index 39c8ecf7f..bd0e9e33c 100755
--- a/httemplate/search/elements/cust_pay_or_refund.html
+++ b/httemplate/search/elements/cust_pay_or_refund.html
@@ -58,6 +58,7 @@ Examples:
 
                 'group_column'   => 'payby',
                 'group_label'    => 'payby_name',
+                'amount_field'   => $amount_field,
                 'subtotal'       => { $opt{amount_field} => "sum($amount_field)" },
                 'subtotal_row'   => [ 'Subtotal',
                                       sub { sprintf($money, $_[0]->$amount_field) },
diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html
index 24cf50e96..cb9c96ce6 100644
--- a/httemplate/search/elements/grouped-search/html
+++ b/httemplate/search/elements/grouped-search/html
@@ -5,6 +5,8 @@ my $conf = FS::Conf->new;
 my %opt = @_;
 $opt{'name'} ||= PL($opt{'name_singular'});
 
+my $amount_field = $opt{amount_field};
+
 my $group_info = $m->comp('core', %opt);
 
 my $redirect;
@@ -109,7 +111,7 @@ my $money = $conf->config('money_char') || '$';
 
 <DIV CLASS="fstabcontainer">
 % if ( $group->num_rows > 0 ) {
-<P><% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %> for <% emt($money.$group->paid) %>
+<P><% emt('[quant,_1,_2]', $group->num_rows, $opt{name_singular}) %> for <% emt($money.$group->$amount_field()) %>
 </P>
 %# download links
 <P><% emt('Download results:') %>

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

Summary of changes:
 httemplate/search/elements/cust_pay_or_refund.html | 1 +
 httemplate/search/elements/grouped-search/html     | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list