X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fcust_bill-promised_date.html;h=721a763eb8c3f94604bf9fa62ba817c24cbd2f23;hb=26004f55ce70242d07fc8de51e24439e783e9e49;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..721a763eb 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