журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12382: LJSUP-13164: Implement 'blocking' pay me...

Committer: nnikulochkina
LJSUP-13164: Implement 'blocking' pay method support in paidsummary.bml
U   trunk/htdocs/admin/accounts/paidsummary.bml
Modified: trunk/htdocs/admin/accounts/paidsummary.bml
===================================================================
--- trunk/htdocs/admin/accounts/paidsummary.bml	2012-07-31 12:11:55 UTC (rev 12381)
+++ trunk/htdocs/admin/accounts/paidsummary.bml	2012-07-31 13:01:42 UTC (rev 12382)
@@ -85,8 +85,10 @@
 
     my $select_payments_sql = "SELECT * FROM payments WHERE used = 'Y'";
 
-    if ($pay_method && $pay_method ne '') {
+    if ($pay_method && $pay_method ne '' && $pay_method ne 'wallet') {
         $select_payments_sql .= " AND method = '$pay_method'";
+    } elsif($pay_method eq 'wallet') {
+        $select_payments_sql .= " AND (method = 'wallet' OR method = 'blocking')";
     } else {
         # TOREMOVE: After we convert old data to a new one
         # select all free carts too
@@ -107,6 +109,7 @@
     if ($users eq 'all' or $users eq 'anon')
     {
         while (my $row = $sth->fetchrow_hashref) {
+            $row->{method} =~ s/blocking/wallet/;
             $payments_ref->{$row->{payid}} = $row;
         }
     }
@@ -114,6 +117,7 @@
     {
         my @users;
         while (my $row = $sth->fetchrow_hashref) {
+            $row->{method} =~ s/blocking/wallet/;
             $payments_ref->{$row->{payid}} = $row;
             push @users, $row->{userid} if $users ne 'all' and $users ne 'anon';
         }
@@ -304,6 +308,9 @@
             $item = 'selfpromo';
             $subkey = 'notification';
         }
+        elsif ($item eq 'repost') {
+            $subkey = 'repost';
+        }
         else {
             $subkey = ( UNIVERSAL::isa($it, 'LJ::Pay::Payment::PayItem::Addon::Sized')
                           ? ((split('-', $it->{subitem}))[0] . '-')

Tags: bml, ljcom, nikulochkina, nnikulochkina
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