r45582 - in /trunk/eekboek: ./ debian/ lib/ lib/EB/ lib/EB/CPAN/ lib/EB/Config/ lib/EB/Report/ lib/EB/Shell/ lib/EB/Tools/ lib/EB/Wx/ lib/EB/examples/ lib/EB/migrate/ lib/EB/schema/ script/

nhandler-guest at users.alioth.debian.org nhandler-guest at users.alioth.debian.org
Sun Oct 11 04:24:36 UTC 2009


Author: nhandler-guest
Date: Sun Oct 11 04:24:24 2009
New Revision: 45582

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45582
Log:
Update to 1.05.00-1

Added:
    trunk/eekboek/lib/EB/CPAN/
      - copied from r45581, branches/upstream/eekboek/current/lib/EB/CPAN/
    trunk/eekboek/lib/EB/Tools/MiniAdm.pm
      - copied unchanged from r45581, branches/upstream/eekboek/current/lib/EB/Tools/MiniAdm.pm
    trunk/eekboek/lib/EB/Wx/
      - copied from r45581, branches/upstream/eekboek/current/lib/EB/Wx/
    trunk/eekboek/lib/EB/migrate/001000013001000014.sql
      - copied unchanged from r45581, branches/upstream/eekboek/current/lib/EB/migrate/001000013001000014.sql
    trunk/eekboek/lib/EB/tips.txt
      - copied unchanged from r45581, branches/upstream/eekboek/current/lib/EB/tips.txt
    trunk/eekboek/script/ebgui
      - copied unchanged from r45581, branches/upstream/eekboek/current/script/ebgui
Modified:
    trunk/eekboek/CHANGES
    trunk/eekboek/EekBoek.spec
    trunk/eekboek/MANIFEST
    trunk/eekboek/META.yml
    trunk/eekboek/debian/changelog
    trunk/eekboek/lib/EB.pm
    trunk/eekboek/lib/EB/Config/IniFiles.pm
    trunk/eekboek/lib/EB/DB.pm
    trunk/eekboek/lib/EB/Globals.pm
    trunk/eekboek/lib/EB/Main.pm
    trunk/eekboek/lib/EB/Report.pm
    trunk/eekboek/lib/EB/Report/Balres.pm
    trunk/eekboek/lib/EB/Shell/DeLuxe.pm
    trunk/eekboek/lib/EB/Tools/Schema.pm
    trunk/eekboek/lib/EB/examples/schema.dat
    trunk/eekboek/lib/EB/schema/eekboek.sql
    trunk/eekboek/lib/EekBoek.pm
    trunk/eekboek/script/ebshell

Modified: trunk/eekboek/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/CHANGES?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/CHANGES (original)
+++ trunk/eekboek/CHANGES Sun Oct 11 04:24:24 2009
@@ -1,8 +1,18 @@
 # CHANGES		-*- coding: utf-8 -*-
 
-1.04.04
+1.05.00
+	* !!! SNAPSHOT !!! SNAPPSHOT !!! SNAPSHOT !!!
+
+1.04.05
+
+	* Fix problem dat 'privé' niet wordt gematched als
+	  content-type = utf8 en $cfg->unicode.
+
+1.04.04	2009-06-10 12:13
 
 	* Bugfix voor --createsampleconfig .
+
+	* Bugfix voor --createsampledb .
 
 1.04.03	2009-04-03 12:18
 

Modified: trunk/eekboek/EekBoek.spec
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/EekBoek.spec?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/EekBoek.spec (original)
+++ trunk/eekboek/EekBoek.spec Sun Oct 11 04:24:24 2009
@@ -5,9 +5,9 @@
 # Package name, lowcase (eekboek)
 %define lcname eekboek
 # Package version
-%define pkgversion 1.04.04
+%define pkgversion 1.05.00
 # Suffix (-unstable, or empty)
-%define pkgsuffix %nil
+%define pkgsuffix -unstable
 
 ################ Build Options ################
 %define gui 0

Modified: trunk/eekboek/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/MANIFEST?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/MANIFEST (original)
+++ trunk/eekboek/MANIFEST Sun Oct 11 04:24:24 2009
@@ -109,6 +109,11 @@
 lib/EB/Booking/Decode.pm
 lib/EB/Booking/Delete.pm
 lib/EB/Booking/IV.pm
+lib/EB/CPAN/File/HomeDir.pm
+lib/EB/CPAN/File/HomeDir/Darwin.pm
+lib/EB/CPAN/File/HomeDir/MacOS9.pm
+lib/EB/CPAN/File/HomeDir/Unix.pm
+lib/EB/CPAN/File/HomeDir/Windows.pm
 lib/EB/Config.pm
 lib/EB/Config/IniFiles.pm
 lib/EB/DB.pm
@@ -148,10 +153,65 @@
 lib/EB/Shell/Base.pm
 lib/EB/Shell/DeLuxe.pm
 lib/EB/Tools/Einde.pm
+lib/EB/Tools/MiniAdm.pm
 lib/EB/Tools/Opening.pm
 lib/EB/Tools/SQLEngine.pm
 lib/EB/Tools/Schema.pm
 lib/EB/Utils.pm
