X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcust_bill-promised_date.html;h=f390609c7ee1a31aa8050c0c39d8622de9027150;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hp=298b13007909918174afe2b08db4e381aa6a4c6b;hpb=ce1b61e7d65317a74f680afb4cb8d8306e14fa5f;p=freeside.git diff --git a/httemplate/misc/process/cust_bill-promised_date.html b/httemplate/misc/process/cust_bill-promised_date.html index 298b13007..f390609c7 100644 --- a/httemplate/misc/process/cust_bill-promised_date.html +++ b/httemplate/misc/process/cust_bill-promised_date.html @@ -1,6 +1,8 @@ - + <%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