From cf8f8aafc5595b31f24a7b0d06289c830d123cb8 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 8 Oct 2005 13:45:14 +0000 Subject: quick payment entry javascript tested & working IE/firefix/konq --- httemplate/misc/batch-cust_pay.html | 134 ++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 httemplate/misc/batch-cust_pay.html (limited to 'httemplate/misc/batch-cust_pay.html') diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html new file mode 100644 index 000000000..b09876b89 --- /dev/null +++ b/httemplate/misc/batch-cust_pay.html @@ -0,0 +1,134 @@ +<%= header( 'Quick payment entry', + menubar( + 'Main Menu' => popurl(1), + ), + 'onLoad="addRow()"', + ) +%> + +<% if ( $cgi->param('error') ) { %> + Error: <%= $cgi->param('error') %> +<% } %> + + + +
+ +Batch

+ + + + + + + + + + + + +
Cust #CustomerAmountCheck #
+ +
+ + +
+ + + + + -- cgit v1.2.1 From 550685eff557af23e242c545d6a9e27a7ef44f23 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 10 Oct 2005 12:20:57 +0000 Subject: updated quick payment entry --- httemplate/misc/batch-cust_pay.html | 414 +++++++++++++++++++++++++++++------- 1 file changed, 338 insertions(+), 76 deletions(-) (limited to 'httemplate/misc/batch-cust_pay.html') diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html index b09876b89..ac7f7ffa3 100644 --- a/httemplate/misc/batch-cust_pay.html +++ b/httemplate/misc/batch-cust_pay.html @@ -1,99 +1,234 @@ <%= header( 'Quick payment entry', menubar( - 'Main Menu' => popurl(1), + 'Main Menu' => $p, #popurl(1), + 'Old-style quick payment entry' => + $p. 'search/cust_main-quickpay.html', ), - 'onLoad="addRow()"', + ( $cgi->param('error') ? '' : 'onload="addRow()"' ), ) %> <% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> + <%= $cgi->param('error') %>

<% } %> - + function select_customer() { -
+ var custnum = this.options[this.selectedIndex].value; + var customer = this.options[this.selectedIndex].text; -Batch

+ var searchrow = this.getAttribute('rownum'); + var custnum_obj = document.getElementById('custnum'+searchrow); + var customer_obj = document.getElementById('customer'+searchrow); + + if ( custnum == '' ) { + //this.style.color = '#ff0000'; + + } else if ( custnum == 'cancel' ) { + + custnum_obj.value = ''; + custnum_obj.style.color = '#000000'; + + this.style.display = 'none'; + customer_obj.style.display = ''; + customer_obj.focus(); + + } else { + + + custnum_obj.value = custnum; + custnum_obj.style.color = '#000000'; + + customer_obj.value = customer; + customer_obj.style.color = '#000000'; + + this.style.display = 'none'; + customer_obj.style.display = ''; + + } + + } + + function opt(what,value,text,color) { + var optionName = new Option(text, value, false, false); + optionName.style.color = color; + var length = what.length; + what.options[length] = optionName; + } + + @@ -102,33 +237,160 @@ + - +<% my $row = 0; + if ( $cgi->param('error') ) { + my $param = $cgi->Vars; +%> + + <% for ( $row = 0; exists($param->{"custnum$row"}); $row++ ) { %> + + + + + + + + + + + + + + + + <% } %> + +<% } %>
Customer Amount Check #
+ " rownum="<%= $row %>"> + + + " rownum="<%= $row %>"> + + + + + $" > + + " > + + <% if ( $param->{"error$row"} ) { %> + Error: <%= $param->{"error$row"} %> + <% } %> +
-
- +
- + + + +<%= include('/elements/xmlhttp.html', + 'url' => $p. 'misc/xmlhttp-cust_main-search.cgi', + 'subs' => [qw( custnum_search smart_search )], + ) +%> + + + -- cgit v1.2.1 From 48b79e72df30f70a168b9b318bc7785129c79262 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 12 Oct 2005 12:02:26 +0000 Subject: change button to say "post payment batch" and main error message to indicate the whole batch should be resubmitted, as per feedback from lewis --- httemplate/misc/batch-cust_pay.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/misc/batch-cust_pay.html') diff --git a/httemplate/misc/batch-cust_pay.html b/httemplate/misc/batch-cust_pay.html index ac7f7ffa3..20cc89045 100644 --- a/httemplate/misc/batch-cust_pay.html +++ b/httemplate/misc/batch-cust_pay.html @@ -300,7 +300,7 @@ -->
- + -- cgit v1.2.1