r23482 - in /trunk/eekboek: ./ contrib/ debian/ inc/ lib/ lib/EB/ lib/EB/Export/ lib/EB/Report/ lib/EB/Report/Reporter/ lib/EB/Tools/

joostvb at users.alioth.debian.org joostvb at users.alioth.debian.org
Tue Jul 22 04:23:18 UTC 2008


Author: joostvb
Date: Tue Jul 22 04:23:14 2008
New Revision: 23482

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23482
Log:
new upstream

Added:
    trunk/eekboek/contrib/example.pl
      - copied unchanged from r23481, branches/upstream/eekboek/current/contrib/example.pl
    trunk/eekboek/lib/EB/Export/
      - copied from r23481, branches/upstream/eekboek/current/lib/EB/Export/
Modified:
    trunk/eekboek/Build.PL
    trunk/eekboek/CHANGES
    trunk/eekboek/EekBoek.spec
    trunk/eekboek/INSTALL
    trunk/eekboek/MANIFEST
    trunk/eekboek/META.yml
    trunk/eekboek/Makefile.PL
    trunk/eekboek/contrib/afschr.pl
    trunk/eekboek/debian/changelog
    trunk/eekboek/inc/build_common.pl
    trunk/eekboek/lib/EB/Config.pm
    trunk/eekboek/lib/EB/DB.pm
    trunk/eekboek/lib/EB/Report/GenBase.pm
    trunk/eekboek/lib/EB/Report/Reporter/Html.pm
    trunk/eekboek/lib/EB/Shell.pm
    trunk/eekboek/lib/EB/Tools/Opening.pm
    trunk/eekboek/lib/EekBoek.pm

Modified: trunk/eekboek/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/Build.PL?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/Build.PL (original)
+++ trunk/eekboek/Build.PL Tue Jul 22 04:23:14 2008
@@ -2,8 +2,8 @@
 # Author          : Johan Vromans
 # Created On      : Thu Sep  1 17:28:26 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Sat Mar  8 16:30:48 2008
-# Update Count    : 100
+# Last Modified On: Sun Apr 27 11:54:40 2008
+# Update Count    : 102
 # Status          : Experimental
 
 # Ease the life of the CPAN testers.
@@ -69,8 +69,8 @@
 $build->create_build_script;
 
 if ( $build->os_type eq "Unix" ) {
-    WriteSpecfile($build->dist_name, $build->dist_version);
-    WriteDebianControl($build->dist_version);
+    # Write .spec file, Debian control, ...
+    ProcessTemplates($build->dist_name, $build->dist_version);
 }
 
 # Debian needs this.

Modified: trunk/eekboek/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/CHANGES?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/CHANGES (original)
+++ trunk/eekboek/CHANGES Tue Jul 22 04:23:14 2008
@@ -1,4 +1,18 @@
-1.03.13
+1.03.90
+
+	* Alle rapporten in HTML kunnen een expliciete titel
+          meekrijgen:
+
+	    balans --title="Voorlopige balans 2009" --out=x.html
+
+	* Bugfix: Meer dan één -D / --define op de command line
+          mogelijk.
+
+	* Kleine wijzigingen in het verwerken van de config files. De
+          ".eekboek.conf" in de huidige directory wordt niet langer
+          meegenomen indien ebshell wordt opgestart met een "-f" optie.
+
+1.03.13 2008-04-13 16:09
 
 	* Voorkom warnings indien bij de BTWaangifte er geen
           voorheffingen hebben plaatsgevonden in de periode waarover

Modified: trunk/eekboek/EekBoek.spec
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/EekBoek.spec?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/EekBoek.spec (original)
+++ trunk/eekboek/EekBoek.spec Tue Jul 22 04:23:14 2008
@@ -5,7 +5,7 @@
 # Package name, lowcase (eekboek)
 %define lcname eekboek
 # Package version
-%define pkgversion 1.03.13
+%define pkgversion 1.03.90
 # Suffix (-unstable, or empty)
 %define pkgsuffix -unstable
 
@@ -19,7 +19,7 @@
 %{?_without_dbtests: %{expand: %%define dbtests 0}}
 ################ End Build Options ################
 
-Name: %pkgname%{pkgsuffix}
+Name: %pkgname
 Version: %pkgversion
 Release: 1
 Source: http://www.eekboek.nl/dl/%{pkgname}-%{version}.tar.gz
@@ -41,7 +41,7 @@
 BuildRequires: perl >= 5.8
 BuildRequires: perl(DBI)
 
-Provides: %{pkgname}%{pkgsuffix} = %{version}
+Provides: %{pkgname} = %{version}
 
 Summary: Bookkeeping software for small and medium-size businesses
 License: Artistic
@@ -117,7 +117,7 @@
 %install
 
 %define ebconf  %{_sysconfdir}/%{lcname}
-%define ebshare %{_datadir}/%{pkgname}%{pkgsuffix}-%{version}
+%define ebshare %{_datadir}/%{pkgname}-%{version}
 
 %{__rm} -rf $RPM_BUILD_ROOT
 
@@ -196,6 +196,9 @@
 %post
 
 %changelog
+* Sat Jul 19 2008 Johan Vromans <jvromans at squirrel.nl> - 1.03.90
+- Remove debian stuff
+- Don't use unstable.
 * Fri Apr 11 2008 Johan Vromans <jvromans at squirrel.nl> - 1.03.12
 - Simplify by setting variables from the .in template
 * Sun Apr 01 2007 Johan Vromans <jvromans at squirrel.nl> - 1.03.03

