[freeside-commits] freeside/httemplate/edit/process/elements ApplicationCommon.html, 1.2, 1.3
Jeff Finucane,420,,
jeff at wavetail.420.am
Mon Oct 26 00:12:14 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/elements
In directory wavetail.420.am:/tmp/cvs-serv23012/httemplate/edit/process/elements
Modified Files:
ApplicationCommon.html
Log Message:
credits return taxes, but the magic calculation button does not yet work properly (grrr - more sleep required) RT#4729
Index: ApplicationCommon.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/ApplicationCommon.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ApplicationCommon.html 21 Sep 2009 02:41:43 -0000 1.2
+++ ApplicationCommon.html 26 Oct 2009 07:12:12 -0000 1.3
@@ -51,6 +51,14 @@
my $custnum = $cust_main->custnum;
+my @subnames = grep { /.+/ } map { /^subnum(\d+)$/ ? $1 : '' } $cgi->param;
+my @subitems = map { [ $cgi->param("subnum$_"), $cgi->param("subamount$_"), $cgi->param("taxXlocationnum$_") ] }
+ @subnames;
+{ local $^W = 0; @subitems = grep { $_->[1] + 0 } @subitems; }
+
+my %options = ();
+$options{subitems} = \@subitems if scalar(@subitems);
+
my $new;
# $new = new FS::cust_refund ( {
# 'reason' => 'Refunding payment', #enter reason in UI
@@ -72,6 +80,8 @@
#}
-my $error = $new->insert( 'manual' => 1 );
+
+$options{manual} = 1;
+my $error = $new->insert( %options );
</%init>
More information about the freeside-commits
mailing list