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

SF.net SVN: ledger-smb:[6193] addons/1.3/wxPOS/scripts



Revision: 6193
          http://sourceforge.net/p/ledger-smb/code/6193
Author:   einhverfr
Date:     2013-10-28 10:25:52 +0000 (Mon, 28 Oct 2013)
Log Message:
-----------
Added configuration setting for number format.  Still need to retrofit on number formatting settings

Modified Paths:
--------------
    addons/1.3/wxPOS/scripts/AR.pm
    addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm

Modified: addons/1.3/wxPOS/scripts/AR.pm
===================================================================
--- addons/1.3/wxPOS/scripts/AR.pm	2013-10-28 10:09:10 UTC (rev 6192)
+++ addons/1.3/wxPOS/scripts/AR.pm	2013-10-28 10:25:52 UTC (rev 6193)
@@ -30,19 +30,13 @@
  my $cust_but = Wx::Button->new($self->{tab}, -1, 'Search', [210, 10], [90, 24]);
  EVT_BUTTON($self->{tab}, $cust_but, sub{$self->_listCustomByName});
  $self->{customer_list} = Wx::ComboBox->new($self->{tab}, -1, '', [10, 40], [290, 24], [''], wxCB_READONLY);
- $self->{inv_type} = Wx::RadioBox->new($self->{tab}, -1, 'Invoice type: ', [320, 10], [120, 58], ['A', 'B', 'C']);
-### Header
- Wx::StaticText->new($self->{tab}, -1, 'Inv Num: ', [450, 10], [180, 24]);
- Wx::StaticText->new($self->{tab}, -1, 'Ord Num: ', [450, 40], [180, 24]);
- Wx::StaticText->new($self->{tab}, -1, 'Record In: ', [630, 10], [180, 24]);
- Wx::StaticText->new($self->{tab}, -1, 'Currency: ', [630, 40], [180, 24]);
  Wx::StaticLine->new($self->{tab}, -1, [0, 70], [800, 2], wxLI_HORIZONTAL);
 ### Parts
  my $warehouse = $self->{sesion}->{defaults}->{wh} || '';
  Wx::StaticText->new($self->{tab}, -1, 'Warehouse: '.$warehouse, [10,120], [120, 24]);
  Wx::StaticText->new($self->{tab}, -1, 'Description', [140, 120], [90, 24]);
  $self->{desc} = Wx::TextCtrl->new($self->{tab}, -1, '', [240, 120], [180, 24]);
- my $parts_but = Wx::Button->new($self->{tab}, -1, 'Search', [440, 120], [60, 24]);
+my $parts_but = Wx::Button->new($self->{tab}, -1, 'Search', [440, 120], [60, 24]);
  EVT_BUTTON($self->{tab}, $parts_but, sub{$self->_listPartsByName});
  Wx::StaticLine->new($self->{tab}, -1, [0, 150], [800, 2], wxLI_HORIZONTAL);
 ##

Modified: addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm
===================================================================
--- addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm	2013-10-28 10:09:10 UTC (rev 6192)
+++ addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm	2013-10-28 10:25:52 UTC (rev 6193)
@@ -15,6 +15,7 @@
                           # written here for initial testing.
 
 our $default_language = 'en';
+our $numberformat = '1.000';
 
 our $dbconfig = {
      host => 'localhost',
@@ -37,7 +38,7 @@
 };
 
 our $curr = {
-   series => qw(100000 50000 20000 10000 5000 1000 500 200 100 50),
+   series => [100000, 50000, 20000, 10000, 5000, 1000, 500, 200, 100, 50],
      curr => 'IDR',
 };
 
@@ -46,6 +47,8 @@
 
 $default_language = $cfg->val('main','default_language') 
       if $cfg->val('main','default_language');
+$number_format = $cfg->val('main','number_format') 
+      if $cfg->val('main','number_format');
 
 for my $var (qw(database user host port password)){
     $dbconfig->{$var} = $cfg->val('database', $var)
@@ -67,8 +70,12 @@
          if $cfg->val('cashdrawer', $var);
 }
 
-for my $var (qw(curr series)){
+for my $var (qw(curr)){
     $curr->{$var} = $cfg->val('currency', $var)
          if $cfg->val('currency', $var);
 }
+
+if ($cfg->val('currency', 'series')){
+   $curr->{series} = split /\s*,\s*/, $cfg->val('currency', 'series');
+}
 1;

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


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits