[freeside-commits] branch FREESIDE_3_BRANCH updated. 7db3b36f7ecde4fc4425749db64cf75d709f3b7c
Ivan
ivan at 420.am
Tue Apr 22 17:14:46 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 7db3b36f7ecde4fc4425749db64cf75d709f3b7c (commit)
from cd6489220a4cebb8c76a07c470fddd544c78999b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7db3b36f7ecde4fc4425749db64cf75d709f3b7c
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Apr 22 17:14:44 2014 -0700
show display_custnum on quick payment entry, RT#28616
diff --git a/httemplate/elements/customer-table.html b/httemplate/elements/customer-table.html
index 75e682d..83abad0 100644
--- a/httemplate/elements/customer-table.html
+++ b/httemplate/elements/customer-table.html
@@ -72,30 +72,33 @@ Example:
function update_customer(searchrow, customerArray) {
+ var display_custnum_obj = document.getElementById('display_custnum'+searchrow);
var custnum_obj = document.getElementById('custnum'+searchrow);
var customer = document.getElementById('customer'+searchrow);
var customer_select = document.getElementById('cust_select'+searchrow);
- custnum_obj.disabled = false;
- custnum_obj.style.backgroundColor = '#ffffff';
+ display_custnum_obj.disabled = false;
+ display_custnum_obj.style.backgroundColor = '#ffffff';
customer.disabled = false;
customer.style.backgroundColor = '#ffffff';
if ( customerArray.length == 0 ) {
- custnum_obj.value = 'Not found';
+ custnum_obj.value = '';
+ display_custnum_obj.value = 'Not found';
customer.value = 'Not found';
- custnum_obj.style.color = '#ff0000';
+ display_custnum_obj.style.color = '#ff0000';
customer.style.color = '#ff0000';
customer.style.display = '';
customer_select.style.display = 'none';
return false;
- } else if ( customerArray.length == 6 ) {
+ } else if ( customerArray.length >= 6 ) {
custnum_obj.value = customerArray[0];
- custnum_obj.style.color = '#000000';
+ display_custnum_obj.value = customerArray[6];
+ display_custnum_obj.style.color = '#000000';
customer.value = customerArray[1];
update_balance_text(searchrow, customerArray[2]);
@@ -139,7 +142,6 @@ Example:
customer.style.display = '';
customer_select.style.display = 'none';
- var custnum_obj = document.getElementById('custnum'+searchrow);
update_balance_text(searchrow, '');
update_status_text(searchrow, '');
update_status_color(searchrow, '#000000');
@@ -164,11 +166,12 @@ Example:
this.style.color = '#000000'
- var custnum_obj = this;
+ var display_custnum_obj = this;
var searchrow = this.getAttribute('rownum');
- var custnum = this.value;
+ var custnum_obj = document.getElementById('custnum'+searchrow);
+ var display_custnum = this.value;
- if ( custnum == 'searching...' || custnum == 'Not found' || custnum == '' )
+ if ( display_custnum == 'searching...' || display_custnum == 'Not found' || display_custnum == '' )
return;
if ( this.getAttribute('magic') == 'nosearch' ) {
@@ -241,7 +244,7 @@ Example:
}
- custnum_search(custnum, search_custnum_update );
+ custnum_search(display_custnum, search_custnum_update );
}
@@ -266,7 +269,7 @@ Example:
var invnum = document.getElementById('invnum'+searchrow);
invnum.value = '';
- var custnum_obj = document.getElementById('custnum'+searchrow);
+ var custnum_obj = document.getElementById('display_custnum'+searchrow);
custnum_obj.value = 'searching...';
custnum_obj.disabled = true;
custnum_obj.style.color = '#000000';
@@ -329,6 +332,7 @@ Example:
var customer = this.options[this.selectedIndex].text;
var searchrow = this.getAttribute('rownum');
+ var display_custnum_obj = document.getElementById('display_custnum'+searchrow);
var custnum_obj = document.getElementById('custnum'+searchrow);
var customer_obj = document.getElementById('customer'+searchrow);
var balance_obj = document.getElementById('balance'+searchrow);
@@ -338,6 +342,7 @@ Example:
} else if ( custnum_balance_status == 'cancel' ) {
+ display_custnum_obj.value = '';
custnum_obj.value = '';
custnum_obj.style.color = '#000000';
@@ -421,16 +426,22 @@ Example:
<TD>
<INPUT TYPE = "text"
- NAME = "custnum<% $row %>"
- ID = "custnum<% $row %>"
+ NAME = "display_custnum<% $row %>"
+ ID = "display_custnum<% $row %>"
SIZE = 8
MAXLENGTH = 12
STYLE = "text-align:right;"
+ VALUE = "<% $param->{"display_custnum$row"} %>"
+ rownum = "<% $row %>"
+ >
+ <INPUT TYPE = "hidden"
+ NAME = "custnum<% $row %>"
+ ID = "custnum<% $row %>"
VALUE = "<% $param->{"custnum$row"} %>"
rownum = "<% $row %>"
>
<SCRIPT TYPE="text/javascript">
- var custnum_input<% $row %> = document.getElementById("custnum<% $row %>");
+ var custnum_input<% $row %> = document.getElementById("display_custnum<% $row %>");
custnum_input<% $row %>.onfocus = clearhint_custnum;
custnum_input<% $row %>.onchange = <% $opt{prefix} %>search_custnum;
</SCRIPT>
@@ -629,15 +640,22 @@ Example:
var custnum_cell = document.createElement('TD');
+ var display_custnum_input = document.createElement('INPUT');
+ display_custnum_input.setAttribute('name', 'display_custnum'+<% $opt{prefix} %>rownum);
+ display_custnum_input.setAttribute('id', 'display_custnum'+<% $opt{prefix} %>rownum);
+ display_custnum_input.style.textAlign = 'right';
+ display_custnum_input.setAttribute('size', 8);
+ display_custnum_input.setAttribute('maxlength', 12);
+ display_custnum_input.setAttribute('rownum', <% $opt{prefix} %>rownum);
+ display_custnum_input.onfocus = clearhint_custnum;
+ display_custnum_input.onchange = <% $opt{prefix} %>search_custnum;
+ custnum_cell.appendChild(display_custnum_input);
+
var custnum_input = document.createElement('INPUT');
+ custnum_input.type = 'hidden';
custnum_input.setAttribute('name', 'custnum'+<% $opt{prefix} %>rownum);
custnum_input.setAttribute('id', 'custnum'+<% $opt{prefix} %>rownum);
- custnum_input.style.textAlign = 'right';
- custnum_input.setAttribute('size', 8);
- custnum_input.setAttribute('maxlength', 12);
custnum_input.setAttribute('rownum', <% $opt{prefix} %>rownum);
- custnum_input.onfocus = clearhint_custnum;
- custnum_input.onchange = <% $opt{prefix} %>search_custnum;
custnum_cell.appendChild(custnum_input);
row.appendChild(custnum_cell);
diff --git a/httemplate/misc/cust_main_note-import.cgi b/httemplate/misc/cust_main_note-import.cgi
index 1862895..2e7dc8b 100644
--- a/httemplate/misc/cust_main_note-import.cgi
+++ b/httemplate/misc/cust_main_note-import.cgi
@@ -49,7 +49,7 @@
if ( customerArray.length == 0 ) {
custnum_obj.value = 'Not found';
custnum_obj.style.color = '#ff0000';
- } else if ( customerArray.length == 5 ) {
+ } else if ( customerArray.length >= 5 ) {
var name = customerArray[1];
opt(customer_select,custnum,name,'#000000');
customer_select.selectedIndex = customer_select.length - 1;
diff --git a/httemplate/misc/xmlhttp-cust_main-search.cgi b/httemplate/misc/xmlhttp-cust_main-search.cgi
index 73c9ff8..b3bf468 100644
--- a/httemplate/misc/xmlhttp-cust_main-search.cgi
+++ b/httemplate/misc/xmlhttp-cust_main-search.cgi
@@ -17,7 +17,8 @@
% $_->balance,
% $_->ucfirst_status,
% $_->statuscolor,
-% scalar($_->open_cust_bill)
+% scalar($_->open_cust_bill),
+% $_->display_custnum,
% ],
% @cust_main
% ];
@@ -66,7 +67,8 @@ sub findbycustnum {
$c->balance,
$c->ucfirst_status,
$c->statuscolor,
- scalar($c->open_cust_bill)
+ scalar($c->open_cust_bill),
+ $c->display_custnum,
];
}
@@ -94,6 +96,7 @@ sub findbycustnum_or_agent_custid {
$_->ucfirst_status,
$_->statuscolor,
scalar($_->open_cust_bill),
+ $_->display_custnum,
],
qsearch({
-----------------------------------------------------------------------
Summary of changes:
httemplate/elements/customer-table.html | 58 +++++++++++++++++---------
httemplate/misc/cust_main_note-import.cgi | 2 +-
httemplate/misc/xmlhttp-cust_main-search.cgi | 7 ++-
3 files changed, 44 insertions(+), 23 deletions(-)
More information about the freeside-commits
mailing list