diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-18 14:03:07 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-18 14:03:07 -0800 |
commit | 85c78d955fbc2fd6c3991156b387d37c185b9f64 (patch) | |
tree | 682733a1bd4cd3e33434dac083569ca86e75d347 /httemplate/misc | |
parent | 89f9957267f05520fc676c378694383d16eedeb1 (diff) |
disable quotations, RT#20688, RT#22232
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/disable-quotation.html | 21 | ||||
-rw-r--r-- | httemplate/misc/enable-quotation.html | 21 |
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> |