projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
batch refactor continued
[freeside.git]
/
httemplate
/
edit
/
cust_credit_bill.cgi
diff --git
a/httemplate/edit/cust_credit_bill.cgi
b/httemplate/edit/cust_credit_bill.cgi
index
249ba31
..
26c1126
100755
(executable)
--- 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;
<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 ) {
% 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="">
<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 %>
% 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>
qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } );
</%init>
+