+lib/EB/Wx/Booking/BKMPanel.pm
+lib/EB/Wx/Booking/IVPanel.pm
+lib/EB/Wx/Booking/IVPanel/BskPanel.pm
+lib/EB/Wx/Export/EekBoek.pm
+lib/EB/Wx/Export/XAF.pm
+lib/EB/Wx/IniWiz.pm
+lib/EB/Wx/Locale.pm
+lib/EB/Wx/Main.pm
+lib/EB/Wx/MainFrame.pm
+lib/EB/Wx/Maint/Accounts.pm
+lib/EB/Wx/Maint/Accounts/TreeCtrl.pm
+lib/EB/Wx/Maint/BTWTarieven.pm
+lib/EB/Wx/Maint/Dagboeken.pm
+lib/EB/Wx/Maint/Relaties.pm
+lib/EB/Wx/Maint/StdAccounts.pm
+lib/EB/Wx/Report/BTWAangifte.pm
+lib/EB/Wx/Report/BTWAangifte/Preferences.pm
+lib/EB/Wx/Report/BalResProof.pm
+lib/EB/Wx/Report/DebCrd.pm
+lib/EB/Wx/Report/DebCrd/Preferences.pm
+lib/EB/Wx/Report/GenBase.pm
+lib/EB/Wx/Report/GenBase/Preferences.pm
+lib/EB/Wx/Report/Grootboek.pm
+lib/EB/Wx/Report/Grootboek/Preferences.pm
+lib/EB/Wx/Report/Journaal.pm
+lib/EB/Wx/Report/Journaal/Preferences.pm
+lib/EB/Wx/Report/Openstaand.pm
+lib/EB/Wx/State.pm
+lib/EB/Wx/Tools/AboutDialog.pm
+lib/EB/Wx/Tools/PreferencesDialog.pm
+lib/EB/Wx/Tools/PropertiesDialog.pm
+lib/EB/Wx/UI/AccInput.pm
+lib/EB/Wx/UI/AmountCtrl.pm
+lib/EB/Wx/UI/BalAccInput.pm
+lib/EB/Wx/UI/BTWInput.pm
+lib/EB/Wx/UI/HvdInput.pm
+lib/EB/Wx/UI/ListInput.pm
+lib/EB/Wx/UI/ListInput/ListDialog.pm
+lib/EB/Wx/UI/NumericCtrl.pm
+lib/EB/Wx/UI/PeriodPanel.pm
+lib/EB/Wx/UI/StdAccPanel.pm
+lib/EB/Wx/UI/VdiInput.pm
+lib/EB/Wx/Window.pm
+lib/EB/Wx/icons/calendar.png
+lib/EB/Wx/icons/credit.png
+lib/EB/Wx/icons/debet.png
+lib/EB/Wx/icons/eb.jpg
+lib/EB/Wx/icons/ebwiz.jpg
+lib/EB/Wx/icons/ebsplash.jpg
+lib/EB/Wx/icons/edit_add.png
+lib/EB/Wx/icons/edit_remove.png
+lib/EB/Wx/icons/edittrash.png
+lib/EB/Wx/icons/perl_powered.png
+lib/EB/tips.txt
 lib/EB/css/balans.css
 lib/EB/css/balres.css
 lib/EB/css/btwaangifte.css
@@ -181,11 +241,13 @@
 lib/EB/migrate/001000010001000011.sql
 lib/EB/migrate/001000011001000012.sql
 lib/EB/migrate/001000012001000013.sql
+lib/EB/migrate/001000013001000014.sql
 lib/EB/schema/eekboek.sql
 lib/EB/schema/sampledb.ebz
 lib/EB/schema/sample.conf
 lib/EekBoek.pm
 script/ebshell
+script/ebgui
 t/10_basic.t
 t/20_dates.t
 t/80_postgresql.t

Modified: trunk/eekboek/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/META.yml?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/META.yml (original)
+++ trunk/eekboek/META.yml Sun Oct 11 04:24:24 2009
@@ -1,6 +1,6 @@
 ---
 name: EekBoek
-version: 1.04.04
+version: 1.05.00
 author:
   - Johan Vromans (jvromans at squirrel.nl)
 abstract: Elementary Bookkeeping (for the Dutch/European market)
@@ -26,7 +26,7 @@
 provides:
   EekBoek:
     file: lib/EekBoek.pm
