diff options
author | mark <mark> | 2011-12-29 19:01:28 +0000 |
---|---|---|
committer | mark <mark> | 2011-12-29 19:01:28 +0000 |
commit | 3e05cfa324d281922e62f718ff0583d36f75f0b9 (patch) | |
tree | 15c955d356b6d9f0dfac4b7339aeb25ce56c19bc /httemplate/misc | |
parent | 00b08d727da0c9a4d07007107e9991f1ce4100e6 (diff) |
setting promised payment date retries events, #13554
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/process/cust_bill-promised_date.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/misc/process/cust_bill-promised_date.html b/httemplate/misc/process/cust_bill-promised_date.html index 298b13007..721a763eb 100644 --- a/httemplate/misc/process/cust_bill-promised_date.html +++ b/httemplate/misc/process/cust_bill-promised_date.html @@ -1,6 +1,8 @@ <SCRIPT TYPE="text/javascript">window.top.location.reload()</SCRIPT> <%init> # XXX ACL? +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Edit customer'); $cgi->param('invnum') =~ /^(\d+)$/ or die "Illegal invnum"; @@ -13,7 +15,10 @@ if ( length($cgi->param('promised_date')) ) { } my $cust_bill = qsearchs('cust_bill', { invnum => $invnum }); +my $cust_main = $cust_bill->cust_main; + $cust_bill->promised_date($promised_date); -my $error = $cust_bill->replace; +# also reset failed payment events +my $error = $cust_bill->replace || $cust_main->retry_realtime; die $error if $error; # nothing fancy here </%init> |