From 49630d793f7901da93a4ffc298f5f328d8a12705 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 29 Dec 2011 19:01:37 +0000 Subject: [PATCH] setting promised payment date retries events, #13554 --- httemplate/misc/process/cust_bill-promised_date.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.11.0