holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r11490: LJSUP-10941: Need a page to display cert...

Committer: akanashin
LJSUP-10941: Need a page to display certain figures from the LiveJournal Shop
U   trunk/htdocs/admin/profit.bml
Modified: trunk/htdocs/admin/profit.bml
===================================================================
--- trunk/htdocs/admin/profit.bml	2012-02-17 13:55:54 UTC (rev 11489)
+++ trunk/htdocs/admin/profit.bml	2012-02-17 14:03:14 UTC (rev 11490)
@@ -10,17 +10,17 @@
 my $sth = $dbh->prepare("select userid,amount from payments where daterecv > '2012-01-01' and used != 'C' and method != 'wallet';");
 $sth->execute();
 while (my $row = $sth->fetchrow_hashref) {
-    $total_sum += $row->{amount} unless LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
+    $total_sum += $row->{amount} if LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
 }
 $sth = $dbh->prepare("select userid,amount,propval from payments,payitems,payitemprop where payments.payid=payitems.payid and year(payments.daterecv)=year(now()) and month(payments.daterecv)=month(now()) and payitems.piid=payitemprop.piid and payments.method='wallet' and payitems.status='done' and payments.used!='C' and payitemprop.propname='selfpromo_refund';");
 $sth->execute();
 while (my $row = $sth->fetchrow_hashref) {
-    $selfpromo_month += $row->{amount}-$row->{propval}/100 unless LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
+    $selfpromo_month += (($row->{amount})-($row->{propval}/100)) if LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
 }
 $sth = $dbh->prepare("select userid,amount,propval from payments,payitems,payitemprop where payments.payid=payitems.payid and year(payments.daterecv)=year(now()) and month(payments.daterecv)=month(now()) and day(payments.daterecv)=day(now()) and payitems.piid=payitemprop.piid and payments.method='wallet' and payitems.status='done' and payments.used!='C' and payitemprop.propname='selfpromo_refund';");
 $sth->execute();
 while (my $row = $sth->fetchrow_hashref) {
-    $selfpromo_day += $row->{amount}-$row->{propval}/100 unless LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
+    $selfpromo_day += (($row->{amount})-($row->{propval}/100)) if LJ::SUP->is_sup_enabled(LJ::load_userid($row->{userid}));
 }
 return int($total_sum) . "," . 
 int($selfpromo_month*LJ::Pay::Wallet::EXCHANGE_RATE) . "," . 

Tags: akanashin, bml, holyandrew, ljcom
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