[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4865] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4865] branches/1.3
- From: ..hidden..
- Date: Fri, 08 Jun 2012 02:07:16 +0000
Revision: 4865
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4865&view=rev
Author: einhverfr
Date: 2012-06-08 02:07:16 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
fixing datestyle not set when logging on
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/Form.pm
branches/1.3/LedgerSMB/RP.pm
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-06-08 00:59:33 UTC (rev 4864)
+++ branches/1.3/Changelog 2012-06-08 02:07:16 UTC (rev 4865)
@@ -6,6 +6,9 @@
* New link for customer/vendor when not a dropdown (Chris T)
* Removed file debugging code from file.pl (Chris T)
* fixed can void voids. (Chris T, h/t Erik Huelsmann, item 3515561)
+* Fixed error on taxable sales report (Chris T, 3531784 h/t Nigel T)
+* Added missing localization calls to recon approval workflow (Chris T)
+* Clarified recon approval workflow (Chris T)
Changelog for 1.3.18
* Fixed missing template for CSV pricelists (Chris T)
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2012-06-08 00:59:33 UTC (rev 4864)
+++ branches/1.3/LedgerSMB/Form.pm 2012-06-08 02:07:16 UTC (rev 4865)
@@ -1349,6 +1349,12 @@
$logger->debug("acquired dbh \$self->{dbh}=$self->{dbh}");
$self->{dbh}->{pg_server_prepare} = 0;
my $dbh = $self->{dbh};
+
+ my $datequery = 'select dateformat from user_preference join users using(id)
+ where username = CURRENT_USER';
+ my $date_sth = $dbh->prepare($datequery);
+ $date_sth->execute;
+ my ($datestyle) = $date_sth->fetchrow_array;
my %date_query = (
'mm/dd/yy' => 'set DateStyle to \'SQL, US\'',
'mm-dd-yy' => 'set DateStyle to \'POSTGRES, US\'',
@@ -1356,11 +1362,7 @@
'dd-mm-yy' => 'set DateStyle to \'POSTGRES, EUROPEAN\'',
'dd.mm.yy' => 'set DateStyle to \'GERMAN\''
);
- if ( !$myconfig->{dateformat}) {
- $myconfig->{dateformat} = 'yyyy-mm-dd';
- } else {
- $self->{dbh}->do( $date_query{ $myconfig->{dateformat} } );
- }
+ $self->{dbh}->do( $date_query{ $datestyle } );
$self->{db_dateformat} = $myconfig->{dateformat}; #shim
# This is the general version check
Modified: branches/1.3/LedgerSMB/RP.pm
===================================================================
--- branches/1.3/LedgerSMB/RP.pm 2012-06-08 00:59:33 UTC (rev 4864)
+++ branches/1.3/LedgerSMB/RP.pm 2012-06-08 02:07:16 UTC (rev 4865)
@@ -1983,7 +1983,6 @@
} else {
$form->error('Invalid input db in RP::tax_report.');
}
-
my $query = qq|
SELECT gl.transdate, gl.id, gl.invnumber, e.name, e.id as entity_id,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.