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

[ljcom] r12865: LJSUP-14042: Add a separate row for jour...

Committer: vtroitsky
LJSUP-14042: Add a separate row for journalpromo in paid summary.bml
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-02 06:38:54 UTC (rev 12864)
+++ trunk/cgi-bin/LJ/Pay/Payment/PayItem/SelfPromo.pm	2012-11-02 14:37:52 UTC (rev 12865)
@@ -37,6 +37,14 @@
     $self->{promotion} ||= LJ::Pay::Promotion->new_from_cart_item($self);
     return $self->{promotion};
 }
+=item get_profit
+    
+=cut
+sub get_profit {
+    my ($self) = @_;
+    my $promo_class = $self->get_promo_class();
+    return $self->get_prop($promo_class.'_profit') || 0;
+}
 
 =item get_product_name
     Get product name

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