alf (red_alf) wrote in changelog,
alf
red_alf
changelog

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

Committer: afedorov
LJSUP-10941: Need a page to display certain figures from the LiveJournal Shop
D   trunk/htdocs/admin/profit.bml
Deleted: trunk/htdocs/admin/profit.bml
===================================================================
--- trunk/htdocs/admin/profit.bml	2012-03-07 14:39:50 UTC (rev 11559)
+++ trunk/htdocs/admin/profit.bml	2012-03-11 08:48:26 UTC (rev 11560)
@@ -1,56 +0,0 @@
-<?_code
-{
-BML::finish();
-use LJ::Pay::Wallet;
-use LJ::Pay::SelfPromo;
-my $total_sum = 0;
-my $selfpromo_month = 0;
-my $selfpromo_day = 0;
-my $dbh = LJ::get_db_writer;
-
-my $total_sum = $dbh->selectrow_array("
-    SELECT SUM(amount) 
-    FROM payments 
-    JOIN user USING(userid)
-    WHERE daterecv > '2012-01-01' 
-      AND used != 'C'
-      AND method != 'wallet'
-      AND caps & 0xc00 = 0x400
-");
-
-my $selfpromo_month = $dbh->selectrow_array("
-    SELECT SUM(amount - propval / 100)
-    FROM payments 
-    LEFT OUTER JOIN payitems ON payments.payid = payitems.payid 
-    LEFT OUTER JOIN payitemprop ON payitemprop.piid = payitems.piid 
-    JOIN user USING(userid)
-    WHERE used = 'Y' 
-      AND method = 'wallet' 
-      AND year(daterecv) = year(now()) 
-      AND month(daterecv) = month(now())
-      AND item='selfpromo'
-      AND payitemprop.propname = 'selfpromo_refund'
-      AND caps & 0xc00 = 0x400
-");
-
-my $selfpromo_day = $dbh->selectrow_array("
-    SELECT SUM(amount - propval / 100)
-    FROM payments 
-    LEFT OUTER JOIN payitems ON payments.payid = payitems.payid 
-    LEFT OUTER JOIN payitemprop ON payitemprop.piid = payitems.piid 
-    JOIN user USING(userid)
-    WHERE used = 'Y' 
-      AND method = 'wallet' 
-      AND year(daterecv) = year(now()) 
-      AND month(daterecv) = month(now())
-      AND item='selfpromo'
-      AND payitemprop.propname = 'selfpromo_refund' 
-      AND day(payments.daterecv) = day(now())
-      AND caps & 0xc00 = 0x400
-");
-
-return int($total_sum) . "," . 
-int($selfpromo_month*LJ::Pay::Wallet::EXCHANGE_RATE) . "," . 
-int($selfpromo_day*LJ::Pay::Wallet::EXCHANGE_RATE);
-}
-_code?>

Tags: afedorov, bml, ljcom, red_alf
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