From c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 31 Jan 2006 04:26:54 +0000 Subject: move header() to include(/elements/header.html) so it can be changed in one place, thanks to Scott Edwards --- httemplate/edit/cust_pay.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 0370ab726..94fd06ca5 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -45,7 +45,7 @@ $title .= " against Invoice #$linknum" if $link eq 'invnum'; %> -<%= header($title, '') %> +<%= include("/elements/header.html",$title, '') %> <% if ( $cgi->param('error') ) { %> Error: <%= $cgi->param('error') %> -- cgit v1.2.1 From 1acbcf55d8cd4675408f8ad3406f431623918c8d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Feb 2006 11:12:29 +0000 Subject: remove inadvertant extra table statement preventing page from showing up in konq --- httemplate/edit/cust_pay.cgi | 2 -- 1 file changed, 2 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 94fd06ca5..a03a245eb 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -52,8 +52,6 @@ $title .= " against Invoice #$linknum" if $link eq 'invnum';

<% } %> -<%= ntable("#cccccc",2) %> - -- cgit v1.2.1 From 8e3dfb380406e145494a5fffa7a0e4aab7b38253 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 13 Aug 2006 10:25:58 +0000 Subject: customer view work: DONE 1. add status and balance to top DONE 2. add some sort of oldest date thing so the history doesn't get too big (# years and a link to "show older") 3. make the rest of the action links into js popups? maybe later, weird IENess when closing em DONE (finished) - so revert out or finish/commit the Enter check payment one - Process page can wait until another day.. it should be more of an *action* DONE 4. Ticket list config knobs for wtxs (grid it too) DONE 5. grid the package list --- httemplate/edit/cust_pay.cgi | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index a03a245eb..e7734c1fc 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -9,22 +9,20 @@ my %payby = ( 'MCRD' => 'Manual credit card', ); -my($link, $linknum, $paid, $payby, $payinfo, $quickpay, $_date); +my($link, $linknum, $paid, $payby, $payinfo, $_date); if ( $cgi->param('error') ) { $link = $cgi->param('link'); $linknum = $cgi->param('linknum'); $paid = $cgi->param('paid'); $payby = $cgi->param('payby'); $payinfo = $cgi->param('payinfo'); - $quickpay = $cgi->param('quickpay'); $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; } elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { - $link = 'custnum'; + $link = $cgi->param('popup') ? 'popup' : 'custnum'; $linknum = $1; $paid = ''; $payby = $cgi->param('payby') || 'BILL'; $payinfo = ''; - $quickpay = $cgi->param('quickpay'); $_date = time; } elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { $link = 'invnum'; @@ -32,7 +30,6 @@ if ( $cgi->param('error') ) { $paid = ''; $payby = $cgi->param('payby') || 'BILL'; $payinfo = ""; - $quickpay = ''; $_date = time; } else { die "illegal query ". $cgi->keywords; @@ -43,9 +40,15 @@ my $paybatch = "webui-$_date-$$-". rand() * 2**32; my $title = 'Post '. $payby{$payby}. ' payment'; $title .= " against Invoice #$linknum" if $link eq 'invnum'; -%> +if ( $link eq 'popup' ) { + +%><%= include('/elements/header-popup.html', $title ) %> + +<% } else { %> -<%= include("/elements/header.html",$title, '') %> +<%= include("/elements/header.html", $title, '') %> + +<% } %> <% if ( $cgi->param('error') ) { %> Error: <%= $cgi->param('error') %> @@ -60,7 +63,6 @@ $title .= " against Invoice #$linknum" if $link eq 'invnum';
- <% my $money_char = $conf->config('money_char') || '$'; @@ -74,7 +76,9 @@ if ( $link eq 'invnum' ) { } %> +<% unless ( $link eq 'popup' ) { %> <%= small_custview($custnum, $conf->config('countrydefault')) %> +<% } %> -- cgit v1.2.1 From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/edit/cust_pay.cgi | 174 ++++++++++++++++++++++--------------------- 1 file changed, 89 insertions(+), 85 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index e7734c1fc..83e4e82ea 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,94 +1,95 @@ -<% - -my $conf = new FS::Conf; - -my %payby = ( - 'BILL' => 'Check', - 'CASH' => 'Cash', - 'WEST' => 'Western Union', - 'MCRD' => 'Manual credit card', -); - -my($link, $linknum, $paid, $payby, $payinfo, $_date); -if ( $cgi->param('error') ) { - $link = $cgi->param('link'); - $linknum = $cgi->param('linknum'); - $paid = $cgi->param('paid'); - $payby = $cgi->param('payby'); - $payinfo = $cgi->param('payinfo'); - $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; -} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { - $link = $cgi->param('popup') ? 'popup' : 'custnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ''; - $_date = time; -} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { - $link = 'invnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ""; - $_date = time; -} else { - die "illegal query ". $cgi->keywords; -} - -my $paybatch = "webui-$_date-$$-". rand() * 2**32; - -my $title = 'Post '. $payby{$payby}. ' payment'; -$title .= " against Invoice #$linknum" if $link eq 'invnum'; - -if ( $link eq 'popup' ) { - -%><%= include('/elements/header-popup.html', $title ) %> - -<% } else { %> - -<%= include("/elements/header.html", $title, '') %> - -<% } %> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> +% +% +%my $conf = new FS::Conf; +% +%my %payby = ( +% 'BILL' => 'Check', +% 'CASH' => 'Cash', +% 'WEST' => 'Western Union', +% 'MCRD' => 'Manual credit card', +%); +% +%my($link, $linknum, $paid, $payby, $payinfo, $_date); +%if ( $cgi->param('error') ) { +% $link = $cgi->param('link'); +% $linknum = $cgi->param('linknum'); +% $paid = $cgi->param('paid'); +% $payby = $cgi->param('payby'); +% $payinfo = $cgi->param('payinfo'); +% $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; +%} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { +% $link = $cgi->param('popup') ? 'popup' : 'custnum'; +% $linknum = $1; +% $paid = ''; +% $payby = $cgi->param('payby') || 'BILL'; +% $payinfo = ''; +% $_date = time; +%} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { +% $link = 'invnum'; +% $linknum = $1; +% $paid = ''; +% $payby = $cgi->param('payby') || 'BILL'; +% $payinfo = ""; +% $_date = time; +%} else { +% die "illegal query ". $cgi->keywords; +%} +% +%my $paybatch = "webui-$_date-$$-". rand() * 2**32; +% +%my $title = 'Post '. $payby{$payby}. ' payment'; +%$title .= " against Invoice #$linknum" if $link eq 'invnum'; +% +%if ( $link eq 'popup' ) { +% +% +<% include('/elements/header-popup.html', $title ) %> +% } else { + + +<% include("/elements/header.html", $title, '') %> +% } +% if ( $cgi->param('error') ) { + +Error: <% $cgi->param('error') %>

-<% } %> +% } + - - - + + + +% +%my $money_char = $conf->config('money_char') || '$'; +%my $custnum; +%if ( $link eq 'invnum' ) { +% my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) +% or die "unknown invnum $linknum"; +% $custnum = $cust_bill->custnum; +%} elsif ( $link eq 'custnum' ) { +% $custnum = $linknum; +%} +% +% unless ( $link eq 'popup' ) { -<% -my $money_char = $conf->config('money_char') || '$'; -my $custnum; -if ( $link eq 'invnum' ) { - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) - or die "unknown invnum $linknum"; - $custnum = $cust_bill->custnum; -} elsif ( $link eq 'custnum' ) { - $custnum = $linknum; -} -%> +<% small_custview($custnum, $conf->config('countrydefault')) %> +% } -<% unless ( $link eq 'popup' ) { %> -<%= small_custview($custnum, $conf->config('countrydefault')) %> -<% } %> - +

