[freeside-commits] freeside/FS/FS Conf.pm, 1.324.2.29, 1.324.2.30 cust_bill_ApplicationCommon.pm, 1.13.2.1, 1.13.2.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Mar 8 20:41:11 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv8326/FS/FS
Modified Files:
Tag: FREESIDE_1_9_BRANCH
Conf.pm cust_bill_ApplicationCommon.pm
Log Message:
backport opensrs modifications (RT 5825 stuff)
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.324.2.29
retrieving revision 1.324.2.30
diff -u -w -d -r1.324.2.29 -r1.324.2.30
--- Conf.pm 8 Mar 2010 10:57:16 -0000 1.324.2.29
+++ Conf.pm 9 Mar 2010 04:41:08 -0000 1.324.2.30
@@ -1112,6 +1112,13 @@
},
{
+ 'key' => 'trigger_export_insert_on_payment',
+ 'section' => 'billing',
+ 'description' => 'Enable exports on payment application.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'lpr',
'section' => 'required',
'description' => 'Print command for paper invoices, for example `lpr -h\'',
Index: cust_bill_ApplicationCommon.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_ApplicationCommon.pm,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -u -w -d -r1.13.2.1 -r1.13.2.2
--- cust_bill_ApplicationCommon.pm 27 Feb 2010 02:59:39 -0000 1.13.2.1
+++ cust_bill_ApplicationCommon.pm 9 Mar 2010 04:41:09 -0000 1.13.2.2
@@ -5,6 +5,11 @@
use List::Util qw(min);
use FS::Schema qw( dbdef );
use FS::Record qw( qsearch qsearchs dbh );
+use FS::cust_pkg;
+use FS::cust_svc;
+use FS::cust_bill_pkg;
+use FS::part_svc;
+use FS::part_export;
@ISA = qw( FS::Record );
@@ -330,6 +335,30 @@
$dbh->rollback if $oldAutoCommit;
return $error;
}
+
+ # trigger export_insert_on_payment
+ if ( $conf->exists('trigger_export_insert_on_payment')
+ && $cust_bill_pkg->pkgnum > 0 )
+ {
+ if ( my $cust_pkg = $cust_bill_pkg->cust_pkg ) {
+
+ foreach my $cust_svc ( $cust_pkg->cust_svc ) {
+ my $svc_x = $cust_svc->svc_x;
+ my @part_export = grep { $_->can('export_insert_on_payment') }
+ $cust_svc->part_svc->part_export;
+
+ foreach my $part_export ( $cust_svc->part_svc->part_export ) {
+ $error = $part_export->_export_insert_on_payment($svc_x);
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+ }
+ }
+ }
+ # done trigger export_insert_on_payment
+
}
#everything should always be applied to line items in full now... sanity check
More information about the freeside-commits
mailing list