diff options
author | jeff <jeff> | 2009-10-26 07:12:12 +0000 |
---|---|---|
committer | jeff <jeff> | 2009-10-26 07:12:12 +0000 |
commit | 64fcb43c61c196766260319cd9219eb70ea27767 (patch) | |
tree | 43a4a49ae30ebf1e8662489139604a44626f53ec /httemplate/edit/process/elements | |
parent | 08ab7010467cf25578acdf8d9a9a068a87f1c49f (diff) |
credits return taxes, but the magic calculation button does not yet work properly (grrr - more sleep required) RT#4729
Diffstat (limited to 'httemplate/edit/process/elements')
-rw-r--r-- | httemplate/edit/process/elements/ApplicationCommon.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/edit/process/elements/ApplicationCommon.html b/httemplate/edit/process/elements/ApplicationCommon.html index e0c5bd707..3cb7ae6bf 100644 --- a/httemplate/edit/process/elements/ApplicationCommon.html +++ b/httemplate/edit/process/elements/ApplicationCommon.html @@ -51,6 +51,14 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $src->custnum } ) 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 $new; #} -my $error = $new->insert( 'manual' => 1 ); + +$options{manual} = 1; +my $error = $new->insert( %options ); </%init> |