[freeside-commits] freeside/httemplate/view cust_bill.cgi, 1.42, 1.43
Ivan,,,
ivan at wavetail.420.am
Sat Oct 3 19:04:52 PDT 2009
- Previous message: [freeside-commits] freeside/httemplate/view/cust_main payment_history.html, 1.43, 1.44
- Next message: [freeside-commits] freeside/FS/FS Conf.pm, 1.180.2.51, 1.180.2.52 Setup.pm, 1.8.2.4, 1.8.2.5 cust_bill.pm, 1.163.2.45, 1.163.2.46 cust_bill_pkg.pm, 1.12.2.4, 1.12.2.5 AccessRight.pm, 1.18.2.9, 1.18.2.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv21487/httemplate/view
Modified Files:
cust_bill.cgi
Log Message:
delete invoices, RT#4048
Index: cust_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill.cgi,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- cust_bill.cgi 30 Jul 2009 06:42:32 -0000 1.42
+++ cust_bill.cgi 4 Oct 2009 02:04:49 -0000 1.43
@@ -2,10 +2,31 @@
"View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
)) %>
+% if ( $conf->exists('deleteinvoices')
+% && $curuser->access_right('Delete invoices' )
+% )
+% {
+
+ <SCRIPT TYPE="text/javascript">
+ function areyousure(href, message) {
+ if (confirm(message) == true)
+ window.location.href = href;
+ }
+ </SCRIPT>
+
+ <A HREF = "javascript:areyousure(
+ '<%$p%>misc/delete-cust_bill.html?<% $invnum %>',
+ 'Are you sure you want to delete this invoice?'
+ )"
+ TITLE = "Delete this invoice from the database completely"
+ >Delete this invoice</A>
+ <BR><BR>
+
+% }
% if ( $cust_bill->owed > 0
% && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD) )
-% && $FS::CurrentUser::CurrentUser->access_right('Post payment')
+% && $curuser->access_right('Post payment')
% && ! $conf->exists('pkg-balances')
% )
% {
@@ -37,8 +58,7 @@
% }
-
-% if ( $FS::CurrentUser::CurrentUser->access_right('Resend invoices') ) {
+% if ( $curuser->access_right('Resend invoices') ) {
<A HREF="<% $p %>misc/print-invoice.cgi?<% $link %>">Re-print this invoice</A>
@@ -54,10 +74,9 @@
% }
-
% if ( $conf->exists('invoice_latex') ) {
- <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>.pdf">View typeset invoice</A>
+ <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>.pdf">View typeset invoice PDF</A>
<BR><BR>
% }
@@ -83,8 +102,10 @@
<% include('/elements/footer.html') %>
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
+ unless $curuser->access_right('View invoices');
#untaint invnum
my($query) = $cgi->keywords;
@@ -105,7 +126,7 @@
'table' => 'cust_bill',
'addl_from' => 'LEFT JOIN cust_main USING ( custnum )',
'hashref' => { 'invnum' => $invnum },
- 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+ 'extra_sql' => ' AND '. $curuser->agentnums_sql,
});
die "Invoice #$invnum not found!" unless $cust_bill;
@@ -117,5 +138,3 @@
my $link = $templatename ? "$templatename-$invnum" : $invnum;
</%init>
-
-
- Previous message: [freeside-commits] freeside/httemplate/view/cust_main payment_history.html, 1.43, 1.44
- Next message: [freeside-commits] freeside/FS/FS Conf.pm, 1.180.2.51, 1.180.2.52 Setup.pm, 1.8.2.4, 1.8.2.5 cust_bill.pm, 1.163.2.45, 1.163.2.46 cust_bill_pkg.pm, 1.12.2.4, 1.12.2.5 AccessRight.pm, 1.18.2.9, 1.18.2.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list