From 7abae1137cfd0830f108cd65fff01370c42e3028 Mon Sep 17 00:00:00 2001 From: Mike Robinson Date: Tue, 1 May 2012 12:40:56 -0500 Subject: 17528 Backdate payment access right. --- httemplate/edit/process/cust_pay.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index 06f5e64d5..8664883c1 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -39,7 +39,13 @@ $cgi->param('link') =~ /^(custnum|invnum|popup)$/ my $field = my $link = $1; $field = 'custnum' if $field eq 'popup'; -my $_date = parse_datetime($cgi->param('_date')); +my $_date; +if ( $FS::CurrentUser::CurrentUser->access_right(['Backdate payment']) ) { + $_date = parse_datetime($cgi->param('_date')); +} +else { + $_date = time; +} my $new = new FS::cust_pay ( { $field => $linknum, -- cgit v1.2.1