[freeside-commits] freeside/httemplate/edit/process part_bill_event.cgi, 1.11, 1.12
Ivan,,,
ivan at wavetail.420.am
Tue Mar 25 18:03:33 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv2871/process
Modified Files:
part_bill_event.cgi
Log Message:
quick shortcut for easier adding of new 1.7-style invoice events
Index: part_bill_event.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/part_bill_event.cgi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- part_bill_event.cgi 13 Jan 2008 21:35:53 -0000 1.11
+++ part_bill_event.cgi 26 Mar 2008 01:03:31 -0000 1.12
@@ -72,21 +72,35 @@
$cgi->param('eventcode', $eventcode);
$cgi->param('plandata', $plandata);
- unless($error){
- my $new = new FS::part_bill_event ( {
- map {
- $_, scalar($cgi->param($_));
- } fields('part_bill_event'),
- } );
- $new->setfield('reason', $rnum);
+ unless($error) {
if ( $eventpart ) {
+
+ my $new = new FS::part_bill_event ( {
+ map { $_ => scalar($cgi->param($_)) }
+ fields('part_bill_event'),
+ } );
+ $new->setfield('reason' => $rnum);
$error = $new->replace($old);
+
} else {
- $error = $new->insert;
- $eventpart = $new->getfield('eventpart');
+
+ foreach my $payby ( $cgi->param('payby') ) {
+ my $new = new FS::part_bill_event ( {
+ map { $_ => scalar($cgi->param($_)) }
+ grep { $_ ne 'payby' }
+ fields('part_bill_event')
+ } );
+ $new->setfield('payby' => $payby);
+ $new->setfield('reason' => $rnum );
+ $error = $new->insert;
+ last if $error;
+ }
+
}
+
}
+
}
</%init>
More information about the freeside-commits
mailing list