From 51984ac3d3da3006809c6866fdecd4ad83610731 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 30 Jul 2001 07:36:04 +0000 Subject: templates!!! --- httemplate/view/cust_bill.cgi | 97 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 httemplate/view/cust_bill.cgi (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi new file mode 100755 index 000000000..24d67ddc6 --- /dev/null +++ b/httemplate/view/cust_bill.cgi @@ -0,0 +1,97 @@ +<% +# +# $Id: cust_bill.cgi,v 1.1 2001-07-30 07:36:04 ivan Exp $ +# +# this is a quick & ugly hack which does little more than add some formatting to the ascii output from /dbin/print-invoice +# +# ivan@voicenet.com 96-dec-05 +# +# added navigation bar +# ivan@voicenet.com 97-jan-30 +# +# now uses Invoice.pm +# ivan@voicenet.com 97-jun-30 +# +# what to do if cust_bill search errors? +# ivan@voicenet.com 97-jul-7 +# +# s/FS::Search/FS::Record/; $cgisuidsetup($cgi); ivan@sisd.com 98-mar-14 +# +# Changes to allow page to work at a relative position in server +# bmccane@maxbaud.net 98-apr-3 +# +# also print 'printed' field ivan@sisd.com 98-jul-10 +# +# $Log: cust_bill.cgi,v $ +# Revision 1.1 2001-07-30 07:36:04 ivan +# templates!!! +# +# Revision 1.8 1999/02/28 00:03:58 ivan +# removed misleading comments +# +# Revision 1.7 1999/01/25 12:26:03 ivan +# yet more mod_perl stuff +# +# Revision 1.6 1999/01/19 05:14:18 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:42 ivan +# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl +# (good idea anyway) +# +# Revision 1.4 1998/12/30 23:03:33 ivan +# bugfixes; fields isn't exported by derived classes +# +# Revision 1.3 1998/12/23 03:07:49 ivan +# $cgi->keywords instead of $cgi->query_string +# +# Revision 1.2 1998/12/17 09:57:20 ivan +# s/CGI::(Base|Request)/CGI.pm/; +# + +use strict; +use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p ); +use IO::File; +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup); +use FS::CGI qw(header popurl menubar); +use FS::Record qw(qsearchs); +use FS::cust_bill; + +$cgi = new CGI; +&cgisuidsetup($cgi); + +#untaint invnum +($query) = $cgi->keywords; +$query =~ /^(\d+)$/; +$invnum = $1; + +$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); +die "Invoice #$invnum not found!" unless $cust_bill; +$custnum = $cust_bill->getfield('custnum'); + +$printed = $cust_bill->printed; + +$p = popurl(2); +print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar( + "Main Menu" => $p, + "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", +)), <Enter payments (check/cash) against this invoice +
Reprint this invoice +

(Printed $printed times) +
+END
+
+print $cust_bill->print_text;
+
+	#formatting
+	print <
+  
+
+END
+
+%>
-- 
cgit v1.2.1


From 3d671921441ba8422650b54435a1959ad1d4c71d Mon Sep 17 00:00:00 2001
From: ivan 
Date: Tue, 21 Aug 2001 02:31:57 +0000
Subject: remove $Log$ messages.  whew.

---
 httemplate/view/cust_bill.cgi | 51 +------------------------------------------
 1 file changed, 1 insertion(+), 50 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 24d67ddc6..12fe8578a 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,54 +1,5 @@
 <%
-#
-# $Id: cust_bill.cgi,v 1.1 2001-07-30 07:36:04 ivan Exp $
-#
-# this is a quick & ugly hack which does little more than add some formatting to the ascii output from /dbin/print-invoice
-#
-# ivan@voicenet.com 96-dec-05
-#
-# added navigation bar
-# ivan@voicenet.com 97-jan-30
-#
-# now uses Invoice.pm
-# ivan@voicenet.com 97-jun-30
-#
-# what to do if cust_bill search errors?
-# ivan@voicenet.com 97-jul-7
-#
-# s/FS::Search/FS::Record/; $cgisuidsetup($cgi); ivan@sisd.com 98-mar-14
-#
-# Changes to allow page to work at a relative position in server
-#       bmccane@maxbaud.net     98-apr-3
-#
-# also print 'printed' field ivan@sisd.com 98-jul-10
-#
-# $Log: cust_bill.cgi,v $
-# Revision 1.1  2001-07-30 07:36:04  ivan
-# templates!!!
-#
-# Revision 1.8  1999/02/28 00:03:58  ivan
-# removed misleading comments
-#
-# Revision 1.7  1999/01/25 12:26:03  ivan
-# yet more mod_perl stuff
-#
-# Revision 1.6  1999/01/19 05:14:18  ivan
-# for mod_perl: no more top-level my() variables; use vars instead
-# also the last s/create/new/;
-#
-# Revision 1.5  1999/01/18 09:41:42  ivan
-# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
-# (good idea anyway)
-#
-# Revision 1.4  1998/12/30 23:03:33  ivan
-# bugfixes; fields isn't exported by derived classes
-#
-# Revision 1.3  1998/12/23 03:07:49  ivan
-# $cgi->keywords instead of $cgi->query_string
-#
-# Revision 1.2  1998/12/17 09:57:20  ivan
-# s/CGI::(Base|Request)/CGI.pm/;
-#
+# 
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
-- 
cgit v1.2.1


From fbcb45dfe5a1bce7981fe4527176b9fdf2ec54b7 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Mon, 3 Sep 2001 22:07:39 +0000
Subject: fix more bugs

---
 httemplate/view/cust_bill.cgi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 12fe8578a..1e024f377 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,5 +1,5 @@
 <%
-# 
+# 
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
@@ -29,9 +29,13 @@ $p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-)), <Enter payments (check/cash) against this invoice
-      
Reprint this invoice +)); + +print qq!Enter payments (check/cash) against this invoice | ! + if $cust_bill->owed > 0; + +print <Reprint this invoice

