[freeside-commits] freeside/FS/FS/Report/Table Monthly.pm, 1.8.2.1, 1.8.2.2
Ivan,,,
ivan at wavetail.420.am
Fri Mar 14 00:48:47 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/Report/Table
In directory wavetail.420.am:/tmp/cvs-serv26068/FS/FS/Report/Table
Modified Files:
Tag: FREESIDE_1_7_BRANCH
Monthly.pm
Log Message:
add net credits to sales/credits/receipts report
Index: Monthly.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Report/Table/Monthly.pm,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- Monthly.pm 14 Aug 2007 21:47:21 -0000 1.8.2.1
+++ Monthly.pm 14 Mar 2008 07:48:44 -0000 1.8.2.2
@@ -228,6 +228,21 @@
);
}
+sub netcredits {
+ my( $self, $speriod, $eperiod, $agentnum ) = @_;
+ $self->scalar_sql("
+ SELECT SUM(cust_credit_bill.amount)
+ FROM cust_credit_bill
+ LEFT JOIN cust_bill USING ( invnum )
+ LEFT JOIN cust_main USING ( custnum )
+ WHERE ". $self->in_time_period_and_agent( $speriod,
+ $eperiod,
+ $agentnum,
+ 'cust_bill._date'
+ )
+ );
+}
+
#these should be auto-generated or $AUTOLOADed or something
sub invoiced_12mo {
my( $self, $speriod, $eperiod, $agentnum ) = @_;
More information about the freeside-commits
mailing list