summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/email-quotation.html
diff options
context:
space:
mode:
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 0000000..e7fef4a
--- /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>