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

SF.net SVN: ledger-smb:[4026] branches/1.3/LedgerSMB/ScriptLib/Company.pm



Revision: 4026
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4026&view=rev
Author:   tshvr
Date:     2011-11-21 11:39:58 +0000 (Mon, 21 Nov 2011)
Log Message:
-----------
locale text

Modified Paths:
--------------
    branches/1.3/LedgerSMB/ScriptLib/Company.pm

Modified: branches/1.3/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- branches/1.3/LedgerSMB/ScriptLib/Company.pm	2011-11-21 08:09:44 UTC (rev 4025)
+++ branches/1.3/LedgerSMB/ScriptLib/Company.pm	2011-11-21 11:39:58 UTC (rev 4026)
@@ -360,13 +360,17 @@
         $search_url .= "&$_=$form->{$_}";
     }
 
+    my $meta_number_name;
+    if($company->{account_class}==1){$meta_number_name='Vendor Number';}
+    elsif($company->{account_class}==2){$meta_number_name='Customer Number';}
+    else{$meta_number_name='Unknown';}
     # Column definitions for dynatable
     @columns = qw(legal_name entity_control_code meta_number credit_description business_type curr);
 		
 	my $column_names = {
 	    legal_name => 'Name',
 	    entity_control_code => 'Control Code',
-	    meta_number => 'Vendor Number',
+	    meta_number => $meta_number_name,
 	    credit_description => 'Description',
 	    business_type => 'Business Type',
 	    curr => 'Currency'
@@ -387,7 +391,8 @@
                 curr          => $ref->{curr},
                 };
     }
-    my $label = $ec_labels->{"$company->{account_class}"};
+    #my $label = $ec_labels->{"$company->{account_class}"};
+    my $label_text="Add ".$ec_labels->{"$company->{account_class}"};
 # CT:  Labels for i18n:
 # text->{'Add Customer')
 # text->('Add Vendor')
@@ -405,7 +410,7 @@
 #        },
 	{name => 'action',
         value => 'add',
-        text => $company->{_locale}->text("Add [_1]", $label),
+        text => $company->{_locale}->text($label_text),
         type => 'submit',
         class => 'submit',
 	}

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