(Printed $printed times)
 END
-- 
cgit v1.2.1


From 91387f8f489e561deaf1de052d80ef800a4970a3 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Fri, 26 Oct 2001 10:24:56 +0000
Subject: cache foo *sigh*

---
 httemplate/view/cust_bill.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 1e024f377..57193197e 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,5 +1,5 @@
 <%
-# 
+# 
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
@@ -26,7 +26,7 @@ $custnum = $cust_bill->getfield('custnum');
 $printed = $cust_bill->printed;
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
 ));
-- 
cgit v1.2.1


From c14a267229fc0d6f2d2afdebab3bd34d825df2ef Mon Sep 17 00:00:00 2001
From: ivan 
Date: Tue, 30 Oct 2001 14:54:07 +0000
Subject: get rid of header foo in individual templates

---
 httemplate/view/cust_bill.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 57193197e..bbcf87fc2 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,5 +1,5 @@
 <%
-# 
+# 
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
@@ -26,7 +26,7 @@ $custnum = $cust_bill->getfield('custnum');
 $printed = $cust_bill->printed;
 
 $p = popurl(2);
-print $cgi->header( @FS::CGI::header ), header('Invoice View', menubar(
+print header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
 ));
-- 
cgit v1.2.1


From 1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Wed, 30 Jan 2002 14:18:09 +0000
Subject: remove   use Module; and   $cgi = new CGI;   &cgisuidsetup(); from
 all templates.  should work better under Mason.

---
 httemplate/view/cust_bill.cgi | 26 ++++++--------------------
 1 file changed, 6 insertions(+), 20 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index bbcf87fc2..ef6d56611 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,31 +1,17 @@
+
 <%
-# 
-
-use strict;
-use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
-use IO::File;
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-use FS::UID qw(cgisuidsetup);
-use FS::CGI qw(header popurl menubar);
-use FS::Record qw(qsearchs);
-use FS::cust_bill;
-
-$cgi = new CGI;
-&cgisuidsetup($cgi);
 
 #untaint invnum
