summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-01-18 14:03:07 -0800
committerIvan Kohler <ivan@freeside.biz>2015-01-18 14:03:07 -0800
commit85c78d955fbc2fd6c3991156b387d37c185b9f64 (patch)
tree682733a1bd4cd3e33434dac083569ca86e75d347 /httemplate/misc
parent89f9957267f05520fc676c378694383d16eedeb1 (diff)
disable quotations, RT#20688, RT#22232
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/disable-quotation.html21
-rw-r--r--httemplate/misc/enable-quotation.html21
2 files changed, 42 insertions, 0 deletions
diff --git a/httemplate/misc/disable-quotation.html b/httemplate/misc/disable-quotation.html
new file mode 100644
index 000000000..a6c48299f
--- /dev/null
+++ b/httemplate/misc/disable-quotation.html
@@ -0,0 +1,21 @@
+%if ( $error ) {
+% errorpage($error);
+%} else {
+<% $cgi->redirect($url) %>
+%}
+<%init>
+
+die "access deined"
+ unless $FS::CurrentUser::CurrentUser->access_right('Disable quotation');
+
+$cgi->param('quotationnum') =~ /^(\d+)$/ or die 'illegal quotationnum';
+my $quotationnum = $1;
+
+my $quotation =
+ qsearchs('quotation', { 'quotationnum' => $quotationnum } );
+
+my $error = $quotation->disable;
+
+my( $label, $url ) = $quotation->cust_or_prospect_label_link( popurl(2) );
+
+</%init>
diff --git a/httemplate/misc/enable-quotation.html b/httemplate/misc/enable-quotation.html
new file mode 100644
index 000000000..e5bb49990
--- /dev/null
+++ b/httemplate/misc/enable-quotation.html
@@ -0,0 +1,21 @@
+%if ( $error ) {
+% errorpage($error);
+%} else {
+<% $cgi->redirect(popurl(2)."view/quotation.html?quotationnum=$quotationnum") %>
+%}
+<%init>
+
+die "access deined"
+ unless $FS::CurrentUser::CurrentUser->access_right('Disable quotation');
+
+$cgi->param('quotationnum') =~ /^(\d+)$/ or die 'illegal quotationnum';
+my $quotationnum = $1;
+
+my $quotation =
+ qsearchs('quotation', { 'quotationnum' => $quotationnum } );
+
+my $error = $quotation->enable;
+
+#my( $label, $url ) = $quotation->cust_or_prospect_label_link( popurl(2) );
+
+</%init>