Modified: trunk/eekboek/INSTALL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/INSTALL?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/INSTALL (original)
+++ trunk/eekboek/INSTALL Tue Jul 22 04:23:14 2008
@@ -5,22 +5,28 @@
 Niet-ASCII tekens worden alleen juist getoond indien je programma op
 deze tekenset is ingesteld.
 
+DIT DOCUMENT IS INDICATIEF. DE ACTUELE INFORMATIE VINDT U OP
+http://www.eekboek.nl/docs/ . 
+
 Benodigdheden
 -------------
 
 Perl5.8.x met DBI (zit standaard in Perl)
-PostgreSQL (zit standaard in de meeste Linux systemen)
+
+Eén van:
+  PostgreSQL (zit standaard in de meeste Linux systemen)
+  SQLite (zit standaard in de meeste Linux systemen)
 
 Perl modules (zelf te installeren):
-       DBD::Pg 1.41 of later
-       Config::IniFiles
-       (Text::CSV_XS voor de Exact importprogramma's)
+  DBD::Pg 1.41 of later
+  DBD::SQLite 1.13 of later
 
 De volgende Perl modules zijn optioneel, maar worden sterk aangeraden
 vanwege de extra functionaliteit:
 
-       Term::ReadLine::Gnu
-       HTML::Entities 1.32
+  Term::ReadLine::Gnu
+  Archive::Zip
+  HTML::Entities 1.32 of later
 
 Installeren (RPM systemen)
 --------------------------
@@ -73,7 +79,7 @@
   $ tar -zxf EekBoek-x.yy.tar.gz
   $ cd EekBoek-x.yy
   $ perl Build.PL
-  $ perl Build
+  $ ./Build
 
 Het verifiëren vereist generieke toegang tot een draaiende PostgreSQL
 database server, alsmede de mogelijkheid om een database met de naam
@@ -81,11 +87,11 @@
 daartoe de environment variabelen PGHOST PGPORT en PGUSER worden
 toegepast; zie de PostgreSQL documentatie.
 
-  $ perl Build test
+  $ ./Build test
 
 Als het niet mogelijk is de database server te benaderen, gebruik dan
 
-  $ Build test --skipdbtests
+  $ ./Build test --skipdbtests
 
 Zonder een succesvolle afronding van de testprocedure inclusief
 database tests heeft het echter weinig zin om verder te gaan.
@@ -124,10 +130,11 @@
 
     $ rpmbuild ... --with dbtests ...
 
-* Om EekBoek te kunnen gebruiken moet je de beschikking hebben over
-  een PostgreSQL database server en een database. EekBoek kan deze
-  database voor je aanmaken, maar dan moet je daartoe bevoegd zijn.
-  Dat kun je bereiken met (veronderstel dat je user 'piet' bent):
+* Om EekBoek te kunnen gebruiken met PostgreSQL moet je de beschikking
+  hebben over een operationele PostgreSQL database server en een
+  database. EekBoek kan deze database voor je aanmaken, maar dan moet
+  je daartoe bevoegd zijn. Dat kun je bereiken met (veronderstel dat
+  je user 'piet' bent):
 
    $ su 
    # su - postgres

Modified: trunk/eekboek/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/MANIFEST?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/MANIFEST (original)
+++ trunk/eekboek/MANIFEST Tue Jul 22 04:23:14 2008
@@ -11,11 +11,7 @@
 contrib/afschr.pl
 contrib/afschr-gewoon.dat
 contrib/afschr-group.dat
-debian/changelog
-debian/compat
-debian/control
-debian/copyright
-debian/rules
+contrib/example.pl
 doc/html/bookings/bank.html
 doc/html/bookings/btw.html
 doc/html/bookings/cash.html
@@ -111,6 +107,7 @@
 lib/EB/DB/Postgres.pm
 lib/EB/DB/Sqlite.pm
 lib/EB/Export.pm
+lib/EB/Export/XAF.pm
 lib/EB/Expression.pm
 lib/EB/Format.pm
 lib/EB/Globals.pm

Modified: trunk/eekboek/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/META.yml?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/META.yml (original)
+++ trunk/eekboek/META.yml Tue Jul 22 04:23:14 2008
@@ -1,6 +1,6 @@
 ---
 name: EekBoek
-version: 1.03.13
+version: 1.03.90
 author:
   - Johan Vromans (jvromans at squirrel.nl)
 abstract: Elementary Bookkeeping (for the Dutch/European market)
@@ -46,7 +46,7 @@
     version: 1.054
   EB::Config:
     file: lib/EB/Config.pm
-    version: 1.014
+    version: 1.017
   EB::Config::IniFiles:
     file: lib/EB/Config/IniFiles.pm
     version: 2.38
@@ -54,7 +54,7 @@
     file: lib/EB/Config.pm
   EB::DB:
     file: lib/EB/DB.pm
-    version: 1.058
+    version: 1.059
   EB::DB::Postgres:
     file: lib/EB/DB/Postgres.pm
     version: 1.025
@@ -66,6 +66,9 @@
   EB::Export:
     file: lib/EB/Export.pm
     version: 1.029
+  EB::Export::XAF:
+    file: lib/EB/Export/XAF.pm
+    version: 1.001
   EB::Expression:
     file: lib/EB/Expression.pm
   EB::Format:
@@ -127,7 +130,7 @@
     version: 1.003
   EB::Report::GenBase:
     file: lib/EB/Report/GenBase.pm
-    version: 1.026
+    version: 1.028
   EB::Report::Grootboek:
     file: lib/EB/Report/Grootboek.pm
     version: 1.033
@@ -182,7 +185,7 @@
     version: 1.006
   EB::Report::Reporter::Html:
     file: lib/EB/Report/Reporter/Html.pm
-    version: 1.016
+    version: 1.017
   EB::Report::Reporter::Text:
     file: lib/EB/Report/Reporter/Text.pm
     version: 1.008
@@ -191,7 +194,7 @@
     version: 1.008
   EB::Shell:
     file: lib/EB/Shell.pm
-    version: 1.105
+    version: 1.107
   EB::Shell::Base:
     file: lib/EB/Shell/Base.pm
     version: 1.021
@@ -206,7 +209,7 @@
     version: 1.016
   EB::Tools::Opening:
     file: lib/EB/Tools/Opening.pm
-    version: 1.039
+    version: 1.041
   EB::Tools::SQLEngine:
     file: lib/EB/Tools/SQLEngine.pm
     version: 1.009
@@ -218,7 +221,7 @@
     version: 1.008
   EekBoek:
     file: lib/EekBoek.pm
-    version: 1.03.13
+    version: 1.03.90
 generated_by: Module::Build version 0.28
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html

Modified: trunk/eekboek/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/Makefile.PL?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/Makefile.PL (original)
+++ trunk/eekboek/Makefile.PL Tue Jul 22 04:23:14 2008
@@ -3,8 +3,8 @@
 # Author          : Johan Vromans
 # Created On      : Fri Sep  2 14:25:11 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Sat Mar  8 16:30:27 2008
-# Update Count    : 98
+# Last Modified On: Sun Apr 27 11:54:15 2008
+# Update Count    : 100
 # Status          : Unknown, Use with caution!
 
 # Ease the life of the CPAN testers.
@@ -45,7 +45,5 @@
 	      PM          => filelist("lib", '$(INST_LIBDIR)/'),
 	     );
 
