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

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



Revision: 6246
          http://sourceforge.net/p/ledger-smb/code/6246
Author:   einhverfr
Date:     2013-11-07 15:03:14 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
default customer now configurable in .conf file

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-11-07 14:35:34 UTC (rev 6245)
+++ addons/1.3/wxPOS/scripts/AR.pm	2013-11-07 15:03:14 UTC (rev 6246)
@@ -24,6 +24,7 @@
  EVT_BUTTON($self->{tab}, $close_btn, sub{$self->_close_pane});
 ### Customer
  my $dft_custom = $self->{sesion}->{defaults}->{custom} || '';
+ $dft_custom ||= $WXPOS::Sysconfig::default_customer;
  Wx::StaticLine->new($self->{tab}, -1, [0, 0], [800, 2], wxLI_HORIZONTAL);
  Wx::StaticText->new($self->{tab}, -1, 'Customer', [10, 10], [90, 24]);
  $self->{custom} = Wx::TextCtrl->new($self->{tab}, -1, $dft_custom, [110, 10], [90, 24]);
@@ -72,6 +73,11 @@
  $self->{total} = Wx::StaticText->new($self->{tab}, -1, '', [600, 500], [90, 24]);
  my $invoice_post = Wx::Button->new($self->{tab}, -1, 'Post', [700, 500], [90, 24]);
  EVT_BUTTON($self->{tab}, $invoice_post, sub{$self->_InvoicePost});
+
+## Finishing
+ if ($dft_custom){
+    $self->_listCustomByName;
+ }
  return $self->{tab};
 }
 #######

Modified: addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm
===================================================================
--- addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm	2013-11-07 14:35:34 UTC (rev 6245)
+++ addons/1.3/wxPOS/scripts/WXPOS/Sysconfig.pm	2013-11-07 15:03:14 UTC (rev 6246)
@@ -45,10 +45,11 @@
 my $cfg = Config::IniFiles->new( -file => "wxpos.conf" ) 
        || die @Config::IniFiles::errors;
 
-$default_language = $cfg->val('main','default_language') 
+our $default_customer;
+for my $key (qw(default_language number_format default_customer)){
+   $$key = $cfg->val('main',$key) 
       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)

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


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits