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

[ljcom] r12918: LJSUP-14212: Add journal promo profit to...

Committer: vtroitsky
LJSUP-14212: Add journal promo profit to the 'LJ Promo Projects Statistic' mailout
U   trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm	2012-11-19 15:16:42 UTC (rev 12917)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm	2012-11-19 15:30:10 UTC (rev 12918)
@@ -38,7 +38,7 @@
     return $self->{promotion};
 }
 =item get_profit
-    
+    Get profit for current item
 =cut
 sub get_profit {
     my ($self) = @_;
@@ -46,6 +46,33 @@
     return $self->get_prop($promo_class.'_profit') || 0;
 }
 
+=item get_owner_profit
+    Return profit of the owner of the slot
+=cut
+sub get_owner_profit {
+    my ($self) = @_;
+    my $promo_class = $self->get_promo_class();
+    return $self->get_prop($promo_class.'_owner_profit') || $self->get_prop($promo_class.'_profit') || 0;
+}
+
+=item get_refund
+    Return refund of the owner of the slot
+=cut
+sub get_refund {
+    my ($self) = @_;
+    my $promo_class = $self->get_promo_class();
+    return $self->get_prop($promo_class.'_refund') || 0;
+}
+
+=item get_remainder
+    Return remainder of the owner of the slot
+=cut
+sub get_remainder {
+    my ($self) = @_;
+    my $promo_class = $self->get_promo_class();
+    return $self->get_prop($promo_class.'_remainder') || 0;
+}
+
 =item get_product_name
     Get product name
 =cut

Tags: ljcom, pm, 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