projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00b08d7
)
setting promised payment date retries events, #13554
author
mark
<mark>
Thu, 29 Dec 2011 19:01:28 +0000
(19:01 +0000)
committer
mark
<mark>
Thu, 29 Dec 2011 19:01:28 +0000
(19:01 +0000)
httemplate/misc/process/cust_bill-promised_date.html
patch
|
blob
|
history
diff --git
a/httemplate/misc/process/cust_bill-promised_date.html
b/httemplate/misc/process/cust_bill-promised_date.html
index
298b130
..
721a763
100644
(file)
--- 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?
<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";
$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_bill = qsearchs('cust_bill', { invnum => $invnum });
+my $cust_main = $cust_bill->cust_main;
+
$cust_bill->promised_date($promised_date);
$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>
die $error if $error; # nothing fancy here
</%init>