-($query) = $cgi->keywords;
+my($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-$invnum = $1;
+my $invnum = $1;
 
-$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Invoice #$invnum not found!" unless $cust_bill;
-$custnum = $cust_bill->getfield('custnum');
+my $custnum = $cust_bill->getfield('custnum');
 
-$printed = $cust_bill->printed;
+my $printed = $cust_bill->printed;
 
-$p = popurl(2);
 print header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-- 
cgit v1.2.1


From 8cbba53b09bb5b09355316b7ff8948500c3b4b76 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Mon, 4 Feb 2002 16:44:48 +0000
Subject: billing events!

---
 httemplate/view/cust_bill.cgi | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index ef6d56611..6bc156816 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,4 +1,4 @@
-
+
 <%
 
 #untaint invnum
@@ -10,7 +10,7 @@ my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Invoice #$invnum not found!" unless $cust_bill;
 my $custnum = $cust_bill->getfield('custnum');
 
-my $printed = $cust_bill->printed;
+#my $printed = $cust_bill->printed;
 
 print header('Invoice View', menubar(
   "Main Menu" => $p,
@@ -20,11 +20,10 @@ print header('Invoice View', menubar(
 print qq!Enter payments (check/cash) against this invoice | !
   if $cust_bill->owed > 0;
 
-print <Reprint this invoice
-      

(Printed $printed times) -
-END
+print qq!Reprint this invoice!.
+#     "

(Printed $printed times)". +#print cust_bill_events + '
'.
 
 print $cust_bill->print_text;
 
-- 
cgit v1.2.1


From c828daa905491e65deb30a2ed34af609cdb96b99 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Sun, 10 Feb 2002 02:16:47 +0000
Subject: pro-rating w/ web interface, tested (closes: Bug#313).

view/cust_bill.cgi invoice view shows invoice events!

fix bug where adding events with no name silently failed instead of giving
an error

add new comission plans
---
 httemplate/view/cust_bill.cgi | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 6bc156816..5860ffd11 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,4 +1,4 @@
-
+
 <%
 
 #untaint invnum
@@ -20,10 +20,15 @@ print header('Invoice View', menubar(
 print qq!Enter payments (check/cash) against this invoice | !
   if $cust_bill->owed > 0;
 
-print qq!Reprint this invoice!.
-#     "

(Printed $printed times)". -#print cust_bill_events - '
'.
+print qq!Reprint this invoice!.      '

'; + +foreach my $cust_bill_event ( + sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event +) { + print time2str("%a %b %e %T %Y", $cust_bill_event->_date). ' - '. + $cust_bill_event->part_bill_event->event. '
'; +} +print '
';
 
 print $cust_bill->print_text;
 
-- 
cgit v1.2.1


From 22a35047ecdffff80110e06cc08fc84f9ddba9b0 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Sun, 10 Feb 2002 13:21:31 +0000
Subject: removed  from all files to fix any redirects, whew

Mason handler.pl overrides CGI::redirect

fixed strict; problems in edit/part_pkg.cgi & edit/process/part_pkg.cgi
---
 httemplate/view/cust_bill.cgi | 1 -
 1 file changed, 1 deletion(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 5860ffd11..da79d79e4 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,4 +1,3 @@
-
 <%
 
 #untaint invnum
-- 
cgit v1.2.1


From a4c96748eb6eab29a70f3a944c6520283a635c78 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Sun, 10 Feb 2002 16:05:22 +0000
Subject: *finally* seems to be working under Mason.  sheesh. *finally* seems
 to be working under Mason.  sheesh. *finally* seems to be working under
 Mason.  sheesh. *finally* seems to be working under Mason.  sheesh. *finally*
 seems to be working under Mason.  sheesh. *finally* seems to be working under
 Mason.  sheesh. *finally* seems to be working under Mason.  sheesh. *finally*
 seems to be working under Mason.  sheesh.

---
 httemplate/view/cust_bill.cgi | 1 +
 1 file changed, 1 insertion(+)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index da79d79e4..7c2af06a7 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,3 +1,4 @@
+
 <%
 
 #untaint invnum
-- 
cgit v1.2.1


From 6a37289c12238d48ea864b8177216ca276b33a40 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Wed, 27 Feb 2002 22:39:14 +0000
Subject: add status and statustext fields to cust_bill_event

---
 httemplate/view/cust_bill.cgi | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 7c2af06a7..95f1a0af8 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -22,13 +22,17 @@ print qq!Enter payments (check/cash) aga
 
 print qq!Reprint this invoice!.      '

'; +print table(). 'EventDateStatus'; foreach my $cust_bill_event ( sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event ) { - print time2str("%a %b %e %T %Y", $cust_bill_event->_date). ' - '. - $cust_bill_event->part_bill_event->event. '
'; + my $status = $cust_bill_event->status; + $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; + print ''. $cust_bill_event->part_bill_event->event. ''. + time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. + $status. ''; } -print '
';
+print '
';
 
 print $cust_bill->print_text;
 
-- 
cgit v1.2.1


From 4201aaaae8a957bc98ce345d3ee0e599da354766 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Tue, 16 Apr 2002 10:47:35 +0000
Subject: report on failed billing events...

---
 httemplate/view/cust_bill.cgi | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 95f1a0af8..53d7bc051 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -22,6 +22,8 @@ print qq!Enter payments (check/cash) aga
 
 print qq!Reprint this invoice!.      '

'; +#false laziness with search/cust_bill_event.cgi + print table(). 'EventDateStatus'; foreach my $cust_bill_event ( sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event -- cgit v1.2.1 From 7f300c1a420b3a95bb7e99c0161059718fb21932 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 30 Nov 2003 07:52:17 +0000 Subject: add link to view typeset invoice --- httemplate/view/cust_bill.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 53d7bc051..ddc92748d 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -22,6 +22,10 @@ print qq!Enter payments (check/cash) aga print qq!Reprint this invoice!. '

'; +print menubar( + 'View typeset invoice' => "${p}view/cust_bill-ps.cgi?$invnum", +), '

'; + #false laziness with search/cust_bill_event.cgi print table(). 'EventDateStatus'; -- cgit v1.2.1 From 0fd894c50eaa84169115ccbb682a53f5148a8c9c Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 11 Jan 2004 23:59:20 +0000 Subject: typeset invoice view in web UI uses pdf instead of postscript, closes Bug#614 --- httemplate/view/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index ddc92748d..4e0c4383b 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -23,7 +23,7 @@ print qq!Enter payments (check/cash) aga print qq!Reprint this invoice!. '

'; print menubar( - 'View typeset invoice' => "${p}view/cust_bill-ps.cgi?$invnum", + 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum", ), '

'; #false laziness with search/cust_bill_event.cgi -- cgit v1.2.1 From 13481802b29a511fa0aa1d10e2ad463e362bf8ed Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 12 Jan 2004 00:03:45 +0000 Subject: only display "view typeset invoice" when there is an invoice_latex template --- httemplate/view/cust_bill.cgi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 4e0c4383b..4d98f3ebc 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -22,9 +22,12 @@ print qq!Enter payments (check/cash) aga print qq!Reprint this invoice!. '

'; -print menubar( - 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum", -), '

'; +my $conf = new FS::Conf; +if ( $conf->exists('invoice_latex') ) { + print menubar( + 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum", + ), '

'; +} #false laziness with search/cust_bill_event.cgi -- cgit v1.2.1 From f4ffa3596c3b8bfc9e862c2a7e8efc68f86207ab Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 12 Feb 2004 06:31:37 +0000 Subject: re-email invoice, closes: bug#526 and have print and email invoice links redirect back to top of customer view page instead of #history tag --- httemplate/view/cust_bill.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 4d98f3ebc..50ee8b36c 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -20,7 +20,13 @@ print header('Invoice View', menubar( print qq!Enter payments (check/cash) against this invoice | ! if $cust_bill->owed > 0; -print qq!Reprint this invoice!. '

'; +print qq!Reprint this invoice!; +if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { + print qq! | !. + qq!Re-email this invoice!; +} + +print '

'; my $conf = new FS::Conf; if ( $conf->exists('invoice_latex') ) { -- cgit v1.2.1 From ea72b6b09a472a989e60fe5bba1884a629907e37 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 2 Apr 2004 11:23:34 +0000 Subject: add a fake .pdf extension to placate some versions of IE. yay IE. --- httemplate/view/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 50ee8b36c..7906af65b 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -31,7 +31,7 @@ print '

'; my $conf = new FS::Conf; if ( $conf->exists('invoice_latex') ) { print menubar( - 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum", + 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum.pdf", ), '

'; } -- cgit v1.2.1 From 97c0616b60819a23dbc6d7d6ebf2ff1dc3446e91 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Oct 2004 13:35:41 +0000 Subject: links to show alternate invoices also --- httemplate/view/cust_bill.cgi | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 7906af65b..3c23d60a8 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -3,8 +3,9 @@ #untaint invnum my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $invnum = $1; +$query =~ /^((.+)-)?(\d+)$/; +my $templatename = $1; +my $invnum = $3; my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; @@ -43,13 +44,27 @@ foreach my $cust_bill_event ( ) { my $status = $cust_bill_event->status; $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; - print ''. $cust_bill_event->part_bill_event->event. ''. + my $part_bill_event = $cust_bill_event->part_bill_event; + print ''. $part_bill_event->event; + + if ( + $part_bill_event->plan eq 'send_alternate' + && $part_bill_event->plandata =~ /^templatename (.*)$/m + ) { + my $templatename = $1; + print qq! ( !. + 'view text | '. + qq!!. + 'view typeset )'; + } + + print ''. time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. $status. ''; } print '
';
 
-print $cust_bill->print_text;
+print $cust_bill->print_text('', $templatename);
 
 	#formatting
 	print <
Date: Tue, 5 Oct 2004 13:44:06 +0000
Subject: links to show alternate invoices also

---
 httemplate/view/cust_bill.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 3c23d60a8..116cd6dcc 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -4,7 +4,7 @@
 #untaint invnum
 my($query) = $cgi->keywords;
 $query =~ /^((.+)-)?(\d+)$/;
-my $templatename = $1;
+my $templatename = $2;
 my $invnum = $3;
 
 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-- 
cgit v1.2.1


From b740db94f284cc882958fa6e78f73c8017783578 Mon Sep 17 00:00:00 2001
From: ivan 
Date: Tue, 5 Oct 2004 13:52:28 +0000
Subject: links to show alternate invoices also

---
 httemplate/view/cust_bill.cgi | 55 ++++++++++++++++++++++++-------------------
 1 file changed, 31 insertions(+), 24 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 116cd6dcc..bda5d769b 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -31,40 +31,47 @@ print '

'; my $conf = new FS::Conf; if ( $conf->exists('invoice_latex') ) { + my $link = "${p}view/cust_bill-pdf.cgi?"; + $link .= "$templatename-" if $templatename; + $link .= "$invnum.pdf"; print menubar( - 'View typeset invoice' => "${p}view/cust_bill-pdf.cgi?$invnum.pdf", + 'View typeset invoice' => $link, ), '

'; } #false laziness with search/cust_bill_event.cgi -print table(). 'EventDateStatus'; -foreach my $cust_bill_event ( - sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event -) { - my $status = $cust_bill_event->status; - $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; - my $part_bill_event = $cust_bill_event->part_bill_event; - print ''. $part_bill_event->event; - - if ( - $part_bill_event->plan eq 'send_alternate' - && $part_bill_event->plandata =~ /^templatename (.*)$/m +unless ( $templatename ) { + print table(). 'EventDateStatus'; + foreach my $cust_bill_event ( + sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event ) { - my $templatename = $1; - print qq! ( !. - 'view text | '. - qq!!. - 'view typeset )'; + my $status = $cust_bill_event->status; + $status .= ': '. $cust_bill_event->statustext + if $cust_bill_event->statustext; + my $part_bill_event = $cust_bill_event->part_bill_event; + print ''. $part_bill_event->event; + + if ( + $part_bill_event->plan eq 'send_alternate' + && $part_bill_event->plandata =~ /^templatename (.*)$/m + ) { + my $templatename = $1; + print qq! ( !. + 'view text | '. + qq!!. + 'view typeset )'; + } + + print ''. + time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. + $status. ''; } - - print ''. - time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. - $status. ''; + print '
'; } -print '
';
 
-print $cust_bill->print_text('', $templatename);
+
+print '
'. $cust_bill->print_text('', $templatename);
 
 	#formatting
 	print <
Date: Tue, 5 Oct 2004 14:16:44 +0000
Subject: links to show alternate invoices also

---
 httemplate/view/cust_bill.cgi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index bda5d769b..34f533196 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -70,8 +70,7 @@ unless ( $templatename ) {
   print '
'; } - -print '
'. $cust_bill->print_text('', $templatename);
+print '
', $cust_bill->print_text('', $templatename);
 
 	#formatting
 	print <
Date: Mon, 20 Dec 2004 10:14:04 +0000
Subject: better error messages on email errors

---
 httemplate/view/cust_bill.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 34f533196..ca0612d09 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -47,7 +47,7 @@ unless ( $templatename ) {
     sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
   ) {
     my $status = $cust_bill_event->status;
-    $status .= ': '. $cust_bill_event->statustext
+    $status .= ': '. encode_entities($cust_bill_event->statustext)
       if $cust_bill_event->statustext;
     my $part_bill_event = $cust_bill_event->part_bill_event;
     print ''. $part_bill_event->event;
-- 
cgit v1.2.1


From 18c025613fa052cf4ba8d484f1296cc2a1719a24 Mon Sep 17 00:00:00 2001
From: khoff 
Date: Mon, 21 Mar 2005 22:13:39 +0000
Subject: Added support for FAX invoice destinations using a HylaFAX server.
 Faxing plain text invoices is not supported.

---
 httemplate/view/cust_bill.cgi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'httemplate/view/cust_bill.cgi')

diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index ca0612d09..c217cc389 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -7,6 +7,8 @@ $query =~ /^((.+)-)?(\d+)$/;
 my $templatename = $2;
 my $invnum = $3;
 
+my $conf = new FS::Conf;
+
 my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Invoice #$invnum not found!" unless $cust_bill;
 my $custnum = $cust_bill->getfield('custnum');
@@ -27,9 +29,11 @@ if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
         qq!Re-email this invoice!;
 }
 
+print qq! | Refax this invoice!
+  if ($conf->exists('hylafax'));
+
 print '

'; -my $conf = new FS::Conf; if ( $conf->exists('invoice_latex') ) { my $link = "${p}view/cust_bill-pdf.cgi?"; $link .= "$templatename-" if $templatename; -- cgit v1.2.1 From 3081639bd119c6d281ef23139649b2e73ba62754 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 14 May 2005 16:27:26 +0000 Subject: html invoices! http://chris-linfoot.net/d6plinks/CWLT-5VZD4Y http://www.dsv.su.se/~jpalme/ietf/mhtml.html ftp://ftp.dsv.su.se/users/jpalme/draft-ietf-mhtml-info.txt http://mailformat.dan.info/headers/mime.html http://www.faqs.org/rfcs/rfc2392.html http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_content-type_multipart.asp (MIME is hard, let's go shopping!) --- httemplate/view/cust_bill.cgi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index c217cc389..5dd8a8d71 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -62,7 +62,7 @@ unless ( $templatename ) { ) { my $templatename = $1; print qq! ( !. - 'view text | '. + 'view | '. qq!!. 'view typeset )'; } @@ -74,11 +74,15 @@ unless ( $templatename ) { print '
'; } -print '
', $cust_bill->print_text('', $templatename);
+if ( $conf->exists('invoice_html') ) {
+  print $cust_bill->print_html('', $templatename);
+} else {
+  print '
', $cust_bill->print_text('', $templatename), '
'; +} #formatting print < + END -- cgit v1.2.1 From c28a4c33a88dfa354436f81a2e213638088adcf1 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 19 May 2005 08:43:27 +0000 Subject: re-email/fax/print links should respect template, also add direct re-send links like the view links and convert view/cust_bill.cgi to proper template --- httemplate/view/cust_bill.cgi | 151 ++++++++++++++++++++++++------------------ 1 file changed, 86 insertions(+), 65 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 5dd8a8d71..9282b7089 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -1,4 +1,3 @@ - <% #untaint invnum @@ -15,76 +14,98 @@ my $custnum = $cust_bill->getfield('custnum'); #my $printed = $cust_bill->printed; -print header('Invoice View', menubar( +my $link = $templatename ? "$templatename-$invnum" : $invnum; + +%> +<%= header('Invoice View', menubar( "Main Menu" => $p, "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", -)); - -print qq!Enter payments (check/cash) against this invoice | ! - if $cust_bill->owed > 0; - -print qq!Reprint this invoice!; -if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { - print qq! | !. - qq!Re-email this invoice!; -} - -print qq! | Refax this invoice! - if ($conf->exists('hylafax')); - -print '

'; - -if ( $conf->exists('invoice_latex') ) { - my $link = "${p}view/cust_bill-pdf.cgi?"; - $link .= "$templatename-" if $templatename; - $link .= "$invnum.pdf"; - print menubar( - 'View typeset invoice' => $link, - ), '

'; -} - -#false laziness with search/cust_bill_event.cgi - -unless ( $templatename ) { - print table(). 'EventDateStatus'; - foreach my $cust_bill_event ( - sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event - ) { +)) %> + +<% if ( $cust_bill->owed > 0 ) { %> + Enter payments (check/cash) against this invoice | +<% } %> + +Reprint this invoice + +<% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { %> + | Re-email + this invoice +<% } %> + +<% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { %> + | Re-fax + this invoice +<% } %> + +

+ +<% if ( $conf->exists('invoice_latex') ) { %> + View typeset invoice +

+<% } %> + +<% #false laziness with search/cust_bill_event.cgi + unless ( $templatename ) { %> + + <%= table() %> + + Event + Date + Status + + + <% foreach my $cust_bill_event ( + sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event + ) { + my $status = $cust_bill_event->status; $status .= ': '. encode_entities($cust_bill_event->statustext) if $cust_bill_event->statustext; my $part_bill_event = $cust_bill_event->part_bill_event; - print ''. $part_bill_event->event; + %> + + <%= $part_bill_event->event %> - if ( - $part_bill_event->plan eq 'send_alternate' - && $part_bill_event->plandata =~ /^templatename (.*)$/m - ) { - my $templatename = $1; - print qq! ( !. - 'view | '. - qq!!. - 'view typeset )'; - } + <% if ( + $part_bill_event->plan eq 'send_alternate' + && $part_bill_event->plandata =~ /^(agent_)?templatename (.*)$/m + ) { + my $alt_templatename = $2; + my $alt_link = "$templatename-$invnum"; + %> + ( view + | view + typeset + | re-print + <% if ( grep { $_ ne 'POST' } + $cust_bill->cust_main->invoicing_list ) { %> + | re-email + <% } %> + + <% if ( $conf->exists('hylafax') + && length($cust_bill->cust_main->fax) ) { %> + | re-fax + <% } %> + + ) + <% } %> - print ''. - time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. - $status. ''; - } - print '
'; -} - -if ( $conf->exists('invoice_html') ) { - print $cust_bill->print_html('', $templatename); -} else { - print '
', $cust_bill->print_text('', $templatename), '
'; -} - - #formatting - print < - - -END + + <%= time2str("%a %b %e %T %Y", $cust_bill_event->_date) %> + <%= $status %> + + <% } %> -%> + +
+ +<% } %> + +<% if ( $conf->exists('invoice_html') ) { %> + <%= $cust_bill->print_html('', $templatename) %> +<% } else { %> +
<%= $cust_bill->print_text('', $templatename) %>
+<% } %> + + -- cgit v1.2.1 From b3f4251177b50175109c566e72f3c556bb6ed586 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 19 May 2005 08:51:19 +0000 Subject: oops, fix alternate view/etc. links --- httemplate/view/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 9282b7089..b9dc23cbc 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -72,7 +72,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; && $part_bill_event->plandata =~ /^(agent_)?templatename (.*)$/m ) { my $alt_templatename = $2; - my $alt_link = "$templatename-$invnum"; + my $alt_link = "$alt_templatename-$invnum"; %> ( view | view -- cgit v1.2.1 From 8d5366cf84513ed7e7832315fb3d36c49f4f9a8a Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 22 May 2005 20:39:21 +0000 Subject: oops, quote $link w/new templating --- httemplate/view/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index b9dc23cbc..39c1a191f 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -41,7 +41,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum;

<% if ( $conf->exists('invoice_latex') ) { %> -
View typeset invoice + View typeset invoice

<% } %> -- cgit v1.2.1 From 1dc2f078842e5c2d28acd8e50b9066d217179a5f Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 26 May 2005 19:30:13 +0000 Subject: silly perl version bs --- httemplate/view/cust_bill.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 39c1a191f..6c8afe74d 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -103,9 +103,9 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; <% } %> <% if ( $conf->exists('invoice_html') ) { %> - <%= $cust_bill->print_html('', $templatename) %> + <%= join("\n", $cust_bill->print_html('', $templatename) ) %> <% } else { %> -
<%= $cust_bill->print_text('', $templatename) %>
+
<%= join("\n", $cust_bill->print_text('', $templatename) ) %>
<% } %> -- cgit v1.2.1 From 8ba2edbf6fd588d7bab077919c36dd7b702d3b59 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 26 May 2005 19:32:49 +0000 Subject: silly perl version bs --- httemplate/view/cust_bill.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 6c8afe74d..2ca7ba959 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -103,9 +103,9 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; <% } %> <% if ( $conf->exists('invoice_html') ) { %> - <%= join("\n", $cust_bill->print_html('', $templatename) ) %> + <%= join('', $cust_bill->print_html('', $templatename) ) %> <% } else { %> -
<%= join("\n", $cust_bill->print_text('', $templatename) ) %>
+
<%= join('', $cust_bill->print_text('', $templatename) ) %>
<% } %> -- cgit v1.2.1 From 1045de52b8e6e9acc46bc9f250711929394ba1c7 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 1 Jun 2005 23:40:13 +0000 Subject: align terminology for consistancy. or something. --- httemplate/view/cust_bill.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 2ca7ba959..38c57ec18 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -26,7 +26,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; Enter payments (check/cash) against this invoice | <% } %> -Reprint this invoice +Re-print this invoice <% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { %> | Re-email -- cgit v1.2.1 From 684a478c0f88e5bf6d1d3f32f4618089146b5709 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Jun 2005 09:29:56 +0000 Subject: add ability to search on a date range of invoice events and then reprint or reemail (boy was that a bit more work than i expected), closes: Bug#946 --- httemplate/view/cust_bill.cgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 38c57ec18..d149cf172 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -67,11 +67,8 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; <%= $part_bill_event->event %> - <% if ( - $part_bill_event->plan eq 'send_alternate' - && $part_bill_event->plandata =~ /^(agent_)?templatename (.*)$/m - ) { - my $alt_templatename = $2; + <% if ( $part_bill_event->templatename ) { + my $alt_templatename = $part_bill_event->templatename; my $alt_link = "$alt_templatename-$invnum"; %> ( view -- cgit v1.2.1 From cccd0b7cd38a88c131e19981be38434f87abe194 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 21 Oct 2005 15:21:37 +0000 Subject: add CASH and WEST payment types (payments only, not cust_main.payby) --- httemplate/view/cust_bill.cgi | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index d149cf172..8dcbd3a35 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -8,6 +8,12 @@ my $invnum = $3; my $conf = new FS::Conf; +my @payby = $conf->config('payby'); +#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) +@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) + unless grep /\w/, @payby; +my %payby = map { $_=>1 } @payby; + my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; my $custnum = $cust_bill->getfield('custnum'); @@ -22,8 +28,38 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", )) %> -<% if ( $cust_bill->owed > 0 ) { %> - Enter payments (check/cash) against this invoice | +<% if ( $cust_bill->owed > 0 + && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} ) + ) + { + my $s = 0; +%> + + Post + + <% if ( $payby{'BILL'} ) { %> + + <%= $s++ ? ' | ' : '' %> + check + + <% } %> + + <% if ( $payby{'CASH'} ) { %> + + <%= $s++ ? ' | ' : '' %> + cash + + <% } %> + + <% if ( $payby{'WEST'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Western Union + + <% } %> + + payment against this invoice
+ <% } %> Re-print this invoice -- cgit v1.2.1 From f10cd68f08a6bfbd565a83b40bacc3f55a1265b3 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 21 Nov 2005 10:47:12 +0000 Subject: add MCRD payment type for manually processed ccards --- httemplate/view/cust_bill.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 8dcbd3a35..572441494 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -29,7 +29,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; )) %> <% if ( $cust_bill->owed > 0 - && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} ) + && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} ) ) { my $s = 0; @@ -58,6 +58,13 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; <% } %> + <% if ( $payby{'MCRD'} ) { %> + + <%= $s++ ? ' | ' : '' %> + manual credit card + + <% } %> + payment against this invoice
<% } %> -- cgit v1.2.1 From bbf01f2a628d15c0ca557cf68235f25d6d233ee7 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 21 Nov 2005 12:41:43 +0000 Subject: ignore blank lines in payby config --- httemplate/view/cust_bill.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_bill.cgi') diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 572441494..56c0c1736 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -8,10 +8,10 @@ my $invnum = $3; my $conf = new FS::Conf; -my @payby = $conf->config('payby'); +my @payby = grep /\w/, $conf->config('payby'); #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) - unless grep /\w/, @payby; + unless @payby; my %payby = map { $_=>1 } @payby; my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -- cgit v1.2.1