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

SF.net SVN: ledger-smb:[3886] trunk



Revision: 3886
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3886&view=rev
Author:   einhverfr
Date:     2011-10-18 06:55:26 +0000 (Tue, 18 Oct 2011)
Log Message:
-----------
Merging from branches/1.3

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Account.pm

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3882
   + /branches/1.3:3711-3885

Modified: trunk/LedgerSMB/DBObject/Account.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Account.pm	2011-10-18 06:50:10 UTC (rev 3885)
+++ trunk/LedgerSMB/DBObject/Account.pm	2011-10-18 06:55:26 UTC (rev 3886)
@@ -59,7 +59,21 @@
     if ($self->{charttype} and $self->{charttype} eq 'H') {
         $func = 'account_heading_save';
     }
-    my ($id_ref) = $self->exec_method(funcname => $func);
+    my ($id_ref) = $self->exec_method(funcname => $func,
+                             continue_on_error => 1);
+    if (!$id_ref->{$func}){ # Didn't return anything.  Chances are this was an 
+                            # Error we trapped from the function.  Time to test
+                            # that error and display a more friendly error.
+       if ($@ =~ /Invalid link settings:\s*Summary/){
+           $self->error($self->{_locale}->text(
+               'Error: Cannot include summary account in other dropdown menus'
+           ));
+       } else {
+          $self->error($self->{_locale}->text(
+               'Internal Database Error.'
+          ) . " $@");
+       }
+    }
     $self->{id} = $id_ref->{$func};
     if (defined $self->{recon}){
         $self->call_procedure(procname => 'cr_coa_to_account_save', args =>[ $self->{accno}, $self->{description}]);


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3882
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-3885
/branches/1.3/scripts/employee.pl:3842-3843


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3882
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-3885
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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