[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3565] trunk/LedgerSMB/Form.pm
- Subject: SF.net SVN: ledger-smb:[3565] trunk/LedgerSMB/Form.pm
- From: ..hidden..
- Date: Mon, 25 Jul 2011 20:16:17 +0000
Revision: 3565
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3565&view=rev
Author: ehuelsmann
Date: 2011-07-25 20:16:16 +0000 (Mon, 25 Jul 2011)
Log Message:
-----------
Fix query of which the brokenness broke saving recurrance patterns.
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2011-07-22 17:21:49 UTC (rev 3564)
+++ trunk/LedgerSMB/Form.pm 2011-07-25 20:16:16 UTC (rev 3565)
@@ -3104,11 +3104,8 @@
# calculate enddate
my $advance = $s{repeat} * ( $s{howmany} - 1 );
- my %interval;
- $interval{'Pg'} =
- "(?::date + interval '$advance $s{unit}')";
- $query = qq|SELECT $interval{$myconfig->{dbdriver}}|;
+ $query = qq|SELECT (?::date + interval '$advance $s{unit}')|;
my ($enddate) = $dbh->selectrow_array($query, undef, $s{startdate});
@@ -3118,7 +3115,7 @@
?::date - current_date AS b|;
$sth = $dbh->prepare($query) || $self->dberror($query);
- $sth->execute( $s{startdate}, $enddate );
+ $sth->execute( $s{startdate}, $enddate ) || $self->dberror($query);
my ( $a, $b ) = $sth->fetchrow_array;
if ( $a + $b ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.