projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
communigate (phase 2): rules. RT#7514
[freeside.git]
/
httemplate
/
edit
/
REAL_cust_pkg.cgi
diff --git
a/httemplate/edit/REAL_cust_pkg.cgi
b/httemplate/edit/REAL_cust_pkg.cgi
index
c312138
..
77ab1fe
100755
(executable)
--- a/
httemplate/edit/REAL_cust_pkg.cgi
+++ b/
httemplate/edit/REAL_cust_pkg.cgi
@@
-94,7
+94,7
@@
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $column %>_text",
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "<% $column %>_text",
- ifFormat: "
%m/%d/%Y
",
+ ifFormat: "
<% $date_format %>
",
button: "<% $column %>_button",
align: "BR"
});
button: "<% $column %>_button",
align: "BR"
});
@@
-128,21
+128,20
@@
</FORM>
<% include('/elements/footer.html') %>
</FORM>
<% include('/elements/footer.html') %>
+<%shared>
-<%once>
+my $conf = new FS::Conf;
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
-#my $format = "%c %z (%Z)";
-my $format = "%m/%d/%Y %T %z (%Z)";
+my $format = $date_format. ' %T %z (%Z)';
-#false laziness w/view/cust_main/packages.html
-#my( $billed_or_prepaid,
-
-</%once>
+</%shared>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
+
my $error = '';
my( $pkgnum, $cust_pkg );
my $error = '';
my( $pkgnum, $cust_pkg );
@@
-188,9
+187,9
@@
if ( $cgi->param('error') ) {
$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
die "No package!" unless $cust_pkg;
$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
die "No package!" unless $cust_pkg;
- foreach my $col (qw( setup last_bill bill adjourn expire )) {
+ foreach my $col (qw( s
tart_date s
etup last_bill bill adjourn expire )) {
my $value = $cgi->param($col);
my $value = $cgi->param($col);
- $cust_pkg->set( $col, $value ?
str2
time($value) : '' );
+ $cust_pkg->set( $col, $value ?
parse_date
time($value) : '' );
}
} else {
}
} else {