Payment -<%= ntable("#cccccc", 2) %> +<% ntable("#cccccc", 2) %> Date - "> + "> @@ -102,33 +103,36 @@ Payment Amount - <%= $money_char %> - by <%= $payby{$payby} %> + <% $money_char %> + by <% $payby{$payby} %> +% if ( $payby eq 'BILL' ) { -<% if ( $payby eq 'BILL' ) { %> Check # - + +% } -<% } %> -<% if ( $link eq 'custnum' ) { %> +% if ( $link eq 'custnum' ) { + Auto-apply
to invoices -<% } elsif ( $link eq 'invnum' ) { %> +% } elsif ( $link eq 'invnum' ) { + Apply to - Invoice #<%= $linknum %> only + Invoice #<% $linknum %> only -<% } %> +% } + - +
-- cgit v1.2.1 From b19266599870172bda0921df60020f0440854750 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 24 Aug 2006 01:37:19 +0000 Subject: oops, "Auto-apply to invoices" dropdown disappeared --- httemplate/edit/cust_pay.cgi | 154 ++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 75 deletions(-) (limited to 'httemplate/edit/cust_pay.cgi') diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 83e4e82ea..855fbfcf1 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,61 +1,14 @@ -% -% -%my $conf = new FS::Conf; -% -%my %payby = ( -% 'BILL' => 'Check', -% 'CASH' => 'Cash', -% 'WEST' => 'Western Union', -% 'MCRD' => 'Manual credit card', -%); -% -%my($link, $linknum, $paid, $payby, $payinfo, $_date); -%if ( $cgi->param('error') ) { -% $link = $cgi->param('link'); -% $linknum = $cgi->param('linknum'); -% $paid = $cgi->param('paid'); -% $payby = $cgi->param('payby'); -% $payinfo = $cgi->param('payinfo'); -% $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; -%} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { -% $link = $cgi->param('popup') ? 'popup' : 'custnum'; -% $linknum = $1; -% $paid = ''; -% $payby = $cgi->param('payby') || 'BILL'; -% $payinfo = ''; -% $_date = time; -%} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { -% $link = 'invnum'; -% $linknum = $1; -% $paid = ''; -% $payby = $cgi->param('payby') || 'BILL'; -% $payinfo = ""; -% $_date = time; -%} else { -% die "illegal query ". $cgi->keywords; -%} -% -%my $paybatch = "webui-$_date-$$-". rand() * 2**32; -% -%my $title = 'Post '. $payby{$payby}. ' payment'; -%$title .= " against Invoice #$linknum" if $link eq 'invnum'; -% -%if ( $link eq 'popup' ) { -% -% -<% include('/elements/header-popup.html', $title ) %> +% if ( $link eq 'popup' ) { + <% include('/elements/header-popup.html', $title ) %> % } else { - - -<% include("/elements/header.html", $title, '') %> + <% include("/elements/header.html", $title, '') %> % } -% if ( $cgi->param('error') ) { -Error: <% $cgi->param('error') %> -

+% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

% } - @@ -64,28 +17,17 @@ -% -%my $money_char = $conf->config('money_char') || '$'; -%my $custnum; -%if ( $link eq 'invnum' ) { -% my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) -% or die "unknown invnum $linknum"; -% $custnum = $cust_bill->custnum; -%} elsif ( $link eq 'custnum' ) { -% $custnum = $linknum; -%} -% -% unless ( $link eq 'popup' ) { -<% small_custview($custnum, $conf->config('countrydefault')) %> +% unless ( $link eq 'popup' ) { + <% small_custview($custnum, $conf->config('countrydefault')) %> % } -

Payment <% ntable("#cccccc", 2) %> + Date @@ -93,6 +35,7 @@ Payment + + Amount <% $money_char %> by <% $payby{$payby} %> -% if ( $payby eq 'BILL' ) { - +% if ( $payby eq 'BILL' ) { Check # % } - -% if ( $link eq 'custnum' ) { +% if ( $link eq 'custnum' || $link eq 'popup' ) { Auto-apply
to invoices - + + + + % } elsif ( $link eq 'invnum' ) { Apply to Invoice #<% $linknum %> only -% } +% } @@ -136,6 +83,63 @@ Payment
- - + + + + +<%once> +my $conf = new FS::Conf; + +my %payby = ( + 'BILL' => 'Check', + 'CASH' => 'Cash', + 'WEST' => 'Western Union', + 'MCRD' => 'Manual credit card', +); + +my $money_char = $conf->config('money_char') || '$'; + + +<%init> +my($link, $linknum, $paid, $payby, $payinfo, $_date); +if ( $cgi->param('error') ) { + $link = $cgi->param('link'); + $linknum = $cgi->param('linknum'); + $paid = $cgi->param('paid'); + $payby = $cgi->param('payby'); + $payinfo = $cgi->param('payinfo'); + $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; +} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { + $link = $cgi->param('popup') ? 'popup' : 'custnum'; + $linknum = $1; + $paid = ''; + $payby = $cgi->param('payby') || 'BILL'; + $payinfo = ''; + $_date = time; +} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { + $link = 'invnum'; + $linknum = $1; + $paid = ''; + $payby = $cgi->param('payby') || 'BILL'; + $payinfo = ""; + $_date = time; +} else { + die "illegal query ". $cgi->keywords; +} + +my $paybatch = "webui-$_date-$$-". rand() * 2**32; + +my $title = 'Post '. $payby{$payby}. ' payment'; +$title .= " against Invoice #$linknum" if $link eq 'invnum'; + +my $custnum; +if ( $link eq 'invnum' ) { + my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) + or die "unknown invnum $linknum"; + $custnum = $cust_bill->custnum; +} elsif ( $link eq 'custnum' ) { + $custnum = $linknum; +} + + -- cgit v1.2.1