Initial revision of account
authorArjen Baart <arjen@andromeda.nl>
Thu, 4 Nov 2010 15:44:07 +0000 (16:44 +0100)
committerArjen Baart <arjen@andromeda.nl>
Thu, 4 Nov 2010 15:44:07 +0000 (16:44 +0100)
Account is a simple bookkeeping application developped over a period
of more than 10 years. The initial revision is actually release
1.3.3 of the application.

16 files changed:
Ledger [new file with mode: 0644]
account.cpp [new file with mode: 0644]
account.h [new file with mode: 0644]
account_main.cpp [new file with mode: 0644]
balans.xsl [new file with mode: 0644]
bank.cpp [new file with mode: 0644]
doc/classes.svg [new file with mode: 0644]
doc/design.odt [new file with mode: 0644]
doc/processes.svg [new file with mode: 0644]
example.jrn [new file with mode: 0644]
makefile [new file with mode: 0644]
postscript.cpp [new file with mode: 0644]
postscript.h [new file with mode: 0644]
profit.xsl [new file with mode: 0644]
saldibalans.xsl [new file with mode: 0644]
total.xsl [new file with mode: 0644]

diff --git a/Ledger b/Ledger
new file mode 100644 (file)
index 0000000..005c484
--- /dev/null
+++ b/Ledger
@@ -0,0 +1,95 @@
+001.00 B  Onroerend goed
+002.00 B  Inventaris kantoor
+002.04 B  Inventaris werkplaats
+002.10 B  Computers
+002.20 B  Apparatuur
+002.30 B  Gereedschap
+002.40 B  Literatuur
+011.00 K  Afschrijving OG
+012.00 K  Afschrijving inventaris kantoor
+012.04 K  Afschrijving inventaris werkplaats
+012.10 K  Afschrijving computers
+012.20 K  Afschrijving apparatuur
+012.30 K  Afschrijving gereedschap
+012.40 K  Afschrijving literatuur
+040.00 B  Vermogen AJB
+040.10 B  Vermogen MK
+041.00 B  Prive AJB
+041.10 B  Prive MK
+060.00 B  Leningen
+061.00 B  Hypotheek OG
+100.00 B  Kas
+100.10 B  Kas vreemde valuta
+101.00 B  Bank (Rabo)
+101.10 B  Bank (ABN)
+102.00 B  Chipknip
+110.00 K  Ontvangen interest
+111.00 K  Betaalde interest
+130.00 B  Debiteuren
+135.00 K  Afschrijving debiteuren
+140.00 B  Crediteuren
+180.00 B  Te vorderen BTW
+180.10 B  Te vorderen BTW kilometers
+181.00 B  Af te dragen BTW
+188.00 B  Te verrekenen BTW
+189.00 K  Verrekende BTW
+190.00 B  Vooruitbetaalde bedragen
+191.00 B  Vooruitontvangen bedragen
+192.00 B  Nog te betalen bedragen
+193.00 B  Nog te ontvangen bedragen
+195.00 B  Nog te faktureren omzet
+230.00 B  Kruisposten
+240.00 B  Creditcards
+250.00 B  Cheques
+270.00 B  Investeringen
+310.00 B  Voorraad componenten      (#00-#59)
+311.00 K  Afschrijving componenten
+320.00 B  Voorraad materiaal        (#60-#69)
+321.00 K  Afschrijving materiaal
+330.00 B  Voorraad halffabrikaten   (#70-#74)
+331.00 K  Afschrijving halffabrikaten
+410.00 K  Loonkosten
+420.00 K  Kantoorbenodigdheden
+421.00 K  Drukwerk
+422.00 K  Abonnementen/documentatie
+423.00 K  Accountantskosten
+424.00 K  Reparatie/onderhoud inventaris kantoor
+424.04 K  Reparatie/onderhoud inventaris werkplaats
+424.10 K  Reparatie/onderhoud computers
+424.20 K  Reparatie/onderhoud apparatuur
+424.30 K  Reparatie/onderhoud gereedschap
+424.99 K  Reparatie/onderhoud diversen
+430.00 K  Telefoonkosten
+431.00 K  Faxkosten
+431.10 K  Datacommunicatie kosten
+432.00 K  Portikosten
+433.00 K  Bankkosten
+434.00 K  Incassokosten
+441.00 K  Reparatie/onderhoud OG
+442.00 K  Energiekosten
+450.00 K  Reklamekosten
+451.00 K  Vrachtkosten
+452.00 K  Reis en verblijfkosten
+453.00 K  Studiekosten
+460.00 K  Div. kosten
+461.00 K  Koersverschillen
+480.00 K  Research kosten
+700.00 B  Voorraad produkten (#75-#79)
+701.00 K  Afschrijving produkten
+710.00 B  Voorraad supplies  (#80-#89)
+711.00 K  Afschrijving supplies
+720.00 B  Voorraad software  (#90-#99)
+721.00 K  Afschrijving software
+800.00 K  Inkoopprijs van de verkopen
+800.20 K  Inkoopprijs van de verkopen eigen produktie
+800.40 K  Inkoopprijs software
+800.60 K  Inkoopprijs advies/ontwikkeling
+800.80 K  Inkoopprijs van de reparaties
+830.00 K  Kortingen en rabatten
+840.00 K  Opbrengst verkopen
+840.20 K  Opbrengst verkopen eigen produktie
+840.40 K  Opbrengst verkopen software
+840.60 K  Opbrengst Advies/ontwikkeling 17.5%
+840.61 K  Opbrengst Advies/ontwikkeling 0%
+840.80 K  Opbrengst reparaties
+910.00 K  Diverse baten en lasten
diff --git a/account.cpp b/account.cpp
new file mode 100644 (file)
index 0000000..9fa1931
--- /dev/null
@@ -0,0 +1,588 @@
+
+#include "account.h"
+
+#include <sstream>
+#include <fstream>
+
+#include <iostream>
+#include <iomanip>
+
+acc_nr::acc_nr(String &s)
+{
+   String s_nr;
+
+   std::cerr << "Account number from " << s;
+   group = s.dec();
+   s_nr    = s(4,2);
+   nr      = s_nr.dec();
+   std::cerr << " : " << *this << "\n";
+}
+
+acc_nr::operator String()
+{
+   char _buf[8];
+   sprintf(_buf, "%03d.%02d", group, nr);
+
+   String s(_buf);
+   return s;
+}
+
+std::istream &operator>>(std::istream &s, acc_nr &a)
+{
+   char c;
+
+   s >> a.group >> c >> a.nr;
+   return s;
+}
+
+std::ostream &operator<<(std::ostream &s, acc_nr a)
+{
+   s << String(a);
+   return s;
+}
+
+std::istream &operator>>(std::istream &s, amount &a)
+{
+   long   hundreds;
+   char   c;
+
+   s >> hundreds >> c >> a.value;
+   a.value += hundreds * 100;
+
+   return s;
+}
+
+std::ostream &operator<<(std::ostream &s, amount a)
+{
+   if (a == 0)
+      s << "           ";
+   else
+   {
+      //s << form("%8d.%02d",a / 100, a % 100);
+      s << std::setw(8) << a / 100 << ".";
+      s << std::setw(2) << std::setfill('0') << a % 100;
+      s << std::setw(0) << std::setfill(' ');
+   }
+
+   return s;
+}
+
+String amount::to_string()
+{
+   char _buf[20];
+   sprintf(_buf, "%8lu.%02lu", value / 100, value % 100);
+
+   if (value != 0)
+   {
+      String s(_buf);
+      return s;
+   }
+   else
+   {
+      return String("           ");
+   }
+}
+std::ostream &operator<<(std::ostream &s, balance b)
+{
+   s << b.Debit << "  " << b.Credit;
+
+   return s;
+}
+
+std::istream &operator>>(std::istream &s, Booking &b)
+{
+   char cmnt[128];
+
+   s >> b.Bnumber >> b.booked;
+   //s.get(cmnt, 128);
+   //b.comment = cmnt;
+   s >> b.comment;
+
+   return s;
+}
+
+std::ostream &operator<<(std::ostream &s, Booking &b)
+{
+   //s << form("#%03d ",b.Bnumber) << b.booked << " " << b.comment;
+   //s << form("%.*s", 58 - ~b.comment, "                                                              ");
+   s << "#" << std::setw(4) << std::setfill('0') << b.Bnumber;
+   s << std::setw(0) << std::setfill(' ');
+   s << " " << b.booked << " ";
+   s << std::setfill(' ') << std::setw(58) << std::left << b.comment;
+   s << std::setw(0) << std::right ;
+
+   return s;
+}
+
+std::istream &operator>>(std::istream &s, Mutation &m)
+{
+   int   nr_blanks = 0;
+   char  c;
+   char  buf[128];
+
+   while (s.get(c), c == ' ')
+      nr_blanks++;
+
+   s.putback(c);
+   s >> m.account;
+
+   amount  a;
+   //s.get(buf, 128);
+
+   //std::istringstream amnt(buf+strlen(buf)-10);
+   //amnt >> a;
+
+   String amnt;
+   int    p;
+
+   s >> amnt;
+   p = ~amnt - 1;
+   while (p > 0 && amnt[p] == ' ')
+   {
+      p--;
+   }
+   while (p > 0 && amnt[p] != ' ')
+   {
+      p--;
+   }
+
+   amnt = amnt(p, ~amnt - p);
+   int dot = amnt.index('.');
+   String cents = amnt(dot+1, 2);
+   a = long(amnt) * 100 + cents.dec();
+
+   if (nr_blanks < 7)
+      m.bal = balance(a, 0);
+   else
+      m.bal = balance(0, a);
+
+   return s;
+}
+
+std::ostream &operator<<(std::ostream &s, Mutation &m)
+{
+   s << "#" << std::setw(4) << std::setfill('0') << m.booking_nr;
+   s << std::setw(0) << std::setfill(' ');
+   s << " " << m.account << m.bal;
+   return s;
+}
+
+
+
+std::istream &operator>>(std::istream &s, Account &acc)
+{
+   char kind, name[128];
+
+   s >> acc.Anumber >> kind >> std::ws;
+   if (kind == 'B')
+      acc.kind = BALANCE;
+   else
+      acc.kind = COST;
+
+   //s.get(name, 128);
+   //acc.name = name;
+
+   s >> acc.name;
+
+   return s;
+}
+
+std::ostream &operator<<(std::ostream &s, Account &acc)
+{
+   s << acc.Anumber << " " << std::setw(44) << std::left << acc.name;
+   s << std::setw(0) << std::right << " ";
+   //s << form("%.*s", 45 - ~acc.name, "                                                   ");
+   s << acc.Bal;
+
+   return s;
+}
+
+std::ostream& operator<<(std::ostream &s, Ledger &l)
+{
+   int  i;
+   balance total, saldi;
+   balance EndBalance, Result;
+
+   s << l.nr_accs << " accounts in ledger:\n\n";
+   for (i=0; i<l.nr_accs; i++)
+   {
+      total += l.accs[i];
+      saldi += ~balance(l.accs[i]);
+      s << l.accs[i] << ~balance(l.accs[i]);
+      if (l.accs[i].BAL())
+      {
+         s << "                       " << ~balance(l.accs[i]);
+         EndBalance += ~balance(l.accs[i]);
+      }
+      else
+      {
+         s << ~balance(l.accs[i]);
+         Result += ~balance(l.accs[i]);
+      }
+      s << "\n";
+   }
+
+   balance profit;
+   profit = ~Result;
+
+   s << "\n       Result                                       ";
+   s << "                                                ";
+   s << -profit << profit << "\n";
+
+   Result += -profit;
+   EndBalance += profit;
+
+   s << "\n       Total                                        ";
+   s << total << saldi << Result << EndBalance << "\n";
+
+   return s;
+}
+
+void PostScript_balans_layout(PostScript &ps)
+{
+   ps.Line(16, 595, 755, 595);
+   ps.Line(16, 580, 755, 580);
+   ps.Line(16, 40, 755, 40);
+   ps.Text(200, 582, "Saldibalans");
+
+   ps.Line( 16, 595,  16, 40);
+   ps.Line(755, 595, 755, 40);
+
+   ps.LineAttributes(0.2, 1.0, 0.0);
+   ps.Line(195, 580, 195, 40);
+   ps.Line(335, 580, 335, 40);
+   ps.Line(475, 580, 475, 40);
+   ps.Line(615, 580, 615, 40);
+
+   ps.LineAttributes(0.2, 2.0, 2.0);
+   ps.Line(265, 580, 265, 40);
+   ps.Line(405, 580, 405, 40);
+   ps.Line(545, 580, 545, 40);
+   ps.Line(685, 580, 685, 40);
+}
+
+void Ledger::accounts_report(const char * filename)
+{
+   PostScript ps(filename);
+   int        i;
+
+   for (i=0; i<nr_accs; i++)
+   {
+      accs[i].Postscript_sheet(ps);
+   }
+}
+
+void Ledger::saldi_report(const char * filename)
+{
+   PostScript ps(filename);
+   balance total, saldi;
+   balance EndBalance, Result;
+   int        i;
+   float      y = 572;
+   int        row = 0;
+
+   ps.NewPage(842, 595);
+   ps.FontSize(6);
+
+
+   for (i=0; i<nr_accs; i++)
+   {
+      balance saldo(accs[i]);
+
+      if (saldo.debit() != 0 || saldo.credit() != 0)
+      {
+         if (row == 64)
+         {
+            ps.FontSize(9);
+            PostScript_balans_layout(ps);
+            ps.NewPage(842, 595);
+            ps.FontSize(6);
+            y = 572;
+            row = 0;
+         }
+
+         if (row % 2 == 1)
+         {
+            ps.Rectangle(16, y-2, 739, 7);
+         }
+
+         total += accs[i];
+         saldi += ~balance(accs[i]);
+
+         ps.Text(20, y, String(accs[i].Number()));
+         ps.Text(50, y, accs[i].Name());
+
+         balance saldo(accs[i]);
+
+         ps.Text(200, y, saldo.debit().to_string());
+         ps.Text(270, y, saldo.credit().to_string());
+         saldo = ~saldo;
+         ps.Text(340, y, saldo.debit().to_string());
+         ps.Text(410, y, saldo.credit().to_string());
+
+         if (accs[i].BAL())
+         {
+            EndBalance += ~balance(accs[i]);
+
+            ps.Text(620, y, saldo.debit().to_string());
+            ps.Text(690, y, saldo.credit().to_string());
+         }
+         else
+         {
+            Result += ~balance(accs[i]);
+
+            ps.Text(480, y, saldo.debit().to_string());
+            ps.Text(550, y, saldo.credit().to_string());
+         }
+
+         y -= 7.0;
+         row ++;
+      }
+   }
+
+   ps.FontSize(9);
+   PostScript_balans_layout(ps);
+
+   balance profit;
+   profit = ~Result;
+   Result += -profit;
+   EndBalance += profit;
+
+   ps.LineAttributes(0.5, 1.0, 0.0);
+   ps.Line(16, 60, 755, 60);
+   y = 52;
+   ps.Text(50, y, "Resultaat");
+   ps.Text(480, y, (-profit).debit().to_string());
+   ps.Text(550, y, (-profit).credit().to_string());
+   ps.Text(620, y, profit.debit().to_string());
+   ps.Text(690, y, profit.credit().to_string());
+
+   ps.Line(16, 50, 755, 50);
+   y = 42;
+   ps.Text(50, y, "Totaal");
+   ps.Text(200, y, total.debit().to_string());
+   ps.Text(270, y, total.credit().to_string());
+   ps.Text(340, y, saldi.debit().to_string());
+   ps.Text(410, y, saldi.credit().to_string());
+   ps.Text(480, y, Result.debit().to_string());
+   ps.Text(550, y, Result.credit().to_string());
+   ps.Text(620, y, EndBalance.debit().to_string());
+   ps.Text(690, y, EndBalance.credit().to_string());
+}
+
+void Ledger::XML_saldi(std::ostream &s)
+{
+   int  i;
+
+   s << "<?xml version='1.0'?>\n";
+   s << "<accounting>\n";
+   s << "<balance-sheet>\n";
+   for (i=0; i<nr_accs; i++)
+   {
+      balance saldo = ~balance(accs[i]);
+
+      if (saldo.debit() != 0 || saldo.credit() != 0)
+      {
+         s << "  <account>\n";
+         s << "    <number>" << accs[i].Number() << "</number>\n";
+         s << "    <name>" << accs[i].Name() << "</name>\n";
+         if (accs[i].BAL())
+         {
+            s << "    <type>BALANCE</type>\n";
+         }
+         else
+         {
+            s << "    <type>COST</type>\n";
+         }
+         if (saldo.debit() == 0)
+         {
+            s << "    <balance>CREDIT</balance>\n";
+            s << "    <amount>" << saldo.credit() << "</amount>\n";
+         }
+         else
+         {
+            s << "    <balance>DEBIT</balance>\n";
+            s << "    <amount>" << saldo.debit() << "</amount>\n";
+         }
+         s << "  </account>\n";
+         s << "\n";
+      }
+   }
+   s << "</balance-sheet>\n";
+   s << "</accounting>\n";
+}
+
+Account & Ledger::operator[](acc_nr Anr)
+{
+   int i;
+
+   for (i=0; accs[i] != Anr && i<nr_accs; i++);
+   if (i == nr_accs)
+      std::cerr << "Account " << Anr << " not found.\n";
+   return accs[i];
+}
+
+extern int n_m;
+extern Mutation m[];
+extern Booking b[];
+
+void PostScript_account_layout(PostScript &ps)
+{
+   ps.LineAttributes(1.0, 1.0, 0.0);
+   ps.Line(30, 770, 580, 770);
+   ps.Line(30, 740, 580, 740);
+   ps.Line(30,  20, 580,  20);
+
+   ps.Line(30, 770, 30, 20);
+   ps.Line(580, 770, 580, 20);
+
+   ps.LineAttributes(0.2, 1.0, 0.0);
+   ps.Line(400, 740, 400, 20);
+   ps.LineAttributes(0.2, 2.0, 2.0);
+   ps.Line(480, 740, 480, 20);
+}
+
+void Account::Postscript_sheet(PostScript &ps)
+{
+   int      M, B;
+   balance  total;
+   balance  saldo;
+   int      row;
+   float    y;
+   bool     page_started = false;
+
+   row = 68;
+
+   /*  Go through all mutations, selecting for each account  */
+
+   for (M = 0; M < n_m; M++)
+   {
+      std::ostringstream   bookstr;
+
+      if (acc_nr(m[M]) == Anumber)
+      {
+         if (row == 68)
+         {
+            if (page_started)
+            {
+               PostScript_account_layout(ps);
+            }
+            page_started = true;
+            ps.NewPage(596, 842);
+            ps.FontSize(12);
+
+            ps.Text(40, 750, String(Anumber));
+            ps.Text(100, 750, name);
+
+            ps.FontSize(8);
+            y = 730;
+            row = 0;
+         }
+
+         saldo = m[M];
+         total += m[M];
+
+         if (row % 2 == 1)
+         {
+            ps.Rectangle(30, y-2, 550, 9);
+         }
+            /*  Search the booking date and description */
+
+         for (B = 0; b[B].number() != m[M].number(); B++);
+         bookstr << b[B];
+         ps.Text(40, y, bookstr.str().c_str());
+
+         ps.Text(400, y, saldo.debit().to_string());
+         ps.Text(480, y, saldo.credit().to_string());
+
+         y -= 10;
+         row++;
+         //s << b[B] << "|" << balance(m[M]) << " |\n";
+      }
+   }
+
+   /*  Print the footer with the totals  */
+
+#if 0
+   s << "                 SALDO                                      ";
+   s << "               |" << -~total << " |\n";
+   s << "----------------------------------------------------------------";
+   s << "-----------+-------------+-----------+\n";
+   total += -~total;
+   s << "                 TOTAAL                                       ";
+   s << "             |" << total << " |\n";
+   s << "----------------------------------------------------------------";
+   s << "-----------+-------------+-----------+\n";
+#endif
+
+   if (page_started)
+   {
+      ps.Text(100, 50, "SALDO");
+      saldo = -~total;
+         ps.Text(400, 50, saldo.debit().to_string());
+         ps.Text(480, 50, saldo.credit().to_string());
+      ps.Line(30,  40, 580,  40);
+      total += -~total;
+      ps.Text(100, 30, "TOTAAL");
+         ps.Text(400, 30, total.debit().to_string());
+         ps.Text(480, 30, total.credit().to_string());
+      PostScript_account_layout(ps);
+   }
+}
+
+void Account::sheet(std::ostream &s)
+{
+   int      M, B;
+   balance  total;
+
+   s << "\n\n             " << Anumber << "  " << name << "\n";
+   s << "================================================================";
+   s << "===========+=============+===========+\n";
+
+   /*  Go through all mutations, selecting for each account  */
+
+   for (M = 0; M < n_m; M++)
+   {
+      if (acc_nr(m[M]) == Anumber)
+      {
+         total += m[M];
+
+            /*  Search the booking date and description */
+
+         for (B = 0; b[B].number() != m[M].number(); B++);
+         s << b[B] << "|" << balance(m[M]) << " |\n";
+      }
+   }
+
+   /*  Print the footer with the totals  */
+
+   s << "                 SALDO                                      ";
+   s << "               |" << -~total << " |\n";
+   s << "----------------------------------------------------------------";
+   s << "-----------+-------------+-----------+\n";
+   total += -~total;
+   s << "                 TOTAAL                                       ";
+   s << "             |" << total << " |\n";
+   s << "----------------------------------------------------------------";
+   s << "-----------+-------------+-----------+\n";
+}
+
+void Ledger::read(char *filename)
+{
+   std::ifstream   in(filename);
+   Account   A;
+
+   if (!in)
+   {
+      std::cerr << "Cannot read ledger file" << filename << "\n";
+      return;
+   }
+
+   nr_accs = 0;
+   while (in  >> A)
+      accs[nr_accs++] = A;
+
+   accs[nr_accs].Name() = String("Rekening bestaat niet");
+
+}
+
diff --git a/account.h b/account.h
new file mode 100644 (file)
index 0000000..997a912
--- /dev/null
+++ b/account.h
@@ -0,0 +1,348 @@
+
+#include <AXE/String.h>
+#include <AXE/date.h>
+
+#include "postscript.h"
+
+// An account number is a number in two parts, separated by a dot (.).
+// The first part is a 3-digit group number and the second part is a
+// 2-digit account number within the group.
+
+// Operations include input and output, conversion to or from a String
+// and test for equality.
+
+class acc_nr
+{
+   unsigned short group, nr;
+
+public:
+
+   acc_nr()
+   {
+      group = 0; nr = 0;
+   }
+
+   acc_nr(unsigned short g, unsigned short n)
+   {
+      group = g;
+      nr    = n;
+   }
+
+   acc_nr(String &s);
+   operator String();
+
+   int operator==(acc_nr a)
+   {
+      return group == a.group && nr == a.nr;
+   }
+
+   friend std::istream & operator>>(std::istream &, acc_nr&);
+   friend std::ostream & operator<<(std::ostream &, acc_nr);
+};
+
+//typedef enum { DEBIT, CREDIT } direction;
+
+class amount
+{
+   unsigned long  value;
+
+public:
+
+   amount()
+   {
+      value = 0;
+   }
+
+   amount(unsigned long l)
+   {
+      value = l;
+   }
+
+   operator long()
+   {
+      return value;
+   }
+
+   amount operator+(amount a)
+   {
+      amount sum;
+
+      sum.value = value + a.value;
+      return sum;
+   }
+
+   amount &operator+=(amount a)
+   {
+      value += a.value;
+
+      return *this;
+   }
+
+   String to_string();
+
+   friend std::istream & operator>>(std::istream &, amount &);
+   friend std::ostream & operator<<(std::ostream &, amount);
+};
+
+class balance
+{
+   amount Debit, Credit;
+
+public:
+
+   balance()
+   {
+      Debit = 0; Credit = 0;
+   }
+
+   balance(amount D, amount C)
+   {
+      Debit = D;
+      Credit = C;
+   }
+
+   amount debit()
+   {
+      return Debit;
+   }
+
+   amount credit()
+   {
+      return Credit;
+   }
+
+   balance operator~()          //  Calculate balance, leaving either
+   {                            //   Debit or Credit 0.
+      amount  saldo;
+      balance b;
+
+      saldo = Debit - Credit;
+      if (long(Debit) > long(Credit))
+         b.Debit = Debit - Credit;
+      else
+         b.Credit = Credit - Debit;
+
+      return b;
+   }
+
+   balance operator-()          //   Reverse the balance
+   {
+      balance b;
+
+      b.Debit = Credit;
+      b.Credit = Debit;
+
+      return b;
+   }
+
+   balance operator+(balance b)
+   {
+      balance sum;
+
+      sum.Debit = Debit + b.Debit;
+      sum.Credit = Credit + b.Credit;
+
+      return sum;
+   }
+   balance &operator+=(balance b)
+   {
+      Debit += b.Debit;
+      Credit += b.Credit;
+
+      return *this;
+   }
+
+   operator int()      //   Check equality
+   {
+      return Debit == Credit;
+   }
+
+   friend std::ostream & operator<<(std::ostream &, balance );
+};
+
+class Booking
+{
+   int   Bnumber;
+   date  booked;
+   String comment;
+
+public:
+
+   int number()
+   {
+      return Bnumber;
+   }
+
+   operator date()
+   {
+      return booked;
+   }
+
+   Booking &operator=(Booking &b)
+   {
+      Bnumber = b.Bnumber;
+      booked  = b.booked;
+      comment = b.comment;
+
+      return *this;
+   }
+
+   friend std::istream & operator>>(std::istream &, Booking &);
+   friend std::ostream & operator<<(std::ostream &, Booking &);
+};
+
+class Mutation
+{
+   int booking_nr;
+   acc_nr account;
+   balance bal;
+
+public:
+
+   Mutation()
+   {
+   }
+   Mutation(int BK_nr)
+   {
+      booking_nr = BK_nr;
+   }
+   int number()
+   {
+      return booking_nr;
+   }
+   operator acc_nr()
+   {
+      return account;
+   }
+   operator balance()
+   {
+      return bal;
+   }
+   friend std::istream & operator>>(std::istream &, Mutation &);
+   friend std::ostream & operator<<(std::ostream &, Mutation &);
+};
+
+typedef enum {BALANCE, COST} acc_kind;
+
+class Account
+{
+   acc_nr   Anumber;
+   String   name;
+   acc_kind kind;
+   balance  Bal;
+
+public:
+
+   Account()
+   {
+      kind = BALANCE;
+   }
+
+   Account(acc_nr A)
+   {
+      Anumber = A;
+      kind    = BALANCE;
+   }
+
+   Account& operator=(Account &a)
+   {
+      Anumber  = a.Anumber;
+      name     = a.name;
+      kind     = a.kind;
+      Bal      = a.Bal;
+
+      return *this;
+   }
+
+   acc_nr Number()
+   {
+      return Anumber;
+   }
+
+   String &Name()
+   {
+      return name;
+   }
+
+   int operator==(acc_nr Anr)
+   {
+      return Anumber == Anr;
+   }
+
+   int operator!=(acc_nr Anr)
+   {
+      return !(Anumber == Anr);
+   }
+   Account &operator+=(Mutation &mut)
+   {
+      Bal += mut;
+
+      return *this;
+   }
+
+   int BAL()
+   {
+      return kind == BALANCE;
+   }
+
+   operator balance()
+   {
+      return Bal;
+   }
+
+   void sheet(std::ostream &);
+   void Postscript_sheet(PostScript &);
+
+   friend std::istream & operator>>(std::istream&, Account&);
+   friend std::ostream & operator<<(std::ostream&, Account&);
+};
+
+class Ledger
+{
+   Account accs[200];
+   int     nr_accs;
+   int     idx;
+
+public:
+
+   Ledger()
+   {
+      nr_accs = 0;
+   }
+
+   Account &operator[](acc_nr Anr);
+
+/*
+   void operator+=(Account &a)
+   {
+      accs[nr_accs++] = a;
+   }
+*/
+
+   void read(char *filename);
+
+   void start()
+   {
+      idx = 0;
+   }
+
+   Account &next()
+   {
+      static Account bogus = Account(acc_nr(1000, 1000));
+
+      if (idx == nr_accs)
+         return bogus;
+      else
+      {
+         idx++;
+         return accs[idx-1];
+      }
+   }
+
+   friend std::ostream & operator<<(std::ostream &, Ledger&);
+
+   void accounts_report(const char *);
+   void saldi_report(const char *);
+   void XML_saldi(std::ostream &);
+};
+
diff --git a/account_main.cpp b/account_main.cpp
new file mode 100644 (file)
index 0000000..4f1bd3c
--- /dev/null
@@ -0,0 +1,224 @@
+#include "account.h"
+#include <fstream>
+#include <iomanip>
+#include <getopt.h>
+
+static char  helptext[] = 
+     "Usage: account [options] journal\n"
+     "\n"
+     "Options:\n"
+     "  -r <start>\n"
+     "  --renumber <start>   :  Renumber the booking numbers (start > 0)\n"
+     "  --help               :  Print this helpful message\n"
+     "  -V\n"
+     "  --version            :  Print the version number\n";
+
+void read_journal(char *journal_file);
+void renumber_journal(char *journal_file, unsigned long renumber);
+void print_journal();
+
+Ledger    ledger;
+Booking   b[2000];
+Mutation  m[6000];
+
+int n_m = 0, n_b = 0;
+
+static struct option long_options[] =
+{
+   { "help",       no_argument,        0,   'h' },
+   { "renumber",   required_argument,  0,   'r' },
+   { "version",    no_argument,        0,   'V' },
+   { 0, 0, 0, 0 }
+};
+
+main(int argc, char *argv[])
+{
+   int      i, c;
+   Account  a;
+
+   unsigned long renum = 0;
+
+   int      option_index = 0;
+
+   while ((c = getopt_long(argc, argv, "Vr:", long_options, &option_index)) != -1)
+   {
+      switch (c)
+      {
+      case 'h':
+         std::cout << helptext;
+         exit(0);
+         break;
+
+      case 'V':
+         std::cout << "account version 1.3.3\n";
+         exit(0);
+         break;
+
+      case 'r':
+         renum = String(optarg);
+         break;
+      }
+   }
+
+   if (optind == argc)
+   {
+      std::cerr << "Usage: account [options] journal_file\n";
+      exit(1);
+   }
+
+   if (renum != 0)
+   {
+      renumber_journal(argv[optind], renum);
+      exit(0);
+   }
+
+   ledger.read((char *)"Ledger");
+   read_journal(argv[optind]);
+
+
+   ledger.start();
+
+   while (a = ledger.next(), a != acc_nr(1000, 1000))
+      a.sheet(std::cout);
+
+   ledger.accounts_report("grootboek.ps");
+
+   //   Calculate all accounts to create the final balance.
+
+   for (i = 0; i < n_m; i++)
+      ledger[m[i]] += m[i];
+
+   std::cout << ledger;
+   
+   ledger.saldi_report("saldibalans.ps");
+
+   std::ofstream  saldi("saldi.xml");
+   ledger.XML_saldi(saldi);
+}
+
+void read_journal(char *journal_file)
+{
+   Booking    B;
+   balance    bal;
+   Mutation   M[100];
+
+   int        n_mut = 0;
+   char       first_char;
+
+   std::ifstream  i(journal_file);
+
+   while (i)
+   {
+      i.get(first_char);
+      switch (first_char)
+      {
+      case '#' :
+         if (n_mut != 0)
+         {
+            if (bal)
+            {
+               if (n_b > 0)
+               {
+                  if (date(B) < date(b[n_b - 1]))
+                  {
+                     std::cerr << "The date of booking " << B.number() << " is out of sequence.\n";
+                  }
+                  if (B.number() < b[n_b - 1].number())
+                  {
+                     std::cerr << "The number of booking " << B.number() << " is out of sequence.\n";
+                  }
+               }
+               b[n_b++] = B;
+               for (int j = 0; j < n_mut; j++)
+                  m[n_m++] = M[j];
+            }
+            else
+            {
+               std::cerr << "Booking nr. " << B.number()
+                    << " is out of balance: " << bal << "\n";
+            }
+            n_mut = 0;
+            bal = balance(0,0);
+            //std::cerr << "\n";
+         }
+         i >> B;
+         //std::cerr << B << "\n";  //  Provide visual check
+         break;
+
+      case ' ' :
+         M[n_mut] = Mutation(B.number());
+         i >> M[n_mut];
+         //std::cerr << "  > " << M[n_mut] << "\n";   // Provide visual check
+         if (i.good())
+         {
+            bal += M[n_mut];
+            n_mut++;
+         }
+         else
+         {
+            std::cerr << "Input error at #" << B.number() << "\n";
+            i.clear();
+         }
+         break;
+
+      case '\n' :  break;   // Ignore linefeeds
+      default:     break;
+      }
+   }
+
+   if (n_mut != 0)
+   {
+      if (bal)
+      {
+         b[n_b++] = B;
+         for (int j = 0; j < n_mut; j++)
+            m[n_m++] = M[j];
+      }
+   }
+}
+
+void renumber_journal(char *journal_file, unsigned long renumber)
+{
+   std::ifstream  i(journal_file);
+   String         line;
+
+   bool          started = false;
+
+   while (i >> line)
+   {
+      if (line[0] == '#')
+      {
+         int    c  = line.index(' ');
+         String nr = line(1,c-1);
+         unsigned long b_nr = nr.dec();
+         line(0,c) = String("");
+
+         if (started)
+         {
+            b_nr = renumber++;
+         }
+         else
+         {
+            if (b_nr == renumber)
+            {
+               renumber ++;
+               started = true;
+            }
+         }
+         std::cout << "#" << std::setw(4) << std::setfill('0') << b_nr;
+         std::cout << line << "\n";
+      }
+      else
+      {
+         std::cout << line << "\n";
+      }
+   }
+}
+
+void print_journal()
+{
+   for (int mi = 0; mi < n_m; mi++)
+   {
+      std::cout << m[mi] << "\n";
+   }
+}
diff --git a/balans.xsl b/balans.xsl
new file mode 100644 (file)
index 0000000..ee22fca
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+            doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
+            doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
+
+<xsl:template match="balance-sheet">
+<html>
+  <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
+<head>
+  <link rel="stylesheet" type="text/css" href="account.css"/>
+  <title>Balans</title>
+
+</head>
+<body>
+   <h1>Balans</h1>
+
+   <h2>Bezittingen</h2>
+   <table>
+   <xsl:for-each select="account[type='BALANCE' and balance='DEBIT']">
+      <tr><xsl:apply-templates/></tr>
+   </xsl:for-each>
+   <tr>
+   <td><b>TOTAAL</b></td>
+   <td><b><xsl:value-of select="sum(account[type='BALANCE' and balance='DEBIT']/amount)"/></b></td>
+   </tr>
+   </table>
+
+   <h2>Schulden</h2>
+   <table>
+   <xsl:for-each select="account[type='BALANCE' and balance='CREDIT']">
+      <tr><xsl:apply-templates/></tr>
+   </xsl:for-each>
+   <tr>
+   <td><b>TOTAAL</b></td>
+   <td><b><xsl:value-of select="sum(account[type='BALANCE' and balance='CREDIT']/amount)"/></b></td>
+   </tr>
+   </table>
+
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="number"/>
+<xsl:template match="type"/>
+<xsl:template match="balance"/>
+
+<xsl:template match="name">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="amount">
+  <td align='right'><xsl:apply-templates/></td>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/bank.cpp b/bank.cpp
new file mode 100644 (file)
index 0000000..8e46444
--- /dev/null
+++ b/bank.cpp
@@ -0,0 +1,260 @@
+/*
+ *  Read bank transactions and generate account bookings.
+ *
+ *  Template syntax:
+ *  Lines starting with '+' or '-': Match for name and description. Two regular
+ *       expressions, separated by '~'.  The '+' matches CREDIT transactions (adds to
+ *       the bank account); the '-' matches DEBIT transactions.
+ *
+ *  Other lines are content of the template. Parts enclosed in '~' characters are substituted by fields
+ *     from the input. Possibilities are: "$D" -> booking date, "$N" -> name, "$A" -> amount,
+ *     anything else is taken as a regular expression that is extracted from the description.
+ */
+
+
+#include <fstream>
+#include <vector>
+#include <AXE/String.h>
+#include <AXE/date.h>
+
+class BankTemplate
+{
+   bool Credit;
+   regex name_match;
+   regex description_match;
+
+   String text_template;
+
+public:
+
+   BankTemplate() : name_match(""), description_match(".*")
+   {
+      Credit = false;
+      text_template = "";
+   }
+
+   BankTemplate(bool cr, String nm, String dm)
+      : name_match(nm), description_match(dm)
+   {
+      Credit = cr;
+      text_template = "";
+   }
+
+   BankTemplate(const BankTemplate  & b)
+      : name_match(b.name_match), description_match(b.description_match)
+   {
+      Credit            = b.Credit;
+      text_template     = b.text_template;
+   }
+
+   void add_to_template(String s)
+   {
+      text_template += s + "\n";
+   }
+
+   bool matches(String deb_cred, String name, String descr);
+
+   String substitute_template(String date, String name, String amount, String descr);
+};
+
+bool BankTemplate::matches(String deb_cred, String name, String descr)
+{
+   return (deb_cred == "C") == Credit && name == name_match && descr == description_match;
+}
+
+String BankTemplate::substitute_template(String date, String name, String amount, String descr)
+{
+   String text(text_template);
+
+   int sub_start, sub_len;
+
+   sub_start = text.index('~');
+
+   while (sub_start != -1)
+   {
+      sub_len = 1;
+      while (text[sub_start + sub_len] != '~')
+      {
+         sub_len++;
+      }
+      sub_len++;
+      String match = text(sub_start, sub_len);
+      if (~match == 4 && match[1] == '$')
+      {
+         switch (match[2])
+         {
+         case 'A':
+            text(sub_start, sub_len) = amount;
+            break;
+
+         case 'N':
+            text(sub_start, sub_len) = name;
+            break;
+
+         case 'D':
+            text(sub_start, sub_len) = date(6,2) + String("-") + date(4,2) + String("-") + date(0,4);
+            break;
+
+         default:
+            text(sub_start, sub_len) = String("INVALID SUBSTITUTION");
+            break;
+         }
+      }
+      else
+      {
+         match <<= 1;
+         match >>= 1;
+         String extraction = descr(regex(match));
+         text(sub_start, sub_len) = extraction;
+      }
+
+      sub_start = text.index('~');
+   }
+
+   return text;
+}
+
+std::vector<BankTemplate> read_templates(const char * filename);
+void read_mutations(const char *filename, std::vector<BankTemplate> templates);
+std::vector<String> parse_csv(String line, char delim);
+
+// Fields in the bank record.
+
+const int DEBIT_CREDIT = 3;
+const int AMOUNT       = 4;
+const int NAME         = 6;
+const int BOOKING_DATE = 7;
+const int DESCRIP1     = 10;
+const int DESCRIP2     = 11;
+const int DESCRIP3     = 12;
+const int DESCRIP4     = 13;
+const int DESCRIP5     = 14;
+const int DESCRIP6     = 15;
+
+main()
+{
+   //read_templates("Bank.templ");
+   std::vector<BankTemplate> templates = read_templates("Bank.templ");
+
+   read_mutations("mut.txt", templates);
+}
+
+std::vector<BankTemplate> read_templates(const char * filename)
+{
+   std::ifstream  in(filename);
+
+   String line;
+   BankTemplate   bt;
+   std::vector<BankTemplate>  templates;
+
+   bool           first = true;
+
+   while (in >> line)
+   {
+      if (~line > 0 && (line[0] == '-' || line[0] == '+'))
+      {
+         //  Start a new template
+
+         if (!first)
+         {
+            templates.push_back(bt);
+         }
+         first = false;
+
+         //line <<= 1;
+         int separator = line.index('~');
+         bt = BankTemplate(line[0] == '+', line(1, separator -1), line(separator + 1, ~line - separator -1));
+      }
+      else
+      {
+         // Add to the template text
+         bt.add_to_template(line);
+      }
+   }
+
+   templates.push_back(bt);
+
+   return templates;
+}
+
+void read_mutations(const char *filename, std::vector<BankTemplate> templates)
+{
+   int            i;
+
+   std::ifstream  in(filename);
+
+   String line;
+   std::vector<String> bank_record;
+
+   while (in >> line)
+   {
+      String description;
+
+      //std::cout << line << "\n";
+      line += ",\"\"";
+      bank_record = parse_csv(line, ',');
+
+      //std::cout << "  " << bank_record[BOOKING_DATE] << " " <<bank_record[DEBIT_CREDIT] << " " <<bank_record[NAME] << ": " << bank_record[AMOUNT];
+      description = bank_record[DESCRIP1];
+      for (i = DESCRIP2; i <= DESCRIP6; i++)
+      {
+         description += " " + bank_record[i];
+      }
+      //std::cout << " " << description << "\n";
+
+      //  Find a template for this bank record
+
+      i = 0;
+      while (!templates[i].matches(bank_record[DEBIT_CREDIT], bank_record[NAME], description) && i < templates.size())
+      {
+         i++;
+      }
+      if (i != templates.size())
+      {
+         std::cout << templates[i].substitute_template(bank_record[BOOKING_DATE], bank_record[NAME],
+                                                       bank_record[AMOUNT], description);
+      }
+      else
+      {
+         std::cerr << "Bank record does not match any tempplate:\n";
+      }
+   }
+}
+
+std::vector<String> parse_csv(String line, char delim)
+{
+   std::vector<String> record;
+   int i;
+   bool inquotes = false;
+   int  start = 0, len = 0;
+
+   for (i = 0; i < ~line; i++)
+   {
+      if (!inquotes && line[i] == '"')
+      {
+         inquotes = true;
+      }
+      else if (inquotes && line[i] == '"')
+      {
+         inquotes = false;
+      }
+      else if (!inquotes && line[i] == delim)
+      {
+         //  Delimiter: copy the substring to the record
+
+         String field = line(start, len);
+         record.push_back(field);
+         len = 0;
+      }
+      else
+      {
+         if (len == 0)
+         {
+            start = i;
+         }
+         len++;
+      }
+   }
+
+   return record;
+}
diff --git a/doc/classes.svg b/doc/classes.svg
new file mode 100644 (file)
index 0000000..351fd43
--- /dev/null
@@ -0,0 +1,709 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="classes.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="EmptyDiamondL"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="EmptyDiamondL"
+       style="overflow:visible">
+      <path
+         id="path3708"
+         d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
+         style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         transform="scale(0.8)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4142136"
+     inkscape:cx="309.70171"
+     inkscape:cy="563.88025"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:snap-global="true"
+     inkscape:window-width="1733"
+     inkscape:window-height="1164"
+     inkscape:window-x="120"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3590" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3594"
+       width="140"
+       height="170"
+       x="40"
+       y="552.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="50"
+       y="562.36218"
+       id="text4050"><tspan
+         sodipodi:role="line"
+         id="tspan4052"
+         x="50"
+         y="562.36218">acc_nr</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 40,572.36218 c 140,0 140,0 140,0 l 0,0"
+       id="path4054" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="50"
+       y="582.36218"
+       id="text4056"><tspan
+         sodipodi:role="line"
+         id="tspan4058"
+         x="50"
+         y="582.36218">group</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="50"
+       y="602.36218"
+       id="text4060"><tspan
+         sodipodi:role="line"
+         id="tspan4062"
+         x="50"
+         y="602.36218">nr</tspan></text>
+    <rect
+       y="562.36218"
+       x="560"
+       height="170"
+       width="140"
+       id="rect2823"
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text2825"
+       y="572.36218"
+       x="570"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="572.36218"
+         x="570"
+         id="tspan2827"
+         sodipodi:role="line">amount</tspan></text>
+    <path
+       id="path2829"
+       d="m 560,582.36218 c 140,0 140,0 140,0 l 0,0"
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text2831"
+       y="592.36218"
+       x="570"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="592.36218"
+         x="570"
+         id="tspan2833"
+         sodipodi:role="line">value</tspan></text>
+    <rect
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3.17156482;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2839"
+       width="140"
+       height="190"
+       x="320"
+       y="562.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="330"
+       y="572.36218"
+       id="text2841"><tspan
+         sodipodi:role="line"
+         id="tspan2843"
+         x="330"
+         y="572.36218">balance</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 320,582.36218 c 140,0 140,0 140,0 l 0,0"
+       id="path2845" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="330"
+       y="592.36218"
+       id="text2847"><tspan
+         sodipodi:role="line"
+         id="tspan2849"
+         x="330"
+         y="592.36218">Debit</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="330"
+       y="612.36218"
+       id="text2851"><tspan
+         sodipodi:role="line"
+         id="tspan2853"
+         x="330"
+         y="612.36218">Credit</tspan></text>
+    <rect
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:0.82285076;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2855"
+       width="20.155643"
+       height="20.155643"
+       x="-333.50888"
+       y="860.43506"
+       transform="matrix(0.86824309,-0.49613904,0.86824309,0.49613904,0,0)"
+       inkscape:transform-center-x="37.123098" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,592.36218 70,-20"
+       id="path4525"
+       inkscape:connector-type="polyline"
+       sodipodi:nodetypes="cc" />
+    <rect
+       y="272.36218"
+       x="490"
+       height="170"
+       width="140"
+       id="rect4527"
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4529"
+       y="282.36218"
+       x="500"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="282.36218"
+         x="500"
+         id="tspan4531"
+         sodipodi:role="line">Booking</tspan></text>
+    <path
+       id="path4533"
+       d="m 490,292.36218 c 140,0 140,0 140,0 l 0,0"
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4535"
+       y="307.36218"
+       x="500"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="307.36218"
+         x="500"
+         id="tspan4537"
+         sodipodi:role="line">Bnumber</tspan></text>
+    <text
+       id="text4539"
+       y="322.36218"
+       x="500"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="322.36218"
+         x="500"
+         id="tspan4541"
+         sodipodi:role="line">booked</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="500"
+       y="337.36218"
+       id="text4543"><tspan
+         sodipodi:role="line"
+         id="tspan4545"
+         x="500"
+         y="337.36218">comment</tspan></text>
+    <rect
+       y="282.36218"
+       x="80"
+       height="170"
+       width="140"
+       id="rect4547"
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4549"
+       y="292.36218"
+       x="90"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="292.36218"
+         x="90"
+         id="tspan4551"
+         sodipodi:role="line">Mutation</tspan></text>
+    <path
+       id="path4553"
+       d="m 80,302.36218 c 140,0 140,0 140,0 l 0,0"
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4555"
+       y="312.36218"
+       x="90"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="312.36218"
+         x="90"
+         id="tspan4557"
+         sodipodi:role="line">booking_nr</tspan></text>
+    <text
+       id="text4559"
+       y="332.36218"
+       x="90"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="332.36218"
+         x="90"
+         id="tspan4561"
+         sodipodi:role="line">bal</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="90"
+       y="352.36218"
+       id="text4563"><tspan
+         sodipodi:role="line"
+         id="tspan4565"
+         x="90"
+         y="352.36218">account</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 219.2031,323.33511 390,562.36218"
+       id="path4567"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 80,352.36218 -30,200"
+       id="path4569"
+       inkscape:connector-type="polyline"
+       sodipodi:nodetypes="cc" />
+    <rect
+       y="772.36218"
+       x="180"
+       height="270"
+       width="140"
+       id="rect4571"
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3.78075624;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4573"
+       y="782.36218"
+       x="190"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="782.36218"
+         x="190"
+         id="tspan4575"
+         sodipodi:role="line">Account</tspan></text>
+    <path
+       id="path4577"
+       d="m 180,792.36218 c 140,0 140,0 140,0 l 0,0"
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4579"
+       y="802.36218"
+       x="190"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="802.36218"
+         x="190"
+         id="tspan4581"
+         sodipodi:role="line">Anumber</tspan></text>
+    <text
+       id="text4583"
+       y="822.36218"
+       x="190"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       xml:space="preserve"><tspan
+         y="822.36218"
+         x="190"
+         id="tspan4585"
+         sodipodi:role="line">name</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="190.91882"
+       y="838.61493"
+       id="text4587"><tspan
+         sodipodi:role="line"
+         id="tspan4589"
+         x="190.91882"
+         y="838.61493">kind</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="191.62593"
+       y="855.58551"
+       id="text4591"><tspan
+         sodipodi:role="line"
+         id="tspan4593"
+         x="191.62593"
+         y="855.58551">Bal</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 180,822.36218 -70,-100"
+       id="path4595"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 320,872.36218 70,-120"
+       id="path4597"
+       inkscape:connector-type="polyline"
+       sodipodi:nodetypes="cc" />
+    <rect
+       style="fill:#0000ff;fill-opacity:0.2477876;stroke:#000000;stroke-width:3.48948002;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4603"
+       width="140"
+       height="230"
+       x="560"
+       y="792.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="570"
+       y="802.36218"
+       id="text4605"><tspan
+         sodipodi:role="line"
+         id="tspan4607"
+         x="570"
+         y="802.36218">Ledger</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 560,812.36218 c 140,0 140,0 140,0 l 0,0"
+       id="path4609" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="570"
+       y="822.36218"
+       id="text4611"><tspan
+         sodipodi:role="line"
+         id="tspan4613"
+         x="570"
+         y="822.36218">accs</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="570"
+       y="842.36218"
+       id="text4615"><tspan
+         sodipodi:role="line"
+         id="tspan4617"
+         x="570"
+         y="842.36218">nr_accs</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="570"
+       y="862.36218"
+       id="text4619"><tspan
+         sodipodi:role="line"
+         id="tspan4621"
+         x="570"
+         y="862.36218">idx</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 560,822.36218 -240,60"
+       id="path4623"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 220,312.36218 270,0"
+       id="path4250"
+       inkscape:connector-type="polyline" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="54.44722"
+       y="633.755"
+       id="text4252"><tspan
+         sodipodi:role="line"
+         id="tspan4254"
+         x="54.44722"
+         y="633.755">String()</tspan><tspan
+         sodipodi:role="line"
+         x="54.44722"
+         y="648.755"
+         id="tspan4256">==</tspan><tspan
+         sodipodi:role="line"
+         x="54.44722"
+         y="663.755"
+         id="tspan4258">istream &gt;&gt;</tspan><tspan
+         sodipodi:role="line"
+         x="54.44722"
+         y="678.755"
+         id="tspan4260">ostream &lt;&lt;</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 40,612.36218 c 140,0 140,0 140,0"
+       id="path4262" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 80,362.36218 c 140,0 140,0 140,0"
+       id="path4264" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 560,602.36218 c 140,0 140,0 140,0"
+       id="path4266" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="571.34229"
+       y="620.31995"
+       id="text4268"><tspan
+         sodipodi:role="line"
+         id="tspan4270"
+         x="571.34229"
+         y="620.31995">long()</tspan><tspan
+         sodipodi:role="line"
+         x="571.34229"
+         y="635.31995"
+         id="tspan4272">+</tspan><tspan
+         sodipodi:role="line"
+         x="571.34229"
+         y="650.31995"
+         id="tspan4274">+=</tspan><tspan
+         sodipodi:role="line"
+         x="571.34229"
+         y="665.31995"
+         id="tspan4276">to_string()</tspan><tspan
+         sodipodi:role="line"
+         x="571.34229"
+         y="680.31995"
+         id="tspan4278">istream &gt;&gt;</tspan><tspan
+         sodipodi:role="line"
+         x="571.34229"
+         y="695.31995"
+         id="tspan4280">ostream &lt;&lt;</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 320,622.36218 140,0"
+       id="path4282" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="334.46149"
+       y="639.4118"
+       id="text4284"><tspan
+         sodipodi:role="line"
+         id="tspan4286"
+         x="334.46149"
+         y="639.4118">debit()</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="654.4118"
+         id="tspan4288">credit()</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="669.4118"
+         id="tspan4290">~</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="684.4118"
+         id="tspan4292">+</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="699.4118"
+         id="tspan4294">-</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="714.4118"
+         id="tspan4296">+=</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="729.4118"
+         id="tspan4298">int()</tspan><tspan
+         sodipodi:role="line"
+         x="334.46149"
+         y="744.4118"
+         id="tspan4300">ostream &lt;&lt;</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,342.36218 140,0"
+       id="path4313" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="499.92447"
+       y="362.93307"
+       id="text4315"><tspan
+         sodipodi:role="line"
+         id="tspan4317"
+         x="499.92447"
+         y="362.93307">number()</tspan><tspan
+         sodipodi:role="line"
+         x="499.92447"
+         y="377.93307"
+         id="tspan2946">date()</tspan><tspan
+         sodipodi:role="line"
+         x="499.92447"
+         y="392.93307"
+         id="tspan4319">istream &gt;&gt;</tspan><tspan
+         sodipodi:role="line"
+         x="499.92447"
+         y="407.93307"
+         id="tspan4321">ostream &lt;&lt;</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="98.287842"
+       y="379.19653"
+       id="text4323"><tspan
+         sodipodi:role="line"
+         id="tspan4325"
+         x="98.287842"
+         y="379.19653">number()</tspan><tspan
+         sodipodi:role="line"
+         x="98.287842"
+         y="394.19653"
+         id="tspan4327">acc_nr()</tspan><tspan
+         sodipodi:role="line"
+         x="98.287842"
+         y="409.19653"
+         id="tspan4329">balance()</tspan><tspan
+         sodipodi:role="line"
+         x="98.287842"
+         y="424.19653"
+         id="tspan4331">istream &gt;&gt;</tspan><tspan
+         sodipodi:role="line"
+         x="98.287842"
+         y="439.19653"
+         id="tspan4333">ostream &lt;&lt;</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 180,862.36218 140,0"
+       id="path4335" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="190.91882"
+       y="881.74841"
+       id="text4337"><tspan
+         sodipodi:role="line"
+         id="tspan4339"
+         x="190.91882"
+         y="881.74841">Number()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="896.74841"
+         id="tspan4341">Name()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="911.74841"
+         id="tspan4343">==</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="926.74841"
+         id="tspan4345">!=</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="941.74841"
+         id="tspan4347">+= Mutation</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="956.74841"
+         id="tspan4349">BAL()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="971.74841"
+         id="tspan4351">balance()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="986.74841"
+         id="tspan4353">sheet()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="1001.7484"
+         id="tspan4355">Postscript_sheet()</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="1016.7484"
+         id="tspan4357">istream &gt;&gt;</tspan><tspan
+         sodipodi:role="line"
+         x="190.91882"
+         y="1031.7484"
+         id="tspan4359">ostream &lt;&lt;</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 560,872.36218 140,0"
+       id="path4361" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="572.75647"
+       y="893.26318"
+       id="text4363"><tspan
+         sodipodi:role="line"
+         id="tspan4365"
+         x="572.75647"
+         y="893.26318">Account [acc_nr]</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="908.26318"
+         id="tspan4367">read()</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="923.26318"
+         id="tspan4369">start()</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="938.26318"
+         id="tspan4371">next()</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="953.26318"
+         id="tspan4373">ostream &lt;&lt;</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="968.26318"
+         id="tspan4375">accounts_report()</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="983.26318"
+         id="tspan4377">saldi_report()</tspan><tspan
+         sodipodi:role="line"
+         x="572.75647"
+         y="998.26318"
+         id="tspan4379">XML_saldi()</tspan></text>
+  </g>
+</svg>
diff --git a/doc/design.odt b/doc/design.odt
new file mode 100644 (file)
index 0000000..7faa8fc
Binary files /dev/null and b/doc/design.odt differ
diff --git a/doc/processes.svg b/doc/processes.svg
new file mode 100644 (file)
index 0000000..d19ed74
--- /dev/null
@@ -0,0 +1,467 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="processes.svg">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path11420"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="EmptyDiamondL"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="EmptyDiamondL"
+       style="overflow:visible">
+      <path
+         id="path3708"
+         d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
+         style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+         transform="scale(0.8)" />
+    </marker>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4142136"
+     inkscape:cx="229.75845"
+     inkscape:cy="830.80225"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:snap-global="true"
+     inkscape:window-width="1733"
+     inkscape:window-height="1164"
+     inkscape:window-x="175"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3590" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       y="262.36218"
+       x="200"
+       height="80"
+       width="100"
+       id="rect4547"
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text4549"
+       y="307.36218"
+       x="215"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="307.36218"
+         x="215"
+         id="tspan4551"
+         sodipodi:role="line">Journal</tspan></text>
+    <path
+       sodipodi:type="arc"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3020"
+       sodipodi:cx="275"
+       sodipodi:cy="157.36218"
+       sodipodi:rx="65"
+       sodipodi:ry="65"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       transform="matrix(0.92307692,0,0,0.92307692,171.15384,162.10479)" />
+    <text
+       xml:space="preserve"
+       style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       x="395"
+       y="307.36218"
+       id="text3022"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3024"
+         x="395"
+         y="307.36218">account</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 300,302.36218 60,0"
+       id="path3804"
+       inkscape:connector-type="polyline" />
+    <rect
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3829"
+       width="100"
+       height="80"
+       x="375"
+       y="127.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="395"
+       y="167.36218"
+       id="text3831"><tspan
+         sodipodi:role="line"
+         id="tspan3833"
+         x="395"
+         y="167.36218">Ledger</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 425,207.36219 0,39.99999"
+       id="path3835"
+       inkscape:connector-type="polyline"
+       sodipodi:nodetypes="cc" />
+    <rect
+       y="127.36218"
+       x="550"
+       height="80"
+       width="100"
+       id="rect3839"
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text3841"
+       y="167.36218"
+       x="550"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="167.36218"
+         x="550"
+         id="tspan3843"
+         sodipodi:role="line">saldibalans.ps</tspan></text>
+    <rect
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3845"
+       width="100"
+       height="80"
+       x="550"
+       y="272.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="555"
+       y="312.36218"
+       id="text3847"><tspan
+         sodipodi:role="line"
+         id="tspan3849"
+         x="555"
+         y="312.36218">grootboek.ps</tspan></text>
+    <rect
+       y="427.36218"
+       x="380"
+       height="80"
+       width="100"
+       id="rect3851"
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    <text
+       id="text3853"
+       y="467.36218"
+       x="395"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="467.36218"
+         x="395"
+         id="tspan3855"
+         sodipodi:role="line">saldi.xml</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="M 470,272.36218 550,162.36219"
+       id="path3857"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
+       d="m 485,307.36218 65,0"
+       id="path3859"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 425,367.36218 0,60"
+       id="path3861"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+       d="m 425,367.36218 0,60"
+       id="path3863"
+       inkscape:connector-type="polyline" />
+    <path
+       transform="matrix(0.92307692,0,0,0.92307692,-18.846153,512.10478)"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       sodipodi:ry="65"
+       sodipodi:rx="65"
+       sodipodi:cy="157.36218"
+       sodipodi:cx="275"
+       id="path3865"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3867"
+       y="657.36218"
+       x="190"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="657.36218"
+         x="190"
+         id="tspan3869"
+         sodipodi:role="line">saldibalans.xsl</tspan></text>
+    <path
+       sodipodi:type="arc"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3871"
+       sodipodi:cx="275"
+       sodipodi:cy="157.36218"
+       sodipodi:rx="65"
+       sodipodi:ry="65"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       transform="matrix(0.92307692,0,0,0.92307692,76.153844,672.10478)" />
+    <text
+       xml:space="preserve"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       x="270"
+       y="822.36218"
+       id="text3873"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3875"
+         x="270"
+         y="822.36218">kostenoverzicht.xsl</tspan></text>
+    <path
+       transform="matrix(0.92307692,0,0,0.92307692,186.15384,522.10478)"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       sodipodi:ry="65"
+       sodipodi:rx="65"
+       sodipodi:cy="157.36218"
+       sodipodi:cx="275"
+       id="path3877"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3879"
+       y="662.36218"
+       x="410"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="662.36218"
+         x="410"
+         id="tspan3881"
+         sodipodi:role="line">profit.xsl</tspan></text>
+    <path
+       sodipodi:type="arc"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3883"
+       sodipodi:cx="275"
+       sodipodi:cy="157.36218"
+       sodipodi:rx="65"
+       sodipodi:ry="65"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       transform="matrix(0.92307692,0,0,0.92307692,406.15385,507.10478)" />
+    <text
+       xml:space="preserve"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       x="630"
+       y="652.36218"
+       id="text3885"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3887"
+         x="630"
+         y="652.36218">balans.xsl</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="M 425.99999,506.8622 235,597.36218"
+       id="path3889"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 455,507.36218 180,90"
+       id="path3895"
+       inkscape:connector-type="polyline" />
+    <path
+       transform="matrix(0.92307692,0,0,0.92307692,301.15385,662.10478)"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       sodipodi:ry="65"
+       sodipodi:rx="65"
+       sodipodi:cy="157.36218"
+       sodipodi:cx="275"
+       id="path3897"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3899"
+       y="807.36218"
+       x="510"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="807.36218"
+         x="510"
+         id="tspan3901"
+         sodipodi:role="line">vermogen.xsl</tspan></text>
+    <path
+       sodipodi:type="arc"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path3903"
+       sodipodi:cx="275"
+       sodipodi:cy="157.36218"
+       sodipodi:rx="65"
+       sodipodi:ry="65"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       transform="matrix(0.92307692,0,0,0.92307692,301.15385,827.10478)" />
+    <text
+       xml:space="preserve"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       x="510"
+       y="972.36218"
+       id="text3905"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3907"
+         x="510"
+         y="972.36218">report.xsl</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 425,507.36218 -95,250"
+       id="path3909"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 445,507.36218 110,240"
+       id="path3911"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 555,867.36218 0,45"
+       id="path3913"
+       inkscape:connector-type="polyline" />
+    <path
+       transform="matrix(0.92307692,0,0,0.92307692,-13.846153,327.10478)"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       sodipodi:ry="65"
+       sodipodi:rx="65"
+       sodipodi:cy="157.36218"
+       sodipodi:cx="275"
+       id="path3915"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text3917"
+       y="472.36218"
+       x="200"
+       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="472.36218"
+         x="200"
+         id="tspan3919"
+         sodipodi:role="line">btw-split.xsl</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
+       d="m 380,472.36218 -80,0"
+       id="path3921"
+       inkscape:connector-type="polyline"
+       sodipodi:nodetypes="cc" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 435,507.36218 5,100"
+       id="path3923"
+       inkscape:connector-type="polyline" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0.8291319;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
+       d="m 245,207.36218 0,55"
+       id="path2871"
+       inkscape:connector-type="polyline" />
+    <path
+       transform="matrix(0.92307692,0,0,0.92307692,-8.84616,2.10479)"
+       d="m 340,157.36218 a 65,65 0 1 1 -130,0 65,65 0 1 1 130,0 z"
+       sodipodi:ry="65"
+       sodipodi:rx="65"
+       sodipodi:cy="157.36218"
+       sodipodi:cx="275"
+       id="path2873"
+       style="fill:#00fff6;fill-opacity:0.2477876;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:type="arc" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text2875"
+       y="147.36218"
+       x="225"
+       style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Charter;-inkscape-font-specification:Bitstream Charter Bold"
+       xml:space="preserve"><tspan
+         y="147.36218"
+         x="225"
+         id="tspan2877"
+         sodipodi:role="line">bank</tspan></text>
+    <rect
+       style="fill:#58ff00;fill-opacity:0.34666664;stroke:#000000;stroke-width:1.73931313;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2879"
+       width="100"
+       height="80"
+       x="15"
+       y="102.36218" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:bold;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Charter Bold"
+       x="35"
+       y="142.36218"
+       id="text2881"><tspan
+         sodipodi:role="line"
+         id="tspan2883"
+         x="35"
+         y="142.36218">Bank mut</tspan></text>
+    <path
+       inkscape:connector-type="polyline"
+       id="path2885"
+       d="m 115,142.36218 70,0"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
+       d="m 240,412.36218 0,-70"
+       id="path3858"
+       inkscape:connector-type="polyline" />
+  </g>
+</svg>
diff --git a/example.jrn b/example.jrn
new file mode 100644 (file)
index 0000000..561c6cf
--- /dev/null
@@ -0,0 +1,1099 @@
+#000 01-01-99 Balans
+     002.00 Inventaris kantoor                 689.73
+     002.04 Inventaris werkplaats                9.95
+     002.10 Computers                         6056.93
+     002.20 Apparatuur                        4987.95
+     002.40 Literatuur                         664.19
+          040.00 Vermogen AJB                         128295.96
+          040.10 Vermogen MK                           42443.17
+     100.00 Kas                                 24.00
+     100.10 Kas vreemde valuta                   9.65
+     101.00 Bank (Rabo)                     113399.12
+     130.00 Debiteuren                       16361.50
+     180.00 Te vorderen BTW                    246.23
+     180.10 Te vorderen BTW kilometers         838.44
+          181.00 Af te dragen BTW                       7927.50
+     188.00 Te verrekenen BTW                 2802.24
+     190.00 Vooruitbetaalde bedragen           490.20
+          192.00 Nog te betalen bedragen                1926.30
+     193.00 Nog te ontvangen bedragen          345.45
+     195.00 Nog te faktureren omzet          25340.00
+     310.00 Voorraad componenten              6021.40
+     320.00 Voorraad materiaal                 207.09
+     330.00 Voorraad halffabrikaten            163.70
+     700.00 Voorraad produkten                1109.54
+     710.00 Voorraad supplies                  617.54
+     720.00 Voorraad software                  208.08
+
+#001 01-01-99 Vooruitbetaalde bedragen 1998
+     422.00 Abonnementen/documentatie          339.45
+     450.00 Reklamekosten                      150.75
+          190.00 Vooruitbetaalde bedragen                490.20
+
+#002 01-01-99 Creditrente 01-10 t/m 31-12
+     101.00 Bank                               345.45
+          193.00 Nog te ontvangen bedragen               345.45
+
+#003 01-01-99 Kosten 01-10 t/m 31-12
+     192.00 Nog te betalen bedragen             12.30
+          101.00 Bank                                     12.30
+
+#004 01-01-99 Kosten Europas 3431
+     433.00 Bankkosten                          10.00
+          101.00 Bank                                     10.00
+
+#005 01-01-99 Kosten Europas 3441
+     433.00 Bankkosten                          10.00
+          101.00 Bank                                     10.00
+
+#006 04-01-99 Faktuur 3277
+     130.00 Debiteuren                       16920.00
+          195.00 Nog te faktureren omzet               14400.00
+          181.00 Af te dragen BTW                       2520.00
+
+#007 04-01-99 Faktuur 3278
+     130.00 Debiteuren                         480.00
+          195.00 Nog te faktureren omzet                 480.00
+
+#008 04-01-99 Faktuur 3279
+     130.00 Debiteuren                         716.75
+          195.00 Nog te faktureren omzet                 610.00
+          181.00 Af te dragen BTW                        106.75
+
+#009 04-01-99 Faktuur 3280
+     130.00 Debiteuren                        5005.50
+          195.00 Nog te faktureren omzet                4260.00
+          181.00 Af te dragen BTW                        745.50
+
+#010 04-01-99 Faktuur 3281
+     130.00 Debiteuren                        5640.00
+          195.00 Nog te faktureren omzet                4800.00
+          181.00 Af te dragen BTW                        840.00
+   
+#011 05-01-99 Faktuur 3275
+     101.00 Bank                              4441.50
+          130.00 Debiteuren                             4441.50
+
+#012 06-01-99 Creditnota 3282
+     195.00 Nog te faktureren omzet            250.00
+     181.00 Af te dragen BTW                    43.75
+          130.00 Debiteuren                              293.75
+
+#013 07-01-99 UUNET faktuur 9905210
+     431.10 Datacommunicatie kosten            137.00
+     180.00 Te vorderen BTW                     23.98
+          140.00 Crediteuren                             160.98
+
+#014 11-01-99 Abbonnement IEEE
+     422.00 Abonnementen/documentatie          474.14
+          041.00 Prive AJB                               474.14
+
+#015 12-01-99 Prive opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#016 13-01-99 Faktuur 3274
+     101.00 Bank                               640.00
+          130.00 Debiteuren                              640.00
+
+#017 13-01-99 KPN kenm.111.396.611.001.807
+     431.00 Faxkosten                           37.33
+     431.10 Datacommunicatie kosten            196.98
+     180.00 Te vorderen BTW                     41.00
+          140.00 Crediteuren                             275.31
+
+#018 22-01-99 Faktuur 3273
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#019 26-01-99 BTW 4e kw.98 2805063261801300
+     181.00 Af te dragen BTW                  7927.50
+          180.00 Te vorderen BTW                         246.23
+          180.10 Te vorderen BTW kilometers              838.44
+          189.00 Verrekende BTW                            0.83
+          101.00 Bank                                   6842.00
+
+#020 29-01-99 KPN kenm. 1111396611001807
+     140.00 Crediteuren                        275.31
+          101.00 Bank                                    275.31
+
+#021 29-01-99 Faktuur 3278
+     101.00 Bank                               480.00
+          130.00 Debiteuren                              480.00
+
+#022 30-01-99 Faktuur 3283
+     130.00 Debiteuren                        1222.00
+          195.00 Nog te fakturen omzet                  1040.00
+          181.00 Af te dragen BTW                        182.00
+
+#023 01-02-99 Prive opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#024 01-02-99 Faktuur 3284
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw.17,5%            9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#025 02-02-99 Faktuur 3285
+     130.00 Debiteuren                        3736.50
+          840.60 Opbrengst Advies/ontw.17,5%            3180.00
+          181.00 Af te dragen BTW                        556.50
+
+#026 02-02-99 Faktuur 3286
+     130.00 Debiteuren                        4512.00
+          840.60 Opbrengst Advies/ontw.17,5%            3840.00
+          181.00 Af te dragen BTW                        672.00
+
+#027 03-02-99 Faktuur 3287
+     130.00 Debiteuren                        1069.25
+          840.60 Opbrengst Advies/ontw.17,5%             910.00
+          181.00 Af te dragen BTW                        159.25
+
+#028 03-02-99 UUNET faktuur 9905210
+     140.00 Crediteuren                        160.98
+          101.00 Bank                                    160.98
+
+#029 08-02-99 Faktuur 3280
+     101.00 Bank                              5005.50
+          130.00 Debiteuren                             5005.50
+
+#030 08-02-99 Faktuur 3279 + creditnota 3282
+     101.00 Bank                               423.00
+          130.00 Debiteuren                              423.00
+
+#031 08-02-99 Faktuur 3281
+     101.00 Bank                              5640.00
+          130.00 Debiteuren                             5640.00
+
+#032 08-02-99 UUNET faktuur 9911883
+     431.10 Datacommunicatiekosten              96.00
+     180.00 Te vorderen BTW                     16.80
+          140.00 Crediteuren                             112.80
+
+#033 11-02-99 Prive opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#034 18-02-99 Eetcafe "De Brijhapper"
+     452.00 Reis en verblijfkosten             150.00
+          041.00 Prive AJB                               150.00
+
+
+#035 19-02-99 Faktuur 3277
+     101.00 Bank                             16920.00
+          130.00 Debiteuren                            16920.00
+
+#036 19-02-99 K.v.K faktuur 23063965
+     422.00 Abonnementen/documentatie          202.06
+          140.00 Crediteuren                             202.06
+
+#037 23-02-99 Grand Cafe Berlage
+     452.00 Reis en verblijfkosten              96.00
+          041.00 Prive AJB                                96.00
+
+#038 26-02-99 Energiekosten 1998
+     192.00 Nog te betalen kosten              914.00
+          101.00 Bank                                    914.00
+
+#039 01-03-99 Faktuur 3283
+     101.00 Bank                              1222.00
+          130.00 Debiteuren                             1222.00
+
+#040 01-03-99 Prive opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#041 04-03-99 Faktuur 3287
+     101.00 Bank                              1069.25
+          130.00 Debiteuren                             1069.25
+
+#042 04-03-99 Faktuur 3286
+     101.00 Bank                              4512.00
+          130.00 Debiteuren                             4512.00
+
+#043 05-03-99 Faktuur 3285
+     101.00 Bank                              3736.50
+          130.00 Debiteuren                             3736.50
+
+#044 05-03-99 Faktuur 3288
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw.17,5%            9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#045 05-03-99 Faktuur 3289
+     130.00 Debiteuren                        1600.00
+          840.61 Opbrengst Advies/ontw. 0%              1600.00
+
+#046 08-03-99 Faktuur 3290
+     130.00 Debiteuren                        4512.00
+          840.60 Opbrengst Advies/ontw.17,5%            3840.00
+          181.00 Af te dragen BTW                        672.00
+
+#047 08-03-99 UUNET faktuur 992090
+     431.10 Datacommunicatie kosten             88.00
+     180.00 Te vorderen BTW                     15.40
+          140.00 Crediteuren                             103.40
+
+#048 08-03-99 UUNET faktuur 9911883
+     140.00 Crediteuren                        112.80
+          101.00 Bank                                    112.80
+
+#049 10-03-99 KPN kenm. 8111396611001808
+     431.00 Faxkosten                           33.12
+     431.10 Datacommunicatiekosten             184.34
+     180.00 Te vorderen BTW                     38.06
+          140.00 Crediteuren                             255.52
+
+#050 10-03-99 Faktuur 3291
+     130.00 Debiteuren                        3666.00
+          840.60 Opbrengst Advies/ontw.17,5%            3120.00
+          181.00 Af te dragen BTW                        546.00
+
+#051 11-03-99 Prive opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#052 13-03-99 Ristorante Pizzeria Pavarotti
+     452.00 Reis en verblijfkosten              58.30
+          041.10 Prive MK                                 58.30
+
+#053 17-03-99 Faktuur 3292
+     130.00 Debiteuren                        2444.00
+          840.60 Opbrengst Advies/ontw.17,5%            2080.00
+          181.00 Af te dragen BTW                        364.00
+
+#054 18-03-99 K.v.K. kenm. 1009923063965000
+     140.00 Crediteuren                        202.06
+          101.00 Bank                                    202.06
+
+#055 19-03-99 Faktuur 3284
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#056 24-03-99 Priveopname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#057 26-03-99 KPN kenm. 8111396611001808
+     140.00 Crediteuren                        255.52
+          101.00 Bank                                    255.52
+
+#058 31-03-99 Prive opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#059 31-03-99 Kilometervergoeding 1e kw. 1999
+     452.00 Reis en verblijfkosten            6483.84
+     180.10 Te vorderen BTW kilometers         884.16
+          041.00 Prive AJB                              7212.00
+          041.10 Prive MK                                156.00
+
+#060 31-03-99 Berekende afschrijvingen
+     012.00 Afschr. inventaris kantoor          80.32
+          002.00 Inventaris kantoor                       80.32
+
+#061 31-03-99 Berekende afschrijvingen
+     012.04 Afschr. inventaris werkplaats        5.13
+          002.04 Inventaris werkplaats                     5.13
+
+#062 31-03-99 Berekende afschrijvingen
+     012.10 Afschrijving computers            1150.86
+          002.10 Computers                              1150.86
+
+#063 31-03-99 Berekende afschrijvingen
+     012.20 Afschrijving apparatuur            453.45
+          002.20 Apparatuur                              453.45
+
+#064 31-03-99 Berekende afschrijvingen
+     012.40 Afschrijving literatuur            127.65
+          002.40 Literatuur                              127.65
+
+#065 01-04-99 Faktuur 3293
+     130.00 Debiteuren                       14100.00
+          840.60 Opbrengst Advies/ontw.17,5%           12000.00
+          181.00 Af te dragen BTW                       2100.00
+
+#066 01-04-99 Faktuur 3294
+     130.00 Debiteuren                        1440.00
+          840.61 Opbrengst Advies/ontw. 0%              1440.00
+
+#067 01-04-99 Faktuur 3295
+     130.00 Debiteuren                        3384.00
+          840.60 Opbrengst Advies/ontw.17,5%            2880.00
+          181.00 Af te dragen BTW                        504.00
+
+#068 01-04-99 Faktuur 3296
+     130.00 Debiteuren                        3877.50
+          840.60 Opbrengst Advies/ontw.17,5%            3300.00
+          181.00 Af te dragen BTW                        577.50
+
+#069 01-04-99 Creditrente 01-01 t/m. 31-03
+     101.00 Bank                               391.14
+          110.00 Ontvangen intrest                       391.14
+
+#070 01-04-99 Kosten 01-01 t/m. 31-03
+     433.00 Bankkosten                          15.90
+          101.00 Bank                                     15.90
+
+#071 05-04-99 Gouden Gids 6011260996999201
+     450.00 Reklamekosten                      135.40
+     180.00 Te vorderen BTW                     23.70
+          140.00 Crediteuren                             159.10
+
+#072 05-04-99 UUNET faktuur 992090
+     140.00 Crediteuren                        103.40
+          101.00 Bank                                    103.40
+
+#073 07-04-99 Trefpunt Access faktuur 099676199
+     422.00 Abonnementen/documentatie          295.70
+     180.00 Te vorderen BTW                     51.75
+          140.00 Crediteuren                             347.45
+
+#074 08-04-99 UUNET faktuur 9928961
+     431.10 Datacommunicatiekosten              90.00
+     180.00 Te vorderen BTW                     15.75
+          140.00 Crediteuren                             105.75
+
+#075 09-04-99 Faktuur 3290
+     101.00 Bank                              4512.00
+          130.00 Debiteuren                             4512.00
+
+#076 10-04-99 Postzegels
+     432.00 Portikosten                         24.00
+          100.00 Kas                                      24.00
+
+#077 12-04-99 Faktuur 3291
+     101.00 Bank                              3666.00
+          130.00 Debiteuren                             3666.00
+
+#078 13-04-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#079 15-04-99 Faktuur 3289
+     101.00 Bank                              1600.00
+          130.00 Debiteuren                             1600.00
+
+#080 16-04-99 Faktuur 3297
+     130.00 Debiteuren                        3666.00
+          840.60 Opbrengst Advies/ontw.17,5%            3120.00
+          181.00 Af te dragen BTW                        546.00
+
+#081 17-04-99 Kasopname
+     100.00 Kas                                250.00
+          101.00 Bank                                    250.00
+
+#082 17-04-99 Display bonnr. 010111354
+     460.00 Diverse kosten                      10.30
+     180.00 Te vorderen BTW                      1.80
+          100.00 Kas                                      12.10
+
+#083 19-04-99 Faktuur 3292
+     101.00 Bank                              2444.00
+          130.00 Debiteuren                             2444.00
+
+#084 21-04-99 Grieks restaurant Athene
+     452.00 Reis en verblijfkosten             163.00
+          041.00 Prive AJB                               163.00
+
+#085 23-04-99 Trefpunt Access 099676199
+     140.00 Crediteuren                        347.45
+          101.00 Bank                                    347.45
+
+#086 24-04-99 Eetcafe JAMAS
+     452.00 Reis en verblijfkosten             184.25
+          041.10 Prive MK                                184.25
+
+#087 27-04-99 NHA kenm. 5013465401548856
+     453.00 Studiekosten                         7.90
+          101.00 Bank                                      7.90
+
+#088 27-04-99 Gouden Gids 6011260996999201
+     140.00 Crediteuren                        159.10
+          101.00 Bank                                    159.10
+
+#089 27-04-99 BTW 1e kw.99 ken.8805063261901210
+     181.00 Af te dragen BTW                 10680.25
+          180.00 Te vorderen BTW                         135.24
+          180.10 Te vorderen BTW kilometers              884.16
+          189.00 Verrekende BTW                            0.85
+          101.00 Bank                                   9660.00
+
+#090 27-04-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#091 29-04-99 Prive-opname Am. dollars
+     041.00 Prive AJB                          265.20
+     041.10 Prive MK                           265.20
+          101.00 Bank                                    530.40
+
+#092 03-05-99 Faktuur 3295
+     101.00 Bank                              3384.00
+          130.00 Debiteuren                             3384.00
+
+#093 03-05-99 Faktuur 3296
+     101.00 Bank                              3877.50
+          130.00 Debiteuren                             3877.50
+
+#094 03-05-99 Prive-opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#095 03-05-99 Faktuur 3288
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#096 06-05-99 UUNET faktuur 9928961
+     140.00 Crediteuren                        105.75
+          101.00 Bank                                    105.75
+
+#097 07-05-99 UUNET faktuur 9939545
+     431.10 Datacommunicatiekosten              88.00
+     180.00 Te vorderen BTW                     15.40
+          140.00 Crediteuren                             103.40
+
+#098 11-05-99 KPN kenm. 6111396611001809
+     431.00 Faxkosten                           27.31
+     431.10 Datacommunicatiekosten             166.94
+     180.00 Te vorderen BTW                     33.99
+          140.00 Crediteuren                             228.24
+
+#099 11-05-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#100 11-05-99 Faktuur 3298
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw. 17,5%           9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#101 12-05-99 Faktuur 3299
+     130.00 Debiteuren                         480.00
+          840.61 Opbrengst Advies/ontw. 0%               480.00
+
+#102 12-05-99 Faktuur 3300
+     130.00 Debiteuren                        3384.00
+          840.60 Opbrengst Advies/ontw. 17,5%           2880.00
+          181.00 Af te dragen BTW                        504.00
+
+#103 12-05-99 Faktuur 3301
+     130.00 Debiteuren                        2444.00
+          840.60 Opbrengst Advies/ontw. 17,5%           2080.00
+          181.00 Af te dragen BTW                        364.00
+
+#104 13-05-99 KPN/Telecom kenm.8002906249990513
+     450.00 Reklamekosten                      135.00
+     180.00 Te vorderen BTW                     23.63
+          140.00 Crediteuren                             158.63
+
+#105 13-05-99 Faktuur 3294
+     101.00 Bank                              1440.00
+          130.00 Debiteuren                             1440.00
+
+#106 18-05-99 Faktuur 3297
+     101.00 Bank                              3666.00
+          130.00 Debiteuren                             3666.00
+
+#107 18-05-99 WEKA faktuur 2649785
+     422.00 Abonnementen/documentatie          205.25
+     180.00 Te vorderen BTW                     12.32
+          140.00 Crediteuren                             217.57
+
+#108 19-05-99 Faktuur 3302
+     130.00 Debiteuren                        3807.00
+          840.60 Opbrengst Advies/ontw.17,5%            3240.00
+          181.00 Af te dragen BTW                        567.00
+
+#109 26-05-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#110 28-05-99 Faktuur 3293
+     101.00 Bank                             14100.00
+          130.00 Debiteuren                            14100.00
+
+#111 28-05-99 NHA kenm. 0013465401573362
+     453.00 Studiekosten                         7.90
+          140.00 Crediteuren                               7.90
+
+#112 31-05-99 KPN/Telecom kenm.8002906249990513
+     140.00 Crediteuren                        158.63
+          101.00 Bank                                    158.63
+
+#113 01-06-99 Prive-opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#114 01-06-99 Faktuur 3303
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw. 17,5%           9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#115 01-06-99 Faktuur 3304
+     130.00 Debiteuren                         480.00
+          840.61 Opbrengst Advies/ontw. 0%               480.00
+
+#116 01-06-99 Faktuur 3305
+     130.00 Debiteuren                        3384.00
+          840.60 Opbrengst Advies/ontw. 17,5%           2880.00
+          181.00 Af te dragen BTW                        504.00
+
+#117 02-06-99 NHA kenm. 0013465401573362
+     140.00 Crediteuren                          7.90
+          101.00 Bank                                      7.90
+
+#118 02-06-99 KPN kenm. 6111396611001809
+     140.00 Crediteuren                        228.24
+          101.00 Bank                                    228.24
+
+#119 02-06-99 Trefpunt kenmerk 43123
+     450.00 Reklamekosten                      201.00
+     180.00 Te vorderen BTW                     35.18
+          140.00 Crediteuren                             236.18
+
+#120 03-06-99 Faktuur 3306
+     130.00 Debiteuren                        2608.50
+          840.60 Opbrengst Advies/ontw. 17,5%           2220.00
+          181.00 Af te dragen BTW                        388.50
+
+#121 03-06-99 WEKA kenm. 2026497850411702
+     140.00 Crediteuren                        217.57
+          101.00 Bank                                    217.57
+
+#122 03-06-99 UUNET faktuur 9939545
+     140.00 Crediteuren                        103.40
+          101.00 Bank                                    103.40
+
+#123 08-06-99 UUNET faktuur 9948902
+     431.10 Datacommunicatiekosten             100.80
+     180.00 Te vorderen BTW                     17.64
+          140.00 Crediteuren                             118.44
+
+#124 09-06-99 Faktuur 3307
+     130.00 Debiteuren                        2444.00
+          840.60 Opbrengst Advies/ontw. 17,5%           2080.00
+          181.00 Af te dragen BTW                        364.00
+
+#125 09-06-99 Faktuur 3299
+     101.00 Bank                               480.00
+          130.00 Debiteuren                              480.00
+
+#126 10-06-99 Pizzeria Il Mago
+     452.00 Reis en verblijfkosten              58.25
+          041.10 Prive MK                                 58.25
+
+#127 11-06-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#128 14-06-99 Faktuur 3301
+     101.00 Bank                              2444.00
+          130.00 Debiteuren                             2444.00
+
+#129 14-06-99 Faktuur 3300
+     101.00 Bank                              3384.00
+          130.00 Debiteuren                             3384.00
+
+#130 14-06-99 Rabofacet Trefpunt kenm. 43123
+     140.00 Crediteuren                        236.18
+          101.00 Bank                                    236.18
+
+#131 18-06-99 Prive-opname
+     041.00 Prive AJB                          425.00
+     041.10 Prive MK                           425.00
+          101.00 Bank                                    850.00
+
+#132 21-06-99 Faktuur 3302
+     101.00 Bank                              3807.00
+          130.00 Debiteuren                             3807.00
+
+#133 22-06-99 Faktuur 3304
+     101.00 Bank                               480.00
+          130.00 Debiteuren                              480.00
+
+#134 25-06-99 Prive-opname
+     041.00 Prive AJB                          698.90
+     041.10 Prive MK                           698.90
+          101.00 Bank                                   1397.80
+
+#135 28-06-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#136 30-06-99 WEKA faktuur 2677801
+     422.00 Abonnementen/documentatie          126.95
+     180.00 Te vorderen BTW                      7.62
+          140.00 Crediteuren                             134.57
+
+#137 30-06-99 Kilometervergoeding 2e kw. 1999
+     452.00 Reis en verblijfkosten            5301.12
+     180.10 Te vorderen BTW kilometers         722.88
+          041.00 Prive AJB                              5982.00
+          041.10 Prive MK                                 42.00
+
+#138 30-06-99 Berekende afschrijvingen
+     012.00 Afschr. inventaris kantoor          80.32
+          002.00 Inventaris kantoor                       80.32
+
+#139 30-06-99 Berekende afschrijvingen
+     012.04 Afschr. inventaris werkplaat         4.79
+          002.04 Inventaris werkplaats                     4.79
+
+#140 30-06-99 Berekende afschrijvingen
+     012.10 Afschrijving computers            1102.30
+          002.10 Computers                              1102.30
+
+#141 30-06-99 Berekende afschrijvingen
+     012.20 Afschrijving apparatuur            453.45
+          002.20 Apparatuur                              453.45
+
+#142 30-06-99 Berekende afschrijvingen
+     012.40 Afschrijving literatuur            117.10
+          002.40 Literatuur                              117.10
+
+#143 30-06-99 Correctie berekende afschr.
+     012.00 Afschr. inventaris kantoor           0.03
+     012.04 Afschr. inventaris werkplaats        0.03
+     012.10 Afschr. computers                    0.02
+     002.40 Literatuur                           0.01
+          002.00 Inventaris kantoor                        0.03
+          002.04 Inventaris werkplaats                     0.03
+          002.10 Computers                                 0.02
+          012.40 Afschr. literatuur                        0.01
+
+#144 01-07-99 Prive opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#145 01-07-99 Creditrente 01-04 t/m. 30-06
+     101.00 Bank                               363.62
+          110.00 Ontvangen interest                      363.62
+
+#146 01-07-99 Kosten 01-04 t/m. 30-06
+     433.00 Bankkosten                          17.90
+          101.00 Bank                                     17.90
+
+#147 01-07-99 Faktuur 3308
+     130.00 Debiteuren                       14100.00
+          840.60 Opbrengst Advies/ontw. 17,5%          12000.00
+          181.00 Af te dragen BTW                       2100.00
+
+#148 01-07-99 Faktuur 3309
+     130.00 Debiteuren                         160.00
+          840.61 Opbrengst Advies/onw. 0%                160.00
+
+#149 01-07-99 Faktuur 3310
+     130.00 Debiteuren                        2291.25
+          840.60 Opbrengst Advies/ontw. 17,5%           1950.00
+          181,00 Af te dragen BTW                        341.25
+
+#150 02-07-99 Faktuur 3298
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#151 02-07-99 Faktuur 3311
+     130.00 Debiteuren                        4935.00
+          840.60 Opbrengst Advies/ontw. 17,5%           4200.00
+          181.00 Af te dragen BTW                        735.00
+
+#152 03-07-99 Postzegels
+     432.00 Portikosten                         24.00
+          100.00 Kas                                      24.00
+
+#153 05-07-99 Faktuur 3305
+     101.00 Bank                              3384.00
+          130.00 Debiteuren                             3384.00
+
+#154 06-07-99 Faktuur 3306
+     101.00 Bank                              2608.50
+          130.00 Debiteuren                             2608.50
+
+#155 07-07-99 UUNET faktuur 9948902
+     140.00 Crediteuren                        118.44
+          101.00 Bank                                    118.44
+
+#156 08-07-99 UUNET faktuur 9958513
+     431.10 Datacommunicatiekosten             100.80
+     180.00 Te vorderen BTW                     17.64
+          140.00 Crediteuren                             118.44
+
+#157 12-07-99 KPN kenm. 9111396611001810
+     431.00 Faxkosten                           43.30
+     431.10 Datacommunicatiekosten             214.91
+     180.00 Te vorderen BTW                     45.19
+          140.00 Crediteuren                             303.40
+
+#158 12-07-99 Faktuur 3307
+     101.00 Bank                              2444.00
+          130.00 Debiteuren                             2444.00
+
+#159 13-07-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#160 13-07-99 Prive-opname AJB
+     041.00 Prive AJB                          500.00
+          101.00 Bank                                    500.00
+
+#161 13-07-99 Prive-opname MK
+     041.10 Prive MK                           500.00
+          101.00 Bank                                    500.00
+
+#162 16-07-99 Faktuur 3312
+     130.00 Debiteuren                        4512.00
+          840.60 Opbrengst Advies/ontw. 17,5%           3840.00
+          181.00 Af te dragen BTW                        672.00
+
+#163 16-07-99 Faktuur 3303
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#164 19-07-99 Weka faktuur 2677801
+     140.00 Crediteuren                        134.57
+          101.00 Bank                                    134.57
+
+#165 20-07-99 Prive-opname AJB + MK
+     041.00 Prive AJB                          325.00
+     041.10 Prive MK                           325.00
+          101.00 Bank                                    650.00
+
+#166 22-07-99 Multivlaai
+     452.00 Reis en verblijfkosten             107.68
+     180.00 Te vorderen BTW                      0.52
+          041.00 Prive AJB                               108.20
+
+#167 27-07-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#168 29-07-99 KPN kenm. 9111396611001810
+     140.00 Crediteuren                        303.40
+          101.00 Bank                                    303.40
+
+#169 29-07-99 BTW 2e kw.99 ken.7805063261901240
+     181.00 Af te dragen BTW                  9779.00
+          180.00 Te vorderen BTW                         238.78
+          180.10 Te vorderen BTW kilometers              722.88
+          189.00 Verrekende BTW                            0.34
+          101.00 Bank                                   8817.00
+
+#170 02-08-99 Prive-opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#171 02-08-99 Faktuur 3313
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw.17,5%            9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#172 04-08-99 Faktuur 3310
+     101.00 Bank                              2291.25
+          130.00 Debiteuren                             2291.25
+
+#173 05-08-99 UUNET faktuur 9969443
+     431.10 Datacommunicatiekosten              97.60
+     180.00 Te vorderen BTW                     17.08
+          140.00 Crediteuren                             114.68
+
+#174 06-08-99 Faktuur 3314
+     130.00 Debiteuren                        2444.00
+          840.60 Opbrengst Advies/ontw.17,5%            2080.00
+          181.00 Af te dragen BTW                        364.00
+
+#175 06-08-99 Faktuur 3311
+     101.00 Bank                              4935.00
+          130.00 Debiteuren                             4935.00
+
+#176 06-08-99 UUNET faktuur 9958513
+     140.00 Crediteuren                        118.44
+          101.00 Bank                                    118.44
+
+#177 10-08-99 Faktuur 3315
+     130.00 Debiteuren                        3384.00
+          840.60 Opbrengst Advies/ontw.17,5%            2880.00
+          181.00 Af te dragen BTW                        504.00
+
+#178 11-08-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#179 13-08-99 Faktuur 3316
+     130.00 Debiteuren                        2679.00
+          840.60 Opbrengst Advies/ontw.17,5%            2280.00
+          181.00 Af te dragen BTW                        399.00
+
+#180 14-08-99 Restaurant Goudreinet
+     452.00 Reis en verblijfkosten             176.75
+          041.00 Prive AJB                               176.75
+
+#181 17-08-99 Restaurant St. Joris
+     452.00 Reis en verblijfkosten             191.50
+          041.00 Prive AJB                               191.50
+
+#182 18-08-99 Faktuur 3312
+     101.00 Bank                              4512.00
+          130.00 Debiteuren                             4512.00
+
+#183 20-08-99 Faktuur 3309
+     101.00 Bank                               160.00
+          130.00 Debiteuren                              160.00
+
+#184 20-08-99 Faktuur 3308
+     101.00 Bank                             14100.00
+          130.00 Debiteuren                            14100.00
+
+#185 20-08-99 D-Reizen
+     041.00 Prive AJB                          950.27
+     041.10 Prive MK                           950.28
+          101.00 Bank                                   1900.55
+
+#186 25-08-99 Prive-opname AJB
+     041.00 Prive AJB                         1000.00
+          101.00 Bank                                   1000.00
+
+#187 25-08-99 Prive-opname MK
+     041.00 Prive MK                          1000.00
+          101.00 Bank                                   1000.00
+
+#188 26-08-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+
+#189 26-08-99 Mijnders Meubelen
+     041.00 Prive AJB                          265.00
+     041.10 Prive MK                           265.00
+          101.00 Bank                                    530.00
+
+#190 31-08-99 Prive-opname MK
+     041.00 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#191 31-08-99 Teruggaaf BTW 805063262B017500
+     101.00 Bank                              2920.00
+          188.00 Te verrekenen BTW                      2802.24
+          910.00 Diverse baten en lasten                 117.76
+
+#192 31-08-99 WEKA faktuur 2711442
+     422.00 Abonnementen/documentatie          126.95
+     180.00 Te vorderen BTW                      7.62
+          140.00 Crediteuren                             134.57
+
+#193 01-09-99 Faktuur 3317
+     130.00 Debiteuren                       11280.00
+          840.60 Opbrengst Advies/ontw.17,5%            9600.00
+          181.00 Af te dragen BTW                       1680.00
+
+#194 01-09-99 Faktuur 3318
+     130.00 Debiteuren                        4512.00
+          840.60 Opbrengst Advies/ontw.17,5%            3840.00
+          181.00 Af te dragen BTW                        672.00
+
+#195 01-09-99 Faktuur 3319
+     130.00 Debiteuren                        3807.00
+          840.60 Opbrengst Advies/ontw.17,5%            3240.00
+          181.00 Af te dragen BTW                        567.00
+
+#196 01-09-99 Visser & Remmersw. fakt. 9908019
+     192.00 Nog te betalen bedragen           1000.00
+     423.00 Accountantskosten                  691.50
+     180.00 Te vorderen BTW                    296.01
+          140.00 Crediteuren                            1987.51
+
+#197 02-09-99 ART & FLOWERS
+     460.00 Diverse kosten                     149.53
+     180.00 Te vorderen BTW                      8.97
+          100.00 Kas                                     158.50
+
+#198 03-09-99 UUNET faktuur 9969443
+     140.00 Crediteuren                        114.68
+          101.00 Bank                                    114.68
+
+#199 06-09-99 Prive-opname AJB
+     041.00 Prive AJB                         1000.00
+          101.00 Bank                                   1000.00
+
+#200 06-09-99 Prive-opname MK
+     041.10 Prive MK                          1000.00
+          101.00 Bank                                   1000.00
+
+#201 08-09-99 Faktuur 3314
+     101.00 Bank                              2444.00
+          130.00 Debiteuren                             2444.00
+
+#202 08-09-99 UUNET faktuur 9979648
+     431.10 Datacommunicatiekosten              97.60
+     180.00 Te vorderen BTW                     17.08
+          140.00 Crediteuren                             114.68
+
+#203 10-09-99 KPN kenm. 111396611001811
+     431.00 Faxkosten                           37.30
+     431.10 Datacommunicatiekosten             196.88
+     180.00 Te vorderen BTW                     40.98
+          140.00 Crediteuren                             275.16
+
+#204 13-09-99 Faktuur 3315
+     101.00 Bank                              3384.00
+          130.00 Debiteuren                             3384.00
+
+#205 13-09-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#206 16-09-99 Faktuur 3316
+     101.00 Bank                              2679.00
+          130.00 Bank                                   2679.00
+
+#207 16-09-99 WEKA kenm. 3027114420411702
+     140.00 Crediteuren                        134.57
+          101.00 Bank                                    134.57
+
+#208 20-09-99 Grieks restaurant Olympiada
+     452.00 Reis en verblijfkosten             205.00
+          041.00 Prive AJB                               205.00
+
+#209 21-09-99 Postzegels
+     432.00 Portikosten                         24.00
+          100.00 Kas                                      24.00
+
+#210 24-09-99 Faktuur 3313
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#211 28-09-99 Priveopname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
+#212 30-09-99 Visser & Remmersw. fakt.9908019
+     140.00 Crediteuren                       1987.51
+          101.00 Bank                                   1987.51
+
+#213 30-09-99 KPN kenm. 7111396611001811
+     140.00 Crediteuren                        275.16
+          101.00 Bank                                    275.16
+
+#214 30-09-99 Kilometervergoeding 3e kw. 1999
+     452.00 Reis en verblijfkosten            4691.28
+     180.10 Te vorderen BTW kilometers         639.72
+          040.00 Prive AJB                              5265.00
+          040.10 Prive MK                                 66.00
+
+#215 30-09-99 Berekende afschrijvingen
+     012.00 Afschr. inventaris kantoor          80.32
+          002.00 Inventaris kantoor                       80.32
+
+#216 30-09-99 Berekende afschrijvingen
+     012.10 Afschrijving computers             814.56
+          002.10 Computers                               814.56
+
+#217 30-09-99 Berekende afschrijvingen
+     012.20 Afschrijving apparatuur            453.45
+          002.20 Apparatuur                              453.45
+
+#218 30-09-99 Berekende afschrijvingen
+     012.40 Afschrijving literatuur            109.45
+          002.40 Literatuur                              109.45
+
+#219 01-10-99 Prive-opname MK
+     041.10 Prive MK                          1800.00
+          101.00 Bank                                   1800.00
+
+#220 01-10-99 Creditrente 01-07 t/m. 30-09
+     101.00 Bank                               399.15
+          110.00 Ontvangen interest                      399.15
+
+#221 01-10-99 Kosten 01-07 t/m. 30-09
+     433.00 Bankkosten                          19.00
+          101.00 Bank                                     19.00
+
+#222 01-10-99 Faktuur 3320
+     130.00 Debiteuren                       14100.00
+          840.60 Opbrengst Advies/ontw.17,5%           12000.00
+          181.00 Af te dragen BTW                       2100.00
+
+#223 01-10-99 Faktuur 3321
+     130.00 Debiteuren                         640.00
+          840.61 Opbrengst Advies/ontw. 0%               640.00
+
+#224 04-10-99 Dinkum faktuur 99.006
+     420.00 Kantoorbenodigdheden               245.00
+     180.00 Te vorderen BTW                     42.88
+          140.00 Crediteuren                             287.88
+
+#225 04-10-99 Faktuur 3318
+     101.00 Bank                              4512.00
+          130.00 Debiteuren                             4512.00
+
+#226 04-10-99 Faktuur 3319
+     101.00 Bank                              3807.00
+          130.00 Debiteuren                             3807.00
+
+#227 05-10-99 Faktuur 3322
+     130.00 Debiteuren                        2397.00
+          840.60 Opbrengst advies/ontw.17,5%            2040.00
+          181.00 Af te dragen BTW                        357.00
+
+#228 07-10-99 UUNET faktuur 9979648
+     140.00 Crediteuren                        114.68
+          101.00 Bank                                    114.68
+
+#229 08-10-99 Dinkum faktuur 99.006
+     140.00 Crediteuren                        287.88
+          101.00 Bank                                    287.88
+
+#230 08-10-99 Prive-opname MK
+     041.10 Prive MK                           500.00
+          101.00 Bank                                    500.00
+
+#231 08-10-99 UUNET faktuur 9990080
+     431.10 Datacommunicatiekosten              97.60
+     180.00 Te vorderen BTW                     17.08
+          140.00 Crediteuren                             114.68
+
+#232 12-10-99 Prive-opname AJB
+     041.00 Prive AJB                         2300.00
+          101.00 Bank                                   2300.00
+
+#233 12-10-99 Dunnet faktuur 56005
+     270.00 Investeringen                     4256.00
+     180.00 Te vorderen BTW                    744.80
+          101.00 Bank                                   5000.80
+
+#234 12-10-99 Dunnet faktuur 56005
+     002.10 Computers                         4256.00
+          270.00 Investeringen                          4256.00
+
+#235 15-10-99 Faktuur 3317
+     101.00 Bank                             11280.00
+          130.00 Debiteuren                            11280.00
+
+#236 16-10-99 Boekhandel de meent
+     422.00 Abonnementen/documentatie          158.49
+     180.00 Te vorderen BTW                      9.51
+          101.00 Bank                                    168.00
+
+#237 19-10-99 Faktuur 332
+     101.00 Bank                               640.00
+          130.00 Debiteuren                              640.00
+
+#238 21-10-99 Prive-opname MK belasting 1999
+     041.10 Prive MK                          3060.00
+          101.00 Bank                                   3060.00
+
+#239 25-10-99 NLUUG faktuur 1999.1104.0148
+     190.00 Vooruitbetaalde bedragen           200.00
+          101.00 Bank                                    200.00
+
+#240 28-10-99 BTW 3e kw.99 ken.6805063261901270
+     181.00 Af te dragen BTW                  9714.25
+          180.00 Te vorderen BTW                         451.09
+          180.10 Te vorderen BTW kilometers              639.72
+          189.00 Verrekende BTW                            0.44
+          101.00 Bank                                   8623.00
+
+#241 28-10-99 Prive-opname AJB belasting 1999
+     041.00 Prive AJB                         2850.00
+          101.00 Bank                                   2850.00
+
diff --git a/makefile b/makefile
new file mode 100644 (file)
index 0000000..b2d911e
--- /dev/null
+++ b/makefile
@@ -0,0 +1,31 @@
+
+OBJS = account_main.o account.o postscript.o
+SRCS = account_main.cpp account.cpp postscript.cpp
+
+LIBS = -lAXE -L/usr/X11R6/lib -lX11 -lps
+
+all      : account bank
+
+account  : $(OBJS)
+       g++ $(OBJS) -o account $(LIBS)
+
+bank     : bank.o
+       g++ bank.o -o bank $(LIBS)
+
+account_main.o : account.h
+
+account.o : account.h postscript.h
+
+install  : account bank
+       cp account bank /usr/local/bin
+       cp balans.xsl profit.xsl saldibalans.xsl /usr/local/xslt
+
+clean    :
+       rm -f account core
+       rm -f bank bank.o
+       rm -f $(OBJS)
+       rm -f saldi.xml saldibalans.ps grootboek.ps
+
+depend:
+       makedepend -I/usr/local/include $(SRCS)
+# DO NOT DELETE
diff --git a/postscript.cpp b/postscript.cpp
new file mode 100644 (file)
index 0000000..1226b32
--- /dev/null
@@ -0,0 +1,5 @@
+
+#include "postscript.h"
+
+bool postscript_started = false;
+
diff --git a/postscript.h b/postscript.h
new file mode 100644 (file)
index 0000000..10c619e
--- /dev/null
@@ -0,0 +1,94 @@
+
+#include <iostream>
+#include <libps/pslib.h>
+
+// A Postscript document as used in pslib
+
+extern bool postscript_started;
+
+class PostScript
+{
+   PSDoc *psdoc;
+   int   psfont;
+   int   page;
+
+public:
+
+   PostScript(const char * filename)
+   {
+      if (!postscript_started)
+      {
+         PS_boot();
+         postscript_started = true;
+      }
+      psdoc = PS_new();
+      PS_open_file(psdoc, filename);
+      //PS_set_info(psdoc, "BoundingBox", "0 0 842 596");
+      PS_set_parameter(psdoc, "SearchPath", "/usr/lib/openoffice/basis3.1/share/psprint/fontmetric");
+      PS_set_parameter(psdoc, "SearchPath", "/usr/lib/openoffice/basis3.2/share/psprint/fontmetric");
+      psfont = PS_findfont(psdoc, "Courier", NULL, 0);
+      page = 0;
+   }
+
+   ~PostScript()
+   {
+      if (page != 0)
+      {
+         PS_end_page(psdoc);
+      }
+      PS_close(psdoc);
+      PS_delete(psdoc);
+   }
+
+   void NewPage(float page_width, float page_height)
+   {
+      if (page != 0)
+      {
+         PS_end_page(psdoc);
+      }
+      if (page_width > page_height)
+      {
+         PS_begin_page(psdoc, page_height, page_width);
+         //  Rotate for landscape.
+
+         PS_translate(psdoc, 600, 0);
+         PS_rotate(psdoc, 90);
+      }
+      else
+      {
+         PS_begin_page(psdoc, page_width, page_height);
+      }
+      page++;
+      PS_setfont(psdoc, psfont, 10.0);
+   }
+
+   void FontSize(float size)
+   {
+      PS_setfont(psdoc, psfont, size);
+   }
+
+   void LineAttributes(float width, float dash_on, float dash_off)
+   {
+      PS_setlinewidth(psdoc, width);
+      PS_setdash(psdoc, dash_on, dash_off);
+   }
+
+   void Line(float x1, float y1, float x2, float y2)
+   {
+      PS_moveto(psdoc, x1, y1);
+      PS_lineto(psdoc, x2, y2);
+      PS_stroke(psdoc);
+   }
+
+   void Rectangle(float x, float y, float width, float height)
+   {
+      PS_setcolor(psdoc, "fill", "rgb", 0.8, 1.0, 0.8, 0.0);
+      PS_rect(psdoc, x, y, width, height);
+      PS_fill(psdoc);
+   }
+
+   void Text(float x, float y, const char * text)
+   {
+      PS_show_xy(psdoc, text, x, y);
+   }
+};
diff --git a/profit.xsl b/profit.xsl
new file mode 100644 (file)
index 0000000..fae6ac0
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+            doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
+            doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
+
+<xsl:template match="balance-sheet">
+<html>
+  <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
+<head>
+  <link rel="stylesheet" type="text/css" href="account.css"/>
+  <title>Winst en Verlies rekening</title>
+</head>
+<body>
+   <h1>Winst en Verlies rekening</h1>
+
+   <h2>Opbrengsten</h2>
+   <table>
+   <xsl:for-each select="account[type='COST' and balance='CREDIT']">
+      <tr><xsl:apply-templates/></tr>
+   </xsl:for-each>
+   <tr>
+   <td><b>TOTAAL</b></td>
+   <td><b><xsl:value-of select="sum(account[type='COST' and balance='CREDIT']/amount)"/></b></td>
+   </tr>
+   </table>
+
+   <h2>Kosten</h2>
+   <table>
+   <xsl:for-each select="account[type='COST' and balance='DEBIT']">
+      <tr><xsl:apply-templates/></tr>
+   </xsl:for-each>
+   <tr>
+   <td><b>TOTAAL</b></td>
+   <td><b><xsl:value-of select="sum(account[type='COST' and balance='DEBIT']/amount)"/></b></td>
+   </tr>
+   </table>
+
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="number"/>
+<xsl:template match="type"/>
+<xsl:template match="balance"/>
+
+<xsl:template match="name">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="amount">
+  <td align='right'><xsl:apply-templates/></td>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/saldibalans.xsl b/saldibalans.xsl
new file mode 100644 (file)
index 0000000..aca4c23
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+            doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
+            doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
+
+<xsl:template match="balance-sheet">
+<html>
+  <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
+<head>
+</head>
+<body>
+   <h1>Saldi Balans</h1>
+
+
+   <table border='1'>
+   <tr><th>Rekening</th><th colspan='2'>Kosten</th><th colspan='2'>Balans</th></tr>
+   <tr><th> </th><th>DEBET</th><th>CREDIT</th><th>DEBET</th><th>CREDIT</th></tr>
+      <xsl:apply-templates/>
+   <tr>
+   <td><b>TOTAAL</b></td>
+   <td align='right'><b><xsl:value-of select="sum(account[type='COST' and balance='DEBIT']/amount)"/></b></td>
+   <td align='right'><b><xsl:value-of select="sum(account[type='COST' and balance='CREDIT']/amount)"/></b></td>
+   <td align='right'><b><xsl:value-of select="sum(account[type='BALANCE' and balance='DEBIT']/amount)"/></b></td>
+   <td align='right'><b><xsl:value-of select="sum(account[type='BALANCE' and balance='CREDIT']/amount)"/></b></td>
+   </tr>
+   </table>
+
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="account[type='COST' and balance='DEBIT']">
+  <tr>
+    <xsl:apply-templates select="name"/>
+    <xsl:apply-templates select='amount'/>
+    <td> </td>
+    <td> </td>
+    <td> </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="account[type='COST' and balance='CREDIT']">
+  <tr>
+    <xsl:apply-templates select="name"/>
+    <td> </td>
+    <xsl:apply-templates select='amount'/>
+    <td> </td>
+    <td> </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="account[type='BALANCE' and balance='DEBIT']">
+  <tr>
+    <xsl:apply-templates select="name"/>
+    <td> </td>
+    <td> </td>
+    <xsl:apply-templates select='amount'/>
+    <td> </td>
+  </tr>
+</xsl:template>
+
+<xsl:template match="account[type='BALANCE' and balance='CREDIT']">
+  <tr>
+    <xsl:apply-templates select="name"/>
+    <td> </td>
+    <td> </td>
+    <td> </td>
+    <xsl:apply-templates select='amount'/>
+  </tr>
+</xsl:template>
+
+
+<xsl:template match="number"/>
+<xsl:template match="type"/>
+<xsl:template match="balance"/>
+
+<xsl:template match="name">
+  <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="amount">
+  <td align='right'><xsl:apply-templates/></td>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/total.xsl b/total.xsl
new file mode 100644 (file)
index 0000000..8e5ecbe
--- /dev/null
+++ b/total.xsl
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:strip-space elements="doc chapter section"/>
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+            doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
+            doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
+
+<xsl:template match="balance-sheet">
+<html>
+  <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
+<head>
+</head>
+<body>
+   <xsl:for-each select="account[type='COST' and balance='CREDIT']/amount">
+      <xsl:apply-templates/><br/>
+   </xsl:for-each>
+<br/>
+<hr/>
+   <xsl:value-of select="sum(account[type='COST' and balance='CREDIT']/amount)"/>
+</body>
+</html>
+</xsl:template>
+
+</xsl:stylesheet>