-# Write .spec file.
-WriteSpecfile($data->{distname}, $x->{VERSION});
-# Write Debian control file.
-WriteDebianControl($x->{VERSION});
+# Write .spec file, Debian control, ...
+ProcessTemplates($data->{distname}, $x->{VERSION});

Modified: trunk/eekboek/contrib/afschr.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/contrib/afschr.pl?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/contrib/afschr.pl (original)
+++ trunk/eekboek/contrib/afschr.pl Tue Jul 22 04:23:14 2008
@@ -4,8 +4,8 @@
 # Author          : Johan Vromans
 # Created On      : Tue Sep 15 15:59:04 1998
 # Last Modified By: Johan Vromans
-# Last Modified On: Sun Apr 13 15:46:14 2008
-# Update Count    : 169
+# Last Modified On: Sat May 10 19:03:19 2008
+# Update Count    : 215
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -29,7 +29,9 @@
 
 my $eb;				# EekBoek boekingen
 my $gr;				# only group totals
-my $oy;
+my $oy;				# order by year
+my $html;			# produce HTML
+my $adm;			# admin name
 
 app_options();
 
@@ -69,7 +71,13 @@
     my $desc = "@desc";
     my @aux = ($desc, $date, $amt, $rest, $n, $bal, $res);
 
-    my ( $year, $month, $day ) = $date =~ /^(\d\d\d\d)-?(\d\d)-?(\d\d)/;
+    my ( $year, $month, $day );
+    if ( $date =~ /^(\d\d\d\d)-?(\d\d)-?(\d\d)$/ ) {
+	( $year, $month, $day ) = ( $1, $2, $3);
+    }
+    elsif ( $date =~ /^(\d\d\d\d)$/ ) {
+	( $year, $month, $day ) = ( $1, 1, 1 );
+    }
 
     # Beginwaarde.
     my $val = $amt;
@@ -118,6 +126,7 @@
     my $this = "";
 
     if ( defined($oy) ) {
+	do_template(join("", <DATA>)) if $html;
 	foreach ( sort { $a->[0] <=> $b->[0] or $a->[3] cmp $b->[3] } @data ) {
 	    ($year, $af, $v, $desc, $date, $amt, $rest, $n, $bal, $res) = @$_;
 	    if ( $this ne $year ) {
@@ -125,19 +134,15 @@
 		$- = 0;
 	    }
 	    next if $oy && $year != $oy;
-	    $date =~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/ and $date = "$3-$2-$1";
-	    write;
+	    do_write();
 	}
-    }
-    else {
-	foreach ( sort { $a->[3] cmp $b->[3] or $a->[0] <=> $b->[0] } @data ) {
-	    ($year, $af, $v, $desc, $date, $amt, $rest, $n, $bal, $res) = @$_;
-	    if ( $this ne $desc ) {
-		$this = $desc;
-		$- = 0;
-	    }
-	    $date =~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/ and $date = "$3-$2-$1";
-	    write;
+	if ( $html ) {
+	    do_template(<<EOD);
+</table>
+<p class="footer">Overzicht aangemaakt op [% bky %]-12-31 door <a href="http://www.eekboek.nl">EekBoek</a></p>
+</body>
+</html>
+EOD
 	}
     }
 }
