projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add cust_event.no_action flag for events that conditionally execute, #36741
[freeside.git]
/
httemplate
/
view
/
cust_bill-logo.cgi
diff --git
a/httemplate/view/cust_bill-logo.cgi
b/httemplate/view/cust_bill-logo.cgi
index
dc8b674
..
85b5d72
100755
(executable)
--- a/
httemplate/view/cust_bill-logo.cgi
+++ b/
httemplate/view/cust_bill-logo.cgi
@@
-3,6
+3,7
@@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('View invoices')
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('View invoices')
+ or $FS::CurrentUser::CurrentUser->access_right('View quotations')
or $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $conf;
or $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $conf;
@@
-13,10
+14,16
@@
if ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
my $invnum = $1;
$templatename = $cgi->param('template') || $cgi->param('templatename');
my $cust_bill = FS::cust_bill->by_key($invnum)
my $invnum = $1;
$templatename = $cgi->param('template') || $cgi->param('templatename');
my $cust_bill = FS::cust_bill->by_key($invnum)
- || FS::cust_bill_void->by_key($invnum)
;
-
die 'unknown invnum' unless $cust_bill
;
+ || FS::cust_bill_void->by_key($invnum)
+
|| die 'unknown invnum'
;
$conf = $cust_bill->conf;
$agentnum = $cust_bill->cust_main->agentnum;
$conf = $cust_bill->conf;
$agentnum = $cust_bill->cust_main->agentnum;
+} elsif ( $cgi->param('quotationnum') =~ /^(\d+)$/ ) {
+ my $quotationnum = $1;
+ my $quotation = FS::quotation->by_key($quotationnum)
+ or die 'unknown quotationnum';
+ $conf = $quotation->conf;
+ $agentnum = $quotation->agentnum;
} else {
# assume the default config
$conf = FS::Conf->new;
} else {
# assume the default config
$conf = FS::Conf->new;