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

SF.net SVN: ledger-smb:[3341] trunk/LedgerSMB/ScriptLib/Company.pm



Revision: 3341
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3341&view=rev
Author:   einhverfr
Date:     2011-06-26 13:24:31 +0000 (Sun, 26 Jun 2011)

Log Message:
-----------

Correcting entity class and account class settings when creating/editing vendors

Modified Paths:
--------------
    trunk/LedgerSMB/ScriptLib/Company.pm

Modified: trunk/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company.pm	2011-06-26 11:30:16 UTC (rev 3340)
+++ trunk/LedgerSMB/ScriptLib/Company.pm	2011-06-26 13:24:31 UTC (rev 3341)
@@ -176,7 +176,6 @@
     
     my ($request) = @_;
     my $company = new_company($request);
-    set_entity_class($company);
     $company->get();
     $company->get_credit_id();
 #    $company->get_metadata(); It will be called from _render_main_screen
@@ -688,6 +687,7 @@
     $company->open_form;
     $company->{dbh}->commit;
     $company->get_metadata();
+    set_entity_class($company);
 
     $company->{creditlimit} = $company->format_amount({amount => $company->{creditlimit}}) unless !defined $company->{creditlimit}; 
     $company->{discount} = "$company->{discount}" unless !defined $company->{discount}; 


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