@@ -173,9 +178,11 @@
     return unless @ARGV > 0;
 
     if ( !GetOptions(
+		     'adm=s'           => \$adm,
 		     'eb|eekboek!'     => \$eb,
 		     'groups'          => \$gr,
 		     'oy|order-year:i' => \$oy,
+		     'html'            => \$html,
 		     'ident'	       => \$ident,
 		     'help|?'	       => \$help,
 		    ) or $help )
@@ -184,6 +191,12 @@
     }
     app_ident if $ident;
     $oy = 0 if defined($oy) && $oy <= 1900;
+    if ( $html ) {
+	die("--html requires --oy=YYYY\n") if $oy <= 1900;
+	die("--html requires --adm=XXX\n") unless $adm;
+	die("--html cannot (yet) be used with --groups\n") if $gr;
+	$eb = 0;
+    }
 }
 
 sub app_ident {
@@ -199,10 +212,73 @@
     --noeb --noeekboek	no EekBoek bookings
     --order-year --oy [YEAR] order by (this) year
     --group             order per group
-    -help		this message
-    -ident		show identification
+    --html		produce HTML (requires --oy and --adm)
+    --adm=NAME		admin name
+    --help		this message
+    --ident		show identification
 EndOfUsage
     exit $exit if $exit != 0;
+}
+
+sub html {
+    my $t = shift;
+    $t =~ s/&/&amp;/g;
+    $t =~ s/>/&gt;/g;
+    $t =~ s/</&lt;/g;
+    $t =~ s/"/&quot;/g;
+    $t;
+}
+
+sub numfmt {
+    my $t = sprintf("%.2f", shift);
+    $t =~ s/\./,/;
+    $t;
+}
+
+sub do_template {
+    my ($t) = @_;
+
+    my %ctrl =
+      ( title	   => "Afschrijfstaat",
+	bky	   => $oy,
+	adm	   => html($adm),
+      );
+    my $pat = "(";
+    foreach ( grep { ! /^_/ } keys(%ctrl) ) {
+	$pat .= quotemeta($_) . "|";
+    }
+    chop($pat);
+    $pat .= ")";
+
+    $pat = qr/\[\%\s+$pat\s+\%\]/;
+
+    $t =~ s/$pat/$ctrl{$1}/ge;
+    print($t);
+}
+
+sub do_write {
+    if ( $date =~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/ ) {
+	$date = "$3-$2-$1";
+    }
+    else {
+	$date = $html ? "Boekwaarde $date" : "Boekw $date";
+    }
+    if ( !$html ) {
+	write;
+	return;
+    }
+    print <<EOD;
+<tr>
+<td class="c_desc">@{[html($desc)]}</th>
+<td class="c_aans">$date</th>
+<td class="c_val">@{[numfmt($amt)]}</th>
+<td class="c_n">$n</th>
+<td class="c_rest">@{[numfmt($rest)]}</th>
+<td class="c_begn">@{[numfmt($v+$af)]}</th>
+<td class="c_afs">@{[numfmt($af)]}</th>
+<td class="c_eind">@{[numfmt($v)]}</th>
+</tr>
+EOD
 }
 
 sub push_group {
@@ -239,3 +315,134 @@
 @>>>  @<<<<<<<<<<<<<<<<<<<  @>>>>>>>  @>>>>>>>  @>>>>>>>
 $year, $desc, sprintf("%.2f",$v+$af), sprintf("%.2f",$af), sprintf("%.2f",$v)
 .
+__END__
+<html>
+<head>
+<title>[% title %]</title>
+<style type="text/css">
+body {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 12px;
+}
+
+.title {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 100%;
+    font-weight: bold;
+    margin-top: 0pt;
+    margin-bottom: 0pt;
+}
+
+.subtitle {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 100%;
+    font-weight: bold;
+    margin-top: 0pt;
+}
+
+.footer {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 80%;
+    font-weight: normal;
+}
+
+body {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    line-height: 150%;
+    color: #000000;
+    table-width: 100%;
+}
+
+table {
+    border: thin solid #000000;
+    border-collapse: collapse;
+}
+table td {
+    border-left:  thin solid #000000;
+    border-right: thin solid #000000;
+}
+table th {
+    border-left:  thin solid #000000;
+    border-right: thin solid #000000;
+    border-bottom: thin solid #000000;
+}
+
+th { vertical-align: top }
+tr { vertical-align: top }
+
+.c_acct, .h_acct {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: left;
+}
+
+.c_desc, .h_desc {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: left;
+}
+
+.c_aans, .h_aans {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: left;
+}
+
+.c_val, .h_val {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+
+.c_n, .h_n {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+
+.c_rest, .h_rest {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+
+.c_begn, .h_begn {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+
+.c_afs, .h_afs {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+
+.c_eind, .h_eind {
+    padding-left: 10pt;
+    padding-right: 10pt;
+    text-align: right;
+}
+</style>
+</head>
+<body>
+<p class="title">[% title %]</p>
+<p class="subtitle">Periode: [% bky %]-01-01 t/m [% bky %]-12-31<br>
+[% adm %]</p>
+<table class="main">
+<tr class="head">
+<th class="h_desc">&nbsp;</th>
+<th class="h_aans" style="text-align:center" colspan="2">Aanschaf</th>
+<th class="h_n" style="text-align:center" colspan="2">Afschrijving</th>
+<th class="h_begn" style="text-align:center" colspan="3">Periode</th>
+</tr>
+<tr class="head">
+<th class="h_desc">Omschrijving</th>
+<th class="h_aans">Datum</th>
+<th class="h_val">Waarde</th>
+<th class="h_n">Jr</th>
+<th class="h_rest">Restant</th>
+<th class="h_begn">Begin</th>
+<th class="h_afs">Afschr.</th>
+<th class="h_eind">Eind</th>
+</tr>

Modified: trunk/eekboek/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/debian/changelog?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/debian/changelog (original)
+++ trunk/eekboek/debian/changelog Tue Jul 22 04:23:14 2008
@@ -1,3 +1,9 @@
+eekboek (1.03.90-1) UNRELEASED; urgency=low
+
+  * (NOT RELEASED YET) New upstream release
+
+ -- Joost van Baal <joostvb at debian.org>  Tue, 22 Jul 2008 06:21:51 +0200
+
 eekboek (1.03.13-1) UNRELEASED; urgency=low
 
   * control: no longer build eekboek-unstable-db-sqlite, but move dependency

Modified: trunk/eekboek/inc/build_common.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/inc/build_common.pl?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/inc/build_common.pl (original)
+++ trunk/eekboek/inc/build_common.pl Tue Jul 22 04:23:14 2008
@@ -1,10 +1,10 @@
 # build_common.inc -- Build file common info -*- perl -*-
-# RCS Info        : $Id: build_common.pl,v 1.18 2008/04/09 20:39:16 jv Exp $
+# RCS Info        : $Id: build_common.pl,v 1.19 2008/07/19 16:28:17 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Thu Sep  1 17:28:26 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Wed Apr  9 22:38:27 2008
-# Update Count    : 83
+# Last Modified On: Sat Jul 19 18:27:56 2008
+# Update Count    : 91
 # Status          : Unknown, Use with caution!
 
 use strict;
@@ -102,37 +102,43 @@
     $pm;
 }
 
-sub WriteSpecfile {
+sub ProcessTemplates {
     my $name    = shift;
     my $version = shift;
 
     my ($mv) = $version =~ /^\d+\.(\d+)/;
+    my %vars =
+      ( PkgName	   => $name,
+	pkgname	   => lc($name),
+	version	   => $version,
+	stable	   => $mv % 2 ? "-unstable" : "",
+	stability  => $mv % 2 ? "unstable" : "stable",
+      );
 
     vcopy( _tag	    => "RPM spec file",
 	   _dst	    => "$name.spec",
-	   PkgName  => $name,
-	   pkgname  => lc($name),
-	   version  => $version,
-	   stable   => $mv % 2 ? "-unstable" : "",
-	 );
-}
+	   %vars);
 
-sub WriteDebianControl {
-    my $version = shift;
-
-    my ($mv) = $version =~ /^\d+\.(\d+)/;
+=begin Debian
 
     vcopy( _tag	    => "Debian control file",
 	   _dst	    => "debian/control",
-	   version  => $version,
-	   stable   => $mv % 2 ? "-unstable" : "",
+	   %vars);
+
+    vcopy( _tag	    => "Debian rules file",
+	   _dst	    => "debian/rules",
+	   %vars);
 	 );
+    chmod((((stat("debian/rules"))[2] & 0777) | 0111), "debian/rules");
 
     vcopy( _tag	    => "Debian changelog file",
 	   _dst	    => "debian/changelog",
-	   version  => $version,
-	   stable   => $mv % 2 ? "unstable" : "stable",
-	 );
+	   %vars);
+
+=end
+
+=cut
+
 }
 
 sub vcopy {

Modified: trunk/eekboek/lib/EB/Config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Config.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Config.pm (original)
+++ trunk/eekboek/lib/EB/Config.pm Tue Jul 22 04:23:14 2008
@@ -1,12 +1,12 @@
 #! perl
 
 # Config.pm -- Configuration files.
-# RCS Info        : $Id: Config.pm,v 1.14 2008/02/18 10:31:19 jv Exp $
+# RCS Info        : $Id: Config.pm,v 1.17 2008/07/19 16:49:20 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Fri Jan 20 17:57:13 2006
 # Last Modified By: Johan Vromans
-# Last Modified On: Mon Feb 18 11:07:50 2008
-# Update Count    : 88
+# Last Modified On: Wed Jul  2 15:28:02 2008
+# Update Count    : 111
 # Status          : Unknown, Use with caution!
 
 package main;
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.14 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.17 $ =~ /(\d+)/g;
 
 use EB::Config::IniFiles;
 use File::Spec;
@@ -56,44 +56,43 @@
 	$i++;
     }
 
+    # Resolve extraconf to a file name. It must exist.
+    if ( $extraconf ) {
+	if ( -d $extraconf ) {
+	    my $f = File::Spec->catfile($extraconf, "$app.conf");
+	    if ( -e $f ) {
+		$extraconf = $f;
+	    }
+	    else {
+		$extraconf = File::Spec->catfile($extraconf, ".$app.conf");
+	    }
+	}
+	die("$extraconf: $!\n") unless -f $extraconf;
+    }
+
+    # Build the list of config files.
+    my @cfgs;
+    if ( !$skipconfig ) {
+	@cfgs = ( "/etc/$app/$app.conf",
+		  glob("~/.$app") . "/$app.conf" );
+	push(@cfgs, ".$app.conf") unless $extraconf;
+    }
+    push(@cfgs, $extraconf) if $extraconf;
+
     # Load configs.
     my $cfg;
-    for my $dir ( "/etc/$app/",
-		  glob("~/.$app") . "/",
-		  ".",
-		  undef		# placeholder for extraconf
-		 ) {
-	my $file;
-	if ( !defined($dir) ) {
-	    last unless $extraconf;
-	    $file = $extraconf;
-	    if ( -d $file ) {
-		my $f = File::Spec->catfile($file, "$app.conf");
-		if ( -e $f ) {
-		    $file = $f;
-		}
-		else {
-		    $file = File::Spec->catfile($file, ".$app.conf");
-		}
-	    }
-	    die("$file: $!\n") unless -f $file;
-	}
-	else {
-	    next if $skipconfig;
-	    $file = $dir . "$app.conf";
-	}
+    for my $file ( @cfgs ) {
 	next unless -s $file;
 	#warn("Config: $file\n");
-	$cfg = EB::Config::IniFiles::Wrapper->new
-	  ( -file => $file, -nocase => 1,
-	    $EB::Config::IniFiles::VERSION >= 2.39 ? (-allowcode => 0) : (),
-	    $cfg ? (-import => $cfg) : () );
+	my @args = ( -file => $file, -nocase => 1 );
+	push(@args, -allowcode => 0) if $EB::Config::IniFiles::VERSION >= 2.39;
+	push(@args, -import => $cfg) if $cfg;
+	$cfg = EB::Config::IniFiles::Wrapper->new(@args);
 	unless ( $cfg ) {
 	    # Too early for localisation.
 	    die(join("\n", @Config::IniFiles::errors)."\n");
 	}
     }
-
     # Make sure we have an object, even if no config files.
     $cfg ||= EB::Config::IniFiles::Wrapper->new;
 
@@ -103,10 +102,12 @@
 	     $i+1 < @ARGV && $ARGV[$i+1] =~ /^(\w+(?:::\w+)*)::?(\w+)=(.*)/ ) {
 	    $cfg->newval($1, $2, $3);
 	    splice(@ARGV, $i, 2);
+	    next;
 	}
 	elsif ( $ARGV[$i] =~ /^--define=(\w+(?:::\w+)*)::?(\w+)=(.*)/ ) {
 	    $cfg->newval($1, $2, $3);
 	    splice(@ARGV, $i, 1);
+	    next;
 	}
 	$i++;
     }

Modified: trunk/eekboek/lib/EB/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/DB.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/DB.pm (original)
+++ trunk/eekboek/lib/EB/DB.pm Tue Jul 22 04:23:14 2008
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: DB.pm,v 1.58 2008/04/09 21:00:53 jv Exp $
+# RCS Id          : $Id: DB.pm,v 1.59 2008/04/14 14:39:20 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Sat May  7 09:18:15 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Thu Mar 27 14:54:58 2008
-# Update Count    : 429
+# Last Modified On: Sun Apr 13 18:06:04 2008
+# Update Count    : 431
 # Status          : Unknown, Use with caution!
 
 ################ Common stuff ################
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.58 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.59 $ =~ /(\d+)/g;
 
 use EB;
 use DBI;
@@ -443,6 +443,23 @@
     $self->do("SELECT COUNT(*)".
 	      " FROM BTWTabel".
 	      " WHERE btw_tariefgroep != 0")->[0];
+}
+
+################ API calls for simple applications ################
+
+sub connect {
+    my $dataset = $cfg->val(qw(database name));
+    if ( !$dataset ) {
+	die(_T("Geen dataset opgegeven.".
+	       " Specificeer een dataset in de configuratiefile.").
+	    "\n");
+    }
+    $::dbh = EB::DB::->new();
+}
+
+sub disconnect {
+    $::dbh->disconnectdb;
+    undef $::dbh;
 }
 
 ################ API calls for database backend ################

Modified: trunk/eekboek/lib/EB/Report/GenBase.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Report/GenBase.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Report/GenBase.pm (original)
+++ trunk/eekboek/lib/EB/Report/GenBase.pm Tue Jul 22 04:23:14 2008
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Info        : $Id: GenBase.pm,v 1.26 2008/04/10 18:58:10 jv Exp $
+# RCS Info        : $Id: GenBase.pm,v 1.28 2008/04/29 17:18:31 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Sat Oct  8 16:40:43 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Thu Apr 10 20:57:21 2008
-# Update Count    : 150
+# Last Modified On: Tue Apr 29 19:18:21 2008
+# Update Count    : 153
 # Status          : Unknown, Use with caution!
 
 package main;
@@ -18,7 +18,7 @@
 use strict;
 use EB;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.26 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.28 $ =~ /(\d+)/g;
 
 use IO::File;
 use EB::Format;
@@ -177,6 +177,7 @@
     $be->{_cssdir} = $cfg->val(qw(html cssdir), undef);
     $be->{_cssdir} =~ s;/*$;/; if defined $be->{_cssdir};
     $be->{_style} = $opts->{style} if $opts->{style};
+    $be->{_title0} = $opts->{title} if $opts->{title};
 
     # Return instance.
     $be;
@@ -217,7 +218,7 @@
     foreach ( qw(html csv text) ) {
 	push(@opts, $_) if $be{$_};
     }
-    push(@opts, "style=s") if $be{html};
+    push(@opts, "style=s", "title|titel=s") if $be{html};
 
     # Explicit --gen-XXX for all backends.
     push(@opts, map { +"gen-$_"} keys %be);

Modified: trunk/eekboek/lib/EB/Report/Reporter/Html.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Report/Reporter/Html.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Report/Reporter/Html.pm (original)
+++ trunk/eekboek/lib/EB/Report/Reporter/Html.pm Tue Jul 22 04:23:14 2008
@@ -1,12 +1,12 @@
 #! perl
 
 # Html.pm -- HTML backend for Reporters.
-# RCS Info        : $Id: Html.pm,v 1.16 2008/03/10 17:41:45 jv Exp $
+# RCS Info        : $Id: Html.pm,v 1.17 2008/04/29 16:33:19 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Thu Dec 29 15:46:47 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Mon Mar 10 18:26:18 2008
-# Update Count    : 67
+# Last Modified On: Tue Apr 29 18:25:19 2008
+# Update Count    : 68
 # Status          : Unknown, Use with caution!
 
 package main;
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.16 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.17 $ =~ /(\d+)/g;
 
 use EB;
 use EB::Format qw(datefmt_full);
@@ -112,7 +112,7 @@
     print {$self->{fh}}
       ("<html>\n",
        "<head>\n",
-       "<title>", $html->($self->{_title1}), "</title>\n");
+       "<title>", $html->($self->{_title0} || $self->{_title1}), "</title>\n");
 
     if ( my $style = $self->{_style} ) {
 	if ( $style =~ /\W/ ) {

Modified: trunk/eekboek/lib/EB/Shell.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Shell.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Shell.pm (original)
+++ trunk/eekboek/lib/EB/Shell.pm Tue Jul 22 04:23:14 2008
@@ -10,7 +10,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.105 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.107 $ =~ /(\d+)/g;
 
 use EB;
 
@@ -967,26 +967,42 @@
 	       [ 'dir=s',
 		 'file|output=s',
 		 'boekjaar=s',
+		 'xaf=s',
 		 'single',
 		 'explicit',
 		 'totals!',
 	       ], $opts)
       or goto &help_export;
 
-    if ( defined($opts->{dir}) && defined($opts->{file}) ) {
-	warn("?"._T("Opties --dir en --file sluiten elkaar uit")."\n");
+    my $t = 0;
+    $t++ if defined($opts->{dir});
+    $t++ if defined($opts->{file});
+    $t++ if defined($opts->{xaf});
+    if ( $t > 1 ) {
+	warn("?"._T("Opties --dir, --file en --xaf sluiten elkaar uit")."\n");
 	return;
     }
-    if ( !defined($opts->{dir}) && !defined($opts->{file}) ) {
-	warn("?"._T("Specifieer --dir of --file")."\n");
+    if ( $t != 1 ) {
+	warn("?"._T("Specifieer --dir, --file of --xaf")."\n");
 	return;
     }
 
     return unless argcnt(@args, 0);
     check_open(1);
 
-    require EB::Export;
-    EB::Export->export($opts);
+    if ( $opts->{xaf} ) {
+	if ( findlib "Export/XAF.pm" ) {
+	    require EB::Export::XAF;
+	    EB::Export::XAF->export($opts);
+	}
+	else {
+	    warn("?"._T("Export naar XML Auditfile Financieel is niet beschikbaar")."\n");
+	}
+    }
+    else {
+	require EB::Export;
+	EB::Export->export($opts);
+    }
 
     return;
 }
@@ -1000,11 +1016,14 @@
 Opties:
 
   --file=<bestand>          Selecteer uitvoerbestand
-  --dir=<directory>           Selecteer uitvoerdirectory
-  --boekjaar=<code>           Selecteer boekjaar
-
-Er moet of een --file of een --dir optie worden opgegeven.
-Zonder --boekjaar selectie wordt de gehele administratie geëxporteerd.
+  --dir=<directory>         Selecteer uitvoerdirectory
+  --xaf=<bestand>           Export XML Auditfile Financieel
+  --boekjaar=<code>         Selecteer boekjaar
+
+Er moet een --file, --dir of een --xaf optie worden opgegeven.
+De XAF export exporteert altijd één enkel boekjaar. Voor de andere
+exports wordt zonder --boekjaar selectie de gehele administratie
+geëxporteerd.
 Eventueel bestaande files worden overschreven.
 EOS
 }

Modified: trunk/eekboek/lib/EB/Tools/Opening.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EB/Tools/Opening.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EB/Tools/Opening.pm (original)
+++ trunk/eekboek/lib/EB/Tools/Opening.pm Tue Jul 22 04:23:14 2008
@@ -1,11 +1,11 @@
 #! perl
 
-# RCS Id          : $Id: Opening.pm,v 1.39 2008/04/09 21:03:57 jv Exp $
+# RCS Id          : $Id: Opening.pm,v 1.41 2008/07/19 16:49:56 jv Exp $
 # Author          : Johan Vromans
 # Created On      : Tue Aug 30 09:49:11 2005
 # Last Modified By: Johan Vromans
-# Last Modified On: Wed Apr  2 21:27:34 2008
-# Update Count    : 268
+# Last Modified On: Thu May  1 17:55:43 2008
+# Update Count    : 290
 # Status          : Unknown, Use with caution!
 
 package main;
@@ -18,7 +18,7 @@
 use strict;
 use warnings;
 
-our $VERSION = sprintf "%d.%03d", q$Revision: 1.39 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%03d", q$Revision: 1.41 $ =~ /(\d+)/g;
 
 use EB;
 use EB::Format;
@@ -135,12 +135,17 @@
 }
 
 sub set_relatie {
+
+    # adm_relatie verkoop:2000:31 2000-12-30 ACME Cursus 1000
+    # adm_relatie 2000-12-31 Cons deb ACME 1000
+
     return shellhelp() unless @_ == 6;
     my $self = shift;
     my ($date, $desc, $type, $code, $amt);
     my ($dbk, $bky, $nr);
 
     if ( $_[0] =~ /^(\w+):(\w+):(\d+)$/ ) {
+	# adm_relatie verkoop:2000:31 2000-12-30 ACME Cursus 1000
 	($dbk, $bky, $nr) = ($1, $2, $3);
 	shift;
 	($date, $code, $desc, $amt) = @_;
@@ -150,6 +155,7 @@
 	$type = $t == DBKTYPE_VERKOOP;
     }
     else {
+	# adm_relatie 2000-12-31 Cons deb ACME 1000
 	($date, $desc, $type, $code, $amt) = @_;
 	return _T("Relatietype moet \"deb\" of \"crd\" zijn")."\n"
 	  unless $type =~ /^crd|deb$/;
@@ -166,26 +172,35 @@
     $bky = substr($date, 0, 4) unless defined $bky;
 
     my $acct;
+    my $sth;
     unless ( defined($dbk) ) {
-	my $sth = $dbh->sql_exec("SELECT min(dbk_id)".
-				 " FROM Dagboeken".
-				 " WHERE dbk_type = ?",
-				 $type ? DBKTYPE_VERKOOP : DBKTYPE_INKOOP);
-	$dbk = $sth->fetchrow_arrayref->[0];
+	$sth = $dbh->sql_exec("SELECT rel_code, rel_ledger".
+			      " FROM Relaties".
+			      " WHERE UPPER(rel_code) = ?".
+			      " AND ".($type ? "" : "NOT ")." rel_debcrd",
+			      uc($code));
+	my $rr = $sth->fetch;
+	return __x("Onbekende relatie: {rel}", rel => $code)."\n"
+	  unless defined $rr;
+	($code, $dbk) = @$rr;
 	$sth->finish;
+	$sth = $dbh->sql_exec("SELECT dbk_id, dbk_acc_id".
+			      " FROM Dagboeken".
+			      " WHERE dbk_id = ?",
+			      $dbk);
     }
     else {
-	my $sth = $dbh->sql_exec("SELECT dbk_id, dbk_acc_id".
-				 " FROM Dagboeken".
-				 " WHERE UPPER(dbk_desc) = ?",
-				 uc($dbk));
-	($dbk, $acct) = @{$sth->fetch};
-    }
+	$sth = $dbh->sql_exec("SELECT dbk_id, dbk_acc_id".
+			      " FROM Dagboeken".
+			      " WHERE UPPER(dbk_desc) = ?",
+			      uc($dbk));
+    }
+    ($dbk, $acct) = @{$sth->fetch};
 
     my $rr = $dbh->do("SELECT rel_code FROM Relaties" .
-			   " WHERE UPPER(rel_code) = ?" .
-			   "  AND " . ($type ? "" : "NOT ") . "rel_debcrd" .
-		           "  AND rel_ledger = ?",
+		      " WHERE UPPER(rel_code) = ?" .
+		      "  AND " . ($type ? "" : "NOT ") . "rel_debcrd" .
+		      "  AND rel_ledger = ?",
 		      uc($code), $dbk);
 
     return __x("Onbekende relatie: {rel}", rel => $code)."\n"
@@ -443,7 +458,6 @@
 	my $dbk_verkoop;
 	foreach my $r ( @{$o->{relatie}} ) {
 	    my ($bky, $nr, $date, $desc, $debcrd, $code, $acct, $amt) = @$r;
-
 	    $nr = $dbh->get_sequence("bsk_nr_0_seq") unless defined $nr;
 
 	    my ($dagboek) = @{$dbh->do("SELECT dbk_id".

Modified: trunk/eekboek/lib/EekBoek.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/eekboek/lib/EekBoek.pm?rev=23482&op=diff
==============================================================================
--- trunk/eekboek/lib/EekBoek.pm (original)
+++ trunk/eekboek/lib/EekBoek.pm Tue Jul 22 04:23:14 2008
@@ -9,9 +9,9 @@
 # Minimal version to prevent many Unicode bugs.
 use 5.008003;
 
-my $RCS_Id = '$Id: EekBoek.pm,v 1.66 2008/04/10 18:54:28 jv Exp $ ';
+my $RCS_Id = '$Id: EekBoek.pm,v 1.68 2008/07/19 16:48:21 jv Exp $ ';
 our $PACKAGE = 'EekBoek';
-our $VERSION = '1.03.13';
+our $VERSION = '1.03.90';
 
 =head1 NAME
 
@@ -62,4 +62,4 @@
 
 1;
 
-# $Id: EekBoek.pm,v 1.66 2008/04/10 18:54:28 jv Exp $ 
+# $Id: EekBoek.pm,v 1.68 2008/07/19 16:48:21 jv Exp $ 




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