[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1.4 goods and services search not working



Not sure if this is a bug?:
On my 1.4 test system if I do a search under goods and services (no search
criteria just all items) I get an error from
DateTime::Format::Strptime-1.540.0 stating that the 'pattern' cant be
undefined.
OK
looking at the line (186) in
Ledgersmb/PGDate.pm
I print the value of pattern => $fmt and it is undefined!
looking above I see $fmt =
$formats->{uc($LedgerSMB::App_State::User->{dateformat})}->[0] is
undefined as well
however
$fmt = $LedgerSMB::App_State::User->{dateformat}
Has the desired format of the test user.
If $fmt = $LedgerSMB::App_State::User->{dateformat} is the intended design
then here is a patch.

Cheers
Turtle
Index: LedgerSMB/PGDate.pm
===================================================================
--- LedgerSMB/PGDate.pm	(revision 6310)
+++ LedgerSMB/PGDate.pm	(working copy)
@@ -177,7 +177,9 @@
     return undef if !defined $self->date;
     my $fmt;
     if (defined $LedgerSMB::App_State::User->{dateformat}){
-        $fmt = $formats->{uc($LedgerSMB::App_State::User->{dateformat})}->[0];
+        #$fmt = $formats->{uc($LedgerSMB::App_State::User->{dateformat})}->[0];
+        $fmt = $LedgerSMB::App_State::User->{dateformat} ;
+ 
     } else {
         $fmt = '%F';
     }
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users