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

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



Revision: 6783
          http://sourceforge.net/p/ledger-smb/code/6783
Author:   einhverfr
Date:     2014-02-06 10:03:15 +0000 (Thu, 06 Feb 2014)
Log Message:
-----------
Fixing default language not recignized for contact screen, fixing bug 1020

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/contact.pm
    trunk/UI/Contact/divs/credit.html

Modified: trunk/LedgerSMB/Scripts/contact.pm
===================================================================
--- trunk/LedgerSMB/Scripts/contact.pm	2014-02-06 08:43:58 UTC (rev 6782)
+++ trunk/LedgerSMB/Scripts/contact.pm	2014-02-06 10:03:15 UTC (rev 6783)
@@ -235,15 +235,9 @@
         push @all_currencies, { text => $curr};
     }
 
-    my ($default_country) = LedgerSMB->call_procedure(
-              procname => 'setting_get',
-                  args => ['default_country']);
-    $default_country = $default_country->{value};
+    my $default_country = LedgerSMB::Setting->get('default_country');
 
-    my ($default_language) = LedgerSMB->call_procedure(
-              procname => 'setting_get',
-                  args => ['default_language']);
-    $default_language = $default_language->{value};
+    my ($default_language) = LedgerSMB::Setting->get('default_language');
 
     my $attach_level_options = [
         {text => $locale->text('Entity'), value => 1} ];
@@ -311,6 +305,8 @@
                 all_taxes => \@all_taxes,
                 all_years => \@all_years,
                all_months =>  LedgerSMB::App_State::all_months()->{dropdown},
+          default_country => $default_country,
+         default_language => $default_language
     });
 }
 

Modified: trunk/UI/Contact/divs/credit.html
===================================================================
--- trunk/UI/Contact/divs/credit.html	2014-02-06 08:43:58 UTC (rev 6782)
+++ trunk/UI/Contact/divs/credit.html	2014-02-06 10:03:15 UTC (rev 6783)
@@ -243,7 +243,11 @@
 			} ?> 
               <?lsmb END ?>
 	  </td>
-        <td> <?lsmb INCLUDE select element_data = {
+        <td> <?lsmb 
+           IF NOT credit_act.language_code;
+                credit_act.language_code = default_language;
+           END;
+           INCLUDE select element_data = {
 		label = text("Language")
 		name = "language_code"
                 default_values = [credit_act.language_code],

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


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits