diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-18 18:13:16 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-18 18:13:16 -0800 |
commit | 03c12b4dabfcaabc218f39ee13557edebc13931d (patch) | |
tree | 0d915cf9e2bbf278a48500b5d125206ab78477a2 /httemplate/misc/process | |
parent | 0b6bd6405107c1abf8f2c5e2bc1b569870a02309 (diff) |
email quotations, RT#22232, RT#20688
Diffstat (limited to 'httemplate/misc/process')
-rwxr-xr-x | httemplate/misc/process/email-quotation.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/misc/process/email-quotation.html b/httemplate/misc/process/email-quotation.html new file mode 100755 index 000000000..e7fef4a85 --- /dev/null +++ b/httemplate/misc/process/email-quotation.html @@ -0,0 +1,20 @@ +<& /elements/header-popup.html, mt('Email sent') &> +<SCRIPT TYPE="text/javascript"> + setTimeout("parent.cClick()", 3000); +</SCRIPT> +<& /elements/footer-popup.html &> +<%init> + +#die "access denied" +# unless $FS::CurrentUser::CurrentUser->access_right('Generate quotation'); #separate rights to generate vs send/email? + +$cgi->param('quotationnum') =~ /^(\d+)$/ or die "Illegal quotationnum"; +my $quotationnum = $1; + +#XXX agent-virt +my $quotation = qsearchs('quotation', { 'quotationnum'=>$quotationnum }) + or die "Unknown quotationnum"; + +$quotation->email({ 'to' => [ $cgi->param('emailaddress') ] }); + +</%init> |