summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/email-quotation.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-01-18 18:13:33 -0800
committerIvan Kohler <ivan@freeside.biz>2015-01-18 18:13:33 -0800
commit999c1f9c054ba51a6c5c7a3a2babe21dd17683cb (patch)
treed0d7ff38d2f340e6d47a9dee2d3c4a77821ad5fd /httemplate/misc/process/email-quotation.html
parent221374cba250b0519bcde64e7e7e8528b7f105e7 (diff)
email quotations, RT#22232, RT#20688
Diffstat (limited to 'httemplate/misc/process/email-quotation.html')
-rwxr-xr-xhttemplate/misc/process/email-quotation.html20
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>