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

SF.net SVN: ledger-smb:[4545] branches/1.3



Revision: 4545
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4545&view=rev
Author:   einhverfr
Date:     2012-03-24 08:14:20 +0000 (Sat, 24 Mar 2012)
Log Message:
-----------
Improving error handling when currencies are not defined

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/bin/aa.pl
    branches/1.3/bin/ir.pl
    branches/1.3/bin/is.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-03-24 08:04:56 UTC (rev 4544)
+++ branches/1.3/Changelog	2012-03-24 08:14:20 UTC (rev 4545)
@@ -19,6 +19,7 @@
 * Fixed means of adding parts/editing pricelist missing (Chris T, bug 3442163)
 * Fixed unknown db detected as SQL-Ledger (Chris T, bug 3510039)
 * Fixed pos ignores pd_proto and always connects tcp (Chris T, bug 3458112)
+* Error now displayed when currencies are not defined (Chris T, bug 3509555)
 
 Andres B is Andres Basile
 

Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl	2012-03-24 08:04:56 UTC (rev 4544)
+++ branches/1.3/bin/aa.pl	2012-03-24 08:14:20 UTC (rev 4545)
@@ -193,6 +193,11 @@
       qq|<option value="transaction">| . $locale->text('Transaction');
 
     # currencies
+    if (!$form->{currencies}){
+        $form->error($locale->text(
+           'No currencies defined.  Please set these up under System/Defaults.'
+        ));
+    }
     @curr = split /:/, $form->{currencies};
     $form->{defaultcurrency} = $curr[0];
     chomp $form->{defaultcurrency};

Modified: branches/1.3/bin/ir.pl
===================================================================
--- branches/1.3/bin/ir.pl	2012-03-24 08:04:56 UTC (rev 4544)
+++ branches/1.3/bin/ir.pl	2012-03-24 08:14:20 UTC (rev 4545)
@@ -114,6 +114,11 @@
 			 job => 1 );
 
     # currencies
+    if (!$form->{currencies}){
+        $form->error($locale->text(
+           'No currencies defined.  Please set these up under System/Defaults.'
+        ));
+    }
     @curr = split /:/, $form->{currencies};
     $form->{defaultcurrency} = $curr[0];
     chomp $form->{defaultcurrency};

Modified: branches/1.3/bin/is.pl
===================================================================
--- branches/1.3/bin/is.pl	2012-03-24 08:04:56 UTC (rev 4544)
+++ branches/1.3/bin/is.pl	2012-03-24 08:14:20 UTC (rev 4545)
@@ -121,6 +121,11 @@
 			 job => 1 );
 
     # currencies
+    if (!$form->{currencies}){
+        $form->error($locale->text(
+           'No currencies defined.  Please set these up under System/Defaults.'
+        ));
+    }
     @curr = split /:/, $form->{currencies};
     $form->{defaultcurrency} = $curr[0];
     chomp $form->{defaultcurrency};

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.