[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1514] trunk/LedgerSMB/AM.pm
- Subject: SF.net SVN: ledger-smb: [1514] trunk/LedgerSMB/AM.pm
- From: ..hidden..
- Date: Wed, 05 Sep 2007 17:05:23 -0700
Revision: 1514
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1514&view=rev
Author: einhverfr
Date: 2007-09-05 17:05:23 -0700 (Wed, 05 Sep 2007)
Log Message:
-----------
Fixing bug 1763928: Books closed-to date not multi-format safe
Modified Paths:
--------------
trunk/LedgerSMB/AM.pm
Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm 2007-09-06 00:04:49 UTC (rev 1513)
+++ trunk/LedgerSMB/AM.pm 2007-09-06 00:05:23 UTC (rev 1514)
@@ -2180,6 +2180,10 @@
UPDATE defaults SET value = ?
WHERE setting_key = ?|;
my $sth = $dbh->prepare($query);
+ my $sth_closedto = $dbh->prepare(qq|
+ UPDATE defaults SET value = to_char(?::date, 'YYYY-MM-DD')
+ WHERE setting_key = ?|);
+
for (qw(revtrans closedto audittrail)) {
if ( $form->{$_} ) {
@@ -2188,8 +2192,11 @@
else {
$val = 0;
}
- $val = undef if ($_ == 'closedto' and $val = 0);
- $sth->execute( $val, $_ );
+ if ($_ eq 'closedto'){
+ $sth_closedto->execute( $val || undef, $_);
+ } else {
+ $sth->execute( $val, $_ );
+ }
}
## SC: Disabling audit trail removal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.