what uncommited changes?
authorIvan Kohler <ivan@freeside.biz>
Mon, 19 Jan 2015 03:47:25 +0000 (19:47 -0800)
committerIvan Kohler <ivan@freeside.biz>
Mon, 19 Jan 2015 03:47:25 +0000 (19:47 -0800)
httemplate/misc/disable-quotation.html [new file with mode: 0644]
httemplate/misc/enable-quotation.html [new file with mode: 0644]

diff --git a/httemplate/misc/disable-quotation.html b/httemplate/misc/disable-quotation.html
new file mode 100644 (file)
index 0000000..a6c4829
--- /dev/null
@@ -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 (file)
index 0000000..e5bb499
--- /dev/null
@@ -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>