diff options
author | jeff <jeff> | 2006-08-26 23:15:14 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-08-26 23:15:14 +0000 |
commit | 6af1b1bfa25e5ececef5e0dcd38b55917121cee2 (patch) | |
tree | cb81deb99bee814a037fd866fa10981ae459472f /httemplate/edit | |
parent | 62ee3858ef853cb2b4f1a6cd98f8a608e7d11d7d (diff) |
batch refactor continued
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/cust_bill_pay.cgi | 2 | ||||
-rwxr-xr-x | httemplate/edit/cust_credit.cgi | 4 | ||||
-rwxr-xr-x | httemplate/edit/cust_credit_bill.cgi | 8 | ||||
-rwxr-xr-x | httemplate/edit/part_bill_event.cgi | 9 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 3 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_refund.cgi | 8 |
6 files changed, 26 insertions, 8 deletions
diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index 498d477cd..90292ebc1 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -36,6 +36,7 @@ function changed(what) { <BR>Invoice #<SELECT NAME="invnum" SIZE=1 onChange="changed(this)"> <OPTION VALUE=""> +% foreach my $cust_bill ( @cust_bill ) { % foreach my $cust_bill ( @cust_bill ) { <OPTION<% $cust_bill->invnum eq $invnum ? ' SELECTED' : '' %> VALUE="<% $cust_bill->invnum %>"><% $cust_bill->invnum %> - <% time2str("%D", $cust_bill->_date) %> - $<% $cust_bill->owed %> @@ -83,3 +84,4 @@ my @cust_bill = sort { $a->_date <=> $b->_date qsearch('cust_bill', { 'custnum' => $cust_pay->custnum } ); </%init> + diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index 13d062c74..803798ef8 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -25,6 +25,9 @@ Credit <TD ALIGN="right">Amount</TD> <TD BGCOLOR="#ffffff">$<INPUT TYPE="text" NAME="amount" VALUE="<% $amount %>" SIZE=8 MAXLENGTH=8></TD> </TR> +% +%#print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!; +% % %#print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!; @@ -78,3 +81,4 @@ my $otaker = getotaker; my $p1 = popurl(1); </%init> + diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi index 249ba31d0..26c1126b1 100755 --- a/httemplate/edit/cust_credit_bill.cgi +++ b/httemplate/edit/cust_credit_bill.cgi @@ -21,6 +21,12 @@ Credit #<B><% $crednum %></B> <SCRIPT> function changed(what) { cust_bill = what.options[what.selectedIndex].value; +% foreach my $cust_bill ( @cust_bill ) { +% my $invnum = $cust_bill->invnum; +% my $changeto = $cust_bill->owed < $cust_credit->credited +% ? $cust_bill->owed +% : $cust_credit->credited; +% % foreach my $cust_bill ( @cust_bill ) { @@ -38,6 +44,7 @@ function changed(what) { <BR>Invoice #<SELECT NAME="invnum" SIZE=1 onChange="changed(this)"> <OPTION VALUE=""> +% foreach my $cust_bill ( @cust_bill ) { % foreach my $cust_bill ( @cust_bill ) { <OPTION<% $cust_bill->invnum eq $invnum ? ' SELECTED' : '' %> VALUE="<% $cust_bill->invnum %>"><% $cust_bill->invnum %> - <% time2str("%D",$cust_bill->_date) %> - $<% $cust_bill->owed %> @@ -90,3 +97,4 @@ my @cust_bill = sort { $a->_date <=> $b->_date qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); </%init> + diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index a58f07883..243975558 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -216,10 +216,16 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % % 'batch-card' => { % 'name' => 'Add card to the pending credit card batch', -% 'code' => '$cust_bill->batch_card();', +% 'code' => '$cust_bill->batch_card(%options);', % 'weight' => 40, % }, % +% 'retriable' => { +% 'name' => 'Mark batched card event as retriable', +% 'code' => '$cust_pay_batch->retriable();', +% 'weight' => 60, +% }, +% % 'send' => { % 'name' => 'Send invoice (email/print/fax)', % 'code' => '$cust_bill->send();', @@ -430,3 +436,4 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> </BODY> </HTML> + diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 2d698c7b0..20c051b92 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -126,7 +126,7 @@ % my $berror = $new->bill; % $new->apply_payments; % $new->apply_credits; -% $berror ||= $new->collect; +% $berror ||= $new->collect 'realtime' => 1; % warn "Warning, error billing during backend-realtime: $berror" if $berror; % % } @@ -152,3 +152,4 @@ %} % + diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index fadfffb62..3a58d9aa5 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -1,4 +1,4 @@ -% + % % %$cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!"; %my $custnum = $1; @@ -7,11 +7,7 @@ % %my $error = ''; %if ( $cgi->param('payby') =~ /^(CARD|CHEK)$/ ) { -% my %payby2bop = ( -% 'CARD' => 'CC', -% 'CHEK' => 'ECHECK', -% ); -% my $bop = $payby2bop{$1}; +% my $bop = FS::payby::$payby2bop{$1}; % $cgi->param('refund') =~ /^(\d*)(\.\d{2})?$/ % or die "illegal refund amount ". $cgi->param('refund'); % my $refund = "$1$2"; |