sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r12088: LJSUP-12161: Create new table for self p...

Committer: vtroitsky
LJSUP-12161: Create new table for self promo in paid summary.bml
U   trunk/htdocs/admin/accounts/paidsummary.bml
Modified: trunk/htdocs/admin/accounts/paidsummary.bml
===================================================================
--- trunk/htdocs/admin/accounts/paidsummary.bml	2012-06-08 11:19:28 UTC (rev 12087)
+++ trunk/htdocs/admin/accounts/paidsummary.bml	2012-06-08 11:34:31 UTC (rev 12088)
@@ -265,7 +265,8 @@
         }
         elsif ($item eq 'coupon') {
             $subkey = $amount;
-        } elsif ($item eq 'selfpromo') {
+        } 
+        elsif ($item eq 'selfpromo') {
             my $sp_type = $it->get_prop('selfpromo') || 'entry';
             my $sp_country = $it->get_prop('selfpromo_country') || 'cyr';
             $subkey = "selfpromo $sp_type $sp_country";
@@ -692,6 +693,7 @@
         $ret .= item_breakdown($view_mode, $stats, 'Total');
         $ret .= item_breakdown($view_mode, $stats, 'Recurring');
         $ret .= item_breakdown($view_mode, $stats, 'Non-recurring');
+        $ret .= item_breakdown($view_mode, $stats, 'Selfpromo');
 
         return $ret;
     }
@@ -729,7 +731,9 @@
         }
 
         my ($gross, $cnt_pos, $amt_pos, $cnt_neg, $amt_neg, $tokens, $refund, $net);
-        foreach my $key (sort item_sort keys %{$stats||{}}) {
+        my @keys = $recur eq 'Selfpromo' ? ( 'selfpromo' ) : keys %{$stats||{}};
+        $recur = 'Total' if $recur eq 'Selfpromo';
+        foreach my $key (sort item_sort @keys) {
             $ret .= display_item_rows($html_view, $key, $stats->{$key}, $recur);
             $gross   += $stats->{$key}->{$recur}->{amount};
             $cnt_pos += $stats->{$key}->{$recur}->{cnt_pos};

Tags: bml, ljcom, sunnyman, vtroitsky
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments