X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2FApplicationCommon.html;h=3cb7ae6bf15f7255886679020560e02ad42809aa;hp=e0c5bd707833b7cd681d3a34619f1fbb29278008;hb=64fcb43c61c196766260319cd9219eb70ea27767;hpb=08ab7010467cf25578acdf8d9a9a068a87f1c49f 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 );