-    version: 1.04.04
+    version: 1.05.00
 generated_by: Module::Build version 0.28
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: trunk/eekboek/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/debian/changelog?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/debian/changelog (original)
+++ trunk/eekboek/debian/changelog Sun Oct 11 04:24:24 2009
@@ -1,3 +1,9 @@
+eekboek (1.05.00-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Nathan Handler <nhandler at nathan-laptop>  Sat, 10 Oct 2009 23:11:30 -0500
+
 eekboek (1.04.04-2) UNRELEASED; urgency=low
 
   * debian/control: Bump Standards-Version to 3.8.2 (No changes)

Modified: trunk/eekboek/lib/EB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB.pm (original)
+++ trunk/eekboek/lib/EB.pm Sun Oct 11 04:24:24 2009
@@ -1,12 +1,12 @@
 #! perl
 
 # EB.pm -- EekBoek Base module.
-# RCS Info        : $Id: EB.pm,v 1.87 2009/04/03 09:41:55 jv Exp $
+# RCS Info        : $Id: EB.pm,v 1.88 2009/10/09 15:31:25 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Fri Sep 16 18:38:45 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Mon Oct  6 14:50:32 2008
-# Update Count    : 221
+# Last Modified On: Fri Oct  9 17:18:19 2009
+# Update Count    : 222
 # Status          : Unknown, Use with caution!
 
 package main;
@@ -16,7 +16,7 @@
 
 package EB;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.87 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.88 $ =~ /(\d+)/g;
 
 use strict;
 use base qw(Exporter);
@@ -81,9 +81,7 @@
 our $imsg;
 our $url = "http://www.eekboek.nl";
 
-# Most elegant (and correct) would be to use an INIT block here, but
-# currently PAR is not able to handle INIT blocks.
-INIT {
+BEGIN {
     return if $ident;		# already done
     my $incompatibleOS = 0;
 

Modified: trunk/eekboek/lib/EB/Config/IniFiles.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Config/IniFiles.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Config/IniFiles.pm (original)
+++ trunk/eekboek/lib/EB/Config/IniFiles.pm Sun Oct 11 04:24:24 2009
@@ -1,5 +1,5 @@
 package EB::Config::IniFiles;
-$EB::Config::IniFiles::VERSION = (qw($Revision: 2.38 $))[1];
+$EB::Config::IniFiles::VERSION = (qw($Revision: 1.1 $))[1];
 require 5.004;
 use strict;
 use Carp;
@@ -7,7 +7,7 @@
 
 @EB::Config::IniFiles::errors = ( );
 
-#	$Header: /cvsroot/config-inifiles/config-inifiles/IniFiles.pm,v 2.38 2003/05/14 01:30:32 wadg Exp $
+#	$Header: /home/jv/src/Repository/eekboek-src/lib/EB/Config/IniFiles.pm,v 1.1 2009/10/09 15:33:32 jv Exp $
 
 =head1 NAME
 
@@ -2154,6 +2154,9 @@
 =head1 Change log
 
      $Log: IniFiles.pm,v $
+     Revision 1.1  2009/10/09 15:33:32  jv
+     Own version to prevent CPAN conflicts.
+
      Revision 2.38  2003/05/14 01:30:32  wadg
      - fixed RewriteConfig and ReadConfig to work with open file handles
      - added a test to ensure that blank files throw no warnings

Modified: trunk/eekboek/lib/EB/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/DB.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/DB.pm (original)
+++ trunk/eekboek/lib/EB/DB.pm Sun Oct 11 04:24:24 2009
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: DB.pm,v 1.59 2008/04/14 14:39:20 jv Exp $
+# RCS Id          : $Id: DB.pm,v 1.60 2009/10/06 08:12:23 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Sat May  7 09:18:15 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Sun Apr 13 18:06:04 2008
-# Update Count    : 431
+# Last Modified On: Tue Oct  6 10:11:39 2009
+# Update Count    : 432
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.59 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.60 $ =~ /(\d+)/g;
 
 use EB;
 use DBI;
@@ -571,6 +571,13 @@
 sub _loaddbbackend {
     my ($self) = @_;
     my $dbtype = $cfg->val(qw(database driver), "postgres");
+
+    # Trim whitespace for stupid users.
+    for ( $dbtype ) {
+	s/^\s+//;
+	s/\s+$//;
+    }
+
     my $pkg = __PACKAGE__ . "::" . ucfirst(lc($dbtype));
     my $pkgfile = __PACKAGE__ . "::" . ucfirst(lc($dbtype)) . ".pm";
     $pkgfile =~ s/::/\//g;

Modified: trunk/eekboek/lib/EB/Globals.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Globals.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Globals.pm (original)
+++ trunk/eekboek/lib/EB/Globals.pm Sun Oct 11 04:24:24 2009
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.30 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.31 $ =~ /(\d+)/g;
 
 use base qw(Exporter);
 
@@ -24,7 +24,7 @@
 BEGIN {
     _newconst("SCM_MAJVERSION", 1);
     _newconst("SCM_MINVERSION", 0);
-    _newconst("SCM_REVISION",  13);
+    _newconst("SCM_REVISION",  14);
 
     _newconst("AMTPRECISION",   2);
     _newconst("AMTWIDTH",       9);

Modified: trunk/eekboek/lib/EB/Main.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Main.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Main.pm (original)
+++ trunk/eekboek/lib/EB/Main.pm Sun Oct 11 04:24:24 2009
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: Main.pm,v 1.4 2009/05/13 20:38:13 jv Exp $
+# RCS Id          : $Id: Main.pm,v 1.5 2009/10/09 15:32:20 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Thu Jul  7 15:53:48 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Wed May 13 21:57:01 2009
-# Update Count    : 907
+# Last Modified On: Tue Oct  6 16:35:11 2009
+# Update Count    : 908
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.4 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.5 $ =~ /(\d+)/g;
 
 use EekBoek;
 
@@ -299,20 +299,27 @@
     --command  -c       voer de rest van de opdrachtregel uit als command
     --echo  -e          toon ingelezen opdrachten
     --boekjaar=XXX	specificeer boekjaar
-    --createdb		maak nieuwe database aan
-    --createsampledb	maak nieuwe demo database aan
-    --schema=XXX        initialisser database met schema
     --import            importeer een nieuwe administratie
     --export            exporteer een administratie
     --dir=XXX           directory voor im/export
     --file=XXX          bestand voor im/export
-    --init		creëer nieuwe administratie
+    --init		(re)creëer administratie
+    --help		deze hulpboodschap
+    --ident		toon identificatie
+    --verbose		geef meer uitgebreide information
+
+Voor beginners:
+
+    --createsampleconfig   maak nieuwe demo config aan
+    --createsampledb	   maak nieuwe demo database aan
+
+Voor experts:
+
+    --createdb		maak nieuwe database aan
+    --schema=XXX        initialiseer database met schema
     --define=XXX -D     definieer configuratiesetting
     --[no]interactive   forceer [non]interactieve modus
     --errexit           stop direct na een fout in de invoer
-    --help		deze hulpboodschap
-    --ident		toon identificatie
-    --verbose		geef meer uitgebreide information
 EndOfUsage
     exit $exit if defined $exit && $exit != 0;
 }

Modified: trunk/eekboek/lib/EB/Report.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Report.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Report.pm (original)
+++ trunk/eekboek/lib/EB/Report.pm Sun Oct 11 04:24:24 2009
@@ -5,12 +5,12 @@
 our $dbh;
 
 # Report.pm -- Report tools
-# RCS Info        : $Id: Report.pm,v 1.7 2008/02/07 12:13:27 jv Exp $
+# RCS Info        : $Id: Report.pm,v 1.8 2009/10/09 15:33:08 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Mon Nov 14 21:46:04 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Thu Feb  7 13:13:25 2008
-# Update Count    : 42
+# Last Modified On: Wed Oct  7 11:32:02 2009
+# Update Count    : 43
 # Status          : Unknown, Use with caution!
 
 package EB::Report;
@@ -18,7 +18,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.7 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.8 $ =~ /(\d+)/g;
 
 use EB;
 use EB::Format qw(numfmt);
@@ -35,9 +35,9 @@
     # balans(r, t0)
     $dbh->sql_exec("DELETE FROM TAccounts");
     $dbh->sql_exec("INSERT INTO TAccounts".
-		   " (acc_id,acc_desc,acc_balres,acc_debcrd,".
+		   " (acc_id,acc_desc,acc_balres,acc_debcrd,acc_dcfixed,".
 		   "acc_ibalance,acc_balance,acc_struct)".
-		   " SELECT acc_id,acc_desc,acc_balres,acc_debcrd,".
+		   " SELECT acc_id,acc_desc,acc_balres,acc_debcrd,acc_dcfixed,".
 		   "acc_ibalance,acc_ibalance AS acc_balance,acc_struct".
 		   " FROM Accounts")->finish;
 

Modified: trunk/eekboek/lib/EB/Report/Balres.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Report/Balres.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Report/Balres.pm (original)
+++ trunk/eekboek/lib/EB/Report/Balres.pm Sun Oct 11 04:24:24 2009
@@ -7,12 +7,12 @@
 
 package EB::Report::Balres;
 
-# RCS Id          : $Id: Balres.pm,v 1.26 2008/02/07 13:15:31 jv Exp $
+# RCS Id          : $Id: Balres.pm,v 1.27 2009/10/09 15:33:58 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Sat Jun 11 13:44:43 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Thu Feb  7 14:15:28 2008
-# Update Count    : 369
+# Last Modified On: Wed Oct  7 11:36:20 2009
+# Update Count    : 400
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.26 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.27 $ =~ /(\d+)/g;
 
 ################ The Process ################
 
@@ -148,7 +148,7 @@
 	    my $cstot = 0;
 	    foreach my $vd ( @{$hvd->[2]} ) {
 		my $did_vd = 0;
-		$sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_balance".
+		$sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_balance, acc_debcrd, acc_dcfixed".
 				      " FROM ${table}".
 				      " WHERE".($balans ? "" : " NOT")." acc_balres".
 				      "  AND acc_struct = ?".
@@ -168,8 +168,9 @@
 				desc => $vd->[1]
 			      })
 		      unless $detail < 2 || $did_vd++;
-		    my ($acc_id, $acc_desc, $acc_balance) = @$rr;
-		    if ( $acc_balance >= 0 ) {
+		    my ($acc_id, $acc_desc, $acc_balance, $acc_debcrd, $acc_dcfixed) = @$rr;
+		    $acc_balance = -$acc_balance if $acc_dcfixed && !$acc_debcrd;
+		    if ( $acc_dcfixed ? $acc_debcrd : ($acc_balance >= 0) ) {
 			$dsstot += $acc_balance;
 			$rep->add({ _style => 'd2',
 				    acct   => $acc_id,
@@ -179,11 +180,12 @@
 			  if $detail >= 2;
 		    }
 		    else {
-			$csstot -= $acc_balance;
+			$acc_balance = -$acc_balance unless $acc_dcfixed;
+			$csstot += $acc_balance;
 			$rep->add({ _style => 'd2',
 				    acct   => $acc_id,
 				    desc   => $acc_desc,
-				    crd    => numfmt(-$acc_balance),
+				    crd    => numfmt($acc_balance),
 				  })
 			  if $detail >= 2;
 		    }
@@ -215,16 +217,17 @@
 
     }
     else {			# Op Grootboek
-	$sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_debcrd, acc_balance, acc_ibalance".
+	$sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_debcrd, acc_dcfixed, acc_balance, acc_ibalance".
 			      " FROM ${table}".
 			      " WHERE".($balans ? "" : " NOT")." acc_balres".
 			      "  AND acc_balance <> 0".
 			      " ORDER BY acc_id");
 
 	while ( $rr = $sth->fetchrow_arrayref ) {
-	    my ($acc_id, $acc_desc, $acc_debcrd, $acc_balance, $acc_ibalance) = @$rr;
+	    my ($acc_id, $acc_desc, $acc_debcrd, $acc_dcfixed, $acc_balance, $acc_ibalance) = @$rr;
 	    $acc_balance -= $acc_ibalance unless $opts->{balans};
-	    if ( $acc_balance >= 0 ) {
+	    $acc_balance = -$acc_balance if $acc_dcfixed && !$acc_debcrd;
+	    if ( $acc_dcfixed ? $acc_debcrd : ($acc_balance >= 0) ) {
 		$dtot += $acc_balance;
 		$rep->add({ _style => 'd',
 			    acct   => $acc_id,
@@ -233,11 +236,12 @@
 			  });
 	    }
 	    else {
-		$ctot -= $acc_balance;
+		$acc_balance = -$acc_balance unless $acc_dcfixed;
+		$ctot += $acc_balance;
 		$rep->add({ _style => 'd',
 			    acct   => $acc_id,
 			    desc   => $acc_desc,
-			    crd    => numfmt(-$acc_balance),
+			    crd    => numfmt($acc_balance),
 			  });
 	    }
 	}

Modified: trunk/eekboek/lib/EB/Shell/DeLuxe.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Shell/DeLuxe.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Shell/DeLuxe.pm (original)
+++ trunk/eekboek/lib/EB/Shell/DeLuxe.pm Sun Oct 11 04:24:24 2009
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: DeLuxe.pm,v 1.19 2008/03/02 15:22:25 jv Exp $
+# RCS Id          : $Id: DeLuxe.pm,v 1.21 2009/10/09 15:34:54 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Thu Jul  7 15:53:48 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Sun Mar  2 16:17:56 2008
-# Update Count    : 258
+# Last Modified On: Sun Sep 20 21:35:01 2009
+# Update Count    : 260
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -18,7 +18,7 @@
 
 use strict;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.19 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.21 $ =~ /(\d+)/g;
 
 use base qw(EB::Shell::Base);
 use EB;
@@ -106,6 +106,21 @@
 		next;
 	    }
 	}
+
+=begin thismustbefixed
+
+	my $s = $line;
+	eval {
+	    $line = decode($self->{unicode} ? 'utf8' : 'latin1', $s, 1);
+	};
+	if ( $@ ) {
+	    warn("?".__x("Geen geldige {cs} tekens in regel {line} van de invoer",
+			 cs => $self->{unicode} ? "UTF-8" : "Latin1",
+			 line => $.)."\n".$line."\n");
+	    next;
+	}
+
+=cut
 	if ( $self->{echo} ) {
 	    my $pr = $self->{echo};
 	    $pr =~ s/\>/>>/ if $pre;
@@ -238,8 +253,6 @@
 
 EB::Shell::DeLuxe extends the options of EB::Shell::Base with:
 
-=over 4
-
 =item interactive
 
 Controls whether this instance is interactive, i.e, uses ReadLine to

Modified: trunk/eekboek/lib/EB/Tools/Schema.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Tools/Schema.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Tools/Schema.pm (original)
+++ trunk/eekboek/lib/EB/Tools/Schema.pm Sun Oct 11 04:24:24 2009
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: Schema.pm,v 1.57 2008/03/10 17:41:58 jv Exp $
+# RCS Id          : $Id: Schema.pm,v 1.59 2009/10/09 15:36:55 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Sun Aug 14 18:10:49 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Sun Mar  9 15:24:14 2008
-# Update Count    : 651
+# Last Modified On: Thu Oct  8 23:46:42 2009
+# Update Count    : 682
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -20,12 +20,12 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.57 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.59 $ =~ /(\d+)/g;
 
 our $sql = 0;			# load schema into SQL files
 my $trace = $cfg->val(__PACKAGE__, "trace", 0);
 
-my $RCS_Id = '$Id: Schema.pm,v 1.57 2008/03/10 17:41:58 jv Exp $ ';
+my $RCS_Id = '$Id: Schema.pm,v 1.59 2009/10/09 15:36:55 jv Exp $ ';
 
 # Package name.
 my $my_package = 'EekBoek';
@@ -270,11 +270,13 @@
 	error(__x("Rekening {id} heeft geen verdichting", id => $id)."\n") unless defined($cvdi);
 	my $debcrd;
 	my $kstomz;
-	if ( ($balres ? $flags =~ /^[dc]$/i : $flags =~ /^[kon]$/i)
+	my $dcfixed;
+	if ( ($balres ? $flags =~ /^[dc]\!?$/i : $flags =~ /^[kon]$/i)
 	     ||
 	     $flags =~ /^[dc][ko]$/i ) {
 	    $debcrd = $flags =~ /d/i;
 	    $kstomz = $flags =~ /k/i if $flags =~ /[ko]/i;
+	    $dcfixed = $flags =~ /\!/;
 	}
 	else {
 	    error(__x("Rekening {id}: onherkenbare vlaggetjes {flags}",
@@ -343,7 +345,7 @@
 	}
 	$desc =~ s/\s+$//;
 	$kstomz = $btw_ko unless defined($kstomz);
-	$acc{$id} = [ $desc, $cvdi, $balres, $debcrd, $kstomz, $btw_type ];
+	$acc{$id} = [ $desc, $cvdi, $balres, $debcrd, $kstomz, $btw_type, $dcfixed ];
     }
     else {
 	0;
@@ -407,6 +409,23 @@
 	    }
 	}
 
+=begin thisshouldwork
+
+	my $s = $_;
+	eval {
+	    $_ = decode($unicode ? 'utf8' : 'latin1', $s, 1);
+	};
+	if ( $@ ) {
+	    warn("?".__x("Geen geldige {cs} tekens in regel {line} van de invoer",
+			 cs => $unicode ? "UTF-8" : "Latin1",
+			 line => $.)."\n".$_."\n");
+	    warn($@);
+	    $fail++;
+	    next;
+	}
+
+=cut
+
 	next if /^\s*#/;
 	next unless /\S/;
 
@@ -590,7 +609,7 @@
     my $out = <<ESQL;
 -- Grootboekrekeningen
 COPY Accounts
-     (acc_id, acc_desc, acc_struct, acc_balres, acc_debcrd,
+     (acc_id, acc_desc, acc_struct, acc_balres, acc_debcrd, acc_dcfixed,
       acc_kstomz, acc_btw, acc_ibalance, acc_balance)
      FROM stdin;
 ESQL
@@ -598,10 +617,12 @@
     for my $i ( sort { $a <=> $b } keys(%acc) ) {
 	my $g = $acc{$i};
 	croak(__x("Geen BTW tariefgroep voor code {code}",
-		  code => $g->[5])) unless exists $btwmap{$g->[5]};
+		  code => $g->[5]))
+	  unless exists $btwmap{$g->[5]} || exists $btwmap{$g->[5]."-"};
 	$out .= _tsv($i, $g->[0], $g->[1],
 		     _tf($g->[2]),
 		     _tf($g->[3]),
+		     _tfn($g->[2] ? $g->[6] : undef),
 		     _tfn($g->[4]),
 		     defined($btwmap{$g->[5]}) ? $btwmap{$g->[5]} : "\\N",
 		     0, 0);
@@ -750,6 +771,8 @@
 #   :btw=nul
 #   :btw=hoog
 #   :btw=laag
+#   :btw=privé
+#   :btw=anders
 #
 # Ook is het mogelijk aan te geven dat een rekening een koppeling
 # (speciale betekenis) heeft met :koppeling=xxx. De volgende koppelingen
@@ -761,6 +784,10 @@
 #   btw_il	idem, laag tarief
 #   btw_vh	idem, verkopen, hoog tarief
 #   btw_vl	idem, laag tarief
+#   btw_ph	idem, privé, hoog tarief
+#   btw_pl	idem, laag tarief
+#   btw_ah	idem, anders, hoog tarief
+#   btw_al	idem, laag tarief
 #   btw_ok	rekening voor de betaalde BTW
 #   winst	rekening waarop de winst wordt geboekt
 #
@@ -825,16 +852,18 @@
 
 # BTW TARIEVEN
 #
-# Er zijn drie tariefgroepen: "hoog", "laag" en "nul". De tariefgroep
-# bepaalt het rekeningnummer waarop de betreffende boeking plaatsvindt.
+# Er zijn vijf tariefgroepen: "hoog", "laag", "nul", "privé" en
+# "anders". De tariefgroep bepaalt het rekeningnummer waarop de
+# betreffende boeking plaatsvindt.
 # Binnen elke tariefgroep zijn meerdere tarieven mogelijk, hoewel dit
 # in de praktijk niet snel zal voorkomen.
 # In de eerste kolom wordt de (numerieke) code voor dit tarief
 # opgegeven. Deze kan o.m. worden gebruikt om expliciet een BTW tarief
-# op te geven bij het boeken. Voor elk tarief (behalve die van groep
-# "nul") moet het percentage worden opgegeven. Met de aanduiding
-# :exclusief kan worden opgegeven dat boekingen op rekeningen met deze
-# tariefgroep standaard het bedrag exclusief BTW aangeven.
+# op te geven bij het boeken. Voor elk gebruikt tarief (behalve die
+# van groep "nul") moet het percentage worden opgegeven. Met de
+# aanduiding :exclusief kan worden opgegeven dat boekingen op
+# rekeningen met deze tariefgroep standaard het bedrag exclusief BTW
+# aangeven.
 #
 # BELANGRIJK: Mutaties die middels de command line shell of de API
 # worden uitgevoerd maken gebruik van het geassocieerde BTW tarief van
@@ -876,7 +905,8 @@
 	    print {$fh} ("# ".__x("VERDICHTING MOET TUSSEN {min} EN {max} (INCL.) LIGGEN",
 			   min => $max_hvd+1, max => $max_vrd)."\n")
 	      if $id <= $max_hvd || $id > $max_vrd;
-	    my $sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_balres, acc_debcrd, acc_kstomz,".
+	    my $sth = $dbh->sql_exec("SELECT acc_id, acc_desc, acc_balres,".
+				     " acc_debcrd, acc_dcfixed, acc_kstomz,".
 				     " acc_btw, btw_tariefgroep, btw_incl".
 				     " FROM Accounts, BTWTabel ".
 				     " WHERE acc_struct = ?".
@@ -884,10 +914,11 @@
 				     " OR btw_id = 0 AND acc_btw IS NULL)".
 				     " ORDER BY acc_id", $id);
 	    while ( my $rr = $sth->fetchrow_arrayref ) {
-		my ($id, $desc, $acc_balres, $acc_debcrd, $acc_kstomz, $btw_id, $btw, $btwincl) = @$rr;
+		my ($id, $desc, $acc_balres, $acc_debcrd, $acc_dcfixed, $acc_kstomz, $btw_id, $btw, $btwincl) = @$rr;
 		my $flags = "";
 		if ( $balres ) {
 		    $flags .= $acc_debcrd ? "D" : "C";
+		    $flags .= '!' if $acc_dcfixed;
 		}
 		else {
 		    $flags .= defined($acc_kstomz)

Modified: trunk/eekboek/lib/EB/examples/schema.dat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/examples/schema.dat?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/examples/schema.dat (original)
+++ trunk/eekboek/lib/EB/examples/schema.dat Sun Oct 11 04:24:24 2009
@@ -1,4 +1,4 @@
-# $Id: schema.dat,v 1.13 2008/02/20 23:24:53 jv Exp $ -*- coding: utf-8 -*-
+# $Id: schema.dat,v 1.14 2009/10/08 21:42:26 jv Exp $ -*- coding: utf-8 -*-
 # EekBoek Rekeningschema voor eekboek_sample
 # Content-Type: text/plain; charset = UTF-8
 
@@ -31,6 +31,8 @@
 #   :btw=nul
 #   :btw=hoog
 #   :btw=laag
+#   :btw=privé
+#   :btw=anders
 #
 # Ook is het mogelijk aan te geven dat een rekening een koppeling
 # (speciale betekenis) heeft met :koppeling=xxx. De volgende koppelingen
@@ -42,6 +44,10 @@
 #   btw_il	idem, laag tarief
 #   btw_vh	idem, verkopen, hoog tarief
 #   btw_vl	idem, laag tarief
+#   btw_ph	idem, privé, hoog tarief
+#   btw_pl	idem, laag tarief
+#   btw_ah	idem, anders, hoog tarief
+#   btw_al	idem, laag tarief
 #   btw_ok	rekening voor de betaalde BTW
 #   winst	rekening waarop de winst wordt geboekt
 #
@@ -148,6 +154,7 @@
          6971  K   Verzending portikosten
          6980  K   Bankkosten
          6981  K   Kasverschillen
+         6982  K   Afrondingen
          6990  K   Overige algemene kosten                    :btw=hoog
 
   8  Bedrijfsopbrengsten
@@ -202,16 +209,18 @@
 
 # BTW TARIEVEN
 #
-# Er zijn drie tariefgroepen: "hoog", "laag" en "nul". De tariefgroep
-# bepaalt het rekeningnummer waarop de betreffende boeking plaatsvindt.
+# Er zijn vijf tariefgroepen: "hoog", "laag", "nul", "privé" en
+# "anders". De tariefgroep bepaalt het rekeningnummer waarop de
+# betreffende boeking plaatsvindt.
 # Binnen elke tariefgroep zijn meerdere tarieven mogelijk, hoewel dit
 # in de praktijk niet snel zal voorkomen.
 # In de eerste kolom wordt de (numerieke) code voor dit tarief
 # opgegeven. Deze kan o.m. worden gebruikt om expliciet een BTW tarief
-# op te geven bij het boeken. Voor elk tarief (behalve die van groep
-# "nul") moet het percentage worden opgegeven. Met de aanduiding
-# :exclusief kan worden opgegeven dat boekingen op rekeningen met deze
-# tariefgroep standaard het bedrag exclusief BTW aangeven.
+# op te geven bij het boeken. Voor elk gebruikt tarief (behalve die
+# van groep "nul") moet het percentage worden opgegeven. Met de
+# aanduiding :exclusief kan worden opgegeven dat boekingen op
+# rekeningen met deze tariefgroep standaard het bedrag exclusief BTW
+# aangeven.
 #
 # BELANGRIJK: Mutaties die middels de command line shell of de API
 # worden uitgevoerd maken gebruik van het geassocieerde BTW tarief van

Modified: trunk/eekboek/lib/EB/schema/eekboek.sql
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/schema/eekboek.sql?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/schema/eekboek.sql (original)
+++ trunk/eekboek/lib/EB/schema/eekboek.sql Sun Oct 11 04:24:24 2009
@@ -27,6 +27,7 @@
     acc_struct  int references Verdichtingen,
     acc_balres  boolean,       -- t:balans f:resultaten
     acc_debcrd  boolean,       -- t:debet  f:credit
+    acc_dcfixed boolean,       -- always d/c despite sign
     acc_kstomz  boolean,       -- t:kosten f:omzet
     acc_btw     smallint,      -- references BTWTabel (constraint postponed)
     acc_ibalance int8,          -- openingsbalanswaarde
@@ -213,6 +214,6 @@
 
 -- Harde waarden, moeten overeenkomen met de code.
 INSERT INTO metadata (adm_scm_majversion, adm_scm_minversion, adm_scm_revision)
-  VALUES (1, 0, 13);
+  VALUES (1, 0, 14);
 
 UPDATE Metadata SET adm_bky = '<<<<'; -- Voorgaand boekjaar

Modified: trunk/eekboek/lib/EekBoek.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EekBoek.pm?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/lib/EekBoek.pm (original)
+++ trunk/eekboek/lib/EekBoek.pm Sun Oct 11 04:24:24 2009
@@ -9,9 +9,9 @@
 # Minimal version to prevent many Unicode bugs.
 use 5.008003;
 
-my $RCS_Id = '$Id: EekBoek.pm,v 1.72 2009/04/03 10:10:41 jv Exp $ ';
+my $RCS_Id = '$Id: EekBoek.pm,v 1.74 2009/10/09 15:31:34 jv Exp $ ';
 our $PACKAGE = 'EekBoek';
-our $VERSION = '1.04.04';
+our $VERSION = '1.05.00';
 
 =head1 NAME
 
@@ -62,4 +62,4 @@
 
 1;
 
-# $Id: EekBoek.pm,v 1.72 2009/04/03 10:10:41 jv Exp $ 
+# $Id: EekBoek.pm,v 1.74 2009/10/09 15:31:34 jv Exp $ 

Modified: trunk/eekboek/script/ebshell
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/script/ebshell?rev=45582&op=diff
==============================================================================
--- trunk/eekboek/script/ebshell (original)
+++ trunk/eekboek/script/ebshell Sun Oct 11 04:24:24 2009
@@ -2,19 +2,12 @@
 
 use strict;
 # use lib qw(EekBoekLibrary);
-
-use EB::Main;
-run();
 
 =head1 NAME
 
 EekBoek - Bookkeeping software for small and medium-size businesses
 
 =head1 SYNOPSIS
-
-  perl -MEB::Main -e run --
-
-If properly installed:
 
   ebshell
 
@@ -43,7 +36,7 @@
 
 =head1 COPYRIGHT AND DISCLAIMER
 
-This program is Copyright 2005-2008 by Squirrel Consultancy. All
+This program is Copyright 2005-2009 by Squirrel Consultancy. All
 rights reserved.
 
 This program is free software; you can redistribute it and/or modify
@@ -59,6 +52,66 @@
 
 =cut
 
+package main;
+
+use strict;
+use warnings;
+use File::Spec;
+use File::Basename;
+
+use Encode;
+binmode( STDERR, ':encoding(utf-8)' );
+
+# Common case when run from unpacked dist.
+my $script = $0;
+if ( -s File::Spec->catfile( dirname( dirname ($script) ), "lib", "EekBoek.pm" ) ) {
+    unshift( @INC, File::Spec->catfile( dirname( dirname ($script) ), "lib" ) );
+}
+
+# Check EekBoek install.
+error( "EekBoek is niet geïnstalleerd, of kon niet worden gevonden.\n".
+       "\nRaadplaag uw systeembeheerder.\n",
+       "Installatiefout" )
+  unless findfile( "EekBoek.pm" )
+  &&     findfile( "EB.pm" )
+  &&     findfile( "EB/schema/eekboek.sql" );
+
+require EekBoek;
+
+error( "De geïnstalleerde versie van $EekBoek::PACKAGE is niet toereikend.\n".
+       "Versie $EekBoek::VERSION is geïnstalleerd terwijl versie 1.05.00 of later\n".
+       "is vereist.\n".
+       "\nRaadplaag uw systeembeheerder.",
+       "Installatiefout" )
+  unless $EekBoek::VERSION ge "1.05.00";
+
+require EB::Config;
+EB::Config->import( $EekBoek::PACKAGE );
+require EB;
+EB->import;
+require EB::Main;
+EB::Main->run;
+
+################ Subroutines ################
+
+sub findfile {
+    my ( $file ) = @_;
+    foreach ( @INC ) {
+	my $f = File::Spec->catfile( $_, $file );
+	return $f if -s $f;
+    }
+    return;
+}
+
+################ Messengers ################
+
+sub error {
+    my ( $msg, $caption, $style ) = @_;
+    warn( encode_utf8($caption), "\n",
+	  encode_utf8($msg), "\n" );
+    exit(1);
+}
+
 1;
 
-# $Id: ebshell,v 1.18 2008/02/18 10:34:50 jv Exp $
+# $Id: ebshell,v 1.19 2009/10/09 15:45:52 jv Exp $




More information about the Pkg-perl-cvs-commits mailing list