--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Administration module
+# Chart of Accounts
+# template routines
+# preferences
+#
+#======================================================================
+
+package AM;
+
+sub get_account {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ $form->{id} = "NULL" unless ($form->{id});
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT c.accno, c.description, c.charttype, c.gifi_accno,
+ c.category, c.link, c.taxkey_id, c.pos_ustva, c.pos_bwa, c.pos_bilanz,c.pos_eur
+ FROM chart c
+ WHERE c.id = $form->{id}|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ foreach my $key (keys %$ref) {
+ $form->{"$key"} = $ref->{"$key"};
+ }
+
+ $sth->finish;
+
+ # get default accounts
+ $query = qq|SELECT inventory_accno_id, income_accno_id, expense_accno_id
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %ref;
+
+ $sth->finish;
+
+ # get taxkeys and description
+ $query = qq|SELECT taxkey, taxdescription
+ FROM tax|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAXKEY} }, $ref;
+ }
+
+ $sth->finish;
+
+ # check if we have any transactions
+ $query = qq|SELECT a.trans_id FROM acc_trans a
+ WHERE a.chart_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_account {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off AutoCommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ # sanity check, can't have AR with AR_...
+ if ($form->{AR} || $form->{AP} || $form->{IC}) {
+ map { delete $form->{$_} }
+ qw(AR_amount AR_tax AR_paid AP_amount AP_tax AP_paid IC_sale IC_cogs IC_taxpart IC_income IC_expense IC_taxservice CT_tax);
+ }
+
+ $form->{link} = "";
+ foreach my $item ($form->{AR}, $form->{AR_amount},
+ $form->{AR_tax}, $form->{AR_paid},
+ $form->{AP}, $form->{AP_amount},
+ $form->{AP_tax}, $form->{AP_paid},
+ $form->{IC}, $form->{IC_sale},
+ $form->{IC_cogs}, $form->{IC_taxpart},
+ $form->{IC_income}, $form->{IC_expense},
+ $form->{IC_taxservice}, $form->{CT_tax}
+ ) {
+ $form->{link} .= "${item}:" if ($item);
+ }
+ chop $form->{link};
+
+ # if we have an id then replace the old record
+ $form->{description} =~ s/\'/\'\'/g;
+
+ # strip blanks from accno
+ map { $form->{$_} =~ s/ //g; } qw(accno);
+
+ my ($query, $sth);
+
+ if ($form->{id} eq "NULL") {
+ $form->{id} = "";
+ }
+
+ map({ $form->{$_} = "NULL" unless ($form->{$_}); }
+ qw(pos_ustva pos_bwa pos_bilanz pos_eur));
+
+ if ($form->{id}) {
+ $query = qq|UPDATE chart SET
+ accno = '$form->{accno}',
+ description = '$form->{description}',
+ charttype = '$form->{charttype}',
+ gifi_accno = '$form->{gifi_accno}',
+ category = '$form->{category}',
+ link = '$form->{link}',
+ taxkey_id = $form->{taxkey_id},
+ pos_ustva = $form->{pos_ustva},
+ pos_bwa = $form->{pos_bwa},
+ pos_bilanz = $form->{pos_bilanz},
+ pos_eur = $form->{pos_eur}
+ WHERE id = $form->{id}|;
+ } else {
+
+ $query = qq|INSERT INTO chart
+ (accno, description, charttype, gifi_accno, category, link, taxkey_id, pos_ustva, pos_bwa, pos_bilanz,pos_eur)
+ VALUES ('$form->{accno}', '$form->{description}',
+ '$form->{charttype}', '$form->{gifi_accno}',
+ '$form->{category}', '$form->{link}', $form->{taxkey_id}, $form->{pos_ustva}, $form->{pos_bwa}, $form->{pos_bilanz}, $form->{pos_eur})|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{IC_taxpart} || $form->{IC_taxservice} || $form->{CT_tax}) {
+
+ my $chart_id = $form->{id};
+
+ unless ($form->{id}) {
+
+ # get id from chart
+ $query = qq|SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$form->{accno}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($chart_id) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ # add account if it doesn't exist in tax
+ $query = qq|SELECT t.chart_id
+ FROM tax t
+ WHERE t.chart_id = $chart_id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($tax_id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ # add tax if it doesn't exist
+ unless ($tax_id) {
+ $query = qq|INSERT INTO tax (chart_id, rate)
+ VALUES ($chart_id, 0)|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ } else {
+
+ # remove tax
+ if ($form->{id}) {
+ $query = qq|DELETE FROM tax
+ WHERE chart_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # commit
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub delete_account {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off AutoCommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|SELECT count(*) FROM acc_trans a
+ WHERE a.chart_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ if ($sth->fetchrow_array) {
+ $sth->finish;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+ return;
+ }
+ $sth->finish;
+
+ # delete chart of account record
+ $query = qq|DELETE FROM chart
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # set inventory_accno_id, income_accno_id, expense_accno_id to defaults
+ $query = qq|UPDATE parts
+ SET inventory_accno_id =
+ (SELECT inventory_accno_id FROM defaults)
+ WHERE inventory_accno_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|UPDATE parts
+ SET income_accno_id =
+ (SELECT income_accno_id FROM defaults)
+ WHERE income_accno_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|UPDATE parts
+ SET expense_accno_id =
+ (SELECT expense_accno_id FROM defaults)
+ WHERE expense_accno_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ foreach my $table (qw(partstax customertax vendortax tax)) {
+ $query = qq|DELETE FROM $table
+ WHERE chart_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # commit and redirect
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub gifi_accounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT accno, description
+ FROM gifi
+ ORDER BY accno|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ALL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_gifi {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT g.accno, g.description
+ FROM gifi g
+ WHERE g.accno = '$form->{accno}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ # check for transactions
+ $query = qq|SELECT count(*) FROM acc_trans a, chart c, gifi g
+ WHERE c.gifi_accno = g.accno
+ AND a.chart_id = c.id
+ AND g.accno = '$form->{accno}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $sth->finish;
+ $form->{orphaned} = !$form->{orphaned};
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_gifi {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{description} =~ s/\'/\'\'/g;
+
+ # id is the old account number!
+ if ($form->{id}) {
+ $query = qq|UPDATE gifi SET
+ accno = '$form->{accno}',
+ description = '$form->{description}'
+ WHERE accno = '$form->{id}'|;
+ } else {
+ $query = qq|INSERT INTO gifi
+ (accno, description)
+ VALUES ('$form->{accno}', '$form->{description}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_gifi {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # id is the old account number!
+ $query = qq|DELETE FROM gifi
+ WHERE accno = '$form->{id}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub warehouses {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT id, description
+ FROM warehouse
+ ORDER BY 2|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ALL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_warehouse {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT w.description
+ FROM warehouse w
+ WHERE w.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ # see if it is in use
+ $query = qq|SELECT count(*) FROM inventory i
+ WHERE i.warehouse_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_warehouse {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{description} =~ s/\'/\'\'/g;
+
+ if ($form->{id}) {
+ $query = qq|UPDATE warehouse SET
+ description = '$form->{description}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO warehouse
+ (description)
+ VALUES ('$form->{description}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_warehouse {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM warehouse
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub departments {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT d.id, d.description, d.role
+ FROM department d
+ ORDER BY 2|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ALL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_department {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT d.description, d.role
+ FROM department d
+ WHERE d.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ # see if it is in use
+ $query = qq|SELECT count(*) FROM dpt_trans d
+ WHERE d.department_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_department {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{description} =~ s/\'/\'\'/g;
+
+ if ($form->{id}) {
+ $query = qq|UPDATE department SET
+ description = '$form->{description}',
+ role = '$form->{role}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO department
+ (description, role)
+ VALUES ('$form->{description}', '$form->{role}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_department {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM department
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub business {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT id, description, discount, customernumberinit, salesman
+ FROM business
+ ORDER BY 2|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ALL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_business {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query =
+ qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman
+ FROM business b
+ WHERE b.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_business {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{description} =~ s/\'/\'\'/g;
+ $form->{discount} /= 100;
+ $form->{salesman} *= 1;
+
+ # id is the old record
+ if ($form->{id}) {
+ $query = qq|UPDATE business SET
+ description = '$form->{description}',
+ discount = $form->{discount},
+ customernumberinit = '$form->{customernumberinit}',
+ salesman = '$form->{salesman}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO business
+ (description, discount, customernumberinit, salesman)
+ VALUES ('$form->{description}', $form->{discount}, '$form->{customernumberinit}', '$form->{salesman}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_business {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM business
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub sic {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT code, sictype, description
+ FROM sic
+ ORDER BY code|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ALL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_sic {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT s.code, s.sictype, s.description
+ FROM sic s
+ WHERE s.code = '$form->{code}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_sic {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{code} =~ s/\'/\'\'/g;
+ $form->{description} =~ s/\'/\'\'/g;
+
+ # if there is an id
+ if ($form->{id}) {
+ $query = qq|UPDATE sic SET
+ code = '$form->{code}',
+ sictype = '$form->{sictype}',
+ description = '$form->{description}'
+ WHERE code = '$form->{id}'|;
+ } else {
+ $query = qq|INSERT INTO sic
+ (code, sictype, description)
+ VALUES ('$form->{code}', '$form->{sictype}', '$form->{description}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_sic {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM sic
+ WHERE code = '$form->{code}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub load_template {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ open(TEMPLATE, "$form->{file}") or $form->error("$form->{file} : $!");
+
+ while (<TEMPLATE>) {
+ $form->{body} .= $_;
+ }
+
+ close(TEMPLATE);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_template {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ open(TEMPLATE, ">$form->{file}") or $form->error("$form->{file} : $!");
+
+ # strip
+ $form->{body} =~ s/\r\n/\n/g;
+ print TEMPLATE $form->{body};
+
+ close(TEMPLATE);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_preferences {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $memberfile, $userspath, $webdav) = @_;
+
+ map { ($form->{$_}) = split /--/, $form->{$_} }
+ qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
+
+ my @a;
+ $form->{curr} =~ s/ //g;
+ map { push(@a, uc pack "A3", $_) if $_ } split /:/, $form->{curr};
+ $form->{curr} = join ':', @a;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ # these defaults are database wide
+ # user specific variables are in myconfig
+ # save defaults
+ my $query = qq|UPDATE defaults SET
+ inventory_accno_id =
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{inventory_accno}'),
+ income_accno_id =
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{income_accno}'),
+ expense_accno_id =
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{expense_accno}'),
+ fxgain_accno_id =
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{fxgain_accno}'),
+ fxloss_accno_id =
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{fxloss_accno}'),
+ invnumber = '$form->{invnumber}',
+ sonumber = '$form->{sonumber}',
+ ponumber = '$form->{ponumber}',
+ sqnumber = '$form->{sqnumber}',
+ rfqnumber = '$form->{rfqnumber}',
+ customernumber = '$form->{customernumber}',
+ vendornumber = '$form->{vendornumber}',
+ articlenumber = '$form->{articlenumber}',
+ servicenumber = '$form->{servicenumber}',
+ yearend = '$form->{yearend}',
+ curr = '$form->{curr}',
+ weightunit = '$form->{weightunit}',
+ businessnumber = '$form->{businessnumber}'
+ |;
+ $dbh->do($query) || $form->dberror($query);
+
+ # update name
+ my $name = $form->{name};
+ $name =~ s/\'/\'\'/g;
+ $query = qq|UPDATE employee
+ SET name = '$name'
+ WHERE login = '$form->{login}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ foreach my $item (split / /, $form->{taxaccounts}) {
+ $query = qq|UPDATE tax
+ SET rate = | . ($form->{$item} / 100) . qq|,
+ taxnumber = '$form->{"taxnumber_$item"}'
+ WHERE chart_id = $item|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ # save first currency in myconfig
+ $form->{currency} = substr($form->{curr}, 0, 3);
+
+ my $myconfig = new User "$memberfile", "$form->{login}";
+
+ foreach my $item (keys %$form) {
+ $myconfig->{$item} = $form->{$item};
+ }
+
+ $myconfig->save_member($memberfile, $userspath);
+
+ if ($webdav) {
+ @webdavdirs =
+ qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen);
+ foreach $directory (@webdavdirs) {
+ $file = "webdav/" . $directory . "/webdav-user";
+ if ($myconfig->{$directory}) {
+ open(HTACCESS, "$file") or die "cannot open webdav-user $!\n";
+ while (<HTACCESS>) {
+ ($login, $password) = split(/:/, $_);
+ if ($login ne $form->{login}) {
+ $newfile .= $_;
+ }
+ }
+ close(HTACCESS);
+ open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n";
+ $newfile .= $myconfig->{login} . ":" . $myconfig->{password} . "\n";
+ print(HTACCESS $newfile);
+ close(HTACCESS);
+ } else {
+ $form->{$directory} = 0;
+ open(HTACCESS, "$file") or die "cannot open webdav-user $!\n";
+ while (<HTACCESS>) {
+ ($login, $password) = split(/:/, $_);
+ if ($login ne $form->{login}) {
+ $newfile .= $_;
+ }
+ }
+ close(HTACCESS);
+ open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n";
+ print(HTACCESS $newfile);
+ close(HTACCESS);
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub defaultaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get defaults from defaults table
+ my $query = qq|SELECT * FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $form->{defaults} = $sth->fetchrow_hashref(NAME_lc);
+ $form->{defaults}{IC} = $form->{defaults}{inventory_accno_id};
+ $form->{defaults}{IC_income} = $form->{defaults}{income_accno_id};
+ $form->{defaults}{IC_expense} = $form->{defaults}{expense_accno_id};
+ $form->{defaults}{FX_gain} = $form->{defaults}{fxgain_accno_id};
+ $form->{defaults}{FX_loss} = $form->{defaults}{fxloss_accno_id};
+
+ $sth->finish;
+
+ $query = qq|SELECT c.id, c.accno, c.description, c.link
+ FROM chart c
+ WHERE c.link LIKE '%IC%'
+ ORDER BY c.accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ foreach my $key (split(/:/, $ref->{link})) {
+ if ($key =~ /IC/) {
+ $nkey = $key;
+ if ($key =~ /cogs/) {
+ $nkey = "IC_expense";
+ }
+ if ($key =~ /sale/) {
+ $nkey = "IC_income";
+ }
+ %{ $form->{IC}{$nkey}{ $ref->{accno} } } = (
+ id => $ref->{id},
+ description => $ref->{description}
+ );
+ }
+ }
+ }
+ $sth->finish;
+
+ $query = qq|SELECT c.id, c.accno, c.description
+ FROM chart c
+ WHERE c.category = 'I'
+ AND c.charttype = 'A'
+ ORDER BY c.accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ %{ $form->{IC}{FX_gain}{ $ref->{accno} } } = (
+ id => $ref->{id},
+ description => $ref->{description}
+ );
+ }
+ $sth->finish;
+
+ $query = qq|SELECT c.id, c.accno, c.description
+ FROM chart c
+ WHERE c.category = 'E'
+ AND c.charttype = 'A'
+ ORDER BY c.accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ %{ $form->{IC}{FX_loss}{ $ref->{accno} } } = (
+ id => $ref->{id},
+ description => $ref->{description}
+ );
+ }
+ $sth->finish;
+
+ # now get the tax rates and numbers
+ $query = qq|SELECT c.id, c.accno, c.description,
+ t.rate * 100 AS rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id = t.chart_id|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{taxrates}{ $ref->{accno} }{id} = $ref->{id};
+ $form->{taxrates}{ $ref->{accno} }{description} = $ref->{description};
+ $form->{taxrates}{ $ref->{accno} }{taxnumber} = $ref->{taxnumber}
+ if $ref->{taxnumber};
+ $form->{taxrates}{ $ref->{accno} }{rate} = $ref->{rate} if $ref->{rate};
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub backup {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $userspath) = @_;
+
+ my $mail;
+ my $err;
+ my $boundary = time;
+ my $tmpfile =
+ "$userspath/$boundary.$myconfig->{dbname}-$form->{dbversion}.sql";
+ my $out = $form->{OUT};
+ $form->{OUT} = ">$tmpfile";
+
+ if ($form->{media} eq 'email') {
+
+ use SL::Mailer;
+ $mail = new Mailer;
+
+ $mail->{to} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
+ $mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
+ $mail->{subject} =
+ "Lx-Office Backup / $myconfig->{dbname}-$form->{dbversion}.sql";
+ @{ $mail->{attachments} } = ($tmpfile);
+ $mail->{version} = $form->{version};
+ $mail->{fileid} = "$boundary.";
+
+ $myconfig->{signature} =~ s/\\n/\r\n/g;
+ $mail->{message} = "--\n$myconfig->{signature}";
+
+ }
+
+ open(OUT, "$form->{OUT}") or $form->error("$form->{OUT} : $!");
+
+ # get sequences, functions and triggers
+ open(FH, "sql/lx-office.sql") or $form->error("sql/lx-office.sql : $!");
+
+ my @sequences = ();
+ my @functions = ();
+ my @triggers = ();
+ my @indices = ();
+ my %tablespecs;
+
+ my $query = "";
+ my @quote_chars;
+
+ while (<FH>) {
+
+ # Remove DOS and Unix style line endings.
+ s/[\r\n]//g;
+
+ # ignore comments or empty lines
+ next if /^(--.*|\s+)$/;
+
+ for (my $i = 0; $i < length($_); $i++) {
+ my $char = substr($_, $i, 1);
+
+ # Are we inside a string?
+ if (@quote_chars) {
+ if ($char eq $quote_chars[-1]) {
+ pop(@quote_chars);
+ }
+ $query .= $char;
+
+ } else {
+ if (($char eq "'") || ($char eq "\"")) {
+ push(@quote_chars, $char);
+
+ } elsif ($char eq ";") {
+
+ # Query is complete. Check for triggers and functions.
+ if ($query =~ /^create\s+function\s+\"?(\w+)\"?/i) {
+ push(@functions, $query);
+
+ } elsif ($query =~ /^create\s+trigger\s+\"?(\w+)\"?/i) {
+ push(@triggers, $query);
+
+ } elsif ($query =~ /^create\s+sequence\s+\"?(\w+)\"?/i) {
+ push(@sequences, $1);
+
+ } elsif ($query =~ /^create\s+table\s+\"?(\w+)\"?/i) {
+ $tablespecs{$1} = $query;
+
+ } elsif ($query =~ /^create\s+index\s+\"?(\w+)\"?/i) {
+ push(@indices, $query);
+
+ }
+
+ $query = "";
+ $char = "";
+ }
+
+ $query .= $char;
+ }
+ }
+ }
+ close(FH);
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get all the tables
+ my @tables = $dbh->tables('', '', 'customer', '', { noprefix => 0 });
+
+ my $today = scalar localtime;
+
+ $myconfig->{dbhost} = 'localhost' unless $myconfig->{dbhost};
+
+ print OUT qq|-- Lx-Office Backup
+-- Dataset: $myconfig->{dbname}
+-- Version: $form->{dbversion}
+-- Host: $myconfig->{dbhost}
+-- Login: $form->{login}
+-- User: $myconfig->{name}
+-- Date: $today
+--
+-- set options
+$myconfig->{dboptions};
+--
+|;
+
+ print OUT "-- DROP Sequences\n";
+ my $item;
+ foreach $item (@sequences) {
+ print OUT qq|DROP SEQUENCE $item;\n|;
+ }
+
+ print OUT "-- DROP Triggers\n";
+
+ foreach $item (@triggers) {
+ if ($item =~ /^create\s+trigger\s+\"?(\w+)\"?\s+.*on\s+\"?(\w+)\"?\s+/i) {
+ print OUT qq|DROP TRIGGER "$1" ON "$2";\n|;
+ }
+ }
+
+ print OUT "-- DROP Functions\n";
+
+ foreach $item (@functions) {
+ if ($item =~ /^create\s+function\s+\"?(\w+)\"?/i) {
+ print OUT qq|DROP FUNCTION "$1" ();\n|;
+ }
+ }
+
+ foreach $table (@tables) {
+ if (!($table =~ /^sql_.*/)) {
+ my $query = qq|SELECT * FROM $table|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $query = "INSERT INTO $table (";
+ map { $query .= qq|$sth->{NAME}->[$_],| }
+ (0 .. $sth->{NUM_OF_FIELDS} - 1);
+ chop $query;
+
+ $query .= ") VALUES";
+
+ if ($tablespecs{$table}) {
+ print(OUT "--\n");
+ print(OUT "DROP TABLE $table;\n");
+ print(OUT $tablespecs{$table}, ";\n");
+ } else {
+ print(OUT "--\n");
+ print(OUT "DELETE FROM $table;\n");
+ }
+ while (my @arr = $sth->fetchrow_array) {
+
+ $fields = "(";
+ foreach my $item (@arr) {
+ if (defined $item) {
+ $item =~ s/\'/\'\'/g;
+ $fields .= qq|'$item',|;
+ } else {
+ $fields .= 'NULL,';
+ }
+ }
+
+ chop $fields;
+ $fields .= ")";
+
+ print OUT qq|$query $fields;\n|;
+ }
+
+ $sth->finish;
+ }
+ }
+
+ # create indices, sequences, functions and triggers
+
+ print(OUT "-- CREATE Indices\n");
+ map({ print(OUT "$_;\n"); } @indices);
+
+ print OUT "-- CREATE Sequences\n";
+ foreach $item (@sequences) {
+ $query = qq|SELECT last_value FROM $item|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my ($id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ print OUT qq|--
+CREATE SEQUENCE $item START $id;
+|;
+ }
+
+ print OUT "-- CREATE Functions\n";
+
+ # functions
+ map { print(OUT $_, ";\n"); } @functions;
+
+ print OUT "-- CREATE Triggers\n";
+
+ # triggers
+ map { print(OUT $_, ";\n"); } @triggers;
+
+ close(OUT);
+
+ $dbh->disconnect;
+
+ # compress backup
+ my @args = ("gzip", "$tmpfile");
+ system(@args) == 0 or $form->error("$args[0] : $?");
+
+ $tmpfile .= ".gz";
+
+ if ($form->{media} eq 'email') {
+ @{ $mail->{attachments} } = ($tmpfile);
+ $err = $mail->send($out);
+ }
+
+ if ($form->{media} eq 'file') {
+
+ open(IN, "$tmpfile") or $form->error("$tmpfile : $!");
+ open(OUT, ">-") or $form->error("STDOUT : $!");
+
+ print OUT qq|Content-Type: application/x-tar-gzip;
+Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}.sql.gz"
+
+|;
+
+ while (<IN>) {
+ print OUT $_;
+ }
+
+ close(IN);
+ close(OUT);
+
+ }
+
+ unlink "$tmpfile";
+
+ $main::lxdebug->leave_sub();
+}
+
+sub closedto {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT closedto, revtrans FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{closedto}, $form->{revtrans}) = $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub closebooks {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ if ($form->{revtrans}) {
+
+ $query = qq|UPDATE defaults SET closedto = NULL,
+ revtrans = '1'|;
+ } else {
+ if ($form->{closedto}) {
+
+ $query = qq|UPDATE defaults SET closedto = '$form->{closedto}',
+ revtrans = '0'|;
+ } else {
+
+ $query = qq|UPDATE defaults SET closedto = NULL,
+ revtrans = '0'|;
+ }
+ }
+
+ # set close in defaults
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Accounts Payables database backend routines
+#
+#======================================================================
+
+package AP;
+
+sub post_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($null, $taxrate, $amount);
+ my $exchangerate = 0;
+
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+ $form->{department_id} *= 1;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{exchangerate} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{transdate}, 'sell');
+
+ $form->{exchangerate} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{exchangerate});
+ }
+
+ # reverse and parse amounts
+ for my $i (1 .. 1) {
+ $form->{"amount_$i"} =
+ $form->round_amount(
+ $form->parse_amount($myconfig, $form->{"amount_$i"}) *
+ $form->{exchangerate} * -1,
+ 2);
+ $amount += ($form->{"amount_$i"} * -1);
+ }
+
+ # this is for ap
+ $form->{amount} = $amount;
+
+ # taxincluded doesn't make sense if there is no amount
+ $form->{taxincluded} = 0 if ($form->{amount} == 0);
+
+ $query =
+ qq| SELECT c.accno, t.rate FROM chart c, tax t where c.id=t.chart_id AND t.taxkey=$form->{taxkey}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{AP}{"tax"}, $form->{taxrate}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $formtax = $form->parse_amount($myconfig, $form->{"tax"});
+
+ $form->{"tax"} = $form->{amount} * $form->{taxrate};
+ $form->{"tax"} =
+ $form->round_amount($form->{"tax"} * $form->{exchangerate}, 2) * -1;
+
+ if ($form->{taxcheck}) {
+ $form->{"tax"} = $formtax * -1;
+ }
+
+ $form->{total_tax} += ($form->{"tax"} * -1);
+
+ # adjust paidaccounts if there is no date in the last row
+ $form->{paidaccounts}-- unless ($form->{"datepaid_$form->{paidaccounts}"});
+
+ $form->{invpaid} = 0;
+
+ # add payments
+ for my $i (1 .. $form->{paidaccounts}) {
+ $form->{"paid_$i"} =
+ $form->round_amount($form->parse_amount($myconfig, $form->{"paid_$i"}),
+ 2);
+
+ $form->{invpaid} += $form->{"paid_$i"};
+ $form->{datepaid} = $form->{"datepaid_$i"};
+
+ }
+
+ $form->{invpaid} =
+ $form->round_amount($form->{invpaid} * $form->{exchangerate}, 2);
+
+ if ($form->{taxincluded} *= 1) {
+ for $i (1 .. 1) {
+ $tax =
+ $form->{"amount_$i"} - ($form->{"amount_$i"} / ($form->{taxrate} + 1));
+ if ($form->{taxcheck}) {
+ $tax = $formtax * -1;
+ }
+ $amount = $form->{"amount_$i"} - $tax;
+ $form->{"amount_$i"} = $form->round_amount($amount, 2);
+ $diff += $amount - $form->{"amount_$i"};
+ $form->{tax} = $form->round_amount($tax, 2);
+ $form->{total_tax} = $form->{tax} * -1;
+ }
+ print(STDERR "Steuer $form->{tax}\n");
+ print(STDERR "TotalSteuer $form->{total_tax}\n");
+
+ # deduct taxes from amount
+ # $form->{amount} -= $form->{total_tax};
+ # deduct difference from amount_1
+ # $form->{amount_1} += $form->round_amount($diff, 2);
+ $form->{amount} = $form->{amount_1} * -1;
+ }
+
+ $form->{netamount} = $form->{amount};
+
+ # store invoice total, this goes into ap table
+ $form->{invtotal} = $form->{amount} + $form->{total_tax};
+
+ # amount for total AP
+ $form->{payables} = $form->{invtotal};
+
+ my ($query, $sth);
+
+ # if we have an id delete old records
+ if ($form->{id}) {
+
+ # delete detail records
+ $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
+
+ $dbh->do($query) || $form->dberror($query);
+
+ } else {
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO ap (invnumber, employee_id)
+ VALUES ('$uid', (SELECT e.id FROM employee e
+ WHERE e.login = '$form->{login}') )|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT a.id FROM ap a
+ WHERE a.invnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ }
+
+ $form->{invnumber} = $form->{id} unless $form->{invnumber};
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(invnumber ordnumber notes);
+
+ $form->{datepaid} = $form->{transdate} unless ($form->{datepaid});
+ my $datepaid = ($form->{invpaid} != 0) ? qq|'$form->{datepaid}'| : 'NULL';
+
+ $query = qq|UPDATE ap SET
+ invnumber = '$form->{invnumber}',
+ transdate = '$form->{transdate}',
+ ordnumber = '$form->{ordnumber}',
+ vendor_id = $form->{vendor_id},
+ taxincluded = '$form->{taxincluded}',
+ amount = $form->{invtotal},
+ duedate = '$form->{duedate}',
+ paid = $form->{invpaid},
+ datepaid = $datepaid,
+ netamount = $form->{netamount},
+ curr = '$form->{currency}',
+ notes = '$form->{notes}',
+ department_id = $form->{department_id}
+ WHERE id = $form->{id}
+ |;
+ $dbh->do($query) || $form->dberror($query);
+
+ # update exchangerate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate}, 0,
+ $form->{exchangerate});
+ }
+
+ # add individual transactions
+ foreach my $item (keys %{ $form->{AP} }) {
+ if ($form->{$item} != 0) {
+ $project_id = 'NULL';
+ if ($item =~ /amount_/) {
+ if ($form->{"project_id_$'"} && $form->{"projectnumber_$'"}) {
+ $project_id = $form->{"project_id_$'"};
+ }
+ }
+
+ # insert detail records in acc_trans
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ project_id, taxkey)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}{$item}'),
+ $form->{$item}, '$form->{transdate}', $project_id, '$form->{taxkey}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ }
+ }
+
+ # if there is no amount but a payment record a payable
+ if ($form->{amount} == 0 && $form->{invtotal} == 0) {
+ $form->{payables} = $form->{invpaid};
+ }
+
+ # add paid transactions
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"} != 0) {
+
+ $exchangerate = 0;
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{"datepaid_$i"}, 'sell');
+
+ $form->{"exchangerate_$i"} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{"exchangerate_$i"});
+ }
+ $form->{"AP_paid_$i"} =~ s/\"//g;
+
+ # get paid account
+
+ ($form->{AP}{"paid_$i"}) = split(/--/, $form->{"AP_paid_$i"});
+ $form->{"datepaid_$i"} = $form->{transdate}
+ unless ($form->{"datepaid_$i"});
+
+ # if there is no amount and invtotal is zero there is no exchangerate
+ if ($form->{amount} == 0 && $form->{invtotal} == 0) {
+ $form->{exchangerate} = $form->{"exchangerate_$i"};
+ }
+
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{exchangerate} * -1,
+ 2);
+ if ($form->{payables}) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}{payables}'),
+ $amount, '$form->{"datepaid_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ $form->{payables} = $amount;
+
+ $form->{"memo_$i"} =~ s/\'/\'\'/g;
+
+ # add payment
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, source, memo)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}{"paid_$i"}'),
+ $form->{"paid_$i"}, '$form->{"datepaid_$i"}',
+ '$form->{"source_$i"}', '$form->{"memo_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add exchange rate difference
+ $amount =
+ $form->round_amount(
+ $form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1),
+ 2);
+ if ($amount != 0) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, fx_transaction, cleared)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}{"paid_$i"}'),
+ $amount, '$form->{"datepaid_$i"}', '1', '0')|;
+
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # exchangerate gain/loss
+ $amount =
+ $form->round_amount(
+ $form->{"paid_$i"} *
+ ($form->{exchangerate} - $form->{"exchangerate_$i"}),
+ 2);
+
+ if ($amount != 0) {
+ $accno = ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno};
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, fx_transaction, cleared)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $amount, '$form->{"datepaid_$i"}', '1', '0')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # update exchange rate record
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency},
+ $form->{"datepaid_$i"},
+ 0, $form->{"exchangerate_$i"});
+ }
+ }
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub delete_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $spool) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM ap WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # commit and redirect
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub ap_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.duedate,
+ a.amount, a.paid, a.ordnumber, v.name, a.invoice,
+ a.netamount, a.datepaid, a.notes, e.name AS employee
+ FROM ap a
+ JOIN vendor v ON (a.vendor_id = v.id)
+ LEFT JOIN employee e ON (a.employee_id = e.id)|;
+
+ my $where = "1 = 1";
+
+ if ($form->{vendor_id}) {
+ $where .= " AND a.vendor_id = $form->{vendor_id}";
+ } else {
+ if ($form->{vendor}) {
+ my $vendor = $form->like(lc $form->{vendor});
+ $where .= " AND lower(v.name) LIKE '$vendor'";
+ }
+ }
+ if ($form->{department}) {
+ my ($null, $department_id) = split /--/, $form->{department};
+ $where .= " AND a.department_id = $department_id";
+ }
+ if ($form->{invnumber}) {
+ my $invnumber = $form->like(lc $form->{invnumber});
+ $where .= " AND lower(a.invnumber) LIKE '$invnumber'";
+ }
+ if ($form->{ordnumber}) {
+ my $ordnumber = $form->like(lc $form->{ordnumber});
+ $where .= " AND lower(a.ordnumber) LIKE '$ordnumber'";
+ }
+ if ($form->{notes}) {
+ my $notes = $form->like(lc $form->{notes});
+ $where .= " AND lower(a.notes) LIKE '$notes'";
+ }
+
+ $where .= " AND a.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $where .= " AND a.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+ if ($form->{open} || $form->{closed}) {
+ unless ($form->{open} && $form->{closed}) {
+ $where .= " AND a.amount <> a.paid" if ($form->{open});
+ $where .= " AND a.amount = a.paid" if ($form->{closed});
+ }
+ }
+
+ my @a = (transdate, invnumber, name);
+ push @a, "employee" if $self->{l_employee};
+ my $sortorder = join ', ', $form->sort_columns(@a);
+ $sortorder = $form->{sort} unless $sortorder;
+
+ $query .= "WHERE $where
+ ORDER by $sortorder";
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ap = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{AP} }, $ap;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Accounts Receivable module backend routines
+#
+#======================================================================
+
+package AR;
+
+sub post_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($null, $taxrate, $amount, $tax, $diff);
+ my $exchangerate = 0;
+ my $i;
+
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{exchangerate} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{transdate}, 'buy');
+ }
+
+ $form->{exchangerate} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{exchangerate});
+
+ for $i (1 .. 1) {
+
+ $form->{"amount_$i"} =
+ $form->round_amount($form->parse_amount($myconfig, $form->{"amount_$i"})
+ * $form->{exchangerate},
+ 2);
+
+ $form->{netamount} += $form->{"amount_$i"};
+ }
+
+ # this is for ar
+
+ $form->{amount} = $form->{netamount};
+
+ $form->{tax} = 0;
+
+ # taxincluded doesn't make sense if there is no amount
+
+ $form->{taxincluded} = 0 if ($form->{amount} == 0);
+
+ $query =
+ qq| SELECT c.accno, t.rate FROM chart c, tax t where c.id=t.chart_id AND t.taxkey=$form->{taxkey}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{AR}{tax}, $form->{taxrate}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $form->{tax} = $form->{amount_1} * $form->{taxrate};
+ $form->{tax} = $form->round_amount($form->{tax} * $form->{exchangerate}, 2);
+ $form->{total_tax} += $form->{tax};
+
+ # adjust paidaccounts if there is no date in the last row
+ $form->{paidaccounts}-- unless ($form->{"datepaid_$form->{paidaccounts}"});
+ $form->{paid} = 0;
+
+ # add payments
+ for $i (1 .. $form->{paidaccounts}) {
+ $form->{"paid_$i"} =
+ $form->round_amount($form->parse_amount($myconfig, $form->{"paid_$i"}),
+ 2);
+
+ $form->{paid} += $form->{"paid_$i"};
+ $form->{datepaid} = $form->{"datepaid_$i"};
+
+ }
+
+ if ($form->{taxincluded} *= 1) {
+ for $i (1 .. 1) {
+ $tax =
+ $form->{"amount_$i"} - ($form->{"amount_$i"} / ($form->{taxrate} + 1));
+ $amount = $form->{"amount_$i"} - $tax;
+ $form->{"amount_$i"} = $form->round_amount($amount, 2);
+ $diff += $amount - $form->{"amount_$i"};
+ $form->{tax} = $form->round_amount($tax, 2);
+ $form->{total_tax} = $form->{tax};
+ }
+
+ # deduct difference from amount_1
+ # $form->{amount_1} += $form->round_amount($diff, 2);
+ $form->{netamount} = $form->{amount_1};
+
+ }
+
+ $form->{amount} = $form->{netamount} + $form->{total_tax};
+ $form->{paid} =
+ $form->round_amount($form->{paid} * $form->{exchangerate}, 2);
+
+ my ($query, $sth, $null);
+
+ ($null, $form->{employee_id}) = split /--/, $form->{employee};
+ unless ($form->{employee_id}) {
+ $form->get_employee($dbh);
+ }
+
+ # if we have an id delete old records
+ if ($form->{id}) {
+
+ # delete detail records
+ $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ } else {
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO ar (invnumber, employee_id)
+ VALUES ('$uid', $form->{employee_id})|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT a.id FROM ar a
+ WHERE a.invnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ }
+
+ # update department
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+ $form->{department_id} *= 1;
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(invnumber ordnumber notes);
+
+ # record last payment date in ar table
+ $form->{datepaid} = $form->{transdate} unless $form->{datepaid};
+ my $datepaid = ($form->{paid} != 0) ? qq|'$form->{datepaid}'| : 'NULL';
+
+ $query = qq|UPDATE ar set
+ invnumber = '$form->{invnumber}',
+ ordnumber = '$form->{ordnumber}',
+ transdate = '$form->{transdate}',
+ customer_id = $form->{customer_id},
+ taxincluded = '$form->{taxincluded}',
+ amount = $form->{amount},
+ duedate = '$form->{duedate}',
+ paid = $form->{paid},
+ datepaid = $datepaid,
+ netamount = $form->{netamount},
+ curr = '$form->{currency}',
+ notes = '$form->{notes}',
+ department_id = $form->{department_id},
+ employee_id = $form->{employee_id}
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # amount for AR account
+ $form->{receivables} = $form->round_amount($form->{amount}, 2) * -1;
+
+ # update exchangerate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate},
+ $form->{exchangerate}, 0);
+ }
+
+ # add individual transactions for AR, amount and taxes
+ foreach my $item (keys %{ $form->{AR} }) {
+ if ($form->{$item} != 0) {
+ $project_id = 'NULL';
+ if ($item =~ /amount_/) {
+ if ($form->{"project_id_$'"} && $form->{"projectnumber_$'"}) {
+ $project_id = $form->{"project_id_$'"};
+ }
+ }
+
+ # insert detail records in acc_trans
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ project_id, taxkey)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}{$item}'),
+ $form->{$item}, '$form->{transdate}', $project_id, '$form->{taxkey}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # add paid transactions
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"} != 0) {
+
+ $form->{"AR_paid_$i"} =~ s/\"//g;
+ ($form->{AR}{"paid_$i"}) = split(/--/, $form->{"AR_paid_$i"});
+ $form->{"datepaid_$i"} = $form->{transdate}
+ unless ($form->{"datepaid_$i"});
+
+ $exchangerate = 0;
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{"datepaid_$i"}, 'buy');
+
+ $form->{"exchangerate_$i"} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{"exchangerate_$i"});
+ }
+
+ # if there is no amount and invtotal is zero there is no exchangerate
+ if ($form->{amount} == 0 && $form->{netamount} == 0) {
+ $form->{exchangerate} = $form->{"exchangerate_$i"};
+ }
+
+ # receivables amount
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{exchangerate}, 2);
+
+ if ($form->{receivables} != 0) {
+
+ # add receivable
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}{receivables}'),
+ $amount, '$form->{"datepaid_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ $form->{receivables} = $amount;
+
+ $form->{"memo_$i"} =~ s/\'/\'\'/g;
+
+ if ($form->{"paid_$i"} != 0) {
+
+ # add payment
+ $amount = $form->{"paid_$i"} * -1;
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, source, memo)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}{"paid_$i"}'),
+ $amount, '$form->{"datepaid_$i"}',
+ '$form->{"source_$i"}', '$form->{"memo_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # exchangerate difference for payment
+ $amount =
+ $form->round_amount(
+ $form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1) * -1,
+ 2);
+
+ if ($amount != 0) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, fx_transaction, cleared)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}{"paid_$i"}'),
+ $amount, '$form->{"datepaid_$i"}', '1', '0')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # exchangerate gain/loss
+ $amount =
+ $form->round_amount(
+ $form->{"paid_$i"} *
+ ($form->{exchangerate} - $form->{"exchangerate_$i"}) * -1,
+ 2);
+
+ if ($amount != 0) {
+ $accno =
+ ($amount > 0) ? $form->{fxgain_accno} : $form->{fxloss_accno};
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, fx_transaction, cleared)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $amount, '$form->{"datepaid_$i"}', '1', '0')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # update exchangerate record
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency},
+ $form->{"datepaid_$i"},
+ $form->{"exchangerate_$i"}, 0);
+ }
+ }
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub delete_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM ar WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # commit
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub ar_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT a.id, a.invnumber, a.ordnumber, a.transdate,
+ a.duedate, a.netamount, a.amount, a.paid, c.name,
+ a.invoice, a.datepaid, a.terms, a.notes, a.shipvia,
+ a.shippingpoint,
+ e.name AS employee
+ FROM ar a
+ JOIN customer c ON (a.customer_id = c.id)
+ LEFT JOIN employee e ON (a.employee_id = e.id)|;
+
+ my $where = "1 = 1";
+ if ($form->{customer_id}) {
+ $where .= " AND a.customer_id = $form->{customer_id}";
+ } else {
+ if ($form->{customer}) {
+ my $customer = $form->like(lc $form->{customer});
+ $where .= " AND lower(c.name) LIKE '$customer'";
+ }
+ }
+ if ($form->{department}) {
+ my ($null, $department_id) = split /--/, $form->{department};
+ $where .= " AND a.department_id = $department_id";
+ }
+ if ($form->{invnumber}) {
+ my $invnumber = $form->like(lc $form->{invnumber});
+ $where .= " AND lower(a.invnumber) LIKE '$invnumber'";
+ }
+ if ($form->{ordnumber}) {
+ my $ordnumber = $form->like(lc $form->{ordnumber});
+ $where .= " AND lower(a.ordnumber) LIKE '$ordnumber'";
+ }
+ if ($form->{notes}) {
+ my $notes = $form->like(lc $form->{notes});
+ $where .= " AND lower(a.notes) LIKE '$notes'";
+ }
+
+ $where .= " AND a.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $where .= " AND a.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+ if ($form->{open} || $form->{closed}) {
+ unless ($form->{open} && $form->{closed}) {
+ $where .= " AND a.amount <> a.paid" if ($form->{open});
+ $where .= " AND a.amount = a.paid" if ($form->{closed});
+ }
+ }
+
+ my @a = (transdate, invnumber, name);
+ push @a, "employee" if $form->{l_employee};
+ my $sortorder = join ', ', $form->sort_columns(@a);
+ $sortorder = $form->{sort} unless $sortorder;
+
+ $query .= "WHERE $where
+ ORDER by $sortorder";
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ar = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{AR} }, $ar;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Batch printing module backend routines
+#
+#======================================================================
+
+package BP;
+
+sub get_vc {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my %arap = (invoice => 'ar',
+ packing_list => 'ar',
+ sales_order => 'oe',
+ purchase_order => 'oe',
+ sales_quotation => 'oe',
+ request_quotation => 'oe',
+ check => 'ap',
+ receipt => 'ar');
+
+ $query = qq|SELECT count(*)
+ FROM (SELECT DISTINCT ON (vc.id) vc.id
+ FROM $form->{vc} vc, $arap{$form->{type}} a, status s
+ WHERE a.$form->{vc}_id = vc.id
+ AND s.trans_id = a.id
+ AND s.formname = '$form->{type}'
+ AND s.spoolfile IS NOT NULL) AS total|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my ($count) = $sth->fetchrow_array;
+ $sth->finish;
+
+ # build selection list
+ if ($count < $myconfig->{vclimit}) {
+ $query = qq|SELECT DISTINCT ON (vc.id) vc.id, vc.name
+ FROM $form->{vc} vc, $arap{$form->{type}} a, status s
+ WHERE a.$form->{vc}_id = vc.id
+ AND s.trans_id = a.id
+ AND s.formname = '$form->{type}'
+ AND s.spoolfile IS NOT NULL|;
+ }
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{"all_$form->{vc}"} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub payment_accounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT DISTINCT ON (s.chart_id) c.accno, c.description
+ FROM status s, chart c
+ WHERE s.chart_id = c.id
+ AND s.formname = '$form->{type}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{accounts} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_spoolfiles {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my ($query, $arap);
+ my $invnumber = "invnumber";
+
+ if ($form->{type} eq 'check' || $form->{type} eq 'receipt') {
+
+ $arap = ($form->{type} eq 'check') ? "ap" : "ar";
+ my ($accno) = split /--/, $form->{account};
+
+ $query = qq|SELECT a.id, s.spoolfile, vc.name, ac.transdate, a.invnumber,
+ a.invoice, '$arap' AS module
+ FROM status s, chart c, $form->{vc} vc, $arap a, acc_trans ac
+ WHERE s.formname = '$form->{type}'
+ AND s.chart_id = c.id
+ AND c.accno = '$accno'
+ AND s.trans_id = a.id
+ AND a.$form->{vc}_id = vc.id
+ AND ac.trans_id = s.trans_id
+ AND ac.chart_id = c.id
+ AND NOT ac.fx_transaction|;
+ } else {
+
+ $arap = "ar";
+ my $invoice = "a.invoice";
+
+ if ($form->{type} =~ /_(order|quotation)$/) {
+ $invnumber = "ordnumber";
+ $arap = "oe";
+ $invoice = '0';
+ }
+
+ $query = qq|SELECT a.id, a.$invnumber AS invnumber, a.ordnumber,
+ a.quonumber, a.transdate, $invoice AS invoice,
+ '$arap' AS module, vc.name, s.spoolfile
+ FROM $arap a, $form->{vc} vc, status s
+ WHERE s.trans_id = a.id
+ AND s.spoolfile IS NOT NULL
+ AND s.formname = '$form->{type}'
+ AND a.$form->{vc}_id = vc.id|;
+ }
+
+ if ($form->{"$form->{vc}_id"}) {
+ $query .= qq| AND a.$form->{vc}_id = $form->{"$form->{vc}_id"}|;
+ } else {
+ if ($form->{ $form->{vc} }) {
+ my $name = $form->like(lc $form->{ $form->{vc} });
+ $query .= " AND lower(vc.name) LIKE '$name'";
+ }
+ }
+ if ($form->{invnumber}) {
+ my $number = $form->like(lc $form->{invnumber});
+ $query .= " AND lower(a.invnumber) LIKE '$number'";
+ }
+ if ($form->{ordnumber}) {
+ my $ordnumber = $form->like(lc $form->{ordnumber});
+ $query .= " AND lower(a.ordnumber) LIKE '$ordnumber'";
+ }
+ if ($form->{quonumber}) {
+ my $quonumber = $form->like(lc $form->{quonumber});
+ $query .= " AND lower(a.quonumber) LIKE '$quonumber'";
+ }
+
+ # $query .= " AND a.transdate >= '$form->{transdatefrom}'" if $form->{transdatefrom};
+ # $query .= " AND a.transdate <= '$form->{transdateto}'" if $form->{transdateto};
+
+ my @a = (transdate, $invnumber, name);
+ my $sortorder = join ', ', $form->sort_columns(@a);
+ $sortorder = $form->{sort} unless $sortorder;
+
+ $query .= " ORDER by $sortorder";
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{SPOOL} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_spool {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $spool) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query;
+
+ if ($form->{type} =~ /(check|receipt)/) {
+ $query = qq|DELETE FROM status
+ WHERE spoolfile = ?|;
+ } else {
+ $query = qq|UPDATE status SET
+ spoolfile = NULL,
+ printed = '1'
+ WHERE spoolfile = ?|;
+ }
+ my $sth = $dbh->prepare($query) || $form->dberror($query);
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ if ($form->{"checked_$i"}) {
+ $sth->execute($form->{"spoolfile_$i"}) || $form->dberror($query);
+ $sth->finish;
+ }
+ }
+
+ # commit
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ if ($rc) {
+ foreach my $i (1 .. $form->{rowcount}) {
+ $_ = qq|$spool/$form->{"spoolfile_$i"}|;
+ if ($form->{"checked_$i"}) {
+ unlink;
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub print_spool {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $spool) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|UPDATE status SET
+ printed = '1'
+ WHERE formname = '$form->{type}'
+ AND spoolfile = ?|;
+ my $sth = $dbh->prepare($query) || $form->dberror($query);
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ if ($form->{"checked_$i"}) {
+ open(OUT, $form->{OUT}) or $form->error("$form->{OUT} : $!");
+
+ $spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
+
+ # send file to printer
+ open(IN, $spoolfile) or $form->error("$spoolfile : $!");
+
+ while (<IN>) {
+ print OUT $_;
+ }
+ close(IN);
+ close(OUT);
+
+ $sth->execute($form->{"spoolfile_$i"}) || $form->dberror($query);
+ $sth->finish;
+
+ }
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+# chart of accounts
+#
+# CHANGE LOG:
+# DS. 2000-07-04 Created
+#
+#======================================================================
+
+package CA;
+use Data::Dumper;
+
+sub all_accounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $amount = ();
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT c.accno,
+ SUM(a.amount) AS amount
+ FROM chart c, acc_trans a
+ WHERE c.id = a.chart_id
+ GROUP BY c.accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $amount{ $ref->{accno} } = $ref->{amount};
+ }
+ $sth->finish;
+
+ $query = qq|SELECT accno, description
+ FROM gifi|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $gifi = ();
+ while (my ($accno, $description) = $sth->fetchrow_array) {
+ $gifi{$accno} = $description;
+ }
+ $sth->finish;
+
+ $query = qq|SELECT c.id, c.accno, c.description, c.charttype, c.gifi_accno,
+ c.category, c.link
+ FROM chart c
+ ORDER BY accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ca = $sth->fetchrow_hashref(NAME_lc)) {
+ $ca->{amount} = $amount{ $ca->{accno} };
+ $ca->{gifi_description} = $gifi{ $ca->{gifi_accno} };
+ if ($ca->{amount} < 0) {
+ $ca->{debit} = $ca->{amount} * -1;
+ } else {
+ $ca->{credit} = $ca->{amount};
+ }
+ push @{ $form->{CA} }, $ca;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub all_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get chart_id
+ my $query = qq|SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{accno}'|;
+ if ($form->{accounttype} eq 'gifi') {
+ $query = qq|SELECT c.id FROM chart c
+ WHERE c.gifi_accno = '$form->{gifi_accno}'|;
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my @id = ();
+ while (my ($id) = $sth->fetchrow_array) {
+ push @id, $id;
+ }
+ $sth->finish;
+
+ my $fromdate_where;
+ my $todate_where;
+
+ my $where = '1 = 1';
+
+ # build WHERE clause from dates if any
+ # if ($form->{fromdate}) {
+ # $where .= " AND ac.transdate >= '$form->{fromdate}'";
+ # }
+ # if ($form->{todate}) {
+ # $where .= " AND ac.transdate <= '$form->{todate}'";
+ # }
+
+ if ($form->{fromdate}) {
+ $fromto = " AND ac.transdate >= '$form->{fromdate}'";
+ $subwhere .= " AND transdate >= '$form->{fromdate}'";
+ $glwhere = " AND ac.transdate >= '$form->{fromdate}'";
+ }
+
+ if ($form->{todate}) {
+ $fromto .= " AND ac.transdate <= '$form->{todate}'";
+ $subwhere .= " AND transdate <= '$form->{todate}'";
+ }
+
+ if ($form->{eur}) {
+ $AR_PAID = qq|AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )|;
+ $AP_PAID = qq|AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )|;
+ } else {
+ $where .= $fromto;
+ $AR_PAID = "";
+ $AP_PAID = "";
+ $glwhere = "";
+ }
+ my $sortorder = join ', ',
+ $form->sort_columns(qw(transdate reference description));
+ my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE: q|'0'|;
+
+ # Oracle workaround, use ordinal positions
+ my %ordinal = (transdate => 4,
+ reference => 2,
+ description => 3);
+ map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
+
+ my ($null, $department_id) = split /--/, $form->{department};
+ my $dpt_where;
+ my $dpt_join;
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN department t ON (t.trans_id = ac.trans_id)
+ |;
+ $dpt_where == qq|
+ AND t.department_id = $department_id
+ |;
+ }
+
+ my $project;
+ if ($form->{project_id}) {
+ $project = qq|
+ AND ac.project_id = $form->{project_id}
+ |;
+ }
+
+ if ($form->{accno} || $form->{gifi_accno}) {
+
+ # get category for account
+ $query = qq|SELECT c.category
+ FROM chart c
+ WHERE c.accno = '$form->{accno}'|;
+
+ if ($form->{accounttype} eq 'gifi') {
+ $query = qq|SELECT c.category
+ FROM chart c
+ WHERE c.gifi_accno = '$form->{gifi_accno}'
+ AND c.charttype = 'A'|;
+ }
+
+ $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+ ($form->{category}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ if ($form->{fromdate}) {
+
+ # get beginning balance
+ $query = qq|SELECT SUM(ac.amount)
+ FROM acc_trans ac
+ JOIN chart c ON (ac.chart_id = c.id)
+ $dpt_join
+ WHERE c.accno = '$form->{accno}'
+ AND ac.transdate < '$form->{fromdate}'
+ $dpt_where
+ $project
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION
+
+ SELECT SUM(ac.sellprice)
+ FROM invoice ac
+ JOIN ar a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.income_accno_id = c.id)
+ $dpt_join
+ WHERE c.accno = '$form->{accno}'
+ AND a.transdate < '$form->{fromdate}'
+ AND c.category = 'I'
+ $dpt_where
+ $project
+
+ UNION
+
+ SELECT SUM(ac.sellprice)
+ FROM invoice ac
+ JOIN ap a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE c.accno = '$form->{accno}'
+ AND a.transdate < '$form->{fromdate}'
+ AND c.category = 'E'
+ $dpt_where
+ $project
+ |;
+
+ }
+
+ if ($form->{accounttype} eq 'gifi') {
+ $query = qq|SELECT SUM(ac.amount)
+ FROM acc_trans ac
+ JOIN chart c ON (ac.chart_id = c.id)
+ $dpt_join
+ WHERE c.gifi_accno = '$form->{gifi_accno}'
+ AND ac.transdate < '$form->{fromdate}'
+ $dpt_where
+ $project
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION
+
+ SELECT SUM(ac.sellprice)
+ FROM invoice ac
+ JOIN ar a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.income_accno_id = c.id)
+ $dpt_join
+ WHERE c.gifi_accno = '$form->{gifi_accno}'
+ AND a.transdate < '$form->{fromdate}'
+ AND c.category = 'I'
+ $dpt_where
+ $project
+
+ UNION
+
+ SELECT SUM(ac.sellprice)
+ FROM invoice ac
+ JOIN ap a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE c.gifi_accno = '$form->{gifi_accno}'
+ AND a.transdate < '$form->{fromdate}'
+ AND c.category = 'E'
+ $dpt_where
+ $project
+ |;
+
+ }
+ }
+
+ $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+ ($form->{balance}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+ }
+
+ $query = "";
+ my $union = "";
+
+ foreach my $id (@id) {
+
+ # get all transactions
+ $query .= qq|$union
+ SELECT g.id, g.reference, g.description, ac.transdate,
+ $false AS invoice, ac.amount, 'gl' as module
+ FROM gl g, acc_trans ac $dpt_from
+ WHERE $where
+ $glwhere
+ $dpt_join
+ $project
+ AND ac.chart_id = $id
+ AND ac.trans_id = g.id
+ UNION
+ SELECT a.id, a.invnumber, c.name, ac.transdate,
+ a.invoice, ac.amount, 'ar' as module
+ FROM ar a, acc_trans ac, customer c $dpt_from
+ WHERE $where
+ $dpt_join
+ $project
+ AND ac.chart_id = $id
+ AND ac.trans_id = a.id
+ $AR_PAID
+ AND a.customer_id = c.id
+ UNION
+ SELECT a.id, a.invnumber, v.name, ac.transdate,
+ a.invoice, ac.amount, 'ap' as module
+ FROM ap a, acc_trans ac, vendor v $dpt_from
+ WHERE $where
+ $dpt_join
+ $project
+ AND ac.chart_id = $id
+ AND ac.trans_id = a.id
+ $AP_PAID
+ AND a.vendor_id = v.id
+ |;
+ $union = qq|
+ UNION ALL
+ |;
+
+ if ($form->{project_id}) {
+
+ $fromdate_where =~ s/ac\./a\./;
+ $todate_where =~ s/ac\./a\./;
+
+ $query .= qq|
+
+ UNION ALL
+
+ SELECT a.id, a.invnumber, c.name, a.transdate,
+ a.invoice, ac.sellprice, 'ar' as module
+ FROM ar a
+ JOIN invoice ac ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN customer c ON (a.customer_id = c.id)
+ $dpt_join
+ WHERE p.income_accno_id = $id
+ $fromdate_where
+ $todate_where
+ $dpt_where
+ $project
+
+ UNION ALL
+
+ SELECT a.id, a.invnumber, v.name, a.transdate,
+ a.invoice, ac.sellprice, 'ap' as module
+ FROM ap a
+ JOIN invoice ac ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN vendor v ON (a.vendor_id = v.id)
+ $dpt_join
+ WHERE p.expense_accno_id = $id
+ $fromdate_where
+ $todate_where
+ $dpt_where
+ $project
+ |;
+
+ $fromdate_where =~ s/a\./ac\./;
+ $todate_where =~ s/a\./ac\./;
+
+ }
+
+ $union = qq|
+ UNION ALL
+ |;
+ }
+
+ $query .= qq|
+ ORDER BY $sortorder|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ca = $sth->fetchrow_hashref(NAME_lc)) {
+
+ # gl
+ if ($ca->{module} eq "gl") {
+ $ca->{module} = "gl";
+ }
+
+ # ap
+ if ($ca->{module} eq "ap") {
+ $ca->{module} = ($ca->{invoice}) ? 'ir' : 'ap';
+ }
+
+ # ar
+ if ($ca->{module} eq "ar") {
+ $ca->{module} = ($ca->{invoice}) ? 'is' : 'ar';
+ }
+
+ if ($ca->{amount} < 0) {
+ $ca->{debit} = $ca->{amount} * -1;
+ $ca->{credit} = 0;
+ } else {
+ $ca->{credit} = $ca->{amount};
+ $ca->{debit} = 0;
+ }
+
+ push @{ $form->{CA} }, $ca;
+
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Check and receipt printing payment module backend routines
+# Number to text conversion routines are in
+# locale/{countrycode}/Num2text
+#
+#======================================================================
+
+package CP;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type, $countrycode) = @_;
+
+ $self = {};
+
+ if ($countrycode) {
+ if (-f "locale/$countrycode/Num2text") {
+ require "locale/$countrycode/Num2text";
+ } else {
+ use SL::Num2text;
+ }
+ } else {
+ use SL::Num2text;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+sub paymentaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT c.accno, c.description, c.link
+ FROM chart c
+ WHERE c.link LIKE '%$form->{ARAP}%'
+ ORDER BY c.accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $form->{PR}{ $form->{ARAP} } = ();
+ $form->{PR}{"$form->{ARAP}_paid"} = ();
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ foreach my $item (split /:/, $ref->{link}) {
+ if ($item eq $form->{ARAP}) {
+ push @{ $form->{PR}{ $form->{ARAP} } }, $ref;
+ }
+ if ($item eq "$form->{ARAP}_paid") {
+ push @{ $form->{PR}{"$form->{ARAP}_paid"} }, $ref;
+ }
+ }
+ }
+ $sth->finish;
+
+ # get currencies and closedto
+ $query = qq|SELECT curr, closedto
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{currencies}, $form->{closedto}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_openvc {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $arap = ($form->{vc} eq 'customer') ? 'ar' : 'ap';
+ my $query = qq|SELECT count(*)
+ FROM $form->{vc} ct, $arap a
+ WHERE a.$form->{vc}_id = ct.id
+ AND a.amount != a.paid|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my ($count) = $sth->fetchrow_array;
+ $sth->finish;
+
+ my $ref;
+
+ # build selection list
+ if ($count < $myconfig->{vclimit}) {
+ $query = qq|SELECT DISTINCT ct.id, ct.name
+ FROM $form->{vc} ct, $arap a
+ WHERE a.$form->{vc}_id = ct.id
+ AND a.amount != a.paid
+ ORDER BY ct.name|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{"all_$form->{vc}"} }, $ref;
+ }
+
+ $sth->finish;
+
+ }
+
+ if ($form->{ARAP} eq 'AR') {
+ $query = qq|SELECT d.id, d.description
+ FROM department d
+ WHERE d.role = 'P'
+ ORDER BY 2|;
+ } else {
+ $query = qq|SELECT d.id, d.description
+ FROM department d
+ ORDER BY 2|;
+ }
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{all_departments} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_openinvoices {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $where = qq|WHERE a.$form->{vc}_id = $form->{"$form->{vc}_id"}
+ AND a.curr = '$form->{currency}'
+ AND NOT a.amount = paid|;
+
+ my ($buysell);
+ if ($form->{vc} eq 'customer') {
+ $buysell = "buy";
+ } else {
+ $buysell = "sell";
+ }
+
+ my $query =
+ qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, a.curr
+ FROM $form->{arap} a
+ $where
+ ORDER BY a.id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ # if this is a foreign currency transaction get exchangerate
+ $ref->{exchangerate} =
+ $form->get_exchangerate($dbh, $ref->{curr}, $ref->{transdate}, $buysell)
+ if ($form->{currency} ne $form->{defaultcurrency});
+ push @{ $form->{PR} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub process_payment {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($paymentaccno) = split /--/, $form->{account};
+
+ # if currency ne defaultcurrency update exchangerate
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{exchangerate} =
+ $form->parse_amount($myconfig, $form->{exchangerate});
+
+ if ($form->{vc} eq 'customer') {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{datepaid},
+ $form->{exchangerate}, 0);
+ } else {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{datepaid}, 0,
+ $form->{exchangerate});
+ }
+ } else {
+ $form->{exchangerate} = 1;
+ }
+
+ my $query = qq|SELECT fxgain_accno_id, fxloss_accno_id
+ FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($fxgain_accno_id, $fxloss_accno_id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ my ($buysell);
+
+ if ($form->{vc} eq 'customer') {
+ $buysell = "buy";
+ } else {
+ $buysell = "sell";
+ }
+
+ my $ml;
+ my $where;
+
+ if ($form->{ARAP} eq 'AR') {
+ $ml = 1;
+ $where = qq|
+ (c.link = 'AR'
+ OR c.link LIKE 'AR:%')
+ |;
+ } else {
+ $ml = -1;
+ $where = qq|
+ (c.link = 'AP'
+ OR c.link LIKE '%:AP'
+ OR c.link LIKE '%:AP:%')
+ |;
+ }
+
+ $paymentamount = $form->{amount};
+
+ # $paymentamount = $form->{amount};
+ my $null;
+ ($null, $form->{department_id}) = split /--/, $form->{department};
+ $form->{department_id} *= 1;
+
+ # query to retrieve paid amount
+ $query = qq|SELECT a.paid FROM ar a
+ WHERE a.id = ?
+ FOR UPDATE|;
+ my $pth = $dbh->prepare($query) || $form->dberror($query);
+
+ # go through line by line
+ for my $i (1 .. $form->{rowcount}) {
+
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
+ $form->{"due_$i"} = $form->parse_amount($myconfig, $form->{"due_$i"});
+
+ if ($form->{"checked_$i"} && $form->{"paid_$i"}) {
+ $paymentamount =
+ (($paymentamount * 1000) - ($form->{"paid_$i"} * 1000)) / 1000;
+
+ # get exchangerate for original
+ $query = qq|SELECT $buysell
+ FROM exchangerate e
+ JOIN $form->{arap} a ON (a.transdate = e.transdate)
+ WHERE e.curr = '$form->{currency}'
+ AND a.id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($exchangerate) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $exchangerate = 1 unless $exchangerate;
+
+ $query = qq|SELECT c.id
+ FROM chart c
+ JOIN acc_trans a ON (a.chart_id = c.id)
+ WHERE $where
+ AND a.trans_id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $amount = $form->round_amount($form->{"paid_$i"} * $exchangerate, 2);
+
+ # add AR/AP
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount)
+ VALUES ($form->{"id_$i"}, $id, '$form->{datepaid}',
+ $amount * $ml)|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add payment
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount, source, memo)
+ VALUES ($form->{"id_$i"},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$paymentaccno'),
+ '$form->{datepaid}', $form->{"paid_$i"} * $ml * -1,
+ '$form->{source}', '$form->{memo}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add exchangerate difference if currency ne defaultcurrency
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * ($form->{exchangerate} - 1),
+ 2);
+ if ($amount != 0) {
+
+ # exchangerate difference
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount, cleared, fx_transaction)
+ VALUES ($form->{"id_$i"},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$paymentaccno'),
+ '$form->{datepaid}', $amount * $ml * -1, '0', '1')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # gain/loss
+
+ $amount =
+ $form->round_amount(
+ $form->{"paid_$i"} * ($exchangerate - $form->{exchangerate}),
+ 2);
+ if ($amount != 0) {
+ my $accno_id = ($amount < 0) ? $fxgain_accno_id : $fxloss_accno_id;
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount, cleared, fx_transaction)
+ VALUES ($form->{"id_$i"}, $accno_id,
+ '$form->{datepaid}', $amount * $ml * -1, '0', '1')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ $form->{"paid_$i"} =
+ $form->round_amount($form->{"paid_$i"} * $exchangerate, 2);
+
+ $pth->execute($form->{"id_$i"}) || $form->dberror;
+ ($amount) = $pth->fetchrow_array;
+ $pth->finish;
+
+ $amount += $form->{"paid_$i"};
+
+ # update AR/AP transaction
+ $query = qq|UPDATE $form->{arap} set
+ paid = $amount,
+ datepaid = '$form->{datepaid}'
+ WHERE id = $form->{"id_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # record a AR/AP with a payment
+ if ($form->round_amount($paymentamount, 2) > 0) {
+ $form->{invnumber} = "";
+ OP::overpayment("", $myconfig, $form, $dbh, $paymentamount, $ml, 1);
+ }
+
+ if ($form->round_amount($paymentamount, 2) < 0) {
+ $dbh->rollback;
+ $rc = 0;
+ }
+ if ($form->round_amount($paymentamount, 2) == 0) {
+ $rc = $dbh->commit;
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# backend code for customers and vendors
+#
+# CHANGE LOG:
+# DS. 2000-07-04 Created
+#
+#======================================================================
+
+package CT;
+
+sub get_tuple {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+ my $query = qq|SELECT ct.*, b.id AS business, s.*, cp.*
+ FROM $form->{db} ct
+ LEFT JOIN business b on ct.business_id = b.id
+ LEFT JOIN shipto s on ct.id = s.trans_id
+ LEFT JOIN contacts cp on ct.id = cp.cp_cv_id
+ WHERE ct.id = $form->{id} order by cp.cp_id limit 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+ if ($form->{salesman_id}) {
+ my $query = qq|SELECT ct.name AS salesman
+ FROM $form->{db} ct
+ WHERE ct.id = $form->{salesman_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($ref) = $sth->fetchrow_array();
+
+ $form->{salesman} = $ref;
+
+ $sth->finish;
+ }
+
+ # check if it is orphaned
+ my $arap = ($form->{db} eq 'customer') ? "ar" : "ap";
+ $query = qq|SELECT a.id
+ FROM $arap a
+ JOIN $form->{db} ct ON (a.$form->{db}_id = ct.id)
+ WHERE ct.id = $form->{id}
+ UNION
+ SELECT a.id
+ FROM oe a
+ JOIN $form->{db} ct ON (a.$form->{db}_id = ct.id)
+ WHERE ct.id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ unless ($sth->fetchrow_array) {
+ $form->{status} = "orphaned";
+ }
+ $sth->finish;
+
+ # get tax labels
+ $query = qq|SELECT c.accno, c.description
+ FROM chart c
+ JOIN tax t ON (t.chart_id = c.id)
+ WHERE c.link LIKE '%CT_tax%'
+ ORDER BY c.accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{taxaccounts} .= "$ref->{accno} ";
+ $form->{tax}{ $ref->{accno} }{description} = $ref->{description};
+ }
+ $sth->finish;
+ chop $form->{taxaccounts};
+
+ # get taxes for customer/vendor
+ $query = qq|SELECT c.accno
+ FROM chart c
+ JOIN $form->{db}tax t ON (t.chart_id = c.id)
+ WHERE t.$form->{db}_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{tax}{ $ref->{accno} }{taxable} = 1;
+ }
+ $sth->finish;
+
+ # get business types
+ $query = qq|SELECT id, description
+ FROM business
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{all_business} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+## LINET
+sub query_titles_and_greetings {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my (%tmp, $ref);
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query =
+ "SELECT DISTINCT(c.cp_greeting) FROM contacts c WHERE c.cp_greeting LIKE '%'";
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ next unless ($ref->{cp_greeting} =~ /[a-zA-Z]/);
+ $tmp{ $ref->{cp_greeting} } = 1;
+ }
+ $sth->finish();
+
+ @{ $form->{GREETINGS} } = sort(keys(%tmp));
+
+ %tmp = ();
+
+ $query =
+ "SELECT DISTINCT(c.cp_title) FROM contacts c WHERE c.cp_title LIKE '%'";
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ next unless ($ref->{cp_title} =~ /[a-zA-Z]/);
+ $tmp{ $ref->{cp_title} } = 1;
+ }
+ $sth->finish();
+
+ @{ $form->{TITLES} } = sort(keys(%tmp));
+
+ $dbh->disconnect();
+ $main::lxdebug->leave_sub();
+}
+## /LINET
+
+sub taxaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get tax labels
+ my $query = qq|SELECT accno, description
+ FROM chart c, tax t
+ WHERE c.link LIKE '%CT_tax%'
+ AND c.id = t.chart_id
+ ORDER BY accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{taxaccounts} .= "$ref->{accno} ";
+ $form->{tax}{ $ref->{accno} }{description} = $ref->{description};
+ }
+ $sth->finish;
+ chop $form->{taxaccounts};
+
+ # this is just for the selection for type of business
+ $query = qq|SELECT id, description
+ FROM business|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{all_business} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_customer {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+##LINET
+ map({ $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
+ if ($form->{"selected_cp_${_}"});
+ } qw(title greeting));
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g }
+ qw(customernumber name street zipcode city country homepage contact notes cp_title cp_greeting language);
+##/LINET
+ # assign value discount, terms, creditlimit
+ $form->{discount} = $form->parse_amount($myconfig, $form->{discount});
+ $form->{discount} /= 100;
+ $form->{terms} *= 1;
+ $form->{taxincluded} *= 1;
+ $form->{obsolete} *= 1;
+ $form->{business} *= 1;
+ $form->{salesman_id} *= 1;
+ $form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
+
+ my ($query, $sth);
+
+ if ($form->{id}) {
+ $query = qq|DELETE FROM customertax
+ WHERE customer_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ } else {
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO customer (name)
+ VALUES ('$uid')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT c.id FROM customer c
+ WHERE c.name = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+ if (!$form->{customernumber} && $form->{business}) {
+ $form->{customernumber} =
+ $form->update_business($myconfig, $form->{business});
+ }
+ if (!$form->{customernumber}) {
+ $form->{customernumber} =
+ $form->update_defaults($myconfig, "customernumber");
+ }
+
+ }
+
+ $query = qq|UPDATE customer SET
+ customernumber = '$form->{customernumber}',
+ name = '$form->{name}',
+ department_1 = '$form->{department_1}',
+ department_2 = '$form->{department_2}',
+ street = '$form->{street}',
+ zipcode = '$form->{zipcode}',
+ city = '$form->{city}',
+ country = '$form->{country}',
+ homepage = '$form->{homepage}',
+ contact = '$form->{contact}',
+ phone = '$form->{phone}',
+ fax = '$form->{fax}',
+ email = '$form->{email}',
+ cc = '$form->{cc}',
+ bcc = '$form->{bcc}',
+ notes = '$form->{notes}',
+ discount = $form->{discount},
+ creditlimit = $form->{creditlimit},
+ terms = $form->{terms},
+ taxincluded = '$form->{taxincluded}',
+ business_id = $form->{business},
+ taxnumber = '$form->{taxnumber}',
+ sic_code = '$form->{sic}',
+ language = '$form->{language}',
+ account_number = '$form->{account_number}',
+ bank_code = '$form->{bank_code}',
+ bank = '$form->{bank}',
+ obsolete = '$form->{obsolete}',
+ ustid = '$form->{ustid}',
+ username = '$form->{username}',
+ salesman_id = '$form->{salesman_id}',
+ user_password = '$form->{user_password}',
+ c_vendor_id = '$form->{c_vendor_id}'
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{cp_id}) {
+ $query = qq|UPDATE contacts SET
+ cp_greeting = '$form->{cp_greeting}',
+ cp_title = '$form->{cp_title}',
+ cp_givenname = '$form->{cp_givenname}',
+ cp_name = '$form->{cp_name}',
+ cp_email = '$form->{cp_email}',
+ cp_phone1 = '$form->{cp_phone1}',
+ cp_phone2 = '$form->{cp_phone2}'
+ WHERE cp_id = $form->{cp_id}|;
+ } elsif ($form->{cp_name} || $form->{cp_givenname}) {
+ $query =
+ qq|INSERT INTO contacts ( cp_cv_id, cp_greeting, cp_title, cp_givenname, cp_name, cp_email, cp_phone1, cp_phone2)
+ VALUES ($form->{id}, '$form->{cp_greeting}','$form->{cp_title}','$form->{cp_givenname}','$form->{cp_name}','$form->{cp_email}','$form->{cp_phone1}','$form->{cp_phone2}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ # save taxes
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"tax_$item"}) {
+ $query = qq|INSERT INTO customertax (customer_id, chart_id)
+ VALUES ($form->{id}, (SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$item'))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # add shipto
+ $form->add_shipto($dbh, $form->{id});
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_vendor {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+##LINET
+ map({ $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
+ if ($form->{"selected_cp_${_}"});
+ } qw(title greeting));
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g }
+ qw(vendornumber name street zipcode city country homepage contact notes cp_title cp_greeting language);
+##/LINET
+ $form->{discount} = $form->parse_amount($myconfig, $form->{discount});
+ $form->{discount} /= 100;
+ $form->{terms} *= 1;
+ $form->{taxincluded} *= 1;
+ $form->{obsolete} *= 1;
+ $form->{business} *= 1;
+ $form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
+
+ my $query;
+
+ if ($form->{id}) {
+ $query = qq|DELETE FROM vendortax
+ WHERE vendor_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ } else {
+ my $uid = time;
+ $uid .= $form->{login};
+
+ $query = qq|INSERT INTO vendor (name)
+ VALUES ('$uid')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT v.id FROM vendor v
+ WHERE v.name = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+ if (!$form->{vendornumber}) {
+ $form->{vendornumber} =
+ $form->update_defaults($myconfig, "vendornumber");
+ }
+
+ }
+
+##LINET
+ $query = qq|UPDATE vendor SET
+ vendornumber = '$form->{vendornumber}',
+ name = '$form->{name}',
+ department_1 = '$form->{department_1}',
+ department_2 = '$form->{department_2}',
+ street = '$form->{street}',
+ zipcode = '$form->{zipcode}',
+ city = '$form->{city}',
+ country = '$form->{country}',
+ homepage = '$form->{homepage}',
+ contact = '$form->{contact}',
+ phone = '$form->{phone}',
+ fax = '$form->{fax}',
+ email = '$form->{email}',
+ cc = '$form->{cc}',
+ bcc = '$form->{bcc}',
+ notes = '$form->{notes}',
+ terms = $form->{terms},
+ discount = $form->{discount},
+ creditlimit = $form->{creditlimit},
+ taxincluded = '$form->{taxincluded}',
+ gifi_accno = '$form->{gifi_accno}',
+ business_id = $form->{business},
+ taxnumber = '$form->{taxnumber}',
+ sic_code = '$form->{sic}',
+ language = '$form->{language}',
+ account_number = '$form->{account_number}',
+ bank_code = '$form->{bank_code}',
+ bank = '$form->{bank}',
+ obsolete = '$form->{obsolete}',
+ ustid = '$form->{ustid}',
+ username = '$form->{username}',
+ user_password = '$form->{user_password}',
+ v_customer_id = '$form->{v_customer_id}'
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{cp_id}) {
+ $query = qq|UPDATE contacts SET
+ cp_greeting = '$form->{cp_greeting}',
+ cp_title = '$form->{cp_title}',
+ cp_givenname = '$form->{cp_givenname}',
+ cp_name = '$form->{cp_name}',
+ cp_email = '$form->{cp_email}',
+ cp_phone1 = '$form->{cp_phone1}',
+ cp_phone2 = '$form->{cp_phone2}'
+ WHERE cp_id = $form->{cp_id}|;
+ } elsif ($form->{cp_name} || $form->{cp_givenname}) {
+ $query =
+ qq|INSERT INTO contacts ( cp_cv_id, cp_greeting, cp_title, cp_givenname, cp_name, cp_email, cp_phone1, cp_phone2)
+ VALUES ($form->{id}, '$form->{cp_greeting}','$form->{cp_title}','$form->{cp_givenname}','$form->{cp_name}','$form->{cp_email}','$form->{cp_phone1}','$form->{cp_phone2}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ # save taxes
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"tax_$item"}) {
+ $query = qq|INSERT INTO vendortax (vendor_id, chart_id)
+ VALUES ($form->{id}, (SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$item'))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # add shipto
+ $form->add_shipto($dbh, $form->{id});
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # delete vendor
+ my $query = qq|DELETE FROM $form->{db}
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub search {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $where = "1 = 1";
+ $form->{sort} = "name" unless ($form->{sort});
+
+ if ($form->{"$form->{db}number"}) {
+ my $companynumber = $form->like(lc $form->{"$form->{db}number"});
+ $where .= " AND lower(ct.$form->{db}number) LIKE '$companynumber'";
+ }
+ if ($form->{name}) {
+ my $name = $form->like(lc $form->{name});
+ $where .= " AND lower(ct.name) LIKE '$name'";
+ }
+ if ($form->{contact}) {
+ my $contact = $form->like(lc $form->{contact});
+ $where .= " AND lower(ct.contact) LIKE '$contact'";
+ }
+ if ($form->{email}) {
+ my $email = $form->like(lc $form->{email});
+ $where .= " AND lower(ct.email) LIKE '$email'";
+ }
+
+ if ($form->{status} eq 'orphaned') {
+ $where .= qq| AND ct.id NOT IN (SELECT o.$form->{db}_id
+ FROM oe o, $form->{db} cv
+ WHERE cv.id = o.$form->{db}_id)|;
+ if ($form->{db} eq 'customer') {
+ $where .= qq| AND ct.id NOT IN (SELECT a.customer_id
+ FROM ar a, customer cv
+ WHERE cv.id = a.customer_id)|;
+ }
+ if ($form->{db} eq 'vendor') {
+ $where .= qq| AND ct.id NOT IN (SELECT a.vendor_id
+ FROM ap a, vendor cv
+ WHERE cv.id = a.vendor_id)|;
+ }
+ $form->{l_invnumber} = $form->{l_ordnumber} = $form->{l_quonumber} = "";
+ }
+
+ my $query = qq|SELECT ct.*, b.description AS business
+ FROM $form->{db} ct
+ LEFT JOIN business b ON (ct.business_id = b.id)
+ WHERE $where|;
+
+ # redo for invoices, orders and quotations
+ if ($form->{l_invnumber} || $form->{l_ordnumber} || $form->{l_quonumber}) {
+
+ my ($ar, $union, $module);
+ $query = "";
+
+ if ($form->{l_invnumber}) {
+ $ar = ($form->{db} eq 'customer') ? 'ar' : 'ap';
+ $module = ($ar eq 'ar') ? 'is' : 'ir';
+
+ $query = qq|SELECT ct.*, b.description AS business,
+ a.invnumber, a.ordnumber, a.quonumber, a.id AS invid,
+ '$module' AS module, 'invoice' AS formtype,
+ (a.amount = a.paid) AS closed
+ FROM $form->{db} ct
+ JOIN $ar a ON (a.$form->{db}_id = ct.id)
+ LEFT JOIN business b ON (ct.business_id = b.id)
+ WHERE $where
+ AND a.invoice = '1'|;
+
+ $union = qq|
+ UNION|;
+
+ }
+
+ if ($form->{l_ordnumber}) {
+ $query .= qq|$union
+ SELECT ct.*, b.description AS business,
+ ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid,
+ 'oe' AS module, 'order' AS formtype,
+ o.closed
+ FROM $form->{db} ct
+ JOIN oe o ON (o.$form->{db}_id = ct.id)
+ LEFT JOIN business b ON (ct.business_id = b.id)
+ WHERE $where
+ AND o.quotation = '0'|;
+
+ $union = qq|
+ UNION|;
+ }
+
+ if ($form->{l_quonumber}) {
+ $query .= qq|$union
+ SELECT ct.*, b.description AS business,
+ ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid,
+ 'oe' AS module, 'quotation' AS formtype,
+ o.closed
+ FROM $form->{db} ct
+ JOIN oe o ON (o.$form->{db}_id = ct.id)
+ LEFT JOIN business b ON (ct.business_id = b.id)
+ WHERE $where
+ AND o.quotation = '1'|;
+
+ }
+ }
+
+ $query .= qq|
+ ORDER BY $form->{sort}|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+##LINET
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{address} = "";
+ map { $ref->{address} .= "$ref->{$_} "; } qw(street zipcode city country);
+ push @{ $form->{CT} }, $ref;
+ }
+##/LINET
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# Lx-Office ERP
+# Copyright (c) 2004
+#
+# Author: Philip Reetz
+# Email: p.reetz@linet-services.de
+# Web: http://www.lx-office.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Datev export module
+#======================================================================
+
+package DATEV;
+
+use Data::Dumper;
+
+sub get_datev_stamm {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|SELECT * FROM datev|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+sub save_datev_stamm {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ $query = qq|DELETE FROM datev|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|INSERT INTO datev
+ (beraternr, beratername, dfvkz, mandantennr, datentraegernr, abrechnungsnr) VALUES
+ (|
+ . $dbh->quote($form->{beraternr}) . qq|,|
+ . $dbh->quote($form->{beratername}) . qq|,|
+ . $dbh->quote($form->{dfvkz}) . qq|,
+ |
+ . $dbh->quote($form->{mandantennr}) . qq|,|
+ . $dbh->quote($form->{datentraegernr}) . qq|,|
+ . $dbh->quote($form->{abrechnungsnr}) . qq|)|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $sth->finish;
+
+ $dbh->commit;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+sub kne_export {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $rc;
+
+ if ($form->{exporttype} == 0) {
+ $rc = &kne_buchungsexport($myconfig, $form);
+ } else {
+ $rc = &kne_stammdatenexport($myconfig, $form);
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub obe_export {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+ $dbh->commit;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+sub get_dates {
+ $main::lxdebug->enter_sub();
+
+ my ($zeitraum, $monat, $quartal, $transdatefrom, $transdateto) = @_;
+
+ $fromto = "transdate >= ";
+
+ my @a = localtime;
+ $a[5] += 1900;
+ $jahr = $a[5];
+ if ($zeitraum eq "monat") {
+ SWITCH: {
+ $monat eq "1" && do {
+ $form->{fromdate} = "1.1.$jahr";
+ $form->{todate} = "31.1.$jahr";
+ last SWITCH;
+ };
+ $monat eq "2" && do {
+ $form->{fromdate} = "1.2.$jahr";
+
+ #this works from 1901 to 2099, 1900 and 2100 fail.
+ $leap = ($jahr % 4 == 0) ? "29" : "28";
+ $form->{todate} = "$leap.2.$jahr";
+ last SWITCH;
+ };
+ $monat eq "3" && do {
+ $form->{fromdate} = "1.3.$jahr";
+ $form->{todate} = "31.3.$jahr";
+ last SWITCH;
+ };
+ $monat eq "4" && do {
+ $form->{fromdate} = "1.4.$jahr";
+ $form->{todate} = "30.4.$jahr";
+ last SWITCH;
+ };
+ $monat eq "5" && do {
+ $form->{fromdate} = "1.5.$jahr";
+ $form->{todate} = "31.5.$jahr";
+ last SWITCH;
+ };
+ $monat eq "6" && do {
+ $form->{fromdate} = "1.6.$jahr";
+ $form->{todate} = "30.6.$jahr";
+ last SWITCH;
+ };
+ $monat eq "7" && do {
+ $form->{fromdate} = "1.7.$jahr";
+ $form->{todate} = "31.7.$jahr";
+ last SWITCH;
+ };
+ $monat eq "8" && do {
+ $form->{fromdate} = "1.8.$jahr";
+ $form->{todate} = "31.8.$jahr";
+ last SWITCH;
+ };
+ $monat eq "9" && do {
+ $form->{fromdate} = "1.9.$jahr";
+ $form->{todate} = "30.9.$jahr";
+ last SWITCH;
+ };
+ $monat eq "10" && do {
+ $form->{fromdate} = "1.10.$jahr";
+ $form->{todate} = "31.10.$jahr";
+ last SWITCH;
+ };
+ $monat eq "11" && do {
+ $form->{fromdate} = "1.11.$jahr";
+ $form->{todate} = "30.11.$jahr";
+ last SWITCH;
+ };
+ $monat eq "12" && do {
+ $form->{fromdate} = "1.12.$jahr";
+ $form->{todate} = "31.12.$jahr";
+ last SWITCH;
+ };
+ }
+ $fromto .=
+ "'" . $form->{fromdate} . "' and transdate <= '" . $form->{todate} . "'";
+ }
+
+ elsif ($zeitraum eq "quartal") {
+ if ($quartal == 1) {
+ $fromto .=
+ "'01.01." . $jahr . "' and transdate <= '31.03." . $jahr . "'";
+ } elsif ($quartal == 2) {
+ $fromto .=
+ "'01.04." . $jahr . "' and transdate <= '30.06." . $jahr . "'";
+ } elsif ($quartal == 3) {
+ $fromto .=
+ "'01.07." . $jahr . "' and transdate <= '30.09." . $jahr . "'";
+ } elsif ($quartal == 4) {
+ $fromto .=
+ "'01.10." . $jahr . "' and transdate <= '31.12." . $jahr . "'";
+ }
+ }
+
+ elsif ($zeitraum eq "zeit") {
+ $fromto .=
+ "'" . $transdatefrom . "' and transdate <= '" . $transdateto . "'";
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $fromto;
+}
+
+sub get_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form, $fromto) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $fromto =~ s/transdate/ac\.transdate/g;
+
+ $query = qq|SELECT taxkey, rate FROM tax|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $taxes{ $ref->{taxkey} } = $ref->{rate};
+ }
+
+ $sth->finish();
+
+ $query =
+ qq|SELECT ac.oid, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ar.invnumber, ar.duedate, ar.amount as umsatz,
+ ct.name, c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, t.chart_id, t.rate FROM acc_trans ac,ar ar, customer ct,
+ chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id)WHERE $fromto AND ac.trans_id=ar.id AND ac.trans_id=ar.id
+ AND ar.customer_id=ct.id AND ac.chart_id=c.id
+ UNION ALL
+ SELECT ac.oid, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ap.invnumber, ap.duedate, ap.amount as umsatz,
+ ct.name, c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, t.chart_id, t.rate FROM acc_trans ac, ap ap, vendor ct, chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id)
+ WHERE $fromto AND ac.trans_id=ap.id AND ap.vendor_id=ct.id AND ac.chart_id=c.id
+ UNION ALL
+ SELECT ac.oid, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey, gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz,
+ gl.description AS name, c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, t.chart_id, t.rate FROM acc_trans ac, gl gl,
+ chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id) WHERE $fromto AND ac.trans_id=gl.id AND ac.chart_id=c.id
+ ORDER BY trans_id, oid|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $i = 0;
+ $g = 0;
+ @splits;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $count = 0;
+ $firstrun = 1;
+ $count += $ref->{amount};
+ push @{$i}, $ref;
+ while (abs($count) > 0.01 || $firstrun) {
+ $ref2 = $sth->fetchrow_hashref(NAME_lc);
+ last unless ($ref2);
+ $count += $ref2->{amount};
+ push @{$i}, $ref2;
+ $firstrun = 0;
+ }
+ $absumsatz = 0;
+ if (scalar(@{$i}) > 2) {
+ for my $j (0 .. (scalar(@{$i}) - 1)) {
+ if (abs($i->[$j]->{'amount'}) > abs($absumsatz)) {
+ $absumsatz = $i->[$j]->{'amount'};
+ $notsplitindex = $j;
+ }
+ }
+ $ml = ($i->[0]->{'umsatz'} > 0) ? 1 : -1;
+ for my $j (0 .. (scalar(@{$i}) - 1)) {
+ if ( ($j != $notsplitindex)
+ && ($i->[$j]->{'chart_id'} eq "")
+ && ( $i->[$j]->{'taxkey'} eq ""
+ || $i->[$j]->{'taxkey'} eq "0"
+ || $i->[$j]->{'taxkey'} eq "1"
+ || $i->[$j]->{'taxkey'} eq "10"
+ || $i->[$j]->{'taxkey'} eq "11")
+ ) {
+ my %blubb = {};
+ map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; }
+ keys(%{ $i->[$notsplitindex] }));
+ $absumsatz += $i->[$j]->{'amount'};
+ $blubb{'amount'} = $i->[$j]->{'amount'} * (-1);
+ $blubb{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml;
+ $i->[$j]->{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml;
+ push @{ $splits[$g] }, \%blubb; #$i->[$notsplitindex];
+ push @{ $splits[$g] }, $i->[$j];
+ push @{ $form->{DATEV} }, \@{ $splits[$g] };
+ $g++;
+ } elsif (($j != $notsplitindex) && ($i->[$j]->{'chart_id'} eq "")) {
+ $absumsatz +=
+ ($i->[$j]->{'amount'} * (1 + $taxes{ $i->[$j]->{'taxkey'} }));
+ my %blubb = {};
+ map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; }
+ keys(%{ $i->[$notsplitindex] }));
+ $test = 1 + $taxes{ $i->[$j]->{'taxkey'} };
+ $blubb{'amount'} =
+ $form->round_amount(($i->[$j]->{'amount'} * $test * -1), 2);
+
+ #print(STDERR $test, " Taxrate\n\n");
+ $blubb{'umsatz'} =
+ abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
+
+ $i->[$j]->{'umsatz'} =
+ abs($form->round_amount(($i->[$j]->{'amount'} * $test), 2)) * $ml;
+
+ #print(STDERR $i->[$j]->{'umsatz'}, " Steuer Umsatz\n");
+ #print(STDERR $i->[$j]->{'amount'}, " Steuer Betrag\n");
+ #print(STDERR $blubb{'umsatz'}, " Umsatz NOTSPLIT\n");
+ push @{ $splits[$g] }, \%blubb;
+ push @{ $splits[$g] }, $i->[$j];
+ push @{ $form->{DATEV} }, \@{ $splits[$g] };
+ $g++;
+ } else {
+ next;
+ }
+ }
+ if (abs($absumsatz) > 0.01) {
+ print(STDERR $absumsatz, "ABSAUMSATZ\n");
+ $form->error("Datev-Export fehlgeschlagen!");
+ }
+ } else {
+ push @{ $form->{DATEV} }, \@{$i};
+ }
+ $i++;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub make_kne_data_header {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form, $fromto) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my @a = localtime;
+ $jahr = $a[5];
+
+ #Header
+ $anwendungsnr = ($fromto) ? "\x31\x31" : "\x31\x33";
+ while (length($form->{datentraegernr}) < 3) {
+ $form->{datentraegernr} = "\x30" . $form->{datentraegernr};
+ }
+
+ $header = "\x1D\x18\x31" . $form->{datentraegernr} . $anwendungsnr;
+
+ $dfvkz = $form->{dfvkz};
+ while (length($dfvkz) < 2) {
+ $dfvkz = "\x30" . $dfvkz;
+ }
+ $header .= $dfvkz;
+
+ $beraternr = $form->{beraternr};
+ while (length($beraternr) < 7) {
+ $beraternr = "\x30" . $beraternr;
+ }
+ $header .= $beraternr;
+
+ $mandantennr = $form->{mandantennr};
+ while (length($mandantennr) < 5) {
+ $mandantennr = "\x30" . $mandantennr;
+ }
+ $header .= $mandantennr;
+
+ $abrechnungsnr = $form->{abrechnungsnr} . $jahr;
+ while (length($abrechnungsnr) < 6) {
+ $abrechnungsnr = "\x30" . $abrechnungsnr;
+ }
+ $header .= $abrechnungsnr;
+
+ $fromto =~ s/transdate|>=|and|\'|<=//g;
+ my ($from, $to) = split / /, $fromto;
+ $from =~ s/ //g;
+ $to =~ s/ //g;
+
+ if ($from ne "") {
+ my ($fday, $fmonth, $fyear) = split /\./, $from;
+ if (length($fmonth) < 2) {
+ $fmonth = "0" . $fmonth;
+ }
+ if (length($fday) < 2) {
+ $fday = "0" . $fday;
+ }
+ $from = $fday . $fmonth . substr($fyear, -2, 2);
+ } else {
+ $from = "";
+ }
+
+ $header .= $from;
+
+ if ($to ne "") {
+ my ($tday, $tmonth, $tyear) = split /\./, $to;
+ if (length($tmonth) < 2) {
+ $tmonth = "0" . $tmonth;
+ }
+ if (length($tday) < 2) {
+ $tday = "0" . $tday;
+ }
+ $to = $tday . $tmonth . substr($tyear, -2, 2);
+ } else {
+ $to = "";
+ }
+ $header .= $to;
+ if ($fromto ne "") {
+ $primanota = "\x30\x30\x31";
+ $header .= $primanota;
+ }
+
+ $passwort = $form->{passwort};
+ while (length($passwort) < 4) {
+ $passwort = "\x30" . $passwort;
+ }
+ $header .= $passwort;
+
+ $anwendungsinfo = "\x20" x 16;
+ $header .= $anwendungsinfo;
+ $inputinfo = "\x20" x 16;
+ $header .= $inputinfo;
+
+ $header .= "\x79";
+
+ #Versionssatz
+ if ($form->{exporttype} == 0) {
+ $versionssatz = "\xB5" . "1,";
+ } else {
+ $versionssatz = "\xB6" . "1,";
+ }
+
+ $query = qq| select accno from chart limit 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ $accnolength = $ref->{accno};
+ $sth->finish;
+
+ $versionssatz .= length($accnolength);
+ $versionssatz .= ",";
+ $versionssatz .= length($accnolength);
+ $versionssatz .= ",SELF" . "\x1C\x79";
+
+ $dbh->disconnect;
+
+ $header .= $versionssatz;
+
+ $main::lxdebug->leave_sub();
+
+ return $header;
+}
+
+sub datetofour {
+ $main::lxdebug->enter_sub();
+
+ my ($date, $six) = @_;
+
+ ($day, $month, $year) = split /\./, $date;
+
+ if ($day =~ /^0/) {
+ $day = substr($day, 1, 1);
+ }
+ if (length($month) < 2) {
+ $month = "0" . $month;
+ }
+ if (length($year) > 2) {
+ $year = substr($year, -2, 2);
+ }
+
+ if ($six) {
+ $date = $day . $month . $year;
+ } else {
+ $date = $day . $month;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $date;
+}
+
+sub formatumsatz {
+ $main::lxdebug->enter_sub();
+
+ my ($umsatz, $stellen) = @_;
+
+ $umsatz =~ s/-//;
+ ($vorkomma, $nachkomma) = split /\./, $umsatz;
+ $umsatz = "";
+ if ($stellen > 0) {
+ for ($i = $stellen; $i >= $stellen + 2 - length($vorkomma); $i--) {
+ $umsatz .= "0";
+ }
+ }
+ for ($i = 3; $i > length($nachkomma); $i--) {
+ $nachkomma .= "0";
+ }
+ $umsatz = $vorkomma . substr($nachkomma, 0, 2);
+
+ $main::lxdebug->leave_sub();
+
+ return $umsatz;
+}
+
+sub make_ed_versionset {
+ $main::lxdebug->enter_sub();
+
+ my ($header, $filename, $blockcount, $fromto) = @_;
+
+ $versionset = "V" . substr($filename, 2, 5);
+ $versionset .= substr($header, 6, 22);
+ if ($fromto ne "") {
+ $versionset .= "0000" . substr($header, 28, 19);
+ } else {
+ $datum = "\x20" x 16;
+ $versionset .= $datum . "001" . substr($header, 28, 4);
+ }
+ while (length($blockcount) < 5) {
+ $blockcount = "0" . $blockcount;
+ }
+ $versionset .= $blockcount;
+ $versionset .= "001";
+ $versionset .= "\x20\x31";
+ $versionset .= substr($header, -12, 10) . " ";
+ $versionset .= "\x20" x 53;
+
+ $main::lxdebug->leave_sub();
+
+ return $versionset;
+}
+
+sub make_ev_header {
+ $main::lxdebug->enter_sub();
+
+ my ($form, $fileno) = @_;
+ $datentraegernr = $form->{datentraegernr};
+ $beraternummer = $form->{beraternr};
+ $beratername = $form->{beratername};
+ $anzahl_dateien = $fileno;
+
+ while (length($datentraegernr) < 3) {
+ $datentraegernr .= " ";
+ }
+
+ while (length($beraternummer) < 7) {
+ $beraternummer .= " ";
+ }
+
+ while (length($beratername) < 9) {
+ $beratername .= " ";
+ }
+
+ while (length($anzahl_dateien) < 5) {
+ $anzahl_dateien = "0" . $anzahl_dateien;
+ }
+
+ $ev_header =
+ $datentraegernr . "\x20\x20\x20" . $beraternummer . $beratername . "\x20";
+ $ev_header .= $anzahl_dateien . $anzahl_dateien;
+ $ev_header .= "\x20" x 95;
+
+ $main::lxdebug->leave_sub();
+
+ return $ev_header;
+}
+
+sub kne_buchungsexport {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+
+ my $export_path = "datev/";
+ my $filename = "ED00000";
+ my $evfile = "EV01";
+ my @ed_versionsets;
+ my $fileno = 0;
+
+ $fromto =
+ &get_dates($form->{zeitraum}, $form->{monat},
+ $form->{quartal}, $form->{transdatefrom},
+ $form->{transdateto});
+ &get_transactions($myconfig, $form, $fromto);
+
+ while (scalar(@{ $form->{DATEV} })) {
+ my $blockcount = 1;
+ my $remaining_bytes = 256;
+ my $total_bytes = 256;
+ my $umsatzsumme = 0;
+ my $buchungssatz = "";
+ $filename++;
+ my $ed_filename = $export_path . $filename;
+ open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
+ $header = &make_kne_data_header($myconfig, $form, $fromto);
+ $remaining_bytes -= length($header);
+
+ while (scalar(@{ $form->{DATEV} }) > 0) {
+ $transaction = shift @{ $form->{DATEV} };
+ $trans_lines = scalar(@{$transaction});
+ $umsatz = 0;
+ $gegenkonto = "";
+ $konto = "";
+ $belegfeld1 = "";
+ $datum = "";
+ $waehrung = "";
+ $buchungstext = "";
+ $belegfeld2 = "";
+ $datevautomatik = 0;
+ $taxkey = 0;
+ $charttax = 0;
+ %umlaute = ('ä' => 'ae',
+ 'ö' => 'oe',
+ 'ü' => 'ue',
+ 'Ä' => 'Ae',
+ 'Ö' => 'Oe',
+ 'Ü' => 'Ue',
+ 'ß' => 'sz');
+
+ for (my $i = 0; $i < $trans_lines; $i++) {
+ if (abs($transaction->[$i]->{'umsatz'}) > abs($umsatz)) {
+ $umsatz = $transaction->[$i]->{'umsatz'};
+ }
+ if ($transaction->[$i]->{'datevautomatik'}) {
+ $datevautomatik = 1;
+ }
+ if ($transaction->[$i]->{'taxkey'}) {
+ $taxkey = $transaction->[$i]->{'taxkey'};
+ }
+ if ($transaction->[$i]->{'charttax'}) {
+ $charttax = $transaction->[$i]->{'charttax'};
+ }
+ if ( ($transaction->[$i]->{'id'} eq $transaction->[$i]->{'chart_id'})
+ && ($trans_lines > 2)) {
+ undef($transaction->[$i]);
+ } elsif ($transaction->[$i]->{'amount'} > 0) {
+ $haben = $i;
+ } else {
+ $soll = $i;
+ }
+ }
+
+ $umsatzsumme += $umsatz;
+
+ # Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern
+ foreach $umlaut (keys(%umlaute)) {
+ $transaction->[$haben]->{'invnumber'} =~
+ s/${umlaut}/${umlaute{$umlaut}}/g;
+ $transaction->[$haben]->{'name'} =~ s/${umlaut}/${umlaute{$umlaut}}/g;
+ }
+
+ $transaction->[$haben]->{'invnumber'} =~ s/[^0-9A-Za-z\$\%\&\*\+\-\/]//g;
+ $transaction->[$haben]->{'name'} =~ s/[^0-9A-Za-z\$\%\&\*\+\-\ \/]//g;
+
+ $transaction->[$haben]->{'invnumber'} =
+ substr($transaction->[$haben]->{'invnumber'}, 0, 12);
+ $transaction->[$haben]->{'name'} =
+ substr($transaction->[$haben]->{'name'}, 0, 30);
+ $transaction->[$haben]->{'invnumber'} =~ s/\ *$//;
+ $transaction->[$haben]->{'name'} =~ s/\ *$//;
+
+ if ($trans_lines >= 2) {
+
+ $gegenkonto = "a" . $transaction->[$haben]->{'accno'};
+ $konto = "e" . $transaction->[$soll]->{'accno'};
+ if ($transaction->[$haben]->{'invnumber'} ne "") {
+ $belegfeld1 =
+ "\xBD" . $transaction->[$haben]->{'invnumber'} . "\x1C";
+ }
+ $datum = "d";
+ $datum .= &datetofour($transaction->[$haben]->{'transdate'}, 0);
+ $waehrung = "\xB3" . "EUR" . "\x1C";
+ if ($transaction->[$haben]->{'name'} ne "") {
+ $buchungstext = "\x1E" . $transaction->[$haben]->{'name'} . "\x1C";
+ }
+ if ($transaction->[$haben]->{'duedate'} ne "") {
+ $belegfeld2 = "\xBE"
+ . &datetofour($transaction->[$haben]->{'duedate'}, 1) . "\x1C";
+ }
+ }
+
+ if (($remaining_bytes - length("+" . &formatumsatz($umsatz, 0))) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $vorzeichen = ($umsatz > 0) ? "+" : "-";
+ $buchungssatz .= $vorzeichen . &formatumsatz($umsatz, 0);
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if ( ($taxkey || $datevautomatik)
+ && (!$datevautomatik || ($datevautomatik && ($charttax ne $taxkey)))) {
+ if (($remaining_bytes - length("\x6C" . "11")) <= 6) {
+ $fuellzeichen =
+ ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ if (!$datevautomatik) {
+ $buchungssatz .= "\x6C" . $taxkey;
+ } else {
+ $buchungssatz .= "\x6C" . "4";
+ }
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+ }
+
+ if (($remaining_bytes - length($gegenkonto)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $gegenkonto;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - length($belegfeld1)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $belegfeld1;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - length($belegfeld2)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $belegfeld2;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - length($datum)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $datum;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - length($konto)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $konto;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - length($buchungstext)) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $buchungstext;
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ if (($remaining_bytes - (length($waehrung . "\x79"))) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= $waehrung . "\x79";
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+
+ }
+
+ $mandantenendsumme =
+ "x" . &formatumsatz($umsatzsumme, 14) . "\x79" . "\x7a";
+ $fuellzeichen =
+ 256 - (length($header . $buchungssatz . $mandantenendsumme) % 256);
+ $dateiende = "\x00" x $fuellzeichen;
+ print(ED $header);
+ print(ED $buchungssatz);
+ print(ED $mandantenendsumme);
+ print(ED $dateiende);
+ close(ED);
+
+ $ed_versionset[$fileno] =
+ &make_ed_versionset($header, $filename, $blockcount, $fromto);
+ $fileno++;
+ }
+
+ #Make EV Verwaltungsdatei
+ $ev_header = &make_ev_header($form, $fileno);
+ $ev_filename = $export_path . $evfile;
+ open(EV, "> $ev_filename") or die "can't open outputfile: EV01\n";
+ print(EV $ev_header);
+
+ foreach $file (@ed_versionset) {
+ print(EV $ed_versionset[$file]);
+ }
+ close(EV);
+ ###
+ $main::lxdebug->leave_sub();
+}
+
+sub kne_stammdatenexport {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+ $form->{abrechnungsnr} = "99";
+
+ my $export_path = "datev/";
+ my $filename = "ED00000";
+ my $evfile = "EV01";
+ my @ed_versionsets;
+ my $fileno = 1;
+ my $i = 0;
+ my $blockcount = 1;
+ my $remaining_bytes = 256;
+ my $total_bytes = 256;
+ my $buchungssatz = "";
+ $filename++;
+ my $ed_filename = $export_path . $filename;
+ open(ED, "> $ed_filename") or die "can't open outputfile: $!\n";
+ $header = &make_kne_data_header($myconfig, $form, "");
+ $remaining_bytes -= length($header);
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query =
+ qq|SELECT c.accno, c.description FROM chart c WHERE c.accno >=|
+ . $dbh->quote($form->{accnofrom}) . qq|
+ AND c.accno <= |
+ . $dbh->quote($form->{accnoto})
+ . qq| ORDER BY c.accno|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if (($remaining_bytes - length("t" . $ref->{'accno'})) <= 6) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= "t" . $ref->{'accno'};
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+ $ref->{'description'} =~ s/[^0-9A-Za-z\$\%\&\*\+\-\/]//g;
+ $ref->{'description'} = substr($ref->{'description'}, 0, 40);
+ $ref->{'description'} =~ s/\ *$//;
+
+ if (
+ ($remaining_bytes - length("\x1E" . $ref->{'description'} . "\x1C\x79")
+ ) <= 6
+ ) {
+ $fuellzeichen = ($blockcount * 256 - length($buchungssatz . $header));
+ $buchungssatz .= "\x00" x $fuellzeichen;
+ $blockcount++;
+ $total_bytes = ($blockcount) * 256;
+ }
+ $buchungssatz .= "\x1E" . $ref->{'description'} . "\x1C\x79";
+ $remaining_bytes = $total_bytes - length($buchungssatz . $header);
+ }
+
+ $sth->finish;
+ print(ED $header);
+ print(ED $buchungssatz);
+ $fuellzeichen = 256 - (length($header . $buchungssatz . "z") % 256);
+ $dateiende = "\x00" x $fuellzeichen;
+ print(ED "z");
+ print(ED $dateiende);
+ close(ED);
+
+ #Make EV Verwaltungsdatei
+ $ed_versionset[0] =
+ &make_ed_versionset($header, $filename, $blockcount, $fromto);
+
+ $ev_header = &make_ev_header($form, $fileno);
+ $ev_filename = $export_path . $evfile;
+ open(EV, "> $ev_filename") or die "can't open outputfile: EV01\n";
+ print(EV $ev_header);
+
+ foreach $file (@ed_versionset) {
+ print(EV $ed_versionset[$file]);
+ }
+ close(EV);
+
+ $dbh->disconnect;
+ ###
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Thomas Bayen <bayen@gmx.de>
+# Antti Kaihola <akaihola@siba.fi>
+# Moritz Bunkus (tex code)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+# Utilities for parsing forms
+# and supporting routines for linking account numbers
+# used in AR, AP and IS, IR modules
+#
+#======================================================================
+
+package Form;
+
+sub _input_to_hash {
+ $main::lxdebug->enter_sub();
+
+ my $input = $_[0];
+ my %in = ();
+ my @pairs = split(/&/, $input);
+
+ foreach (@pairs) {
+ my ($name, $value) = split(/=/, $_, 2);
+ $in{$name} = unescape(undef, $value);
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return %in;
+}
+
+sub _request_to_hash {
+ $main::lxdebug->enter_sub();
+
+ my ($input) = @_;
+ my ($i, $loc, $key, $val);
+ my (%ATTACH, $f, $header, $header_body, $len, $buf);
+ my ($boundary, @list, $size, $body, $x, $blah, $name);
+
+ if ($ENV{'CONTENT_TYPE'}
+ && ($ENV{'CONTENT_TYPE'} =~ /multipart\/form-data; boundary=(.+)$/)) {
+ $boundary = quotemeta('--' . $1);
+ @list = split(/$boundary/, $input);
+
+ # For some reason there are always 2 extra, that are empty
+ $size = @list - 2;
+
+ for ($x = 1; $x <= $size; $x++) {
+ $header_body = $list[$x];
+ $header_body =~ /\r\n\r\n|\n\n/;
+
+ # Here we split the header and body
+ $header = $`;
+ $body = $'; #'
+ $body =~ s/\r\n$//;
+
+ # Now we try to get the file name
+ $name = $header;
+ $name =~ /name=\"(.+)\"/;
+ ($name, $blah) = split(/\"/, $1);
+
+ # If the form name is not attach, then we need to parse this like
+ # regular form data
+ if ($name ne "attach") {
+ $body =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
+ $ATTACH{$name} = $body;
+
+ # Otherwise it is an attachment and we need to finish it up
+ } elsif ($name eq "attach") {
+ $header =~ /filename=\"(.+)\"/;
+ $ATTACH{'FILE_NAME'} = $1;
+ $ATTACH{'FILE_NAME'} =~ s/\"//g;
+ $ATTACH{'FILE_NAME'} =~ s/\s//g;
+ $ATTACH{'FILE_CONTENT'} = $body;
+
+ for ($i = $x; $list[$i]; $i++) {
+ $list[$i] =~ s/^.+name=$//;
+ $list[$i] =~ /\"(\w+)\"/;
+ $ATTACH{$1} = $'; #'
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+ return %ATTACH;
+
+ } else {
+ $main::lxdebug->leave_sub();
+ return _input_to_hash($input);
+ }
+}
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my $type = shift;
+
+ my $self = {};
+
+ read(STDIN, $_, $ENV{CONTENT_LENGTH});
+
+ if ($ENV{QUERY_STRING}) {
+ $_ = $ENV{QUERY_STRING};
+ }
+
+ if ($ARGV[0]) {
+ $_ = $ARGV[0];
+ }
+
+ my %parameters = _request_to_hash($_);
+ map({ $self->{$_} = $parameters{$_}; } keys(%parameters));
+
+ $self->{menubar} = 1 if $self->{path} =~ /lynx/i;
+
+ $self->{action} = lc $self->{action};
+ $self->{action} =~ s/( |-|,|#)/_/g;
+
+ $self->{version} = "2.1.2";
+ $self->{dbversion} = "2.1.2";
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+sub debug {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ print "\n";
+
+ map { print "$_ = $self->{$_}\n" } (sort keys %{$self});
+
+ $main::lxdebug->leave_sub();
+}
+
+sub escape {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $str, $beenthere) = @_;
+
+ # for Apache 2 we escape strings twice
+ #if (($ENV{SERVER_SOFTWARE} =~ /Apache\/2/) && !$beenthere) {
+ # $str = $self->escape($str, 1);
+ #}
+
+ $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
+
+ $main::lxdebug->leave_sub();
+
+ return $str;
+}
+
+sub unescape {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $str) = @_;
+
+ $str =~ tr/+/ /;
+ $str =~ s/\\$//;
+
+ $str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
+
+ $main::lxdebug->leave_sub();
+
+ return $str;
+}
+
+sub error {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $msg) = @_;
+
+ if ($ENV{HTTP_USER_AGENT}) {
+ $msg =~ s/\n/<br>/g;
+
+ $self->header;
+
+ print qq|
+ <body>
+
+ <h2 class=error>Error!</h2>
+
+ <p><b>$msg</b>
+
+ </body>
+ </html>
+ |;
+
+ die "Error: $msg\n";
+
+ } else {
+
+ if ($self->{error_function}) {
+ &{ $self->{error_function} }($msg);
+ } else {
+ die "Error: $msg\n";
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub info {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $msg) = @_;
+
+ if ($ENV{HTTP_USER_AGENT}) {
+ $msg =~ s/\n/<br>/g;
+
+ if (!$self->{header}) {
+ $self->header;
+ print qq|
+ <body>|;
+ }
+
+ print qq|
+
+ <p><b>$msg</b>
+ |;
+
+ } else {
+
+ if ($self->{info_function}) {
+ &{ $self->{info_function} }($msg);
+ } else {
+ print "$msg\n";
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub numtextrows {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $str, $cols, $maxrows) = @_;
+
+ my $rows = 0;
+
+ map { $rows += int(((length) - 2) / $cols) + 1 } split /\r/, $str;
+
+ $maxrows = $rows unless defined $maxrows;
+
+ $main::lxdebug->leave_sub();
+
+ return ($rows > $maxrows) ? $maxrows : $rows;
+}
+
+sub dberror {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $msg) = @_;
+
+ $self->error("$msg\n" . $DBI::errstr);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub isblank {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $name, $msg) = @_;
+
+ if ($self->{$name} =~ /^\s*$/) {
+ $self->error($msg);
+ }
+ $main::lxdebug->leave_sub();
+}
+
+sub header {
+ $main::lxdebug->enter_sub();
+
+ my ($self) = @_;
+
+ if ($self->{header}) {
+ $main::lxdebug->leave_sub();
+ return;
+ }
+
+ my ($stylesheet, $favicon, $charset);
+
+ if ($ENV{HTTP_USER_AGENT}) {
+
+ if ($self->{stylesheet} && (-f "css/$self->{stylesheet}")) {
+ $stylesheet =
+ qq|<LINK REL="stylesheet" HREF="css/$self->{stylesheet}" TYPE="text/css" TITLE="Lx-Office stylesheet">
+ |;
+ }
+
+ if ($self->{favicon} && (-f "$self->{favicon}")) {
+ $favicon =
+ qq|<LINK REL="shortcut icon" HREF="$self->{favicon}" TYPE="image/x-icon">
+ |;
+ }
+
+ if ($self->{charset}) {
+ $charset =
+ qq|<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=$self->{charset}">
+ |;
+ }
+ if ($self->{landscape}) {
+ $pagelayout = qq|<style type="text/css">
+ \@page { size:landscape; }
+ </style>|;
+ }
+ if ($self->{fokus}) {
+ $fokus = qq|<script type="text/javascript">
+<!--
+function fokus(){document.$self->{fokus}.focus();}
+//-->
+</script>|;
+ }
+
+ #Set Calendar
+ $jsscript = "";
+ if ($self->{jsscript} == 1) {
+
+ $jsscript = qq|
+ <style type="text/css">\@import url(js/jscalendar/calendar-win2k-1.css);</style>
+ <script type="text/javascript" src="js/jscalendar/calendar.js"></script>
+ <script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>
+ <script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>
+ |;
+ }
+
+ $self->{titlebar} =
+ ($self->{title})
+ ? "$self->{title} - $self->{titlebar}"
+ : $self->{titlebar};
+
+ print qq|Content-Type: text/html
+
+<head>
+ <title>$self->{titlebar}</title>
+ $stylesheet
+ $pagelayout
+ $favicon
+ $charset
+ $jsscript
+ $fokus
+</head>
+
+|;
+ }
+ $self->{header} = 1;
+
+ $main::lxdebug->leave_sub();
+}
+
+# write Trigger JavaScript-Code ($qty = 1 - only one Trigger)
+sub write_trigger {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $qty,
+ $inputField_1, $align_1, $button_1,
+ $inputField_2, $align_2, $button_2)
+ = @_;
+
+ # set dateform for jsscript
+ # default
+ $ifFormat = "%d.%m.%Y";
+ if ($myconfig->{dateformat} eq "dd.mm.yy") {
+ $ifFormat = "%d.%m.%Y";
+ } else {
+ if ($myconfig->{dateformat} eq "dd-mm-yy") {
+ $ifFormat = "%d-%m-%Y";
+ } else {
+ if ($myconfig->{dateformat} eq "dd/mm/yy") {
+ $ifFormat = "%d/%m/%Y";
+ } else {
+ if ($myconfig->{dateformat} eq "mm/dd/yy") {
+ $ifFormat = "%m/%d/%Y";
+ } else {
+ if ($myconfig->{dateformat} eq "mm-dd-yy") {
+ $ifFormat = "%m-%d-%Y";
+ } else {
+ if ($myconfig->{dateformat} eq "yyyy-mm-dd") {
+ $ifFormat = "%Y-%m-%d";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ $trigger_1 = qq|
+ Calendar.setup(
+ {
+ inputField : "$inputField_1",
+ ifFormat :"$ifFormat",
+ align : "$align_1",
+ button : "$button_1"
+ }
+ );
+ |;
+
+ if ($qty == 2) {
+ $trigger_2 = qq|
+ Calendar.setup(
+ {
+ inputField : "$inputField_2",
+ ifFormat :"$ifFormat",
+ align : "$align_2",
+ button : "$button_2"
+ }
+ );
+ |;
+ }
+ $jsscript = qq|
+ <script type="text/javascript">
+ <!--
+ $trigger_1
+ $trigger_2
+ //-->
+ </script>
+ |;
+
+ $main::lxdebug->leave_sub();
+
+ return $jsscript;
+} #end sub write_trigger
+
+sub redirect {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $msg) = @_;
+
+ if ($self->{callback}) {
+
+ ($script, $argv) = split(/\?/, $self->{callback});
+ exec("perl", "$script", $argv);
+
+ } else {
+
+ $self->info($msg);
+ exit;
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+# sort of columns removed - empty sub
+sub sort_columns {
+ $main::lxdebug->enter_sub();
+
+ my ($self, @columns) = @_;
+
+ $main::lxdebug->leave_sub();
+
+ return @columns;
+}
+
+sub format_amount {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $amount, $places, $dash) = @_;
+
+ if ($places =~ /\d/) {
+ $amount = $self->round_amount($amount, $places);
+ }
+
+ # is the amount negative
+ my $negative = ($amount < 0);
+
+ if ($amount != 0) {
+ if ($myconfig->{numberformat} && ($myconfig->{numberformat} ne '1000.00'))
+ {
+ my ($whole, $dec) = split /\./, "$amount";
+ $whole =~ s/-//;
+ $amount = join '', reverse split //, $whole;
+
+ if ($myconfig->{numberformat} eq '1,000.00') {
+ $amount =~ s/\d{3,}?/$&,/g;
+ $amount =~ s/,$//;
+ $amount = join '', reverse split //, $amount;
+ $amount .= "\.$dec" if ($dec ne "");
+ }
+
+ if ($myconfig->{numberformat} eq '1.000,00') {
+ $amount =~ s/\d{3,}?/$&./g;
+ $amount =~ s/\.$//;
+ $amount = join '', reverse split //, $amount;
+ $amount .= ",$dec" if ($dec ne "");
+ }
+
+ if ($myconfig->{numberformat} eq '1000,00') {
+ $amount = "$whole";
+ $amount .= ",$dec" if ($dec ne "");
+ }
+
+ if ($dash =~ /-/) {
+ $amount = ($negative) ? "($amount)" : "$amount";
+ } elsif ($dash =~ /DRCR/) {
+ $amount = ($negative) ? "$amount DR" : "$amount CR";
+ } else {
+ $amount = ($negative) ? "-$amount" : "$amount";
+ }
+ }
+ } else {
+ if ($dash eq "0" && $places) {
+ if ($myconfig->{numberformat} eq '1.000,00') {
+ $amount = "0" . "," . "0" x $places;
+ } else {
+ $amount = "0" . "." . "0" x $places;
+ }
+ } else {
+ $amount = ($dash ne "") ? "$dash" : "0";
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $amount;
+}
+
+sub parse_amount {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $amount) = @_;
+
+ if (!(substr($amount, -3, 1) eq ".")) {
+ if ( ($myconfig->{numberformat} eq '1.000,00')
+ || ($myconfig->{numberformat} eq '1000,00')) {
+ $amount =~ s/\.//g;
+ $amount =~ s/,/\./;
+ }
+
+ $amount =~ s/,//g;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return ($amount * 1);
+}
+
+sub round_amount {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $amount, $places) = @_;
+ my $rc;
+
+ # $places = 3 if $places == 2;
+
+ if (($places * 1) >= 0) {
+
+ # add 1/10^$places+3
+ $rc =
+ sprintf("%.${places}f",
+ $amount + (1 / (10**($places + 3))) * (($amount > 0) ? 1 : -1));
+ } else {
+ $places *= -1;
+ $rc =
+ sprintf("%.f", $amount / (10**$places) + (($amount > 0) ? 0.1 : -0.1)) *
+ (10**$places);
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub parse_template {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $userspath) = @_;
+
+ # { Moritz Bunkus
+ # Some variables used for page breaks
+ my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) =
+ (0, 0, 0);
+ my ($current_page, $current_line) = (1, 1);
+ my $pagebreak = "";
+ my $sum = 0;
+
+ # } Moritz Bunkus
+
+ # Make sure that all *notes* (intnotes, partnotes_*, notes etc) are converted to markup correctly.
+ $self->format_string(grep(/notes/, keys(%{$self})));
+
+ # Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
+ $self->{"notes"} = $self->{ $self->{"formname"} . "notes" };
+
+ map({ $self->{"employee_${_}"} = $myconfig->{$_}; }
+ qw(email tel fax name signature));
+
+ open(IN, "$self->{templates}/$self->{IN}")
+ or $self->error("$self->{IN} : $!");
+
+ @_ = <IN>;
+ close(IN);
+
+ $self->{copies} = 1 if (($self->{copies} *= 1) <= 0);
+
+ # OUT is used for the media, screen, printer, email
+ # for postscript we store a copy in a temporary file
+ my $fileid = time;
+ $self->{tmpfile} = "$userspath/${fileid}.$self->{IN}";
+ if ($self->{format} =~ /(postscript|pdf)/ || $self->{media} eq 'email') {
+ $out = $self->{OUT};
+ $self->{OUT} = ">$self->{tmpfile}";
+ }
+
+ if ($self->{OUT}) {
+ open(OUT, "$self->{OUT}") or $self->error("$self->{OUT} : $!");
+ } else {
+ open(OUT, ">-") or $self->error("STDOUT : $!");
+ $self->header;
+ }
+
+ # Do we have to run LaTeX two times? This is needed if
+ # the template contains page references.
+ $two_passes = 0;
+
+ # first we generate a tmpfile
+ # read file and replace <%variable%>
+ while ($_ = shift) {
+
+ $par = "";
+ $var = $_;
+
+ $two_passes = 1 if (/\\pageref/);
+
+ # { Moritz Bunkus
+ # detect pagebreak block and its parameters
+ if (/\s*<%pagebreak ([0-9]+) ([0-9]+) ([0-9]+)%>/) {
+ $chars_per_line = $1;
+ $lines_on_first_page = $2;
+ $lines_on_second_page = $3;
+
+ while ($_ = shift) {
+ last if (/\s*<%end pagebreak%>/);
+ $pagebreak .= $_;
+ }
+ }
+
+ # } Moritz Bunkus
+
+ if (/\s*<%foreach /) {
+
+ # this one we need for the count
+ chomp $var;
+ $var =~ s/\s*<%foreach (.+?)%>/$1/;
+ while ($_ = shift) {
+ last if (/\s*<%end /);
+
+ # store line in $par
+ $par .= $_;
+ }
+
+ # display contents of $self->{number}[] array
+ for $i (0 .. $#{ $self->{$var} }) {
+
+ # { Moritz Bunkus
+ # Try to detect whether a manual page break is necessary
+ # but only if there was a <%pagebreak ...%> block before
+
+ if ($chars_per_line) {
+ my $lines =
+ int(length($self->{"description"}[$i]) / $chars_per_line + 0.95);
+ my $lpp;
+
+ my $_description = $self->{"description"}[$i];
+ while ($_description =~ /\\newline/) {
+ $lines++;
+ $_description =~ s/\\newline//;
+ }
+ $self->{"description"}[$i] =~ s/(\\newline\s?)*$//;
+
+ if ($current_page == 1) {
+ $lpp = $lines_on_first_page;
+ } else {
+ $lpp = $lines_on_second_page;
+ }
+
+ # Yes we need a manual page break
+ if (($current_line + $lines) > $lpp) {
+ my $pb = $pagebreak;
+
+ # replace the special variables <%sumcarriedforward%>
+ # and <%lastpage%>
+
+ my $psum = $self->format_amount($myconfig, $sum, 2);
+ $pb =~ s/<%sumcarriedforward%>/$psum/g;
+ $pb =~ s/<%lastpage%>/$current_page/g;
+
+ # only "normal" variables are supported here
+ # (no <%if, no <%foreach, no <%include)
+
+ $pb =~ s/<%(.+?)%>/$self->{$1}/g;
+
+ # page break block is ready to rock
+ print(OUT $pb);
+ $current_page++;
+ $current_line = 1;
+ }
+ $current_line += $lines;
+ }
+ $sum += $self->parse_amount($myconfig, $self->{"linetotal"}[$i]);
+
+ # } Moritz Bunkus
+
+ # don't parse par, we need it for each line
+ $_ = $par;
+ s/<%(.+?)%>/$self->{$1}[$i]/mg;
+ print OUT;
+ }
+ next;
+ }
+
+ # if not comes before if!
+ if (/\s*<%if not /) {
+
+ # check if it is not set and display
+ chop;
+ s/\s*<%if not (.+?)%>/$1/;
+
+ unless ($self->{$_}) {
+ while ($_ = shift) {
+ last if (/\s*<%end /);
+
+ # store line in $par
+ $par .= $_;
+ }
+
+ $_ = $par;
+
+ } else {
+ while ($_ = shift) {
+ last if (/\s*<%end /);
+ }
+ next;
+ }
+ }
+
+ if (/\s*<%if /) {
+
+ # check if it is set and display
+ chop;
+ s/\s*<%if (.+?)%>/$1/;
+
+ if ($self->{$_}) {
+ while ($_ = shift) {
+ last if (/\s*<%end /);
+
+ # store line in $par
+ $par .= $_;
+ }
+
+ $_ = $par;
+
+ } else {
+ while ($_ = shift) {
+ last if (/\s*<%end /);
+ }
+ next;
+ }
+ }
+
+ # check for <%include filename%>
+ if (/\s*<%include /) {
+
+ # get the filename
+ chomp $var;
+ $var =~ s/\s*<%include (.+?)%>/$1/;
+
+ # mangle filename
+ $var =~ s/(\/|\.\.)//g;
+
+ # prevent the infinite loop!
+ next if ($self->{"$var"});
+
+ open(INC, "$self->{templates}/$var")
+ or $self->error($self->cleanup . "$self->{templates}/$var : $!");
+ unshift(@_, <INC>);
+ close(INC);
+
+ $self->{"$var"} = 1;
+
+ next;
+ }
+
+ s/<%(.+?)%>/$self->{$1}/g;
+ print OUT;
+ }
+
+ close(OUT);
+
+ # { Moritz Bunkus
+ # Convert the tex file to postscript
+ if ($self->{format} =~ /(postscript|pdf)/) {
+
+ use Cwd;
+ $self->{cwd} = cwd();
+ $self->{tmpdir} = "$self->{cwd}/$userspath";
+
+ chdir("$userspath") or $self->error($self->cleanup . "chdir : $!");
+
+ $self->{tmpfile} =~ s/$userspath\///g;
+
+ if ($self->{format} eq 'postscript') {
+ system(
+ "latex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err"
+ );
+ $self->error($self->cleanup) if ($?);
+ if ($two_passes) {
+ system(
+ "latex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err"
+ );
+ $self->error($self->cleanup) if ($?);
+ }
+
+ $self->{tmpfile} =~ s/tex$/dvi/;
+
+ system("dvips $self->{tmpfile} -o -q > /dev/null");
+ $self->error($self->cleanup . "dvips : $!") if ($?);
+ $self->{tmpfile} =~ s/dvi$/ps/;
+ }
+ if ($self->{format} eq 'pdf') {
+ system(
+ "pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err"
+ );
+ $self->error($self->cleanup) if ($?);
+ if ($two_passes) {
+ system(
+ "pdflatex --interaction=nonstopmode $self->{tmpfile} > $self->{tmpfile}.err"
+ );
+ $self->error($self->cleanup) if ($?);
+ }
+ $self->{tmpfile} =~ s/tex$/pdf/;
+ }
+
+ }
+
+ if ($self->{format} =~ /(postscript|pdf)/ || $self->{media} eq 'email') {
+
+ if ($self->{media} eq 'email') {
+
+ use SL::Mailer;
+
+ my $mail = new Mailer;
+
+ map { $mail->{$_} = $self->{$_} }
+ qw(cc bcc subject message version format charset);
+ $mail->{to} = qq|$self->{email}|;
+ $mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
+ $mail->{fileid} = "$fileid.";
+
+ # if we send html or plain text inline
+ if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) {
+ $mail->{contenttype} = "text/html";
+
+ $mail->{message} =~ s/\r\n/<br>\n/g;
+ $myconfig->{signature} =~ s/\\n/<br>\n/g;
+ $mail->{message} .= "<br>\n--<br>\n$myconfig->{signature}\n<br>";
+
+ open(IN, $self->{tmpfile})
+ or $self->error($self->cleanup . "$self->{tmpfile} : $!");
+ while (<IN>) {
+ $mail->{message} .= $_;
+ }
+
+ close(IN);
+
+ } else {
+
+ @{ $mail->{attachments} } = ($self->{tmpfile});
+
+ $myconfig->{signature} =~ s/\\n/\r\n/g;
+ $mail->{message} .= "\r\n--\r\n$myconfig->{signature}";
+
+ }
+
+ my $err = $mail->send($out);
+ $self->error($self->cleanup . "$err") if ($err);
+
+ } else {
+
+ $self->{OUT} = $out;
+
+ my $numbytes = (-s $self->{tmpfile});
+ open(IN, $self->{tmpfile})
+ or $self->error($self->cleanup . "$self->{tmpfile} : $!");
+
+ $self->{copies} = 1 unless $self->{media} eq 'printer';
+
+ chdir("$self->{cwd}");
+
+ for my $i (1 .. $self->{copies}) {
+ if ($self->{OUT}) {
+ open(OUT, $self->{OUT})
+ or $self->error($self->cleanup . "$self->{OUT} : $!");
+ } else {
+
+ # launch application
+ print qq|Content-Type: application/$self->{format}
+Content-Disposition: attachment; filename="$self->{tmpfile}"
+Content-Length: $numbytes
+
+|;
+
+ open(OUT, ">-") or $self->error($self->cleanup . "$!: STDOUT");
+
+ }
+
+ while (<IN>) {
+ print OUT $_;
+ }
+
+ close(OUT);
+
+ seek IN, 0, 0;
+ }
+
+ close(IN);
+ }
+
+ $self->cleanup;
+
+ }
+
+ chdir("$self->{cwd}");
+ $main::lxdebug->leave_sub();
+}
+
+sub cleanup {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+
+ chdir("$self->{tmpdir}");
+
+ my @err = ();
+ if (-f "$self->{tmpfile}.err") {
+ open(FH, "$self->{tmpfile}.err");
+ @err = <FH>;
+ close(FH);
+ }
+
+ if ($self->{tmpfile}) {
+
+ # strip extension
+ $self->{tmpfile} =~ s/\.\w+$//g;
+ my $tmpfile = $self->{tmpfile};
+ unlink(<$tmpfile.*>);
+ }
+
+ chdir("$self->{cwd}");
+
+ $main::lxdebug->leave_sub();
+
+ return "@err";
+}
+
+sub format_string {
+ $main::lxdebug->enter_sub();
+
+ my ($self, @fields) = @_;
+ my %unique_fields;
+
+ %unique_fields = map({ $_ => 1 } @fields);
+ @fields = keys(%unique_fields);
+ my $format = $self->{format};
+ if ($self->{format} =~ /(postscript|pdf)/) {
+ $format = 'tex';
+ }
+
+ my %replace = (
+ 'order' => {
+ 'html' => [
+ '<', '>', quotemeta('\n'), '
+'
+ ],
+ 'tex' => [
+ '&', quotemeta('\n'), '
+',
+ '"', '\$', '%', '_', '#', quotemeta('^'),
+ '{', '}', '<', '>', '£', "\r"
+ ]
+ },
+ 'html' => {
+ '<' => '<',
+ '>' => '>',
+ quotemeta('\n') => '<br>',
+ '
+' => '<br>'
+ },
+ 'tex' => {
+ '"' => "''",
+ '&' => '\&',
+ '\$' => '\$',
+ '%' => '\%',
+ '_' => '\_',
+ '#' => '\#',
+ quotemeta('^') => '\^\\',
+ '{' => '\{',
+ '}' => '\}',
+ '<' => '$<$',
+ '>' => '$>$',
+ quotemeta('\n') => '\newline ',
+ '
+' => '\newline ',
+ '£' => '\pounds ',
+ "\r" => ""
+ });
+
+ foreach my $key (@{ $replace{order}{$format} }) {
+ map { $self->{$_} =~ s/$key/$replace{$format}{$key}/g; } @fields;
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub datetonum {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $date, $myconfig) = @_;
+
+ if ($date && $date =~ /\D/) {
+
+ if ($myconfig->{dateformat} =~ /^yy/) {
+ ($yy, $mm, $dd) = split /\D/, $date;
+ }
+ if ($myconfig->{dateformat} =~ /^mm/) {
+ ($mm, $dd, $yy) = split /\D/, $date;
+ }
+ if ($myconfig->{dateformat} =~ /^dd/) {
+ ($dd, $mm, $yy) = split /\D/, $date;
+ }
+
+ $dd *= 1;
+ $mm *= 1;
+ $yy = ($yy < 70) ? $yy + 2000 : $yy;
+ $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
+
+ $dd = "0$dd" if ($dd < 10);
+ $mm = "0$mm" if ($mm < 10);
+
+ $date = "$yy$mm$dd";
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $date;
+}
+
+# Database routines used throughout
+
+sub dbconnect {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ # connect to database
+ my $dbh =
+ DBI->connect($myconfig->{dbconnect},
+ $myconfig->{dbuser}, $myconfig->{dbpasswd})
+ or $self->dberror;
+
+ # set db options
+ if ($myconfig->{dboptions}) {
+ $dbh->do($myconfig->{dboptions}) || $self->dberror($myconfig->{dboptions});
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $dbh;
+}
+
+sub dbconnect_noauto {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ # connect to database
+ $dbh =
+ DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser},
+ $myconfig->{dbpasswd}, { AutoCommit => 0 })
+ or $self->dberror;
+
+ # set db options
+ if ($myconfig->{dboptions}) {
+ $dbh->do($myconfig->{dboptions}) || $self->dberror($myconfig->{dboptions});
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $dbh;
+}
+
+sub update_balance {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $table, $field, $where, $value) = @_;
+
+ # if we have a value, go do it
+ if ($value != 0) {
+
+ # retrieve balance from table
+ my $query = "SELECT $field FROM $table WHERE $where FOR UPDATE";
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $self->dberror($query);
+ my ($balance) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $balance += $value;
+
+ # update balance
+ $query = "UPDATE $table SET $field = $balance WHERE $where";
+ $dbh->do($query) || $self->dberror($query);
+ }
+ $main::lxdebug->leave_sub();
+}
+
+sub update_exchangerate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $curr, $transdate, $buy, $sell) = @_;
+
+ # some sanity check for currency
+ if ($curr eq '') {
+ $main::lxdebug->leave_sub();
+ return;
+ }
+
+ my $query = qq|SELECT e.curr FROM exchangerate e
+ WHERE e.curr = '$curr'
+ AND e.transdate = '$transdate'
+ FOR UPDATE|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $set;
+ if ($buy != 0 && $sell != 0) {
+ $set = "buy = $buy, sell = $sell";
+ } elsif ($buy != 0) {
+ $set = "buy = $buy";
+ } elsif ($sell != 0) {
+ $set = "sell = $sell";
+ }
+
+ if ($sth->fetchrow_array) {
+ $query = qq|UPDATE exchangerate
+ SET $set
+ WHERE curr = '$curr'
+ AND transdate = '$transdate'|;
+ } else {
+ $query = qq|INSERT INTO exchangerate (curr, buy, sell, transdate)
+ VALUES ('$curr', $buy, $sell, '$transdate')|;
+ }
+ $sth->finish;
+ $dbh->do($query) || $self->dberror($query);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_exchangerate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $currency, $transdate, $rate, $fld) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+
+ my ($buy, $sell) = (0, 0);
+ $buy = $rate if $fld eq 'buy';
+ $sell = $rate if $fld eq 'sell';
+
+ $self->update_exchangerate($dbh, $currency, $transdate, $buy, $sell);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_exchangerate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $curr, $transdate, $fld) = @_;
+
+ my $query = qq|SELECT e.$fld FROM exchangerate e
+ WHERE e.curr = '$curr'
+ AND e.transdate = '$transdate'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my ($exchangerate) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+
+ return $exchangerate;
+}
+
+sub check_exchangerate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $currency, $transdate, $fld) = @_;
+
+ unless ($transdate) {
+ $main::lxdebug->leave_sub();
+ return "";
+ }
+
+ my $dbh = $self->dbconnect($myconfig);
+
+ my $query = qq|SELECT e.$fld FROM exchangerate e
+ WHERE e.curr = '$currency'
+ AND e.transdate = '$transdate'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my ($exchangerate) = $sth->fetchrow_array;
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $exchangerate;
+}
+
+sub add_shipto {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+##LINET
+ my $shipto;
+ foreach
+ my $item (qw(name street zipcode city country contact phone fax email)) {
+ if ($self->{"shipto$item"}) {
+ $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
+ }
+ $self->{"shipto$item"} =~ s/\'/\'\'/g;
+ }
+
+ if ($shipto) {
+ my $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptostreet,
+ shiptozipcode, shiptocity, shiptocountry, shiptocontact,
+ shiptophone, shiptofax, shiptoemail) VALUES ($id,
+ '$self->{shiptoname}', '$self->{shiptostreet}',
+ '$self->{shiptozipcode}', '$self->{shiptocity}',
+ '$self->{shiptocountry}', '$self->{shiptocontact}',
+ '$self->{shiptophone}', '$self->{shiptofax}',
+ '$self->{shiptoemail}')|;
+ $dbh->do($query) || $self->dberror($query);
+ }
+##/LINET
+ $main::lxdebug->leave_sub();
+}
+
+sub get_employee {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh) = @_;
+
+ my $query = qq|SELECT e.id, e.name FROM employee e
+ WHERE e.login = '$self->{login}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($self->{employee_id}, $self->{employee}) = $sth->fetchrow_array;
+ $self->{employee_id} *= 1;
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
+# get other contact for transaction and form - html/tex
+sub get_contact {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+
+ my $query = qq|SELECT c.*
+ FROM contacts c
+ WHERE cp_id=$id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ push @{ $self->{$_} }, $ref;
+
+ $sth->finish;
+ $main::lxdebug->leave_sub();
+}
+
+# get contacts for id, if no contact return {"","","","",""}
+sub get_contacts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+
+ my $query = qq|SELECT c.cp_id, c.cp_cv_id, c.cp_name, c.cp_givenname
+ FROM contacts c
+ WHERE cp_cv_id=$id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $i = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_contacts} }, $ref;
+ $i++;
+ }
+
+ if ($i == 0) {
+ push @{ $self->{all_contacts} }, { { "", "", "", "", "" } };
+ }
+ $sth->finish;
+ $main::lxdebug->leave_sub();
+}
+
+# this sub gets the id and name from $table
+sub get_name {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $table) = @_;
+
+ # connect to database
+ my $dbh = $self->dbconnect($myconfig);
+
+ my $name = $self->like(lc $self->{$table});
+ my $customernumber = $self->like(lc $self->{customernumber});
+
+ if ($self->{customernumber} ne "") {
+ $query = qq~SELECT c.id, c.name,
+ c.street || ' ' || c.zipcode || ' ' || c.city || ' ' || c.country AS address
+ FROM $table c
+ WHERE (lower(c.customernumber) LIKE '$customernumber') AND (not c.obsolete)
+ ORDER BY c.name~;
+ } else {
+ $query = qq~SELECT c.id, c.name,
+ c.street || ' ' || c.zipcode || ' ' || c.city || ' ' || c.country AS address
+ FROM $table c
+ WHERE (lower(c.name) LIKE '$name') AND (not c.obsolete)
+ ORDER BY c.name~;
+ }
+
+ if ($self->{openinvoices}) {
+ $query = qq~SELECT DISTINCT c.id, c.name,
+ c.street || ' ' || c.zipcode || ' ' || c.city || ' ' || c.country AS address
+ FROM $self->{arap} a
+ JOIN $table c ON (a.${table}_id = c.id)
+ WHERE NOT a.amount = a.paid
+ AND lower(c.name) LIKE '$name'
+ ORDER BY c.name~;
+ }
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $self->dberror($query);
+
+ my $i = 0;
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $self->{name_list} }, $ref);
+ $i++;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $i;
+}
+
+# the selection sub is used in the AR, AP, IS, IR and OE module
+#
+sub all_vc {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $table, $module) = @_;
+
+ my $ref;
+ my $dbh = $self->dbconnect($myconfig);
+
+ my $query = qq|SELECT count(*) FROM $table|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ my ($count) = $sth->fetchrow_array;
+ $sth->finish;
+
+ # build selection list
+ if ($count < $myconfig->{vclimit}) {
+ $query = qq|SELECT id, name
+ FROM $table WHERE not obsolete
+ ORDER BY name|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{"all_$table"} }, $ref;
+ }
+
+ $sth->finish;
+
+ }
+
+ # get self
+ $self->get_employee($dbh);
+
+ # setup sales contacts
+ $query = qq|SELECT e.id, e.name
+ FROM employee e
+ WHERE e.sales = '1'
+ AND NOT e.id = $self->{employee_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_employees} }, $ref;
+ }
+ $sth->finish;
+
+ # this is for self
+ push @{ $self->{all_employees} },
+ { id => $self->{employee_id},
+ name => $self->{employee} };
+
+ # sort the whole thing
+ @{ $self->{all_employees} } =
+ sort { $a->{name} cmp $b->{name} } @{ $self->{all_employees} };
+
+ if ($module eq 'AR') {
+
+ # prepare query for departments
+ $query = qq|SELECT d.id, d.description
+ FROM department d
+ WHERE d.role = 'P'
+ ORDER BY 2|;
+
+ } else {
+ $query = qq|SELECT d.id, d.description
+ FROM department d
+ ORDER BY 2|;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_departments} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+# this is only used for reports
+sub all_departments {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $table) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+ my $where = "1 = 1";
+
+ if (defined $table) {
+ if ($table eq 'customer') {
+ $where = " d.role = 'P'";
+ }
+ }
+
+ my $query = qq|SELECT d.id, d.description
+ FROM department d
+ WHERE $where
+ ORDER BY 2|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_departments} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub create_links {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $module, $myconfig, $table) = @_;
+
+ $self->all_vc($myconfig, $table, $module);
+
+ # get last customers or vendors
+ my ($query, $sth);
+
+ my $dbh = $self->dbconnect($myconfig);
+
+ my %xkeyref = ();
+
+ # now get the account numbers
+ $query =
+ qq|SELECT c.accno, SUBSTRING(c.description,1,50) as description, c.link, c.taxkey_id
+ FROM chart c
+ WHERE c.link LIKE '%$module%'
+ ORDER BY c.accno|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $self->{accounts} = "";
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ foreach my $key (split /:/, $ref->{link}) {
+ if ($key =~ /$module/) {
+
+ # cross reference for keys
+ $xkeyref{ $ref->{accno} } = $key;
+
+ push @{ $self->{"${module}_links"}{$key} },
+ { accno => $ref->{accno},
+ description => $ref->{description},
+ taxkey => $ref->{taxkey_id} };
+
+ $self->{accounts} .= "$ref->{accno} " unless $key =~ /tax/;
+ }
+ }
+ }
+ $sth->finish;
+
+ if (($module eq "AP") || ($module eq "AR")) {
+
+ # get tax rates and description
+ $query = qq| SELECT * FROM tax t|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ $form->{TAX} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{TAX} }, $ref;
+ }
+ $sth->finish;
+ }
+
+ if ($self->{id}) {
+ my $arap = ($table eq 'customer') ? 'ar' : 'ap';
+
+ $query = qq|SELECT a.cp_id, a.invnumber, a.transdate,
+ a.${table}_id, a.datepaid, a.duedate, a.ordnumber,
+ a.taxincluded, a.curr AS currency, a.notes, a.intnotes,
+ c.name AS $table, a.department_id, d.description AS department,
+ a.amount AS oldinvtotal, a.paid AS oldtotalpaid,
+ a.employee_id, e.name AS employee, a.gldate
+ FROM $arap a
+ JOIN $table c ON (a.${table}_id = c.id)
+ LEFT JOIN employee e ON (e.id = a.employee_id)
+ LEFT JOIN department d ON (d.id = a.department_id)
+ WHERE a.id = $self->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ foreach $key (keys %$ref) {
+ $self->{$key} = $ref->{$key};
+ }
+ $sth->finish;
+
+ # get amounts from individual entries
+ $query = qq|SELECT c.accno, c.description, a.source, a.amount, a.memo,
+ a.transdate, a.cleared, a.project_id, p.projectnumber, a.taxkey, t.rate
+ FROM acc_trans a
+ JOIN chart c ON (c.id = a.chart_id)
+ LEFT JOIN project p ON (p.id = a.project_id)
+ LEFT Join tax t ON (a.taxkey = t.taxkey)
+ WHERE a.trans_id = $self->{id}
+ AND a.fx_transaction = '0'
+ ORDER BY a.transdate|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $fld = ($table eq 'customer') ? 'buy' : 'sell';
+
+ # get exchangerate for currency
+ $self->{exchangerate} =
+ $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate},
+ $fld);
+
+ # store amounts in {acc_trans}{$key} for multiple accounts
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{exchangerate} =
+ $self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate},
+ $fld);
+
+ push @{ $self->{acc_trans}{ $xkeyref{ $ref->{accno} } } }, $ref;
+ }
+ $sth->finish;
+
+ $query = qq|SELECT d.curr AS currencies, d.closedto, d.revtrans,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno
+ FROM defaults d|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $self->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ } else {
+
+ # get date
+ $query = qq|SELECT current_date AS transdate,
+ d.curr AS currencies, d.closedto, d.revtrans,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno
+ FROM defaults d|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $self->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ if ($self->{"$self->{vc}_id"}) {
+
+ # only setup currency
+ ($self->{currency}) = split /:/, $self->{currencies};
+
+ } else {
+
+ $self->lastname_used($dbh, $myconfig, $table, $module);
+
+ my $fld = ($table eq 'customer') ? 'buy' : 'sell';
+
+ # get exchangerate for currency
+ $self->{exchangerate} =
+ $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate},
+ $fld);
+
+ }
+
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub lastname_used {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $myconfig, $table, $module) = @_;
+
+ my $arap = ($table eq 'customer') ? "ar" : "ap";
+ my $where = "1 = 1";
+
+ if ($self->{type} =~ /_order/) {
+ $arap = 'oe';
+ $where = "quotation = '0'";
+ }
+ if ($self->{type} =~ /_quotation/) {
+ $arap = 'oe';
+ $where = "quotation = '1'";
+ }
+
+ my $query = qq|SELECT id FROM $arap
+ WHERE id IN (SELECT MAX(id) FROM $arap
+ WHERE $where
+ AND ${table}_id > 0)|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my ($trans_id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $trans_id *= 1;
+ $query = qq|SELECT ct.name, a.curr, a.${table}_id,
+ current_date + ct.terms AS duedate, a.department_id,
+ d.description AS department
+ FROM $arap a
+ JOIN $table ct ON (a.${table}_id = ct.id)
+ LEFT JOIN department d ON (a.department_id = d.id)
+ WHERE a.id = $trans_id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($self->{$table}, $self->{currency}, $self->{"${table}_id"},
+ $self->{duedate}, $self->{department_id}, $self->{department})
+ = $sth->fetchrow_array;
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub current_date {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $thisdate, $days) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+ my ($sth, $query);
+
+ $days *= 1;
+ if ($thisdate) {
+ my $dateformat = $myconfig->{dateformat};
+ $dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
+
+ $query = qq|SELECT to_date('$thisdate', '$dateformat') + $days AS thisdate
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ } else {
+ $query = qq|SELECT current_date AS thisdate
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ }
+
+ ($thisdate) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $thisdate;
+}
+
+sub like {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $string) = @_;
+
+ if ($string !~ /%/) {
+ $string = "%$string%";
+ }
+
+ $string =~ s/\'/\'\'/g;
+
+ $main::lxdebug->leave_sub();
+
+ return $string;
+}
+
+sub redo_rows {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $flds, $new, $count, $numrows) = @_;
+
+ my @ndx = ();
+
+ map { push @ndx, { num => $new->[$_ - 1]->{runningnumber}, ndx => $_ } }
+ (1 .. $count);
+
+ my $i = 0;
+
+ # fill rows
+ foreach my $item (sort { $a->{num} <=> $b->{num} } @ndx) {
+ $i++;
+ $j = $item->{ndx} - 1;
+ map { $self->{"${_}_$i"} = $new->[$j]->{$_} } @{$flds};
+ }
+
+ # delete empty rows
+ for $i ($count + 1 .. $numrows) {
+ map { delete $self->{"${_}_$i"} } @{$flds};
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub update_status {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ my ($i, $id);
+
+ my $dbh = $self->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM status
+ WHERE formname = '$self->{formname}'
+ AND trans_id = ?|;
+ my $sth = $dbh->prepare($query) || $self->dberror($query);
+
+ if ($self->{formname} =~ /(check|receipt)/) {
+ for $i (1 .. $self->{rowcount}) {
+ $sth->execute($self->{"id_$i"} * 1) || $self->dberror($query);
+ $sth->finish;
+ }
+ } else {
+ $sth->execute($self->{id}) || $self->dberror($query);
+ $sth->finish;
+ }
+
+ my $printed = ($self->{printed} =~ /$self->{formname}/) ? "1" : "0";
+ my $emailed = ($self->{emailed} =~ /$self->{formname}/) ? "1" : "0";
+
+ my %queued = split / /, $self->{queued};
+
+ if ($self->{formname} =~ /(check|receipt)/) {
+
+ # this is a check or receipt, add one entry for each lineitem
+ my ($accno) = split /--/, $self->{account};
+ $query = qq|INSERT INTO status (trans_id, printed, spoolfile, formname,
+ chart_id) VALUES (?, '$printed',
+ '$queued{$self->{formname}}', '$self->{prinform}',
+ (SELECT c.id FROM chart c WHERE c.accno = '$accno'))|;
+ $sth = $dbh->prepare($query) || $self->dberror($query);
+
+ for $i (1 .. $self->{rowcount}) {
+ if ($self->{"checked_$i"}) {
+ $sth->execute($self->{"id_$i"}) || $self->dberror($query);
+ $sth->finish;
+ }
+ }
+ } else {
+ $query = qq|INSERT INTO status (trans_id, printed, emailed,
+ spoolfile, formname)
+ VALUES ($self->{id}, '$printed', '$emailed',
+ '$queued{$self->{formname}}', '$self->{formname}')|;
+ $dbh->do($query) || $self->dberror($query);
+ }
+
+ $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_status {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh) = @_;
+
+ my ($query, $printed, $emailed);
+
+ my $formnames = $self->{printed};
+ my $emailforms = $self->{emailed};
+
+ my $query = qq|DELETE FROM status
+ WHERE formname = '$self->{formname}'
+ AND trans_id = $self->{id}|;
+ $dbh->do($query) || $self->dberror($query);
+
+ # this only applies to the forms
+ # checks and receipts are posted when printed or queued
+
+ if ($self->{queued}) {
+ my %queued = split / /, $self->{queued};
+
+ foreach my $formname (keys %queued) {
+ $printed = ($self->{printed} =~ /$self->{formname}/) ? "1" : "0";
+ $emailed = ($self->{emailed} =~ /$self->{formname}/) ? "1" : "0";
+
+ $query = qq|INSERT INTO status (trans_id, printed, emailed,
+ spoolfile, formname)
+ VALUES ($self->{id}, '$printed', '$emailed',
+ '$queued{$formname}', '$formname')|;
+ $dbh->do($query) || $self->dberror($query);
+
+ $formnames =~ s/$self->{formname}//;
+ $emailforms =~ s/$self->{formname}//;
+
+ }
+ }
+
+ # save printed, emailed info
+ $formnames =~ s/^ +//g;
+ $emailforms =~ s/^ +//g;
+
+ my %status = ();
+ map { $status{$_}{printed} = 1 } split / +/, $formnames;
+ map { $status{$_}{emailed} = 1 } split / +/, $emailforms;
+
+ foreach my $formname (keys %status) {
+ $printed = ($formnames =~ /$self->{formname}/) ? "1" : "0";
+ $emailed = ($emailforms =~ /$self->{formname}/) ? "1" : "0";
+
+ $query = qq|INSERT INTO status (trans_id, printed, emailed, formname)
+ VALUES ($self->{id}, '$printed', '$emailed', '$formname')|;
+ $dbh->do($query) || $self->dberror($query);
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub update_defaults {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $fld) = @_;
+
+ my $dbh = $self->dbconnect_noauto($myconfig);
+ my $query = qq|SELECT $fld FROM defaults FOR UPDATE|;
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $self->dberror($query);
+ my ($var) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $var++;
+
+ $query = qq|UPDATE defaults
+ SET $fld = '$var'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $var;
+}
+
+sub update_business {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $business_id) = @_;
+
+ my $dbh = $self->dbconnect_noauto($myconfig);
+ my $query =
+ qq|SELECT customernumberinit FROM business WHERE id=$business_id FOR UPDATE|;
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $self->dberror($query);
+ my ($var) = $sth->fetchrow_array;
+ $sth->finish;
+ if ($var ne "") {
+ $var++;
+ }
+ $query = qq|UPDATE business
+ SET customernumberinit = '$var' WHERE id=$business_id|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $var;
+}
+
+sub get_salesman {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $salesman) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+ my $query =
+ qq|SELECT id, name FROM customer WHERE (customernumber ilike '%$salesman%' OR name ilike '%$salesman%') AND business_id in (SELECT id from business WHERE salesman)|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $i = 0;
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $self->{salesman_list} }, $ref);
+ $i++;
+ }
+ $dbh->commit;
+ $main::lxdebug->leave_sub();
+
+ return $i;
+}
+
+sub get_partsgroup {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $p) = @_;
+
+ my $dbh = $self->dbconnect($myconfig);
+
+ my $query = qq|SELECT DISTINCT pg.id, pg.partsgroup
+ FROM partsgroup pg
+ JOIN parts p ON (p.partsgroup_id = pg.id)|;
+
+ if ($p->{searchitems} eq 'part') {
+ $query .= qq|
+ WHERE p.inventory_accno_id > 0|;
+ }
+ if ($p->{searchitems} eq 'service') {
+ $query .= qq|
+ WHERE p.inventory_accno_id IS NULL|;
+ }
+ if ($p->{searchitems} eq 'assembly') {
+ $query .= qq|
+ WHERE p.assembly = '1'|;
+ }
+ if ($p->{searchitems} eq 'labor') {
+ $query .= qq|
+ WHERE p.inventory_accno_id > 0 AND p.income_accno_id IS NULL|;
+ }
+
+ $query .= qq|
+ ORDER BY partsgroup|;
+
+ if ($p->{all}) {
+ $query = qq|SELECT id, partsgroup FROM partsgroup
+ ORDER BY partsgroup|;
+ }
+
+ if ($p->{language_code}) {
+ $query = qq|SELECT DISTINCT pg.id, pg.partsgroup,
+ t.description AS translation
+ FROM partsgroup pg
+ JOIN parts p ON (p.partsgroup_id = pg.id)
+ LEFT JOIN translation t ON (t.trans_id = pg.id AND t.language_code = '$p->{language_code}')
+ ORDER BY translation|;
+ }
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $self->{all_partsgroup} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{all_partsgroup} }, $ref;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+package Locale;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type, $country, $NLS_file) = @_;
+ my $self = {};
+
+ %self = ();
+ if ($country && -d "locale/$country") {
+ $self->{countrycode} = $country;
+ eval { require "locale/$country/$NLS_file"; };
+ }
+
+ $self->{NLS_file} = $NLS_file;
+
+ push @{ $self->{LONG_MONTH} },
+ ("January", "February", "March", "April",
+ "May ", "June", "July", "August",
+ "September", "October", "November", "December");
+ push @{ $self->{SHORT_MONTH} },
+ (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec));
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+sub text {
+ my ($self, $text) = @_;
+
+ return (exists $self{texts}{$text}) ? $self{texts}{$text} : $text;
+}
+
+sub findsub {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $text) = @_;
+
+ if (exists $self{subs}{$text}) {
+ $text = $self{subs}{$text};
+ } else {
+ if ($self->{countrycode} && $self->{NLS_file}) {
+ Form->error(
+ "$text not defined in locale/$self->{countrycode}/$self->{NLS_file}");
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $text;
+}
+
+sub date {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $date, $longformat) = @_;
+
+ my $longdate = "";
+ my $longmonth = ($longformat) ? 'LONG_MONTH' : 'SHORT_MONTH';
+
+ if ($date) {
+
+ # get separator
+ $spc = $myconfig->{dateformat};
+ $spc =~ s/\w//g;
+ $spc = substr($spc, 1, 1);
+
+ if ($date =~ /\D/) {
+ if ($myconfig->{dateformat} =~ /^yy/) {
+ ($yy, $mm, $dd) = split /\D/, $date;
+ }
+ if ($myconfig->{dateformat} =~ /^mm/) {
+ ($mm, $dd, $yy) = split /\D/, $date;
+ }
+ if ($myconfig->{dateformat} =~ /^dd/) {
+ ($dd, $mm, $yy) = split /\D/, $date;
+ }
+ } else {
+ $date = substr($date, 2);
+ ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/);
+ }
+
+ $dd *= 1;
+ $mm--;
+ $yy = ($yy < 70) ? $yy + 2000 : $yy;
+ $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
+
+ if ($myconfig->{dateformat} =~ /^dd/) {
+ if (defined $longformat && $longformat == 0) {
+ $mm++;
+ $dd = "0$dd" if ($dd < 10);
+ $mm = "0$mm" if ($mm < 10);
+ $longdate = "$dd$spc$mm$spc$yy";
+ } else {
+ $longdate = "$dd";
+ $longdate .= ($spc eq '.') ? ". " : " ";
+ $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy";
+ }
+ } elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") {
+
+ # Use German syntax with the ISO date style "yyyy-mm-dd" because
+ # Lx-Office is mainly used in Germany or German speaking countries.
+ if (defined $longformat && $longformat == 0) {
+ $mm++;
+ $dd = "0$dd" if ($dd < 10);
+ $mm = "0$mm" if ($mm < 10);
+ $longdate = "$yy-$mm-$dd";
+ } else {
+ $longdate = "$dd. ";
+ $longdate .= &text($self, $self->{$longmonth}[$mm]) . " $yy";
+ }
+ } else {
+ if (defined $longformat && $longformat == 0) {
+ $mm++;
+ $dd = "0$dd" if ($dd < 10);
+ $mm = "0$mm" if ($mm < 10);
+ $longdate = "$mm$spc$dd$spc$yy";
+ } else {
+ $longdate = &text($self, $self->{$longmonth}[$mm]) . " $dd, $yy";
+ }
+ }
+
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $longdate;
+}
+
+sub parse_date {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $date, $longformat) = @_;
+
+ unless ($date) {
+ $main::lxdebug->leave_sub();
+ return ();
+ }
+
+ # get separator
+ $spc = $myconfig->{dateformat};
+ $spc =~ s/\w//g;
+ $spc = substr($spc, 1, 1);
+
+ if ($date =~ /\D/) {
+ if ($myconfig->{dateformat} =~ /^yy/) {
+ ($yy, $mm, $dd) = split /\D/, $date;
+ } elsif ($myconfig->{dateformat} =~ /^mm/) {
+ ($mm, $dd, $yy) = split /\D/, $date;
+ } elsif ($myconfig->{dateformat} =~ /^dd/) {
+ ($dd, $mm, $yy) = split /\D/, $date;
+ }
+ } else {
+ $date = substr($date, 2);
+ ($yy, $mm, $dd) = ($date =~ /(..)(..)(..)/);
+ }
+
+ $dd *= 1;
+ $mm *= 1;
+ $yy = ($yy < 70) ? $yy + 2000 : $yy;
+ $yy = ($yy >= 70 && $yy <= 99) ? $yy + 1900 : $yy;
+
+ $main::lxdebug->leave_sub();
+ return ($yy, $mm, $dd);
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# General ledger backend code
+#
+# CHANGE LOG:
+# DS. 2000-07-04 Created
+# DS. 2001-06-12 Changed relations from accno to chart_id
+#
+#======================================================================
+
+package GL;
+
+use Data::Dumper;
+
+sub delete_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM gl WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # commit and redirect
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub post_transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($debit, $credit) = (0, 0);
+ my $project_id;
+
+ my $i;
+
+ # check if debit and credit balances
+
+ $debit = abs(int($form->round_amount($form->{debit}, 3) * 1000));
+ $credit = abs(int($form->round_amount($form->{credit}, 3) * 1000));
+ $tax = abs(int($form->round_amount($form->{tax}, 3) * 1000));
+
+ if ( (($debit >= $credit) && (abs($debit - ($credit + $tax)) > 4))
+ || (($debit < $credit) && (abs(($debit + $tax) - $credit) > 4))) {
+ return -2;
+ }
+
+ if (($debit + $credit + $tax) == 0) {
+ return -3;
+ }
+
+ $debit = $form->round_amount($form->{debit}, 2);
+ $credit = $form->round_amount($form->{credit}, 2);
+ $tax = $form->round_amount($form->{tax}, 2);
+ debug($debit, $credit, $tax, "Betraege");
+
+ if ($form->{storno}) {
+ $debit = $debit * -1;
+ $credit = $credit * -1;
+ $tax = $tax * -1;
+ $form->{reference} = "Storno-" . $form->{reference};
+ $form->{description} = "Storno-" . $form->{description};
+ }
+
+ # connect to database, turn off AutoCommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ # post the transaction
+ # make up a unique handle and store in reference field
+ # then retrieve the record based on the unique handle to get the id
+ # replace the reference field with the actual variable
+ # add records to acc_trans
+
+ # if there is a $form->{id} replace the old transaction
+ # delete all acc_trans entries and add the new ones
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(reference description notes);
+
+ if (!$form->{taxincluded}) {
+ $form->{taxincluded} = 0;
+ }
+
+ my ($query, $sth);
+ if ($form->{id}) {
+
+ # delete individual transactions
+ $query = qq|DELETE FROM acc_trans
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ } else {
+ my $uid = time;
+ $uid .= $form->{login};
+
+ $query = qq|INSERT INTO gl (reference, employee_id)
+ VALUES ('$uid', (SELECT e.id FROM employee e
+ WHERE e.login = '$form->{login}'))|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT g.id FROM gl g
+ WHERE g.reference = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ }
+ my ($null, $department_id) = split /--/, $form->{department};
+ $department_id *= 1;
+
+ $query = qq|UPDATE gl SET
+ reference = '$form->{reference}',
+ description = '$form->{description}',
+ notes = '$form->{notes}',
+ transdate = '$form->{transdate}',
+ department_id = $department_id,
+ taxincluded = '$form->{taxincluded}'
+ WHERE id = $form->{id}|;
+
+ $dbh->do($query) || $form->dberror($query);
+ ($taxkey, $rate) = split(/--/, $form->{taxkey});
+
+ # insert acc_trans transactions
+ foreach $i ((credit, debit)) {
+
+ # extract accno
+ ($accno) = split(/--/, $form->{"${i}chartselected"});
+ my $amount = 0;
+ debug("$accno $i Kontonummer");
+ if ($i eq "credit") {
+ $amount = $credit;
+ }
+ if ($i eq "debit") {
+ $amount = $debit * -1;
+ }
+
+ if ($form->{"${i}_splited"}) {
+
+ # if there is an amount, add the record
+ for $j (2 .. $form->{"${i}rowcount"}) {
+ ($accno) = split(/--/, $form->{"${i}chartselected_$j"});
+
+ $amount = $form->{"${i}_$j"};
+
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected_$j"});
+
+ if ($i eq "debit") {
+ $amount *= -1;
+ }
+ if ($amount != 0) {
+ $project_id =
+ ($form->{"project_id_$i"}) ? $form->{"project_id_$i"} : 'NULL';
+ $query =
+ qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, project_id, taxkey)
+ VALUES
+ ($form->{id}, (SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$accno'),
+ $amount, '$form->{transdate}', '$form->{reference}',
+ $project_id, $taxkey)|;
+
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ $tax = $form->{"tax_$j"};
+ print(STDERR $tax, " Steuer bei Durchlauf $j\n\n");
+ if ($tax != 0) {
+
+ # add taxentry
+ if ($i eq "debit") {
+ $tax = $tax * (-1);
+ }
+ $amount = $tax;
+
+ $project_id =
+ ($form->{"project_id_$i"}) ? $form->{"project_id_$i"} : 'NULL';
+ $query =
+ qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, project_id, taxkey)
+ VALUES
+ ($form->{id}, (SELECT t.chart_id
+ FROM tax t
+ WHERE t.taxkey = $taxkey),
+ $amount, '$form->{transdate}', '$form->{reference}',
+ $project_id, $taxkey)|;
+
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ } else {
+
+ # if there is an amount, add the record
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected"});
+ $taxkey *= 1;
+ debug("$amount auf $accno buchen");
+ if ($amount != 0) {
+ $project_id =
+ ($form->{"project_id_$i"}) ? $form->{"project_id_$i"} : 'NULL';
+ $query =
+ qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, project_id, taxkey)
+ VALUES
+ ($form->{id}, (SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$accno'),
+ $amount, '$form->{transdate}', '$form->{reference}',
+ $project_id, $taxkey)|;
+
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+ if ($tax != 0 && !($form->{credit_splited} || $form->{debit_splited})) {
+
+ # add taxentry
+ if ($form->{debittaxkey}) {
+ $tax = $tax * (-1);
+ }
+ $amount = $tax;
+ debug("$amount Steuern buchen");
+
+ $project_id =
+ ($form->{"project_id_$i"}) ? $form->{"project_id_$i"} : 'NULL';
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, project_id, taxkey)
+ VALUES
+ ($form->{id}, (SELECT t.chart_id
+ FROM tax t
+ WHERE t.taxkey = $taxkey),
+ $amount, '$form->{transdate}', '$form->{reference}',
+ $project_id, $taxkey)|;
+
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # commit and redirect
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub all_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+ my ($query, $sth, $source, $null);
+
+ my ($glwhere, $arwhere, $apwhere) = ("1 = 1", "1 = 1", "1 = 1");
+
+ if ($form->{reference}) {
+ $source = $form->like(lc $form->{reference});
+ $glwhere .= " AND lower(g.reference) LIKE '$source'";
+ $arwhere .= " AND lower(a.invnumber) LIKE '$source'";
+ $apwhere .= " AND lower(a.invnumber) LIKE '$source'";
+ }
+ if ($form->{department}) {
+ ($null, $source) = split /--/, $form->{department};
+ $glwhere .= " AND g.department_id = $source";
+ $arwhere .= " AND a.department_id = $source";
+ $apwhere .= " AND a.department_id = $source";
+ }
+
+ if ($form->{source}) {
+ $source = $form->like(lc $form->{source});
+ $glwhere .= " AND lower(ac.source) LIKE '$source'";
+ $arwhere .= " AND lower(ac.source) LIKE '$source'";
+ $apwhere .= " AND lower(ac.source) LIKE '$source'";
+ }
+ if ($form->{datefrom}) {
+ $glwhere .= " AND ac.transdate >= '$form->{datefrom}'";
+ $arwhere .= " AND ac.transdate >= '$form->{datefrom}'";
+ $apwhere .= " AND ac.transdate >= '$form->{datefrom}'";
+ }
+ if ($form->{dateto}) {
+ $glwhere .= " AND ac.transdate <= '$form->{dateto}'";
+ $arwhere .= " AND ac.transdate <= '$form->{dateto}'";
+ $apwhere .= " AND ac.transdate <= '$form->{dateto}'";
+ }
+ if ($form->{description}) {
+ my $description = $form->like(lc $form->{description});
+ $glwhere .= " AND lower(g.description) LIKE '$description'";
+ $arwhere .= " AND lower(ct.name) LIKE '$description'";
+ $apwhere .= " AND lower(ct.name) LIKE '$description'";
+ }
+ if ($form->{notes}) {
+ my $notes = $form->like(lc $form->{notes});
+ $glwhere .= " AND lower(g.notes) LIKE '$notes'";
+ $arwhere .= " AND lower(a.notes) LIKE '$notes'";
+ $apwhere .= " AND lower(a.notes) LIKE '$notes'";
+ }
+ if ($form->{accno}) {
+ $glwhere .= " AND c.accno = '$form->{accno}'";
+ $arwhere .= " AND c.accno = '$form->{accno}'";
+ $apwhere .= " AND c.accno = '$form->{accno}'";
+ }
+ if ($form->{gifi_accno}) {
+ $glwhere .= " AND c.gifi_accno = '$form->{gifi_accno}'";
+ $arwhere .= " AND c.gifi_accno = '$form->{gifi_accno}'";
+ $apwhere .= " AND c.gifi_accno = '$form->{gifi_accno}'";
+ }
+ if ($form->{category} ne 'X') {
+ $glwhere .= " AND c.category = '$form->{category}'";
+ $arwhere .= " AND c.category = '$form->{category}'";
+ $apwhere .= " AND c.category = '$form->{category}'";
+ }
+
+ if ($form->{accno}) {
+
+ # get category for account
+ $query = qq|SELECT c.category
+ FROM chart c
+ WHERE c.accno = '$form->{accno}'|;
+ $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+ ($form->{ml}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ if ($form->{datefrom}) {
+ $query = qq|SELECT SUM(ac.amount)
+ FROM acc_trans ac, chart c
+ WHERE ac.chart_id = c.id
+ AND c.accno = '$form->{accno}'
+ AND ac.transdate < date '$form->{datefrom}'
+ |;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{balance}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+ }
+
+ if ($form->{gifi_accno}) {
+
+ # get category for account
+ $query = qq|SELECT c.category
+ FROM chart c
+ WHERE c.gifi_accno = '$form->{gifi_accno}'|;
+ $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+ ($form->{ml}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ if ($form->{datefrom}) {
+ $query = qq|SELECT SUM(ac.amount)
+ FROM acc_trans ac, chart c
+ WHERE ac.chart_id = c.id
+ AND c.gifi_accno = '$form->{gifi_accno}'
+ AND ac.transdate < date '$form->{datefrom}'
+ |;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{balance}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+ }
+
+ my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE: q|'0'|;
+
+ my $query =
+ qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, t.taxkey AS sorttax,
+ g.description, ac.transdate, ac.source, ac.trans_id,
+ ac.amount, c.accno, c.gifi_accno, g.notes, t.chart_id, ac.oid
+ FROM gl g, acc_trans ac, chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id)
+ WHERE $glwhere
+ AND ac.chart_id = c.id
+ AND g.id = ac.trans_id
+ UNION
+ SELECT a.id, 'ar' AS type, a.invoice, a.invnumber, ac.taxkey, t.taxkey AS sorttax,
+ ct.name, ac.transdate, ac.source, ac.trans_id,
+ ac.amount, c.accno, c.gifi_accno, a.notes, t.chart_id, ac.oid
+ FROM ar a, acc_trans ac, customer ct, chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id)
+ WHERE $arwhere
+ AND ac.chart_id = c.id
+ AND a.customer_id = ct.id
+ AND a.id = ac.trans_id
+ UNION
+ SELECT a.id, 'ap' AS type, a.invoice, a.invnumber, ac.taxkey, t.taxkey AS sorttax,
+ ct.name, ac.transdate, ac.source, ac.trans_id,
+ ac.amount, c.accno, c.gifi_accno, a.notes, t.chart_id, ac.oid
+ FROM ap a, acc_trans ac, vendor ct, chart c LEFT JOIN tax t ON
+ (t.chart_id=c.id)
+ WHERE $apwhere
+ AND ac.chart_id = c.id
+ AND a.vendor_id = ct.id
+ AND a.id = ac.trans_id
+ ORDER BY transdate, trans_id, taxkey DESC, sorttax DESC, oid|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ print(STDERR $ref->{id}, " Transaction\n");
+
+ # gl
+ if ($ref->{type} eq "gl") {
+ $ref->{module} = "gl";
+ }
+
+ # ap
+ if ($ref->{type} eq "ap") {
+ if ($ref->{invoice}) {
+ $ref->{module} = "ir";
+ } else {
+ $ref->{module} = "ap";
+ }
+ }
+
+ # ar
+ if ($ref->{type} eq "ar") {
+ if ($ref->{invoice}) {
+ $ref->{module} = "is";
+ } else {
+ $ref->{module} = "ar";
+ }
+ }
+ $balance = $ref->{amount};
+ $i = 0;
+ $j = 0;
+ $k = 0;
+ $l = 0;
+ if ($ref->{amount} < 0) {
+ if ($ref->{chart_id} > 0) {
+ $ref->{debit_tax}{$i} = $ref->{amount} * -1;
+ $ref->{debit_tax_accno}{$i} = $ref->{accno};
+ } else {
+ $ref->{debit}{$k} = $ref->{amount} * -1;
+ $ref->{debit_accno}{$k} = $ref->{accno};
+ $ref->{debit_taxkey}{$k} = $ref->{taxkey};
+ }
+ } else {
+ if ($ref->{chart_id} > 0) {
+ $ref->{credit_tax}{$j} = $ref->{amount};
+ $ref->{credit_tax_accno}{$j} = $ref->{accno};
+ } else {
+ $ref->{credit}{$l} = $ref->{amount};
+ $ref->{credit_accno}{$l} = $ref->{accno};
+ $ref->{credit_taxkey}{$l} = $ref->{taxkey};
+ }
+ }
+
+ while (abs($balance) >= 0.015) {
+ my $ref2 = $sth->fetchrow_hashref(NAME_lc)
+ || $form->error("Unbalanced ledger!");
+
+ $balance =
+ (int($balance * 100000) + int(100000 * $ref2->{amount})) / 100000;
+ print(STDERR $balance, " BAlance\n");
+ if ($ref2->{amount} < 0) {
+ if ($ref2->{chart_id} > 0) {
+ if ($ref->{debit_tax_accno}{$i} ne "") {
+ $i++;
+ }
+ $ref->{debit_tax}{$i} = $ref2->{amount} * -1;
+ $ref->{debit_tax_accno}{$i} = $ref2->{accno};
+ } else {
+ if ($ref->{debit_accno}{$k} ne "") {
+ $k++;
+ }
+ $ref->{debit}{$k} = $ref2->{amount} * -1;
+ $ref->{debit_accno}{$k} = $ref2->{accno};
+ $ref->{debit_taxkey}{$k} = $ref2->{taxkey};
+ }
+ } else {
+ if ($ref2->{chart_id} > 0) {
+ if ($ref->{credit_tax_accno}{$j} ne "") {
+ $j++;
+ }
+ $ref->{credit_tax}{$j} = $ref2->{amount};
+ $ref->{credit_tax_accno}{$j} = $ref2->{accno};
+ } else {
+ if ($ref->{credit_accno}{$l} ne "") {
+ $l++;
+ }
+ $ref->{credit}{$l} = $ref2->{amount};
+ $ref->{credit_accno}{$l} = $ref2->{accno};
+ $ref->{credit_taxkey}{$l} = $ref2->{taxkey};
+ }
+ }
+ }
+
+ # print(STDERR Dumper($ref));
+ push @{ $form->{GL} }, $ref;
+ $balance = 0;
+ }
+ $sth->finish;
+
+ if ($form->{accno}) {
+ $query =
+ qq|SELECT c.description FROM chart c WHERE c.accno = '$form->{accno}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{account_description}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+ if ($form->{gifi_accno}) {
+ $query =
+ qq|SELECT g.description FROM gifi g WHERE g.accno = '$form->{gifi_accno}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{gifi_account_description}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub transaction {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($query, $sth, $ref);
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+ $form->{creditrowcount} = 1;
+ $form->{debitrowcount} = 1;
+ if ($form->{id}) {
+ $query = "SELECT closedto, revtrans
+ FROM defaults";
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{closedto}, $form->{revtrans}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $query = "SELECT g.reference, g.description, g.notes, g.transdate,
+ d.description AS department, e.name as employee, g.taxincluded, g.gldate
+ FROM gl g
+ LEFT JOIN department d ON (d.id = g.department_id)
+ LEFT JOIN employee e ON (e.id = g.employee_id)
+ WHERE g.id = $form->{id}";
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ # retrieve individual rows
+ $query = "SELECT c.accno, a.amount, project_id,
+ (SELECT p.projectnumber FROM project p
+ WHERE a.project_id = p.id) AS projectnumber, a.taxkey, (SELECT c1.accno FROM chart c1, tax t WHERE t.taxkey=a.taxkey AND c1.id=t.chart_id) AS taxaccno
+ FROM acc_trans a, chart c
+ WHERE a.chart_id = c.id
+ AND a.trans_id = $form->{id}
+ ORDER BY accno";
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $debitcount = 2;
+ $creditcount = 2;
+ $taxcount = 2;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ if ($ref->{accno} eq $ref->{taxaccno}) {
+ $form->{"tax_$taxcount"} = $ref->{amount};
+ $form->{"tax"} += $ref->{amount};
+ $form->{"taxchartselected_$taxcount"} = $ref->{taxkey};
+ $taxcount++;
+ } else {
+
+ if ($ref->{amount} < 0) {
+ $form->{"debit_$debitcount"} = $ref->{amount} * -1;
+ $form->{"debit"} += $ref->{amount} * -1;
+ $form->{"debitchartselected_$debitcount"} = $ref->{accno};
+ $debitcount++;
+ }
+ if ($ref->{amount} > 0) {
+
+ $form->{"credit_$creditcount"} = $ref->{amount};
+ $form->{"credit"} += $ref->{amount};
+ $form->{"creditchartselected_$creditcount"} = $ref->{accno};
+ $creditcount++;
+ }
+ }
+
+ $taxkey = $ref->{taxkey} * 1;
+ }
+ if ($creditcount > 3) {
+ $form->{credit_splited} = 1;
+ $form->{credit} = $form->{credit} + $form->{tax};
+ $form->{creditrowcount} = $creditcount - 1;
+ } else {
+ $form->{credit} = $form->{credit_2};
+ $form->{amount} = $form->{amount_2};
+ $form->{creditaccno} = $form->{creditchartselected_2};
+ }
+ if ($debitcount > 3) {
+ $form->{debit_splited} = 1;
+ $form->{debit} = $form->{debit} + $form->{tax};
+ $form->{debitrowcount} = $debitcount - 1;
+ } else {
+ $form->{debit} = $form->{debit_2};
+ $form->{debitaccno} = $form->{debitchartselected_2};
+ }
+
+ if ( (($form->{credit} > $form->{debit}) && (!$form->{taxincluded}))
+ || (($form->{credit} > $form->{debit}) && ($form->{taxincluded}))) {
+ $form->{amount} = $form->{debit};
+ } else {
+ $form->{amount} = $form->{credit};
+ }
+
+ # get tax description
+ $query = qq| SELECT * FROM tax t|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $form->{TAX} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAX} }, $ref;
+ }
+
+ $sth->finish;
+ } else {
+ $query = "SELECT current_date AS transdate, closedto, revtrans
+ FROM defaults";
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{transdate}, $form->{closedto}, $form->{revtrans}) =
+ $sth->fetchrow_array;
+
+ # get tax description
+ $query = qq| SELECT * FROM tax t order by t.taxkey|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $form->{TAX} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAX} }, $ref;
+ }
+ }
+
+ $sth->finish;
+
+ # get chart of accounts
+ $query = qq|SELECT c.accno, c.description, c.taxkey_id
+ FROM chart c
+ WHERE c.charttype = 'A'
+ ORDER by c.accno|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $form->{chart} = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{chart} }, $ref;
+ }
+ $sth->finish;
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub debug {
+ local *OUT;
+ if (open(OUT, ">>/tmp/linet.log")) {
+
+ # chomp(@_);
+ print(OUT join("\n", @_), "\n");
+ close(OUT);
+ } else {
+ print(STDERR "noe: $!\n");
+ }
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory Control backend
+#
+#======================================================================
+
+package IC;
+
+sub get_part {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to db
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.*,
+ c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE p.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ # copy to $form variables
+ map { $form->{$_} = $ref->{$_} } (keys %{$ref});
+
+ $sth->finish;
+
+ my %oid = ('Pg' => 'a.oid',
+ 'Oracle' => 'a.rowid');
+
+ # part or service item
+ $form->{item} = ($form->{inventory_accno}) ? 'part' : 'service';
+ if ($form->{assembly}) {
+ $form->{item} = 'assembly';
+
+ # retrieve assembly items
+ $query = qq|SELECT p.id, p.partnumber, p.description,
+ p.sellprice, p.weight, a.qty, a.bom, p.unit,
+ pg.partsgroup
+ FROM parts p
+ JOIN assembly a ON (a.parts_id = p.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE a.id = $form->{id}
+ ORDER BY $oid{$myconfig->{dbdriver}}|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $form->{assembly_rows} = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{assembly_rows}++;
+ foreach my $key (keys %{$ref}) {
+ $form->{"${key}_$form->{assembly_rows}"} = $ref->{$key};
+ }
+ }
+ $sth->finish;
+
+ }
+
+ # setup accno hash for <option checked> {amount} is used in create_links
+ $form->{amount}{IC} = $form->{inventory_accno};
+ $form->{amount}{IC_income} = $form->{income_accno};
+ $form->{amount}{IC_sale} = $form->{income_accno};
+ $form->{amount}{IC_expense} = $form->{expense_accno};
+ $form->{amount}{IC_cogs} = $form->{expense_accno};
+
+ unless ($form->{item} eq 'service') {
+
+ # get makes
+ if ($form->{makemodel}) {
+ $query = qq|SELECT m.make, m.model FROM makemodel m
+ WHERE m.parts_id = $form->{id}|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $i = 1;
+ while (($form->{"make_$i"}, $form->{"model_$i"}) = $sth->fetchrow_array)
+ {
+ $i++;
+ }
+ $sth->finish;
+ $form->{makemodel_rows} = $i - 1;
+
+ }
+ }
+
+ # now get accno for taxes
+ $query = qq|SELECT c.accno
+ FROM chart c, partstax pt
+ WHERE pt.chart_id = c.id
+ AND pt.parts_id = $form->{id}|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (($key) = $sth->fetchrow_array) {
+ $form->{amount}{$key} = $key;
+ }
+
+ $sth->finish;
+
+ # is it an orphan
+ $query = qq|SELECT i.parts_id
+ FROM invoice i
+ WHERE i.parts_id = $form->{id}
+ UNION
+ SELECT o.parts_id
+ FROM orderitems o
+ WHERE o.parts_id = $form->{id}
+ UNION
+ SELECT a.parts_id
+ FROM assembly a
+ WHERE a.parts_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ if ($form->{eur} && ($form->{item} ne 'service')) {
+ $form->{IC} = $form->{IC_expense};
+ }
+
+ ($form->{inventory_accno}) = split(/--/, $form->{IC});
+ ($form->{expense_accno}) = split(/--/, $form->{IC_expense});
+ ($form->{income_accno}) = split(/--/, $form->{IC_income});
+
+ # connect to database, turn off AutoCommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ # save the part
+ # make up a unique handle and store in partnumber field
+ # then retrieve the record based on the unique handle to get the id
+ # replace the partnumber field with the actual variable
+ # add records for makemodel
+
+ # if there is a $form->{id} then replace the old entry
+ # delete all makemodel entries and add the new ones
+
+ # escape '
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(partnumber description notes unit);
+
+ # undo amount formatting
+ map { $form->{$_} = $form->parse_amount($myconfig, $form->{$_}) }
+ qw(rop weight listprice sellprice gv lastcost stock);
+
+ # set date to NULL if nothing entered
+ $form->{priceupdate} =
+ ($form->{priceupdate}) ? qq|'$form->{priceupdate}'| : "NULL";
+
+ $form->{makemodel} = (($form->{make_1}) || ($form->{model_1})) ? 1 : 0;
+
+ $form->{alternate} = 0;
+ $form->{assembly} = ($form->{item} eq 'assembly') ? 1 : 0;
+ $form->{obsolete} *= 1;
+ $form->{shop} *= 1;
+ $form->{onhand} *= 1;
+ $form->{ve} *= 1;
+ $form->{ge} *= 1;
+
+ my ($query, $sth);
+
+ if ($form->{id}) {
+
+ # get old price
+ $query = qq|SELECT p.sellprice, p.weight
+ FROM parts p
+ WHERE p.id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my ($sellprice, $weight) = $sth->fetchrow_array;
+ $sth->finish;
+
+ # if item is part of an assembly adjust all assemblies
+ $query = qq|SELECT a.id, a.qty
+ FROM assembly a
+ WHERE a.parts_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ while (my ($id, $qty) = $sth->fetchrow_array) {
+ &update_assembly($dbh, $form, $id, $qty, $sellprice * 1, $weight * 1);
+ }
+ $sth->finish;
+
+ if ($form->{item} ne 'service') {
+
+ # delete makemodel records
+ $query = qq|DELETE FROM makemodel
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ if ($form->{item} eq 'assembly') {
+ if ($form->{onhand} != 0) {
+ &adjust_inventory($dbh, $form, $form->{id}, $form->{onhand} * -1);
+ }
+
+ # delete assembly records
+ $query = qq|DELETE FROM assembly
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $form->{onhand} += $form->{stock};
+ }
+
+ # delete tax records
+ $query = qq|DELETE FROM partstax
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ } else {
+ my $uid = time;
+ $uid .= $form->{login};
+
+ $query = qq|SELECT p.id FROM parts p
+ WHERE p.partnumber = '$form->{partnumber}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ if ($form->{id} ne "") {
+ $main::lxdebug->leave_sub();
+ return 3;
+ }
+ $query = qq|INSERT INTO parts (partnumber)
+ VALUES ('$uid')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT p.id FROM parts p
+ WHERE p.partnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $form->{orphaned} = 1;
+ $form->{onhand} = $form->{stock} if $form->{item} eq 'assembly';
+ if ($form->{partnumber} eq "" && $form->{inventory_accno} eq "") {
+ $form->{partnumber} = $form->update_defaults($myconfig, "servicenumber");
+ }
+ if ($form->{partnumber} eq "" && $form->{inventory_accno} ne "") {
+ $form->{partnumber} = $form->update_defaults($myconfig, "articlenumber");
+ }
+
+ }
+ my $partsgroup_id = 0;
+
+ if ($form->{partsgroup}) {
+ ($partsgroup, $partsgroup_id) = split /--/, $form->{partsgroup};
+ }
+
+ $query = qq|UPDATE parts SET
+ partnumber = '$form->{partnumber}',
+ description = '$form->{description}',
+ makemodel = '$form->{makemodel}',
+ alternate = '$form->{alternate}',
+ assembly = '$form->{assembly}',
+ listprice = $form->{listprice},
+ sellprice = $form->{sellprice},
+ lastcost = $form->{lastcost},
+ weight = $form->{weight},
+ priceupdate = $form->{priceupdate},
+ unit = '$form->{unit}',
+ notes = '$form->{notes}',
+ rop = $form->{rop},
+ bin = '$form->{bin}',
+ inventory_accno_id = (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{inventory_accno}'),
+ income_accno_id = (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{income_accno}'),
+ expense_accno_id = (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{expense_accno}'),
+ obsolete = '$form->{obsolete}',
+ image = '$form->{image}',
+ drawing = '$form->{drawing}',
+ shop = '$form->{shop}',
+ ve = '$form->{ve}',
+ gv = '$form->{gv}',
+ microfiche = '$form->{microfiche}',
+ partsgroup_id = $partsgroup_id
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # insert makemodel records
+ unless ($form->{item} eq 'service') {
+ for my $i (1 .. $form->{makemodel_rows}) {
+ if (($form->{"make_$i"}) || ($form->{"model_$i"})) {
+ map { $form->{"${_}_$i"} =~ s/\'/\'\'/g } qw(make model);
+
+ $query = qq|INSERT INTO makemodel (parts_id, make, model)
+ VALUES ($form->{id},
+ '$form->{"make_$i"}', '$form->{"model_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ # insert taxes
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"IC_tax_$item"}) {
+ $query = qq|INSERT INTO partstax (parts_id, chart_id)
+ VALUES ($form->{id},
+ (SELECT c.id
+ FROM chart c
+ WHERE c.accno = '$item'))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # add assembly records
+ if ($form->{item} eq 'assembly') {
+
+ for my $i (1 .. $form->{assembly_rows}) {
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+ $form->{"bom_$i"} *= 1;
+ $query = qq|INSERT INTO assembly (id, parts_id, qty, bom)
+ VALUES ($form->{id}, $form->{"id_$i"},
+ $form->{"qty_$i"}, '$form->{"bom_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # adjust onhand for the parts
+ if ($form->{onhand} != 0) {
+ &adjust_inventory($dbh, $form, $form->{id}, $form->{onhand});
+ }
+
+ @a = localtime;
+ $a[5] += 1900;
+ $a[4]++;
+ my $shippingdate = "$a[5]-$a[4]-$a[3]";
+
+ $form->get_employee($dbh);
+
+ # add inventory record
+ $query = qq|INSERT INTO inventory (warehouse_id, parts_id, qty,
+ shippingdate, employee_id) VALUES (
+ 0, $form->{id}, $form->{stock}, '$shippingdate',
+ $form->{employee_id})|;
+ $dbh->do($query) || $form->dberror($query);
+
+ }
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($form->{expense_accno} != $form->{inventory_accno})
+ ? $form->{inventory_accno}
+ : $form->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $form->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ ORDER BY c.accno|;
+ $stw = $dbh->prepare($query);
+
+ $stw->execute || $form->dberror($query);
+
+ $form->{taxaccount} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $form->{taxaccount} .= "$ptr->{accno} ";
+ if (!($form->{taxaccount2} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccount2} .= " $ptr->{accno} ";
+ }
+
+ }
+
+ # commit
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub update_assembly {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form, $id, $qty, $sellprice, $weight) = @_;
+
+ my $query = qq|SELECT a.id, a.qty
+ FROM assembly a
+ WHERE a.parts_id = $id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($pid, $aqty) = $sth->fetchrow_array) {
+ &update_assembly($dbh, $form, $pid, $aqty * $qty, $sellprice, $weight);
+ }
+ $sth->finish;
+
+ $query = qq|UPDATE parts
+ SET sellprice = sellprice +
+ $qty * ($form->{sellprice} - $sellprice),
+ weight = weight +
+ $qty * ($form->{weight} - $weight)
+ WHERE id = $id|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub retrieve_assemblies {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $where = '1 = 1';
+
+ if ($form->{partnumber}) {
+ my $partnumber = $form->like(lc $form->{partnumber});
+ $where .= " AND lower(p.partnumber) LIKE '$partnumber'";
+ }
+
+ if ($form->{description}) {
+ my $description = $form->like(lc $form->{description});
+ $where .= " AND lower(p.description) LIKE '$description'";
+ }
+ $where .= " AND NOT p.obsolete = '1'";
+
+ # retrieve assembly items
+ my $query = qq|SELECT p.id, p.partnumber, p.description,
+ p.bin, p.onhand, p.rop,
+ (SELECT sum(p2.inventory_accno_id)
+ FROM parts p2, assembly a
+ WHERE p2.id = a.parts_id
+ AND a.id = p.id) AS inventory
+ FROM parts p
+ WHERE $where
+ AND assembly = '1'|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{assembly_items} }, $ref if $ref->{inventory};
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub restock_assemblies {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ for my $i (1 .. $form->{rowcount}) {
+
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+ &adjust_inventory($dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"});
+ }
+
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub adjust_inventory {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form, $id, $qty) = @_;
+
+ my $query = qq|SELECT p.id, p.inventory_accno_id, p.assembly, a.qty
+ FROM parts p, assembly a
+ WHERE a.parts_id = p.id
+ AND a.id = $id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ my $allocate = $qty * $ref->{qty};
+
+ # is it a service item, then loop
+ $ref->{inventory_accno_id} *= 1;
+ next if (($ref->{inventory_accno_id} == 0) && !$ref->{assembly});
+
+ # adjust parts onhand
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $ref->{id}|,
+ $allocate * -1);
+ }
+
+ $sth->finish;
+
+ # update assembly
+ my $rc = $form->update_balance($dbh, "parts", "onhand", qq|id = $id|, $qty);
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub delete {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off AutoCommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM parts
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM partstax
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # check if it is a part, assembly or service
+ if ($form->{item} ne 'service') {
+ $query = qq|DELETE FROM makemodel
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ if ($form->{item} eq 'assembly') {
+
+ # delete inventory
+ $query = qq|DELETE FROM inventory
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM assembly
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ if ($form->{item} eq 'alternate') {
+ $query = qq|DELETE FROM alternate
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # commit
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub assembly_item {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $i = $form->{assembly_rows};
+ my $var;
+ my $where = "1 = 1";
+
+ if ($form->{"partnumber_$i"}) {
+ $var = $form->like(lc $form->{"partnumber_$i"});
+ $where .= " AND lower(p.partnumber) LIKE '$var'";
+ }
+ if ($form->{"description_$i"}) {
+ $var = $form->like(lc $form->{"description_$i"});
+ $where .= " AND lower(p.description) LIKE '$var'";
+ }
+ if ($form->{"partsgroup_$i"}) {
+ $var = $form->like(lc $form->{"partsgroup_$i"});
+ $where .= " AND lower(pg.partsgroup) LIKE '$var'";
+ }
+
+ if ($form->{id}) {
+ $where .= " AND NOT p.id = $form->{id}";
+ }
+
+ if ($partnumber) {
+ $where .= " ORDER BY p.partnumber";
+ } else {
+ $where .= " ORDER BY p.description";
+ }
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.partnumber, p.description, p.sellprice,
+ p.weight, p.onhand, p.unit,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $where|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{item_list} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub all_parts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $where = '1 = 1';
+ my $var;
+
+ my $group;
+ my $limit;
+
+ foreach my $item (qw(partnumber drawing microfiche make model)) {
+ if ($form->{$item}) {
+ $var = $form->like(lc $form->{$item});
+
+ # make will build later Bugfix 145
+ if ($item ne 'make') {
+ $where .= " AND lower(p.$item) LIKE '$var'";
+ }
+ }
+ }
+
+ # special case for description
+ if ($form->{description}) {
+ unless ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+ $var = $form->like(lc $form->{description});
+ $where .= " AND lower(p.description) LIKE '$var'";
+ }
+ }
+
+ # special case for serialnumber
+ if ($form->{l_serialnumber}) {
+ if ($form->{serialnumber}) {
+ $var = $form->like(lc $form->{serialnumber});
+ $where .= " AND lower(serialnumber) LIKE '$var'";
+ }
+ }
+
+ if ($form->{searchitems} eq 'part') {
+ $where .= " AND p.inventory_accno_id > 0";
+ }
+ if ($form->{searchitems} eq 'assembly') {
+ $form->{bought} = "";
+ $where .= " AND p.assembly = '1'";
+ }
+ if ($form->{searchitems} eq 'service') {
+ $where .= " AND p.inventory_accno_id IS NULL AND NOT p.assembly = '1'";
+
+ # irrelevant for services
+ $form->{make} = $form->{model} = "";
+ }
+
+ # items which were never bought, sold or on an order
+ if ($form->{itemstatus} eq 'orphaned') {
+ $form->{onhand} = $form->{short} = 0;
+ $form->{bought} = $form->{sold} = 0;
+ $form->{onorder} = $form->{ordered} = 0;
+ $form->{rfq} = $form->{quoted} = 0;
+
+ $form->{transdatefrom} = $form->{transdateto} = "";
+
+ $where .= " AND p.onhand = 0
+ AND p.id NOT IN (SELECT p.id FROM parts p, invoice i
+ WHERE p.id = i.parts_id)
+ AND p.id NOT IN (SELECT p.id FROM parts p, assembly a
+ WHERE p.id = a.parts_id)
+ AND p.id NOT IN (SELECT p.id FROM parts p, orderitems o
+ WHERE p.id = o.parts_id)";
+ }
+
+ if ($form->{itemstatus} eq 'active') {
+ $where .= " AND p.obsolete = '0'";
+ }
+ if ($form->{itemstatus} eq 'obsolete') {
+ $where .= " AND p.obsolete = '1'";
+ $form->{onhand} = $form->{short} = 0;
+ }
+ if ($form->{itemstatus} eq 'onhand') {
+ $where .= " AND p.onhand > 0";
+ }
+ if ($form->{itemstatus} eq 'short') {
+ $where .= " AND p.onhand < p.rop";
+ }
+ if ($form->{make}) {
+ $var = $form->like(lc $form->{make});
+ $where .= " AND p.id IN (SELECT DISTINCT ON (m.parts_id) m.parts_id
+ FROM makemodel m WHERE lower(m.make) LIKE '$var')";
+ }
+ if ($form->{model}) {
+ $var = $form->like(lc $form->{model});
+ $where .= " AND p.id IN (SELECT DISTINCT ON (m.parts_id) m.parts_id
+ FROM makemodel m WHERE lower(m.model) LIKE '$var')";
+ }
+ if ($form->{partsgroup}) {
+ $var = $form->like(lc $form->{partsgroup});
+ $where .= " AND lower(pg.partsgroup) LIKE '$var'";
+ }
+ if ($form->{l_soldtotal}) {
+ $where .= " AND p.id=i.parts_id AND i.qty >= 0";
+ $group =
+ " GROUP BY p.id,p.partnumber,p.description,p.onhand,p.unit,p.bin, p.sellprice,p.listprice,p.lastcost,p.priceupdate,pg.partsgroup";
+ }
+ if ($form->{top100}) {
+ $limit = " LIMIT 100";
+ }
+
+ # tables revers?
+ if ($form->{revers} == 1) {
+ $form->{desc} = " DESC";
+ } else {
+ $form->{desc} = "";
+ }
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $sortorder = $form->{sort};
+ $sortorder .= $form->{desc};
+ $sortorder = $form->{sort} unless $sortorder;
+
+ my $query = "";
+
+ if ($form->{l_soldtotal}) {
+ $form->{soldtotal} = 'soldtotal';
+ $query =
+ qq|SELECT p.id,p.partnumber,p.description,p.onhand,p.unit,p.bin,p.sellprice,p.listprice,
+ p.lastcost,p.priceupdate,pg.partsgroup,sum(i.qty) as soldtotal FROM parts
+ p LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id), invoice i
+ WHERE $where
+ $group
+ ORDER BY $sortorder
+ $limit|;
+ } else {
+ $query = qq|SELECT p.id, p.partnumber, p.description, p.onhand, p.unit,
+ p.bin, p.sellprice, p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $where
+ $group
+ ORDER BY $sortorder|;
+ }
+
+ # rebuild query for bought and sold items
+ if ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+
+ my @a = qw(partnumber description bin priceupdate name);
+
+ push @a, qw(invnumber serialnumber) if ($form->{bought} || $form->{sold});
+ push @a, "ordnumber" if ($form->{onorder} || $form->{ordered});
+ push @a, "quonumber" if ($form->{rfq} || $form->{quoted});
+
+ my $union = "";
+ $query = "";
+
+ if ($form->{bought} || $form->{sold}) {
+
+ my $invwhere = "$where";
+ $invwhere .= " AND i.assemblyitem = '0'";
+ $invwhere .= " AND a.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $invwhere .= " AND a.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+
+ if ($form->{description}) {
+ $var = $form->like(lc $form->{description});
+ $invwhere .= " AND lower(i.description) LIKE '$var'";
+ }
+
+ my $flds = qq|p.id, p.partnumber, i.description, i.serialnumber,
+ i.qty AS onhand, i.unit, p.bin, i.sellprice,
+ p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup,
+ a.invnumber, a.ordnumber, a.quonumber, i.trans_id,
+ ct.name|;
+
+ if ($form->{bought}) {
+ $query = qq|
+ SELECT $flds, 'ir' AS module, '' AS type,
+ 1 AS exchangerate
+ FROM invoice i
+ JOIN parts p ON (p.id = i.parts_id)
+ JOIN ap a ON (a.id = i.trans_id)
+ JOIN vendor ct ON (a.vendor_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $invwhere|;
+ $union = "
+ UNION";
+ }
+
+ if ($form->{sold}) {
+ $query .= qq|$union
+ SELECT $flds, 'is' AS module, '' AS type,
+ 1 As exchangerate
+ FROM invoice i
+ JOIN parts p ON (p.id = i.parts_id)
+ JOIN ar a ON (a.id = i.trans_id)
+ JOIN customer ct ON (a.customer_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $invwhere|;
+ $union = "
+ UNION";
+ }
+ }
+
+ if ($form->{onorder} || $form->{ordered}) {
+ my $ordwhere = "$where
+ AND o.quotation = '0'";
+ $ordwhere .= " AND o.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $ordwhere .= " AND o.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+
+ if ($form->{description}) {
+ $var = $form->like(lc $form->{description});
+ $ordwhere .= " AND lower(oi.description) LIKE '$var'";
+ }
+
+ $flds = qq|p.id, p.partnumber, oi.description, '' AS serialnumber,
+ oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
+ p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup,
+ '' AS invnumber, o.ordnumber, o.quonumber, oi.trans_id,
+ ct.name|;
+
+ if ($form->{ordered}) {
+ $query .= qq|$union
+ SELECT $flds, 'oe' AS module, 'sales_order' AS type,
+ (SELECT buy FROM exchangerate ex
+ WHERE ex.curr = o.curr
+ AND ex.transdate = o.transdate) AS exchangerate
+ FROM orderitems oi
+ JOIN parts p ON (oi.parts_id = p.id)
+ JOIN oe o ON (oi.trans_id = o.id)
+ JOIN customer ct ON (o.customer_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $ordwhere
+ AND o.customer_id > 0|;
+ $union = "
+ UNION";
+ }
+
+ if ($form->{onorder}) {
+ $flds = qq|p.id, p.partnumber, oi.description, '' AS serialnumber,
+ oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
+ p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup,
+ '' AS invnumber, o.ordnumber, o.quonumber, oi.trans_id,
+ ct.name|;
+
+ $query .= qq|$union
+ SELECT $flds, 'oe' AS module, 'purchase_order' AS type,
+ (SELECT sell FROM exchangerate ex
+ WHERE ex.curr = o.curr
+ AND ex.transdate = o.transdate) AS exchangerate
+ FROM orderitems oi
+ JOIN parts p ON (oi.parts_id = p.id)
+ JOIN oe o ON (oi.trans_id = o.id)
+ JOIN vendor ct ON (o.vendor_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $ordwhere
+ AND o.vendor_id > 0|;
+ }
+
+ }
+
+ if ($form->{rfq} || $form->{quoted}) {
+ my $quowhere = "$where
+ AND o.quotation = '1'";
+ $quowhere .= " AND o.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $quowhere .= " AND o.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+
+ if ($form->{description}) {
+ $var = $form->like(lc $form->{description});
+ $quowhere .= " AND lower(oi.description) LIKE '$var'";
+ }
+
+ $flds = qq|p.id, p.partnumber, oi.description, '' AS serialnumber,
+ oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
+ p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup,
+ '' AS invnumber, o.ordnumber, o.quonumber, oi.trans_id,
+ ct.name|;
+
+ if ($form->{quoted}) {
+ $query .= qq|$union
+ SELECT $flds, 'oe' AS module, 'sales_quotation' AS type,
+ (SELECT buy FROM exchangerate ex
+ WHERE ex.curr = o.curr
+ AND ex.transdate = o.transdate) AS exchangerate
+ FROM orderitems oi
+ JOIN parts p ON (oi.parts_id = p.id)
+ JOIN oe o ON (oi.trans_id = o.id)
+ JOIN customer ct ON (o.customer_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $quowhere
+ AND o.customer_id > 0|;
+ $union = "
+ UNION";
+ }
+
+ if ($form->{rfq}) {
+ $flds = qq|p.id, p.partnumber, oi.description, '' AS serialnumber,
+ oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
+ p.listprice, p.lastcost, p.rop, p.weight,
+ p.priceupdate, p.image, p.drawing, p.microfiche,
+ pg.partsgroup,
+ '' AS invnumber, o.ordnumber, o.quonumber, oi.trans_id,
+ ct.name|;
+
+ $query .= qq|$union
+ SELECT $flds, 'oe' AS module, 'request_quotation' AS type,
+ (SELECT sell FROM exchangerate ex
+ WHERE ex.curr = o.curr
+ AND ex.transdate = o.transdate) AS exchangerate
+ FROM orderitems oi
+ JOIN parts p ON (oi.parts_id = p.id)
+ JOIN oe o ON (oi.trans_id = o.id)
+ JOIN vendor ct ON (o.vendor_id = ct.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $quowhere
+ AND o.vendor_id > 0|;
+ }
+
+ }
+ $query .= qq|
+ ORDER BY $sortorder|;
+
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{parts} }, $ref;
+ }
+
+ $sth->finish;
+
+ # include individual items for assemblies
+ if ($form->{searchitems} eq 'assembly' && $form->{bom}) {
+ foreach $item (@{ $form->{parts} }) {
+ push @assemblies, $item;
+ $query = qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
+ p.unit, p.bin,
+ p.sellprice, p.listprice, p.lastcost,
+ p.rop, p.weight, p.priceupdate,
+ p.image, p.drawing, p.microfiche
+ FROM parts p, assembly a
+ WHERE p.id = a.parts_id
+ AND a.id = $item->{id}|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{assemblyitem} = 1;
+ push @assemblies, $ref;
+ }
+ $sth->finish;
+
+ push @assemblies, { id => $item->{id} };
+
+ }
+
+ # copy assemblies to $form->{parts}
+ @{ $form->{parts} } = @assemblies;
+ }
+
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+sub create_links {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $module, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ if ($form->{id}) {
+ $query = qq|SELECT c.accno, c.description, c.link, c.id,
+ p.inventory_accno_id, p.income_accno_id, p.expense_accno_id
+ FROM chart c, parts p
+ WHERE c.link LIKE '%$module%'
+ AND p.id = $form->{id}
+ ORDER BY c.accno|;
+ } else {
+ $query = qq|SELECT c.accno, c.description, c.link, c.id,
+ d.inventory_accno_id, d.income_accno_id, d.expense_accno_id
+ FROM chart c, defaults d
+ WHERE c.link LIKE '%$module%'
+ ORDER BY c.accno|;
+ }
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ foreach my $key (split /:/, $ref->{link}) {
+ if ($key =~ /$module/) {
+ if ( ($ref->{id} eq $ref->{inventory_accno_id})
+ || ($ref->{id} eq $ref->{income_accno_id})
+ || ($ref->{id} eq $ref->{expense_accno_id})) {
+ push @{ $form->{"${module}_links"}{$key} },
+ { accno => $ref->{accno},
+ description => $ref->{description},
+ selected => "selected" };
+ } else {
+ push @{ $form->{"${module}_links"}{$key} },
+ { accno => $ref->{accno},
+ description => $ref->{description},
+ selected => "" };
+ }
+ }
+ }
+ }
+ $sth->finish;
+
+ if ($form->{id}) {
+ $query = qq|SELECT weightunit
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{weightunit}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ } else {
+ $query = qq|SELECT weightunit, current_date
+ FROM defaults|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{weightunit}, $form->{priceupdate}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+# get partnumber, description, unit, sellprice and soldtotal with choice through $sortorder for Top100
+sub get_parts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $sortorder) = @_;
+ my $dbh = $form->dbconnect($myconfig);
+ my $order = " p.partnumber";
+ my $where = "1 = 1";
+
+ if ($sortorder eq "all") {
+ $where .= " AND p.partnumber LIKE '%$form->{partnumber}%'";
+ $where .= " AND p.description LIKE '%$form->{description}%'";
+ } else {
+ if ($sortorder eq "partnumber") {
+ $where .= " AND p.partnumber LIKE '%$form->{partnumber}%'";
+ $order = qq|p.$sortorder|;
+ }
+ if ($sortorder eq "description") {
+ $where .= " AND p.description LIKE '%$form->{description}%'";
+ }
+ }
+
+ my $query =
+ qq|SELECT p.id, p.partnumber, p.description, p.unit, p.sellprice FROM parts p WHERE $where ORDER BY $order|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ my $j = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if (($ref->{partnumber} eq "*") && ($ref->{description} eq "")) {
+ } else {
+ $j++;
+ $form->{"id_$j"} = $ref->{id};
+ $form->{"partnumber_$j"} = $ref->{partnumber};
+ $form->{"description_$j"} = $ref->{description};
+ $form->{"unit_$j"} = $ref->{unit};
+ $form->{"sellprice_$j"} = $ref->{sellprice};
+ $form->{"soldtotal_$j"} = get_soldtotal($dbh, $ref->{id});
+ } #fi
+ } #while
+ $form->{rows} = $j;
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $self;
+} #end get_parts()
+
+# gets sum of sold part with part_id
+sub get_soldtotal {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $id) = @_;
+
+ my $query =
+ qq|SELECT sum(i.qty) as totalsold FROM invoice i WHERE i.parts_id = $id|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $sum = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ $sum = $ref->{totalsold};
+ } #while
+ $sth->finish;
+
+ if ($sum eq undef) {
+ $sum = 0;
+ } #fi
+
+ $main::lxdebug->leave_sub();
+
+ return $sum;
+} #end get_soldtotal
+
+sub retrieve_item {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $i = $form->{rowcount};
+ my $where = "NOT p.obsolete = '1'";
+
+ if ($form->{"partnumber_$i"}) {
+ my $partnumber = $form->like(lc $form->{"partnumber_$i"});
+ $where .= " AND lower(p.partnumber) LIKE '$partnumber'";
+ }
+ if ($form->{"description_$i"}) {
+ my $description = $form->like(lc $form->{"description_$i"});
+ $where .= " AND lower(p.description) LIKE '$description'";
+ }
+
+ if ($form->{"partsgroup_$i"}) {
+ my $partsgroup = $form->like(lc $form->{"partsgroup_$i"});
+ $where .= " AND lower(pg.partsgroup) LIKE '$partsgroup'";
+ }
+
+ if ($form->{"description_$i"}) {
+ $where .= " ORDER BY description";
+ } else {
+ $where .= " ORDER BY partnumber";
+ }
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.partnumber, p.description, p.sellprice,
+ p.listprice,
+ c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ p.unit, p.assembly, p.bin, p.onhand, p.notes AS partnotes,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
+ WHERE $where|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ #while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ # get tax rates and description
+ #$accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{inventory_accno};
+ #$query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ # FROM chart c, tax t
+ # WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ # ORDER BY accno|;
+ # $stw = $dbh->prepare($query);
+ #$stw->execute || $form->dberror($query);
+
+ #$ref->{taxaccounts} = "";
+ #while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ # $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ # $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ # $form->{taxaccounts} .= "$ptr->{accno} ";
+ # $ref->{taxaccounts} .= "$ptr->{accno} ";
+
+ #}
+
+ #$stw->finish;
+ #chop $ref->{taxaccounts};
+
+ push @{ $form->{item_list} }, $ref;
+
+ #}
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory received module
+#
+#======================================================================
+
+package IR;
+
+sub post_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($query, $sth, $null, $project_id);
+ my $exchangerate = 0;
+ my $allocated;
+ my $taxrate;
+ my $taxamount;
+ my $taxdiff;
+ my $item;
+
+ if ($form->{id}) {
+
+ &reverse_invoice($dbh, $form);
+
+ } else {
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO ap (invnumber, employee_id)
+ VALUES ('$uid', (SELECT e.id FROM employee e
+ WHERE e.login = '$form->{login}'))|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT a.id FROM ap a
+ WHERE a.invnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ ($null, $form->{contact_id}) = split /--/, $form->{contact};
+ $form->{contact_id} *= 1;
+
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(invnumber ordnumber quonumber);
+
+ my ($amount, $linetotal, $lastinventoryaccno, $lastexpenseaccno);
+ my ($netamount, $invoicediff, $expensediff) = (0, 0, 0);
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{exchangerate} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{transdate}, 'sell');
+ }
+
+ $form->{exchangerate} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{exchangerate});
+
+ for my $i (1 .. $form->{rowcount}) {
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+
+ map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
+ qw(partnumber description unit);
+
+ @taxaccounts = split / /, $form->{"taxaccounts_$i"};
+ $taxdiff = 0;
+ $allocated = 0;
+ $taxrate = 0;
+
+ $form->{"sellprice_$i"} =
+ $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+ my $fxsellprice = $form->{"sellprice_$i"};
+
+ my ($dec) = ($fxsellprice =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ map { $taxrate += $form->{"${_}_rate"} } @taxaccounts;
+
+ if ($form->{"inventory_accno_$i"}) {
+
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2);
+
+ if ($form->{taxincluded}) {
+ $taxamount = $linetotal * ($taxrate / (1 + $taxrate));
+ $form->{"sellprice_$i"} =
+ $form->{"sellprice_$i"} * (1 / (1 + $taxrate));
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ }
+
+ $netamount += $linetotal;
+
+ if ($form->round_amount($taxrate, 7) == 0) {
+ if ($form->{taxincluded}) {
+ foreach $item (@taxaccounts) {
+ $taxamount =
+ $form->round_amount($linetotal * $form->{"${item}_rate"} /
+ (1 + abs($form->{"${item}_rate"})),
+ 2);
+ $taxdiff += $taxamount;
+ $form->{amount}{ $form->{id} }{$item} -= $taxamount;
+ }
+ $form->{amount}{ $form->{id} }{ $taxaccounts[0] } += $taxdiff;
+ } else {
+ map {
+ $form->{amount}{ $form->{id} }{$_} -=
+ $linetotal * $form->{"${_}_rate"}
+ } @taxaccounts;
+ }
+ } else {
+ map {
+ $form->{amount}{ $form->{id} }{$_} -=
+ $taxamount * $form->{"${_}_rate"} / $taxrate
+ } @taxaccounts;
+ }
+
+ # add purchase to inventory, this one is without the tax!
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} * $form->{exchangerate};
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2) *
+ $form->{exchangerate};
+ $linetotal = $form->round_amount($linetotal, 2);
+
+ # this is the difference for the inventory
+ $invoicediff += ($amount - $linetotal);
+
+ $form->{amount}{ $form->{id} }{ $form->{"inventory_accno_$i"} } -=
+ $linetotal;
+
+ # adjust and round sellprice
+ $form->{"sellprice_$i"} =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{exchangerate},
+ $decimalplaces);
+
+ # update parts table
+ $query = qq|UPDATE parts SET
+ lastcost = $form->{"sellprice_$i"}
+ WHERE id = $form->{"id_$i"}|;
+
+ $dbh->do($query) || $form->dberror($query);
+
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $form->{"id_$i"}|,
+ $form->{"qty_$i"})
+ unless $form->{shipped};
+
+ # check if we sold the item already and
+ # make an entry for the expense and inventory
+ $query = qq|SELECT i.id, i.qty, i.allocated, i.trans_id,
+ p.inventory_accno_id, p.expense_accno_id, a.transdate
+ FROM invoice i, ar a, parts p
+ WHERE i.parts_id = p.id
+ AND i.parts_id = $form->{"id_$i"}
+ AND (i.qty + i.allocated) > 0
+ AND i.trans_id = a.id
+ ORDER BY transdate|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $totalqty = $form->{"qty_$i"};
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ my $qty = $ref->{qty} + $ref->{allocated};
+
+ if (($qty - $totalqty) > 0) {
+ $qty = $totalqty;
+ }
+
+ $linetotal = $form->round_amount($form->{"sellprice_$i"} * $qty, 2);
+
+ if ($ref->{allocated} < 0) {
+
+ # we have an entry for it already, adjust amount
+ $form->update_balance(
+ $dbh,
+ "acc_trans",
+ "amount",
+ qq|trans_id = $ref->{trans_id} AND chart_id = $ref->{inventory_accno_id} AND transdate = '$ref->{transdate}'|,
+ $linetotal);
+
+ $form->update_balance(
+ $dbh,
+ "acc_trans",
+ "amount",
+ qq|trans_id = $ref->{trans_id} AND chart_id = $ref->{expense_accno_id} AND transdate = '$ref->{transdate}'|,
+ $linetotal * -1);
+
+ } else {
+
+ # add entry for inventory, this one is for the sold item
+ if ($linetotal != 0) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate)
+ VALUES ($ref->{trans_id}, $ref->{inventory_accno_id},
+ $linetotal, '$ref->{transdate}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add expense
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, taxkey)
+ VALUES ($ref->{trans_id}, $ref->{expense_accno_id},
+ | . ($linetotal * -1) . qq|, '$ref->{transdate}',
+ (SELECT taxkey from tax WHERE chart_id = $ref->{expense_accno_id}))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ # update allocated for sold item
+ $form->update_balance($dbh, "invoice", "allocated",
+ qq|id = $ref->{id}|,
+ $qty * -1);
+
+ $allocated += $qty;
+
+ last if (($totalqty -= $qty) <= 0);
+ }
+
+ $sth->finish;
+
+ $lastinventoryaccno = $form->{"inventory_accno_$i"};
+
+ } else {
+
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2);
+
+ if ($form->{taxincluded}) {
+ $taxamount = $linetotal * ($taxrate / (1 + $taxrate));
+
+ $form->{"sellprice_$i"} =
+ $form->{"sellprice_$i"} * (1 / (1 + $taxrate));
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ }
+
+ $netamount += $linetotal;
+
+ if ($form->round_amount($taxrate, 7) == 0) {
+ if ($form->{taxincluded}) {
+ foreach $item (@taxaccounts) {
+ $taxamount =
+ $linetotal * $form->{"${item}_rate"} /
+ (1 + abs($form->{"${item}_rate"}));
+ $totaltax += $taxamount;
+ $form->{amount}{ $form->{id} }{$item} -= $taxamount;
+ }
+ } else {
+ map {
+ $form->{amount}{ $form->{id} }{$_} -=
+ $linetotal * $form->{"${_}_rate"}
+ } @taxaccounts;
+ }
+ } else {
+ map {
+ $form->{amount}{ $form->{id} }{$_} -=
+ $taxamount * $form->{"${_}_rate"} / $taxrate
+ } @taxaccounts;
+ }
+
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} * $form->{exchangerate};
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2) *
+ $form->{exchangerate};
+ $linetotal = $form->round_amount($linetotal, 2);
+
+ # this is the difference for expense
+ $expensediff += ($amount - $linetotal);
+
+ # add amount to expense
+ $form->{amount}{ $form->{id} }{ $form->{"expense_accno_$i"} } -=
+ $linetotal;
+
+ $lastexpenseaccno = $form->{"expense_accno_$i"};
+
+ # adjust and round sellprice
+ $form->{"sellprice_$i"} =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{exchangerate},
+ $decimalplaces);
+
+ # update lastcost
+ $query = qq|UPDATE parts SET
+ lastcost = $form->{"sellprice_$i"}
+ WHERE id = $form->{"id_$i"}|;
+
+ $dbh->do($query) || $form->dberror($query);
+
+ }
+
+ $project_id = 'NULL';
+ if ($form->{"projectnumber_$i"}) {
+ $project_id = $form->{"projectnumber_$i"};
+ }
+ print(STDERR $project_id, " Project_id\n");
+ $deliverydate =
+ ($form->{"deliverydate_$i"})
+ ? qq|'$form->{"deliverydate_$i"}'|
+ : "NULL";
+
+ # save detail record in invoice table
+ $query = qq|INSERT INTO invoice (trans_id, parts_id, description, qty,
+ sellprice, fxsellprice, allocated, unit, deliverydate,
+ project_id, serialnumber)
+ VALUES ($form->{id}, $form->{"id_$i"},
+ '$form->{"description_$i"}', | . ($form->{"qty_$i"} * -1) . qq|,
+ $form->{"sellprice_$i"}, $fxsellprice, $allocated,
+ '$form->{"unit_$i"}', $deliverydate, (SELECT id FROM project WHERE projectnumber = '$project_id'),
+ '$form->{"serialnumber_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ print(STDERR $query, "\n\n");
+ }
+ }
+
+ $form->{datepaid} = $form->{invdate};
+
+ # all amounts are in natural state, netamount includes the taxes
+ # if tax is included, netamount is rounded to 2 decimal places,
+ # taxes are not
+
+ # total payments
+ for my $i (1 .. $form->{paidaccounts}) {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
+ $form->{paid} += $form->{"paid_$i"};
+ $form->{datepaid} = $form->{"datepaid_$i"} if ($form->{"datepaid_$i"});
+ }
+
+ my ($tax, $paiddiff) = (0, 0);
+
+ $netamount = $form->round_amount($netamount, 2);
+
+ # figure out rounding errors for amount paid and total amount
+ if ($form->{taxincluded}) {
+
+ $amount = $form->round_amount($netamount * $form->{exchangerate}, 2);
+ $paiddiff = $amount - $netamount * $form->{exchangerate};
+ $netamount = $amount;
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ $amount = $form->{amount}{ $form->{id} }{$item} * $form->{exchangerate};
+ $form->{amount}{ $form->{id} }{$item} = $form->round_amount($amount, 2);
+ $amount = $form->{amount}{ $form->{id} }{$item} * -1;
+ $tax += $amount;
+ $netamount -= $amount;
+ }
+
+ $invoicediff += $paiddiff;
+ $expensediff += $paiddiff;
+
+ ######## this only applies to tax included
+ if ($lastinventoryaccno) {
+ $form->{amount}{ $form->{id} }{$lastinventoryaccno} -= $invoicediff;
+ }
+ if ($lastexpenseaccno) {
+ $form->{amount}{ $form->{id} }{$lastexpenseaccno} -= $expensediff;
+ }
+
+ } else {
+ $amount = $form->round_amount($netamount * $form->{exchangerate}, 2);
+ $paiddiff = $amount - $netamount * $form->{exchangerate};
+ $netamount = $amount;
+ foreach my $item (split / /, $form->{taxaccounts}) {
+ $form->{amount}{ $form->{id} }{$item} =
+ $form->round_amount($form->{amount}{ $form->{id} }{$item}, 2);
+ $amount =
+ $form->round_amount(
+ $form->{amount}{ $form->{id} }{$item} * $form->{exchangerate} * -1,
+ 2);
+ $paiddiff +=
+ $amount - $form->{amount}{ $form->{id} }{$item} *
+ $form->{exchangerate} * -1;
+ $form->{amount}{ $form->{id} }{$item} =
+ $form->round_amount($amount * -1, 2);
+ $amount = $form->{amount}{ $form->{id} }{$item} * -1;
+ $tax += $amount;
+ }
+ }
+
+ $form->{amount}{ $form->{id} }{ $form->{AP} } = $netamount + $tax;
+
+ if ($form->{paid} != 0) {
+ $form->{paid} =
+ $form->round_amount($form->{paid} * $form->{exchangerate} + $paiddiff,
+ 2);
+ }
+
+ # update exchangerate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{invdate}, 0,
+ $form->{exchangerate});
+ }
+
+ # record acc_trans transactions
+ foreach my $trans_id (keys %{ $form->{amount} }) {
+ foreach my $accno (keys %{ $form->{amount}{$trans_id} }) {
+ if (
+ ($form->{amount}{$trans_id}{$accno} =
+ $form->round_amount($form->{amount}{$trans_id}{$accno}, 2)
+ ) != 0
+ ) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, taxkey)
+ VALUES ($trans_id, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{amount}{$trans_id}{$accno}, '$form->{invdate}',
+ (SELECT taxkey_id FROM chart WHERE accno = '$accno'))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ # deduct payment differences from paiddiff
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"} != 0) {
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{exchangerate}, 2);
+ $paiddiff -= $amount - $form->{"paid_$i"} * $form->{exchangerate};
+ }
+ }
+
+ # force AP entry if 0
+ $form->{amount}{ $form->{id} }{ $form->{AP} } = $form->{paid}
+ if ($form->{amount}{ $form->{id} }{ $form->{AP} } == 0);
+
+ # record payments and offsetting AP
+ for my $i (1 .. $form->{paidaccounts}) {
+
+ if ($form->{"paid_$i"} != 0) {
+ my ($accno) = split /--/, $form->{"AP_paid_$i"};
+ $form->{"datepaid_$i"} = $form->{invdate}
+ unless ($form->{"datepaid_$i"});
+ $form->{datepaid} = $form->{"datepaid_$i"};
+
+ $amount = (
+ $form->round_amount(
+ $form->{"paid_$i"} * $form->{exchangerate} + $paiddiff, 2
+ )
+ ) * -1;
+
+ # record AP
+
+ if ($form->{amount}{ $form->{id} }{ $form->{AP} } != 0) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}'),
+ $amount, '$form->{"datepaid_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # record payment
+
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, memo)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{"paid_$i"}, '$form->{"datepaid_$i"}',
+ '$form->{"source_$i"}', '$form->{"memo_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $exchangerate = 0;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{"datepaid_$i"}, 'sell');
+
+ $form->{"exchangerate_$i"} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{"exchangerate_$i"});
+ }
+
+ # exchangerate difference
+ $form->{fx}{$accno}{ $form->{"datepaid_$i"} } +=
+ $form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1) + $paiddiff;
+
+ # gain/loss
+ $amount =
+ ($form->{"paid_$i"} * $form->{exchangerate}) -
+ ($form->{"paid_$i"} * $form->{"exchangerate_$i"});
+ if ($amount > 0) {
+ $form->{fx}{ $form->{fxgain_accno} }{ $form->{"datepaid_$i"} } +=
+ $amount;
+ } else {
+ $form->{fx}{ $form->{fxloss_accno} }{ $form->{"datepaid_$i"} } +=
+ $amount;
+ }
+
+ $paiddiff = 0;
+
+ # update exchange rate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency},
+ $form->{"datepaid_$i"},
+ 0, $form->{"exchangerate_$i"});
+ }
+ }
+ }
+
+ # record exchange rate differences and gains/losses
+ foreach my $accno (keys %{ $form->{fx} }) {
+ foreach my $transdate (keys %{ $form->{fx}{$accno} }) {
+ if (
+ ($form->{fx}{$accno}{$transdate} =
+ $form->round_amount($form->{fx}{$accno}{$transdate}, 2)
+ ) != 0
+ ) {
+
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, cleared, fx_transaction)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{fx}{$accno}{$transdate}, '$transdate', '0', '1')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ $amount = $netamount + $tax;
+
+ # set values which could be empty
+ $form->{taxincluded} *= 1;
+ my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
+ my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL";
+
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+ $form->{department_id} *= 1;
+
+ $form->{invnumber} = $form->{id} unless $form->{invnumber};
+
+ # save AP record
+ $query = qq|UPDATE ap set
+ invnumber = '$form->{invnumber}',
+ ordnumber = '$form->{ordnumber}',
+ quonumber = '$form->{quonumber}',
+ transdate = '$form->{invdate}',
+ vendor_id = $form->{vendor_id},
+ amount = $amount,
+ netamount = $netamount,
+ paid = $form->{paid},
+ datepaid = $datepaid,
+ duedate = $duedate,
+ invoice = '1',
+ taxincluded = '$form->{taxincluded}',
+ notes = '$form->{notes}',
+ intnotes = '$form->{intnotes}',
+ curr = '$form->{currency}',
+ department_id = $form->{department_id},
+ cp_id = $form->{contact_id}
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add shipto
+ $form->{name} = $form->{vendor};
+ $form->{name} =~ s/--$form->{vendor_id}//;
+ $form->add_shipto($dbh, $form->{id});
+
+ # delete zero entries
+ $query = qq|DELETE FROM acc_trans
+ WHERE amount = 0|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub reverse_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form) = @_;
+
+ # reverse inventory items
+ my $query = qq|SELECT i.parts_id, p.inventory_accno_id, p.expense_accno_id,
+ i.qty, i.allocated, i.sellprice
+ FROM invoice i, parts p
+ WHERE i.parts_id = p.id
+ AND i.trans_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $netamount = 0;
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $netamount += $form->round_amount($ref->{sellprice} * $ref->{qty} * -1, 2);
+
+ if ($ref->{inventory_accno_id}) {
+
+ # update onhand
+ $form->update_balance($dbh, "parts", "onhand", qq|id = $ref->{parts_id}|,
+ $ref->{qty});
+
+ # if $ref->{allocated} > 0 than we sold that many items
+ if ($ref->{allocated} > 0) {
+
+ # get references for sold items
+ $query = qq|SELECT i.id, i.trans_id, i.allocated, a.transdate
+ FROM invoice i, ar a
+ WHERE i.parts_id = $ref->{parts_id}
+ AND i.allocated < 0
+ AND i.trans_id = a.id
+ ORDER BY transdate DESC|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $pthref = $sth->fetchrow_hashref(NAME_lc)) {
+ my $qty = $ref->{allocated};
+ if (($ref->{allocated} + $pthref->{allocated}) > 0) {
+ $qty = $pthref->{allocated} * -1;
+ }
+
+ my $amount = $form->round_amount($ref->{sellprice} * $qty, 2);
+
+ #adjust allocated
+ $form->update_balance($dbh, "invoice", "allocated",
+ qq|id = $pthref->{id}|, $qty);
+
+ $form->update_balance(
+ $dbh,
+ "acc_trans",
+ "amount",
+ qq|trans_id = $pthref->{trans_id} AND chart_id = $ref->{expense_accno_id} AND transdate = '$pthref->{transdate}'|,
+ $amount);
+
+ $form->update_balance(
+ $dbh,
+ "acc_trans",
+ "amount",
+ qq|trans_id = $pthref->{trans_id} AND chart_id = $ref->{inventory_accno_id} AND transdate = '$pthref->{transdate}'|,
+ $amount * -1);
+
+ last if (($ref->{allocated} -= $qty) <= 0);
+ }
+ $sth->finish;
+ }
+ }
+ }
+ $sth->finish;
+
+ # delete acc_trans
+ $query = qq|DELETE FROM acc_trans
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete invoice entries
+ $query = qq|DELETE FROM invoice
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ &reverse_invoice($dbh, $form);
+
+ # delete zero entries
+ my $query = qq|DELETE FROM acc_trans
+ WHERE amount = 0|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete AP record
+ my $query = qq|DELETE FROM ap
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub retrieve_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query;
+
+ if ($form->{id}) {
+
+ # get default accounts and last invoice number
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies
+ FROM defaults d|;
+ } else {
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies,
+ current_date AS invdate
+ FROM defaults d|;
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ if ($form->{id}) {
+
+ # retrieve invoice
+ $query = qq|SELECT a.cp_id, a.invnumber, a.transdate AS invdate, a.duedate,
+ a.ordnumber, a.quonumber, a.paid, a.taxincluded, a.notes,
+ a.intnotes, a.curr AS currency
+ FROM ap a
+ WHERE a.id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ $form->{exchangerate} =
+ $form->get_exchangerate($dbh, $form->{currency}, $form->{invdate},
+ "sell");
+
+ # get shipto
+ $query = qq|SELECT s.* FROM shipto s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ # retrieve individual items
+ $query = qq|SELECT c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ p.partnumber, i.description, i.qty, i.fxsellprice AS sellprice,
+ i.parts_id AS id, i.unit, p.bin, i.deliverydate,
+ pr.projectnumber,
+ i.project_id, i.serialnumber,
+ pg.partsgroup
+ FROM invoice i
+ JOIN parts p ON (i.parts_id = p.id)
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN project pr ON (i.project_id = pr.id)
+ LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
+ WHERE i.trans_id = $form->{id}
+ ORDER BY i.id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($ref->{expense_accno} != $ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+ $vendor_accno =
+ ($ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ ORDER BY accno|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ $ref->{taxaccounts} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $ref->{taxaccounts} .= "$ptr->{accno} ";
+ if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccounts} .= "$ptr->{accno} ";
+ }
+
+ }
+
+ chop $ref->{taxaccounts};
+ push @{ $form->{invoice_details} }, $ref;
+ $stw->finish;
+ }
+ $sth->finish;
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub get_vendor {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $dateformat = $myconfig->{dateformat};
+ $dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
+
+ my $duedate =
+ ($form->{invdate})
+ ? "to_date('$form->{invdate}', '$dateformat')"
+ : "current_date";
+
+ $form->{vendor_id} *= 1;
+
+ # get vendor
+ my $query = qq|SELECT v.name AS vendor, v.creditlimit, v.terms,
+ v.email, v.cc, v.bcc, v.language,
+ v.street, v.zipcode, v.city, v.country,
+ $duedate + v.terms AS duedate, v.notes AS intnotes
+ FROM vendor v
+ WHERE v.id = $form->{vendor_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ $form->{creditremaining} = $form->{creditlimit};
+ $query = qq|SELECT SUM(a.amount - a.paid)
+ FROM ap a
+ WHERE a.vendor_id = $form->{vendor_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{creditremaining}) -= $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $query = qq|SELECT o.amount,
+ (SELECT e.sell FROM exchangerate e
+ WHERE e.curr = o.curr
+ AND e.transdate = o.transdate)
+ FROM oe o
+ WHERE o.vendor_id = $form->{vendor_id}
+ AND o.quotation = '0'
+ AND o.closed = '0'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($amount, $exch) = $sth->fetchrow_array) {
+ $exch = 1 unless $exch;
+ $form->{creditremaining} -= $amount * $exch;
+ }
+ $sth->finish;
+
+ $form->get_contacts($dbh, $form->{vendor_id});
+
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+
+ # get contact if selected
+ if ($form->{contact} ne "--" && $form->{contact} ne "") {
+ $form->get_contact($dbh, $form->{cp_id});
+ }
+
+ # get shipto if we do not convert an order or invoice
+ if (!$form->{shipto}) {
+ map { delete $form->{$_} }
+ qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
+
+ $query = qq|SELECT s.* FROM shipto s
+ WHERE s.trans_id = $form->{vendor_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+ }
+
+ # get taxes for vendor
+ $query = qq|SELECT c.accno
+ FROM chart c
+ JOIN vendortax v ON (v.chart_id = c.id)
+ WHERE v.vendor_id = $form->{vendor_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $vendortax = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $vendortax{ $ref->{accno} } = 1;
+ }
+ $sth->finish;
+
+ if (!$form->{id} && $form->{type} !~ /_(order|quotation)/) {
+
+ # setup last accounts used
+ $query = qq|SELECT c.accno, c.description, c.link, c.category
+ FROM chart c
+ JOIN acc_trans ac ON (ac.chart_id = c.id)
+ JOIN ap a ON (a.id = ac.trans_id)
+ WHERE a.vendor_id = $form->{vendor_id}
+ AND NOT (c.link LIKE '%_tax%' OR c.link LIKE '%_paid%')
+ AND a.id IN (SELECT max(a2.id) FROM ap a2
+ WHERE a2.vendor_id = $form->{vendor_id})|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $i = 0;
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($ref->{category} eq 'E') {
+ $i++;
+ $form->{"AP_amount_$i"} = "$ref->{accno}--$ref->{description}";
+ }
+ if ($ref->{category} eq 'L') {
+ $form->{APselected} = $form->{AP_1} =
+ "$ref->{accno}--$ref->{description}";
+ }
+ }
+ $sth->finish;
+ $form->{rowcount} = $i if ($i && !$form->{type});
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub retrieve_item {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $i = $form->{rowcount};
+
+ # don't include assemblies or obsolete parts
+ my $where = "NOT p.assembly = '1' AND NOT p.obsolete = '1'";
+
+ if ($form->{"partnumber_$i"}) {
+ my $partnumber = $form->like(lc $form->{"partnumber_$i"});
+ $where .= " AND lower(p.partnumber) LIKE '$partnumber'";
+ }
+
+ if ($form->{"description_$i"}) {
+ my $description = $form->like(lc $form->{"description_$i"});
+ $where .= " AND lower(p.description) LIKE '$description'";
+ }
+
+ if ($form->{"partsgroup_$i"}) {
+ my $partsgroup = $form->like(lc $form->{"partsgroup_$i"});
+ $where .= " AND lower(pg.partsgroup) LIKE '$partsgroup'";
+ }
+
+ if ($form->{"description_$i"}) {
+ $where .= " ORDER BY p.description";
+ } else {
+ $where .= " ORDER BY p.partnumber";
+ }
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.partnumber, p.description,
+ c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ pg.partsgroup,
+ p.lastcost AS sellprice, p.unit, p.bin, p.onhand, p.notes AS partnotes
+ FROM parts p
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
+ WHERE $where|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($ref->{expense_accno} != $ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+ $vendor_accno =
+ ($ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ ORDER BY c.accno|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+
+ $ref->{taxaccounts} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $ref->{taxaccounts} .= "$ptr->{accno} ";
+ if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccounts} .= "$ptr->{accno} ";
+ }
+
+ }
+
+ $stw->finish;
+ chop $ref->{taxaccounts};
+
+ push @{ $form->{item_list} }, $ref;
+
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub vendor_details {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get contact id, set it if nessessary
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+
+ $contact = "";
+ if ($form->{cp_id}) {
+ $contact = "and cp.cp_id = $form->{cp_id}";
+ }
+
+ $taxincluded = $form->{taxincluded};
+
+ # get rest for the vendor
+ # fax and phone and email as vendor*
+ my $query =
+ qq|SELECT ct.*, cp.*, ct.notes as vendornotes, phone as vendorphone, fax as vendorfax, email as vendoremail
+ FROM vendor ct
+ LEFT JOIN contacts cp on ct.id = cp.cp_cv_id
+ WHERE ct.id = $form->{vendor_id} $contact order by cp.cp_id limit 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $form->{taxincluded} = $taxincluded;
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub item_links {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT c.accno, c.description, c.link
+ FROM chart c
+ WHERE c.link LIKE '%IC%'
+ ORDER BY c.accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ foreach my $key (split(/:/, $ref->{link})) {
+ if ($key =~ /IC/) {
+ push @{ $form->{IC_links}{$key} },
+ { accno => $ref->{accno},
+ description => $ref->{description} };
+ }
+ }
+ }
+
+ $sth->finish;
+ $main::lxdebug->leave_sub();
+}
+
+sub webdav_folder {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+
+SWITCH: {
+ $path = "webdav/rechnungen/" . $form->{invnumber}, last SWITCH
+ if ($form->{vc} eq "customer");
+ $path = "webdav/einkaufsrechnungen/" . $form->{invnumber}, last SWITCH
+ if ($form->{vc} eq "vendor");
+ }
+
+ if (!-d $path) {
+ mkdir($path, 0770) or die "can't make directory $!\n";
+ } else {
+ if ($form->{id}) {
+ @files = <$path/*>;
+ foreach $file (@files) {
+
+ $file =~ /\/([^\/]*)$/;
+ $fname = $1;
+ $ENV{'SCRIPT_NAME'} =~ /\/([^\/]*)\//;
+ $lxerp = $1;
+ $link = "http://" . $ENV{'SERVER_NAME'} . "/" . $lxerp . "/" . $file;
+ $form->{WEBDAV}{$fname} = $link;
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory invoicing module
+#
+#======================================================================
+
+package IS;
+
+sub invoice_details {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $locale) = @_;
+
+ $form->{duedate} = $form->{invdate} unless ($form->{duedate});
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT date '$form->{duedate}' - date '$form->{invdate}'
+ AS terms
+ FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{terms}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ my $tax = 0;
+ my $item;
+ my $i;
+ my @partsgroup = ();
+ my $partsgroup;
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ # sort items by partsgroup
+ for $i (1 .. $form->{rowcount}) {
+ $partsgroup = "";
+ if ($form->{"partsgroup_$i"} && $form->{groupitems}) {
+ $form->format_string("partsgroup_$i");
+ $partsgroup = $form->{"partsgroup_$i"};
+ }
+ push @partsgroup, [$i, $partsgroup];
+ }
+
+ my $sameitem = "";
+ my @taxaccounts;
+ my %taxaccounts;
+ my %taxbase;
+ my $taxrate;
+ my $taxamount;
+ my $taxbase;
+ my $taxdiff;
+
+ foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
+ $i = $item->[0];
+
+ if ($item->[1] ne $sameitem) {
+ push(@{ $form->{description} }, qq|$item->[1]|);
+ $sameitem = $item->[1];
+
+ map { push(@{ $form->{$_} }, "") }
+ qw(runningnumber number serialnumber bin partnotes qty unit deliverydate sellprice listprice netprice discount linetotal);
+ }
+
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+
+ # add number, description and qty to $form->{number}, ....
+ push(@{ $form->{runningnumber} }, $i);
+ push(@{ $form->{number} }, qq|$form->{"partnumber_$i"}|);
+ push(@{ $form->{serialnumber} }, qq|$form->{"serialnumber_$i"}|);
+ push(@{ $form->{bin} }, qq|$form->{"bin_$i"}|);
+ push(@{ $form->{"partnotes"} }, qq|$form->{"partnotes_$i"}|);
+ push(@{ $form->{description} }, qq|$form->{"description_$i"}|);
+ push(@{ $form->{qty} },
+ $form->format_amount($myconfig, $form->{"qty_$i"}));
+ push(@{ $form->{unit} }, qq|$form->{"unit_$i"}|);
+ push(@{ $form->{deliverydate} }, qq|$form->{"deliverydate_$i"}|);
+
+ push(@{ $form->{sellprice} }, $form->{"sellprice_$i"});
+
+ if ($form->{lizenzen}) {
+ if ($form->{"licensenumber_$i"}) {
+ $query =
+ qq|SELECT l.licensenumber, l.validuntil FROM license l WHERE l.id = $form->{"licensenumber_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($licensenumber, $validuntil) = $sth->fetchrow_array;
+ push(@{ $form->{licensenumber} }, $licensenumber);
+ push(@{ $form->{validuntil} },
+ $locale->date($myconfig, $validuntil, 0));
+ $licensenumber = "Lizenz: " . $licensenumber;
+ $sth->finish;
+ push(@{ $form->{licensenumber} }, $licensenumber);
+ } else {
+ push(@{ $form->{licensenumber} }, "");
+ push(@{ $form->{validuntil} }, "");
+ }
+ }
+
+ # listprice
+ push(@{ $form->{listprice} }, $form->{"listprice_$i"});
+
+ my $sellprice = $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+ my ($dec) = ($sellprice =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ my $discount =
+ $form->round_amount(
+ $sellprice * $form->parse_amount($myconfig,
+ $form->{"discount_$i"}) / 100,
+ $decimalplaces);
+
+ # keep a netprice as well, (sellprice - discount)
+ $form->{"netprice_$i"} = $sellprice - $discount;
+ push(@{ $form->{netprice} },
+ ($form->{"netprice_$i"} != 0)
+ ? $form->format_amount(
+ $myconfig, $form->{"netprice_$i"},
+ $decimalplaces
+ )
+ : " ");
+
+ my $linetotal =
+ $form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);
+
+ $discount =
+ ($discount != 0)
+ ? $form->format_amount($myconfig, $discount * -1, $decimalplaces)
+ : " ";
+ $linetotal = ($linetotal != 0) ? $linetotal : " ";
+
+ push(@{ $form->{discount} }, $discount);
+
+ $form->{total} += $linetotal;
+
+ push(@{ $form->{linetotal} },
+ $form->format_amount($myconfig, $linetotal, 2));
+
+ @taxaccounts = split / /, $form->{"taxaccounts_$i"};
+ $taxrate = 0;
+ $taxdiff = 0;
+
+ map { $taxrate += $form->{"${_}_rate"} } @taxaccounts;
+
+ if ($form->{taxincluded}) {
+
+ # calculate tax
+ $taxamount = $linetotal * $taxrate / (1 + $taxrate);
+ $taxbase = $linetotal - $taxamount;
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ $taxbase = $linetotal;
+ }
+
+ if ($form->round_amount($taxrate, 7) == 0) {
+ if ($form->{taxincluded}) {
+ foreach $item (@taxaccounts) {
+ $taxamount =
+ $form->round_amount($linetotal * $form->{"${item}_rate"} /
+ (1 + abs($form->{"${item}_rate"})),
+ 2);
+
+ $taxaccounts{$item} += $taxamount;
+ $taxdiff += $taxamount;
+
+ $taxbase{$item} += $taxbase;
+ }
+ $taxaccounts{ $taxaccounts[0] } += $taxdiff;
+ } else {
+ foreach $item (@taxaccounts) {
+ $taxaccounts{$item} += $linetotal * $form->{"${item}_rate"};
+ $taxbase{$item} += $taxbase;
+ }
+ }
+ } else {
+ foreach $item (@taxaccounts) {
+ $taxaccounts{$item} +=
+ $taxamount * $form->{"${item}_rate"} / $taxrate;
+ $taxbase{$item} += $taxbase;
+ }
+ }
+
+ if ($form->{"assembly_$i"}) {
+ $sameitem = "";
+
+ # get parts and push them onto the stack
+ my $sortorder = "";
+ if ($form->{groupitems}) {
+ $sortorder =
+ qq|ORDER BY pg.partsgroup, a.$oid{$myconfig->{dbdriver}}|;
+ } else {
+ $sortorder = qq|ORDER BY a.$oid{$myconfig->{dbdriver}}|;
+ }
+
+ $query = qq|SELECT p.partnumber, p.description, p.unit, a.qty,
+ pg.partsgroup
+ FROM assembly a
+ JOIN parts p ON (a.parts_id = p.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE a.bom = '1'
+ AND a.id = '$form->{"id_$i"}'
+ $sortorder|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($form->{groupitems} && $ref->{partsgroup} ne $sameitem) {
+ map { push(@{ $form->{$_} }, "") }
+ qw(runningnumber number serialnumber unit qty bin sellprice listprice netprice discount linetotal);
+ $sameitem = ($ref->{partsgroup}) ? $ref->{partsgroup} : "--";
+ push(@{ $form->{description} }, $sameitem);
+ }
+
+ map { $form->{"a_$_"} = $ref->{$_} } qw(partnumber description);
+ $form->format_string("a_partnumber", "a_description");
+
+ push(@{ $form->{description} },
+ $form->format_amount($myconfig, $ref->{qty} * $form->{"qty_$i"}
+ )
+ . qq| -- $form->{"a_partnumber"}, $form->{"a_description"}|);
+ map { push(@{ $form->{$_} }, "") }
+ qw(number unit qty runningnumber serialnumber bin sellprice listprice netprice discount linetotal);
+
+ }
+ $sth->finish;
+ }
+ }
+ }
+
+ foreach my $item (sort keys %taxaccounts) {
+ if ($form->round_amount($taxaccounts{$item}, 2) != 0) {
+ push(@{ $form->{taxbase} },
+ $form->format_amount($myconfig, $taxbase{$item}, 2));
+
+ $tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
+
+ push(@{ $form->{tax} }, $form->format_amount($myconfig, $taxamount));
+ push(@{ $form->{taxdescription} }, $form->{"${item}_description"});
+ push(@{ $form->{taxrate} },
+ $form->format_amount($myconfig, $form->{"${item}_rate"} * 100));
+ push(@{ $form->{taxnumber} }, $form->{"${item}_taxnumber"});
+ }
+ }
+
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ push(@{ $form->{payment} }, $form->{"paid_$i"});
+ my ($accno, $description) = split /--/, $form->{"AR_paid_$i"};
+ push(@{ $form->{paymentaccount} }, $description);
+ push(@{ $form->{paymentdate} }, $form->{"datepaid_$i"});
+ push(@{ $form->{paymentsource} }, $form->{"source_$i"});
+
+ $form->{paid} += $form->parse_amount($myconfig, $form->{"paid_$i"});
+ }
+ }
+
+ $form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2);
+ $form->{invtotal} =
+ ($form->{taxincluded}) ? $form->{total} : $form->{total} + $tax;
+ $form->{total} =
+ $form->format_amount($myconfig, $form->{invtotal} - $form->{paid}, 2);
+ $form->{invtotal} = $form->format_amount($myconfig, $form->{invtotal}, 2);
+
+ $form->{paid} = $form->format_amount($myconfig, $form->{paid}, 2);
+
+ # myconfig variables
+ map { $form->{$_} = $myconfig->{$_} }
+ (qw(company address tel fax signature businessnumber));
+ $form->{username} = $myconfig->{name};
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub project_description {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+
+ my $query = qq|SELECT p.description
+ FROM project p
+ WHERE p.id = $id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($_) = $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+
+ return $_;
+}
+
+sub customer_details {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get contact id, set it if nessessary
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+
+ $contact = "";
+ if ($form->{cp_id}) {
+ $contact = "and cp.cp_id = $form->{cp_id}";
+ }
+
+ $taxincluded = $form->{taxincluded};
+
+ # get rest for the customer
+ my $query = qq|SELECT ct.*, cp.*, ct.notes as customernotes
+ FROM customer ct
+ LEFT JOIN contacts cp on ct.id = cp.cp_cv_id
+ WHERE ct.id = $form->{customer_id} $contact order by cp.cp_id limit 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $form->{taxincluded} = $taxincluded;
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub post_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($query, $sth, $null, $project_id, $deliverydate);
+ my $exchangerate = 0;
+
+ ($null, $form->{employee_id}) = split /--/, $form->{employee};
+ unless ($form->{employee_id}) {
+ $form->get_employee($dbh);
+ }
+
+ ($null, $form->{contact_id}) = split /--/, $form->{contact};
+ $form->{contact_id} *= 1;
+
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+ $form->{department_id} *= 1;
+
+ if ($form->{id}) {
+
+ &reverse_invoice($dbh, $form);
+
+ } else {
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO ar (invnumber, employee_id)
+ VALUES ('$uid', $form->{employee_id})|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT a.id FROM ar a
+ WHERE a.invnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ map { $form->{$_} =~ s/\'/\'\'/g }
+ (qw(invnumber shippingpoint shipvia notes intnotes message));
+
+ my ($netamount, $invoicediff) = (0, 0);
+ my ($amount, $linetotal, $lastincomeaccno);
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{exchangerate} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{transdate}, 'buy');
+ }
+
+ $form->{exchangerate} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{exchangerate});
+
+ $form->{expense_inventory} = "";
+
+ foreach my $i (1 .. $form->{rowcount}) {
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+
+ map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
+ (qw(partnumber description unit));
+
+ # undo discount formatting
+ $form->{"discount_$i"} =
+ $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
+
+ my ($allocated, $taxrate) = (0, 0);
+ my $taxamount;
+
+ # keep entered selling price
+ my $fxsellprice =
+ $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+
+ my ($dec) = ($fxsellprice =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ # deduct discount
+ my $discount =
+ $form->round_amount($fxsellprice * $form->{"discount_$i"},
+ $decimalplaces);
+ $form->{"sellprice_$i"} = $fxsellprice - $discount;
+
+ # add tax rates
+ map { $taxrate += $form->{"${_}_rate"} } split / /,
+ $form->{"taxaccounts_$i"};
+
+ # round linetotal to 2 decimal places
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2);
+
+ if ($form->{taxincluded}) {
+ $taxamount = $linetotal * ($taxrate / (1 + $taxrate));
+ $form->{"sellprice_$i"} =
+ $form->{"sellprice_$i"} * (1 / (1 + $taxrate));
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ }
+
+ $netamount += $linetotal;
+
+ if ($taxamount != 0) {
+ map {
+ $form->{amount}{ $form->{id} }{$_} +=
+ $taxamount * $form->{"${_}_rate"} / $taxrate
+ } split / /, $form->{"taxaccounts_$i"};
+ }
+
+ # add amount to income, $form->{amount}{trans_id}{accno}
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} * $form->{exchangerate};
+
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2) *
+ $form->{exchangerate};
+ $linetotal = $form->round_amount($linetotal, 2);
+
+ # this is the difference from the inventory
+ $invoicediff += ($amount - $linetotal);
+
+ $form->{amount}{ $form->{id} }{ $form->{"income_accno_$i"} } +=
+ $linetotal;
+
+ $lastincomeaccno = $form->{"income_accno_$i"};
+
+ # adjust and round sellprice
+ $form->{"sellprice_$i"} =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{exchangerate},
+ $decimalplaces);
+
+ if ($form->{"inventory_accno_$i"} || $form->{"assembly_$i"}) {
+
+ # adjust parts onhand quantity
+
+ if ($form->{"assembly_$i"}) {
+
+ # do not update if assembly consists of all services
+ $query = qq|SELECT sum(p.inventory_accno_id)
+ FROM parts p
+ JOIN assembly a ON (a.parts_id = p.id)
+ WHERE a.id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ if ($sth->fetchrow_array) {
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $form->{"id_$i"}|,
+ $form->{"qty_$i"} * -1)
+ unless $form->{shipped};
+ }
+ $sth->finish;
+
+ # record assembly item as allocated
+ &process_assembly($dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"});
+ } else {
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $form->{"id_$i"}|,
+ $form->{"qty_$i"} * -1)
+ unless $form->{shipped};
+
+ $allocated = &cogs($dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"});
+ }
+ }
+
+ $project_id = 'NULL';
+ if ($form->{"projectnumber_$i"}) {
+ $project_id = $form->{"projectnumber_$i"};
+ }
+ $deliverydate =
+ ($form->{"deliverydate_$i"})
+ ? qq|'$form->{"deliverydate_$i"}'|
+ : "NULL";
+
+ # save detail record in invoice table
+ $query = qq|INSERT INTO invoice (trans_id, parts_id, description, qty,
+ sellprice, fxsellprice, discount, allocated, assemblyitem,
+ unit, deliverydate, project_id, serialnumber)
+ VALUES ($form->{id}, $form->{"id_$i"},
+ '$form->{"description_$i"}', $form->{"qty_$i"},
+ $form->{"sellprice_$i"}, $fxsellprice,
+ $form->{"discount_$i"}, $allocated, 'f',
+ '$form->{"unit_$i"}', $deliverydate, (SELECT id from project where projectnumber = '$project_id'),
+ '$form->{"serialnumber_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{lizenzen}) {
+ if ($form->{"licensenumber_$i"}) {
+ $query =
+ qq|SELECT i.id FROM invoice i WHERE i.trans_id=$form->{id} ORDER BY i.oid DESC LIMIT 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($invoice_row_id) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $query =
+ qq|INSERT INTO licenseinvoice (trans_id, license_id) VALUES ($invoice_row_id, $form->{"licensenumber_$i"})|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ }
+ }
+
+ $form->{datepaid} = $form->{invdate};
+
+ # total payments, don't move we need it here
+ for my $i (1 .. $form->{paidaccounts}) {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
+ $form->{paid} += $form->{"paid_$i"};
+ $form->{datepaid} = $form->{"datepaid_$i"} if ($form->{"datepaid_$i"});
+ }
+
+ my ($tax, $diff) = (0, 0);
+
+ $netamount = $form->round_amount($netamount, 2);
+
+ # figure out rounding errors for total amount vs netamount + taxes
+ if ($form->{taxincluded}) {
+
+ $amount = $form->round_amount($netamount * $form->{exchangerate}, 2);
+ $diff += $amount - $netamount * $form->{exchangerate};
+ $netamount = $amount;
+
+ foreach my $item (split / /, $form->{taxaccounts}) {
+ $amount = $form->{amount}{ $form->{id} }{$item} * $form->{exchangerate};
+ $form->{amount}{ $form->{id} }{$item} = $form->round_amount($amount, 2);
+ $tax += $form->{amount}{ $form->{id} }{$item};
+ $netamount -= $form->{amount}{ $form->{id} }{$item};
+ }
+
+ $invoicediff += $diff;
+ ######## this only applies to tax included
+ if ($lastincomeaccno) {
+ $form->{amount}{ $form->{id} }{$lastincomeaccno} += $invoicediff;
+ }
+
+ } else {
+ $amount = $form->round_amount($netamount * $form->{exchangerate}, 2);
+ $diff = $amount - $netamount * $form->{exchangerate};
+ $netamount = $amount;
+ foreach my $item (split / /, $form->{taxaccounts}) {
+ $form->{amount}{ $form->{id} }{$item} =
+ $form->round_amount($form->{amount}{ $form->{id} }{$item}, 2);
+ $amount =
+ $form->round_amount(
+ $form->{amount}{ $form->{id} }{$item} * $form->{exchangerate},
+ 2);
+ $diff +=
+ $amount - $form->{amount}{ $form->{id} }{$item} *
+ $form->{exchangerate};
+ $form->{amount}{ $form->{id} }{$item} = $form->round_amount($amount, 2);
+ $tax += $form->{amount}{ $form->{id} }{$item};
+ }
+ }
+
+ $form->{amount}{ $form->{id} }{ $form->{AR} } = $netamount + $tax;
+ $form->{paid} =
+ $form->round_amount($form->{paid} * $form->{exchangerate} + $diff, 2);
+
+ # reverse AR
+ $form->{amount}{ $form->{id} }{ $form->{AR} } *= -1;
+
+ # update exchangerate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{invdate},
+ $form->{exchangerate}, 0);
+ }
+
+ foreach my $trans_id (keys %{ $form->{amount} }) {
+ foreach my $accno (keys %{ $form->{amount}{$trans_id} }) {
+ next unless ($form->{expense_inventory} =~ /$accno/);
+ if (
+ ($form->{amount}{$trans_id}{$accno} =
+ $form->round_amount($form->{amount}{$trans_id}{$accno}, 2)
+ ) != 0
+ ) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, taxkey)
+ VALUES ($trans_id, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{amount}{$trans_id}{$accno}, '$form->{invdate}',
+ (SELECT taxkey_id FROM chart WHERE accno = '$accno'))|;
+ $dbh->do($query) || $form->dberror($query);
+ $form->{amount}{$trans_id}{$accno} = 0;
+ }
+ }
+
+ foreach my $accno (keys %{ $form->{amount}{$trans_id} }) {
+ if (
+ ($form->{amount}{$trans_id}{$accno} =
+ $form->round_amount($form->{amount}{$trans_id}{$accno}, 2)
+ ) != 0
+ ) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, taxkey)
+ VALUES ($trans_id, (SELECT id FROM chart
+ WHERE accno = '$accno'),
+ $form->{amount}{$trans_id}{$accno}, '$form->{invdate}',
+ (SELECT taxkey_id FROM chart WHERE accno = '$accno'))|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ # deduct payment differences from diff
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"} != 0) {
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{exchangerate}, 2);
+ $diff -= $amount - $form->{"paid_$i"} * $form->{exchangerate};
+ }
+ }
+
+ # force AR entry if 0
+ # $form->{amount}{$form->{id}}{$form->{AR}} = 1 if ($form->{amount}{$form->{id}}{$form->{AR}} == 0);
+
+ # record payments and offsetting AR
+ for my $i (1 .. $form->{paidaccounts}) {
+
+ if ($form->{"paid_$i"} != 0) {
+ my ($accno) = split /--/, $form->{"AR_paid_$i"};
+ $form->{"datepaid_$i"} = $form->{invdate}
+ unless ($form->{"datepaid_$i"});
+ $form->{datepaid} = $form->{"datepaid_$i"};
+
+ $exchangerate = 0;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig, $form->{currency},
+ $form->{"datepaid_$i"}, 'buy');
+
+ $form->{"exchangerate_$i"} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{"exchangerate_$i"});
+ }
+
+ # record AR
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{exchangerate} + $diff,
+ 2);
+
+ if ($form->{amount}{ $form->{id} }{ $form->{AR} } != 0) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}'),
+ $amount, '$form->{"datepaid_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ # record payment
+ $form->{"paid_$i"} *= -1;
+
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate,
+ source, memo)
+ VALUES ($form->{id}, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{"paid_$i"}, '$form->{"datepaid_$i"}',
+ '$form->{"source_$i"}', '$form->{"memo_$i"}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # exchangerate difference
+ $form->{fx}{$accno}{ $form->{"datepaid_$i"} } +=
+ $form->{"paid_$i"} * ($form->{"exchangerate_$i"} - 1) + $diff;
+
+ # gain/loss
+ $amount =
+ $form->{"paid_$i"} * $form->{exchangerate} - $form->{"paid_$i"} *
+ $form->{"exchangerate_$i"};
+ if ($amount > 0) {
+ $form->{fx}{ $form->{fxgain_accno} }{ $form->{"datepaid_$i"} } +=
+ $amount;
+ } else {
+ $form->{fx}{ $form->{fxloss_accno} }{ $form->{"datepaid_$i"} } +=
+ $amount;
+ }
+
+ $diff = 0;
+
+ # update exchange rate
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ $form->update_exchangerate($dbh, $form->{currency},
+ $form->{"datepaid_$i"},
+ $form->{"exchangerate_$i"}, 0);
+ }
+ }
+ }
+
+ # record exchange rate differences and gains/losses
+ foreach my $accno (keys %{ $form->{fx} }) {
+ foreach my $transdate (keys %{ $form->{fx}{$accno} }) {
+ if (
+ ($form->{fx}{$accno}{$transdate} =
+ $form->round_amount($form->{fx}{$accno}{$transdate}, 2)
+ ) != 0
+ ) {
+
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount,
+ transdate, cleared, fx_transaction)
+ VALUES ($form->{id},
+ (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ $form->{fx}{$accno}{$transdate}, '$transdate', '0', '1')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ $amount = $netamount + $tax;
+
+ # set values which could be empty to 0
+ $form->{terms} *= 1;
+ $form->{taxincluded} *= 1;
+ my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
+ my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL";
+
+ # fill in subject if there is none
+ $form->{subject} = qq|$form->{label} $form->{invnumber}|
+ unless $form->{subject};
+
+ # if there is a message stuff it into the intnotes
+ my $cc = "Cc: $form->{cc}\\r\n" if $form->{cc};
+ my $bcc = "Bcc: $form->{bcc}\\r\n" if $form->{bcc};
+ my $now = scalar localtime;
+ $form->{intnotes} .= qq|\r
+\r| if $form->{intnotes};
+
+ $form->{intnotes} .= qq|[email]\r
+Date: $now
+To: $form->{email}\r
+$cc${bcc}Subject: $form->{subject}\r
+\r
+Message: $form->{message}\r| if $form->{message};
+
+ # save AR record
+ $query = qq|UPDATE ar set
+ invnumber = '$form->{invnumber}',
+ ordnumber = '$form->{ordnumber}',
+ quonumber = '$form->{quonumber}',
+ cusordnumber = '$form->{cusordnumber}',
+ transdate = '$form->{invdate}',
+ customer_id = $form->{customer_id},
+ amount = $amount,
+ netamount = $netamount,
+ paid = $form->{paid},
+ datepaid = $datepaid,
+ duedate = $duedate,
+ invoice = '1',
+ shippingpoint = '$form->{shippingpoint}',
+ shipvia = '$form->{shipvia}',
+ terms = $form->{terms},
+ notes = '$form->{notes}',
+ intnotes = '$form->{intnotes}',
+ taxincluded = '$form->{taxincluded}',
+ curr = '$form->{currency}',
+ department_id = $form->{department_id},
+ employee_id = $form->{employee_id},
+ cp_id = $form->{contact_id}
+ WHERE id = $form->{id}
+ |;
+ $dbh->do($query) || $form->dberror($query);
+
+ $form->{pago_total} = $amount;
+
+ # add shipto
+ $form->{name} = $form->{customer};
+ $form->{name} =~ s/--$form->{customer_id}//;
+ $form->add_shipto($dbh, $form->{id});
+
+ # save printed, emailed and queued
+ $form->save_status($dbh);
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub process_assembly {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form, $id, $totalqty) = @_;
+
+ my $query = qq|SELECT a.parts_id, a.qty, p.assembly,
+ p.partnumber, p.description, p.unit,
+ p.inventory_accno_id, p.income_accno_id,
+ p.expense_accno_id
+ FROM assembly a
+ JOIN parts p ON (a.parts_id = p.id)
+ WHERE a.id = $id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ my $allocated = 0;
+
+ $ref->{inventory_accno_id} *= 1;
+ $ref->{expense_accno_id} *= 1;
+
+ map { $ref->{$_} =~ s/\'/\'\'/g } (qw(partnumber description unit));
+
+ # multiply by number of assemblies
+ $ref->{qty} *= $totalqty;
+
+ if ($ref->{assembly}) {
+ &process_assembly($dbh, $form, $ref->{parts_id}, $ref->{qty});
+ next;
+ } else {
+ if ($ref->{inventory_accno_id}) {
+ $allocated = &cogs($dbh, $form, $ref->{parts_id}, $ref->{qty});
+ }
+ }
+
+ # save detail record for individual assembly item in invoice table
+ $query = qq|INSERT INTO invoice (trans_id, description, parts_id, qty,
+ sellprice, fxsellprice, allocated, assemblyitem, unit)
+ VALUES
+ ($form->{id}, '$ref->{description}',
+ $ref->{parts_id}, $ref->{qty}, 0, 0, $allocated, 't',
+ '$ref->{unit}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ }
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub cogs {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form, $id, $totalqty) = @_;
+
+ my $query = qq|SELECT i.id, i.trans_id, i.qty, i.allocated, i.sellprice,
+ (SELECT c.accno FROM chart c
+ WHERE p.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE p.expense_accno_id = c.id) AS expense_accno
+ FROM invoice i, parts p
+ WHERE i.parts_id = p.id
+ AND i.parts_id = $id
+ AND (i.qty + i.allocated) < 0
+ ORDER BY trans_id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $allocated = 0;
+ my $qty;
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if (($qty = (($ref->{qty} * -1) - $ref->{allocated})) > $totalqty) {
+ $qty = $totalqty;
+ }
+
+ $form->update_balance($dbh, "invoice", "allocated", qq|id = $ref->{id}|,
+ $qty);
+
+ # total expenses and inventory
+ # sellprice is the cost of the item
+ $linetotal = $form->round_amount($ref->{sellprice} * $qty, 2);
+
+ if (!$eur) {
+
+ # add to expense
+ $form->{amount}{ $form->{id} }{ $ref->{expense_accno} } += -$linetotal;
+ $form->{expense_inventory} .= " " . $ref->{expense_accno};
+
+ # deduct inventory
+ $form->{amount}{ $form->{id} }{ $ref->{inventory_accno} } -= -$linetotal;
+ $form->{expense_inventory} .= " " . $ref->{inventory_accno};
+ }
+
+ # add allocated
+ $allocated += -$qty;
+
+ last if (($totalqty -= $qty) <= 0);
+ }
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+
+ return $allocated;
+}
+
+sub reverse_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form) = @_;
+
+ # reverse inventory items
+ my $query = qq|SELECT i.id, i.parts_id, i.qty, i.assemblyitem, p.assembly,
+ p.inventory_accno_id
+ FROM invoice i
+ JOIN parts p ON (i.parts_id = p.id)
+ WHERE i.trans_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ if ($ref->{inventory_accno_id} || $ref->{assembly}) {
+
+ # if the invoice item is not an assemblyitem adjust parts onhand
+ if (!$ref->{assemblyitem}) {
+
+ # adjust onhand in parts table
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $ref->{parts_id}|,
+ $ref->{qty});
+ }
+
+ # loop if it is an assembly
+ next if ($ref->{assembly});
+
+ # de-allocated purchases
+ $query = qq|SELECT i.id, i.trans_id, i.allocated
+ FROM invoice i
+ WHERE i.parts_id = $ref->{parts_id}
+ AND i.allocated > 0
+ ORDER BY i.trans_id DESC|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $inhref = $sth->fetchrow_hashref(NAME_lc)) {
+ $qty = $ref->{qty};
+ if (($ref->{qty} - $inhref->{allocated}) > 0) {
+ $qty = $inhref->{allocated};
+ }
+
+ # update invoice
+ $form->update_balance($dbh, "invoice", "allocated",
+ qq|id = $inhref->{id}|,
+ $qty * -1);
+
+ last if (($ref->{qty} -= $qty) <= 0);
+ }
+ $sth->finish;
+ }
+ }
+
+ $sth->finish;
+
+ # delete acc_trans
+ $query = qq|DELETE FROM acc_trans
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete invoice entries
+ $query = qq|DELETE FROM invoice
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{lizenzen}) {
+ $query = qq|DELETE FROM licenseinvoice
+ WHERE trans_id in (SELECT id FROM invoice WHERE trans_id = $form->{id})|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $spool) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ &reverse_invoice($dbh, $form);
+
+ # delete AR record
+ my $query = qq|DELETE FROM ar
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete spool files
+ $query = qq|SELECT s.spoolfile FROM status s
+ WHERE s.trans_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $spoolfile;
+ my @spoolfiles = ();
+
+ while (($spoolfile) = $sth->fetchrow_array) {
+ push @spoolfiles, $spoolfile;
+ }
+ $sth->finish;
+
+ # delete status entries
+ $query = qq|DELETE FROM status
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ if ($rc) {
+ foreach $spoolfile (@spoolfiles) {
+ unlink "$spool/$spoolfile" if $spoolfile;
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub retrieve_invoice {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query;
+
+ if ($form->{id}) {
+
+ # get default accounts and last invoice number
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies
+ FROM defaults d|;
+ } else {
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies, current_date AS invdate
+ FROM defaults d|;
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ if ($form->{id}) {
+
+ # retrieve invoice
+ $query = qq|SELECT a.invnumber, a.ordnumber, a.quonumber, a.cusordnumber,
+ a.transdate AS invdate, a.paid,
+ a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes,
+ a.duedate, a.taxincluded, a.curr AS currency,
+ a.employee_id, e.name AS employee
+ FROM ar a
+ LEFT JOIN employee e ON (e.id = a.employee_id)
+ WHERE a.id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ $form->{exchangerate} =
+ $form->get_exchangerate($dbh, $form->{currency}, $form->{invdate},
+ "buy");
+
+ # get shipto
+ $query = qq|SELECT s.* FROM shipto s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ # get printed, emailed
+ $query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname
+ FROM status s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{printed} .= "$ref->{formname} " if $ref->{printed};
+ $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
+ $form->{queued} .= "$ref->{formname} $ref->{spoolfile} "
+ if $ref->{spoolfile};
+ }
+ $sth->finish;
+ map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
+
+ # retrieve individual items
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE p.inventory_accno_id = c.id)
+ AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE p.income_accno_id = c.id)
+ AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE p.expense_accno_id = c.id)
+ AS expense_accno,
+ i.description, i.qty, i.fxsellprice AS sellprice,
+ i.discount, i.parts_id AS id, i.unit, i.deliverydate,
+ i.project_id, pr.projectnumber, i.serialnumber,
+ p.partnumber, p.assembly, p.bin, p.notes AS partnotes, i.id AS invoice_pos,
+ pg.partsgroup
+ FROM invoice i
+ JOIN parts p ON (i.parts_id = p.id)
+ LEFT JOIN project pr ON (i.project_id = pr.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE i.trans_id = $form->{id}
+ AND NOT i.assemblyitem = '1'
+ ORDER BY i.id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($ref->{expense_accno} != $ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ ORDER BY accno|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ $ref->{taxaccounts} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $ref->{taxaccounts} .= "$ptr->{accno} ";
+ if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccounts} .= "$ptr->{accno} ";
+ }
+
+ }
+
+ if ($form->{lizenzen}) {
+ $query = qq|SELECT l.licensenumber, l.id AS licenseid
+ FROM license l, licenseinvoice li
+ WHERE l.id = li.license_id AND li.trans_id = $ref->{invoice_pos}|;
+ $stg = $dbh->prepare($query);
+ $stg->execute || $form->dberror($query);
+ ($licensenumber, $licenseid) = $stg->fetchrow_array();
+ $ref->{lizenzen} =
+ "<option value=\"$licenseid\">$licensenumber</option>";
+ $stg->finish();
+ }
+
+ chop $ref->{taxaccounts};
+ push @{ $form->{invoice_details} }, $ref;
+ $stw->finish;
+ }
+ $sth->finish;
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub get_customer {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $dateformat = $myconfig->{dateformat};
+ $dateformat .= "yy" if $myconfig->{dateformat} !~ /^y/;
+
+ my $duedate =
+ ($form->{invdate})
+ ? "to_date('$form->{invdate}', '$dateformat')"
+ : "current_date";
+
+ $form->{customer_id} *= 1;
+
+ # get customer
+ my $query = qq|SELECT c.name AS customer, c.discount, c.creditlimit, c.terms,
+ c.email, c.cc, c.bcc, c.language,
+ c.street, c.zipcode, c.city, c.country,
+ $duedate + c.terms AS duedate, c.notes AS intnotes,
+ b.discount AS tradediscount, b.description AS business
+ FROM customer c
+ LEFT JOIN business b ON (b.id = c.business_id)
+ WHERE c.id = $form->{customer_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ $form->{creditremaining} = $form->{creditlimit};
+ $query = qq|SELECT SUM(a.amount - a.paid)
+ FROM ar a
+ WHERE a.customer_id = $form->{customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{creditremaining}) -= $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $query = qq|SELECT o.amount,
+ (SELECT e.buy FROM exchangerate e
+ WHERE e.curr = o.curr
+ AND e.transdate = o.transdate)
+ FROM oe o
+ WHERE o.customer_id = $form->{customer_id}
+ AND o.quotation = '0'
+ AND o.closed = '0'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($amount, $exch) = $sth->fetchrow_array) {
+ $exch = 1 unless $exch;
+ $form->{creditremaining} -= $amount * $exch;
+ }
+ $sth->finish;
+
+ $form->get_contacts($dbh, $form->{customer_id});
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+
+ # get contact if selected
+ if ($form->{contact} ne "--" && $form->{contact} ne "") {
+ $form->get_contact($dbh, $form->{cp_id});
+ }
+
+ # get shipto if we did not converted an order or invoice
+ if (!$form->{shipto}) {
+ map { delete $form->{$_} }
+ qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
+
+ $query = qq|SELECT s.* FROM shipto s
+ WHERE s.trans_id = $form->{customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+ }
+
+ # get taxes we charge for this customer
+ $query = qq|SELECT c.accno
+ FROM chart c
+ JOIN customertax ct ON (ct.chart_id = c.id)
+ WHERE ct.customer_id = $form->{customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $customertax = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $customertax{ $ref->{accno} } = 1;
+ }
+ $sth->finish;
+
+ # setup last accounts used for this customer
+ if (!$form->{id} && $form->{type} !~ /_(order|quotation)/) {
+ $query = qq|SELECT c.accno, c.description, c.link, c.category
+ FROM chart c
+ JOIN acc_trans ac ON (ac.chart_id = c.id)
+ JOIN ar a ON (a.id = ac.trans_id)
+ WHERE a.customer_id = $form->{customer_id}
+ AND NOT (c.link LIKE '%_tax%' OR c.link LIKE '%_paid%')
+ AND a.id IN (SELECT max(a2.id) FROM ar a2
+ WHERE a2.customer_id = $form->{customer_id})|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $i = 0;
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($ref->{category} eq 'I') {
+ $i++;
+ $form->{"AR_amount_$i"} = "$ref->{accno}--$ref->{description}";
+ }
+ if ($ref->{category} eq 'A') {
+ $form->{ARselected} = $form->{AR_1} =
+ "$ref->{accno}--$ref->{description}";
+ }
+ }
+ $sth->finish;
+ $form->{rowcount} = $i if ($i && !$form->{type});
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub retrieve_item {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $i = $form->{rowcount};
+
+ my $where = "NOT p.obsolete = '1'";
+
+ if ($form->{"partnumber_$i"}) {
+ my $partnumber = $form->like(lc $form->{"partnumber_$i"});
+ $where .= " AND lower(p.partnumber) LIKE '$partnumber'";
+ }
+ if ($form->{"description_$i"}) {
+ my $description = $form->like(lc $form->{"description_$i"});
+ $where .= " AND lower(p.description) LIKE '$description'";
+ }
+
+ if ($form->{"partsgroup_$i"}) {
+ my $partsgroup = $form->like(lc $form->{"partsgroup_$i"});
+ $where .= " AND lower(pg.partsgroup) LIKE '$partsgroup'";
+ }
+
+ if ($form->{"description_$i"}) {
+ $where .= " ORDER BY p.description";
+ } else {
+ $where .= " ORDER BY p.partnumber";
+ }
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.partnumber, p.description, p.sellprice,
+ p.listprice,
+ c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ p.unit, p.assembly, p.bin, p.onhand, p.notes AS partnotes,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
+ WHERE $where|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($ref->{expense_accno} != $ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT c2.taxkey_id from chart c2 where c2.accno = '$accno_id')
+ ORDER BY c.accno|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+
+ $ref->{taxaccounts} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $ref->{taxaccounts} .= "$ptr->{accno} ";
+ if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccounts} .= "$ptr->{accno} ";
+ }
+
+ }
+
+ $stw->finish;
+ chop $ref->{taxaccounts};
+
+ push @{ $form->{item_list} }, $ref;
+
+ if ($form->{lizenzen}) {
+ if ($ref->{inventory_accno} > 0) {
+ $query =
+ qq| SELECT l.* FROM license l WHERE l.parts_id = $ref->{id} AND NOT l.id IN (SELECT li.license_id FROM licenseinvoice li)|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{LIZENZEN}{ $ref->{id} } }, $ptr;
+ }
+ $stw->finish;
+ }
+ }
+
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub webdav_folder {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+
+SWITCH: {
+ $path = "webdav/rechnungen/" . $form->{invnumber}, last SWITCH
+ if ($form->{vc} eq "customer");
+ $path = "webdav/einkaufsrechnungen/" . $form->{invnumber}, last SWITCH
+ if ($form->{vc} eq "vendor");
+ }
+
+ if (!-d $path) {
+ mkdir($path, 0770) or die "can't make directory $!\n";
+ } else {
+ if ($form->{id}) {
+ @files = <$path/*>;
+ foreach $file (@files) {
+ $file =~ /\/([^\/]*)$/;
+ $fname = $1;
+ $ENV{'SCRIPT_NAME'} =~ /\/([^\/]*)\//;
+ $lxerp = $1;
+ $link = "http://" . $ENV{'SERVER_NAME'} . "/" . $lxerp . "/" . $file;
+ $form->{WEBDAV}{$fname} = $link;
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#=====================================================================
+#
+# routines to retrieve / manipulate win ini style files
+# ORDER is used to keep the elements in the order they appear in .ini
+#
+#=====================================================================
+
+package Inifile;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type, $file, $level) = @_;
+
+ my $id = "";
+ my $skip;
+
+ $type = ref($self) || $self;
+
+ open FH, "$file" or Form->error("$file : $!");
+
+ while (<FH>) {
+ next if /^(#|;|\s)/;
+ last if /^\./;
+
+ chop;
+
+ # strip comments
+ s/\s*(#|;).*//g;
+
+ # remove any trailing whitespace
+ s/^\s*(.*?)\s*$/$1/;
+
+ if (/^\[/) {
+ s/(\[|\])//g;
+
+ $id = $_;
+
+ # if there is a level skip
+ if ($skip = ($id !~ /^$level/)) {
+ next;
+ }
+
+ push @{ $self->{ORDER} }, $_;
+
+ next;
+
+ }
+
+ if (!$skip) {
+
+ # add key=value to $id
+ my ($key, $value) = split /=/, $_, 2;
+
+ $self->{$id}{$key} = $value;
+ }
+
+ }
+ close FH;
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Philip Reetz
+# Email: p.reetz@linet-services.de
+# Web: http://www.linet-services.de/
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Software license module
+# Backend routines
+#======================================================================
+
+package LICENSES;
+
+use SL::Form;
+
+sub save_license {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ $dbh = $form->dbconnect($myconfig);
+
+ $query =
+ qq| INSERT INTO license (licensenumber) VALUES ('$form->{licensenumber}')|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $sth->finish();
+
+ $query =
+ qq|SELECT l.id FROM license l WHERE l.licensenumber = '$form->{licensenumber}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($license_id) = $sth->fetchrow_array;
+ $sth->finish();
+
+ # save license
+ $query = qq|UPDATE license SET
+ validuntil = '$form->{validuntil}',
+ licensenumber = '$form->{licensenumber}',
+ parts_id = $form->{parts_id},
+ customer_id = $form->{customer_id},
+ comment = '$form->{comment}',
+ quantity = $form->{quantity}
+ WHERE id=$license_id|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $sth->finish();
+
+ if ($form->{own_product}) {
+ $form->update_balance($dbh, "parts", "onhand", qq|id = $form->{parts_id}|,
+ 1);
+ }
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $license_id;
+}
+
+sub get_customers {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $ref;
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $f = $dbh->quote('%' . $form->{"customer_name"} . '%');
+ my $query = qq|SELECT * FROM customer WHERE name ilike $f|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $form->{"all_customers"} = [];
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $form->{"all_customers"} }, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+ $main::lxdebug->leave_sub();
+}
+
+sub search {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my ($ref, $sth, $f, $s, $query);
+ my $dbh = $form->dbconnect($myconfig);
+
+ if ($form->{"partnumber"} || $form->{"description"}) {
+ $f = "(parts_id IN (SELECT id FROM parts WHERE ";
+ if ($form->{"partnumber"}) {
+ $f .=
+ "(partnumber ILIKE "
+ . $dbh->quote('%' . $form->{"partnumber"} . '%') . ")";
+ }
+ if ($form->{"description"}) {
+ $f .= " AND " if ($form->{"partnumber"});
+ $f .=
+ "(description ILIKE "
+ . $dbh->quote('%' . $form->{"description"} . '%') . ")";
+ }
+ $f .= "))";
+ }
+
+ if ($form->{"customer_name"}) {
+ $f .= " AND " if ($f);
+ $f .=
+ "(customer_id IN (SELECT id FROM customer WHERE name ILIKE "
+ . $dbh->quote('%' . $form->{"customer_name"} . '%') . "))";
+ }
+
+ if (!$form->{"all"} && $form->{"expiring_in"}) {
+ $f .= " AND " if ($f);
+ $f .=
+ "(validuntil < now() + "
+ . $dbh->quote("" . $form->{"expiring_in"} . " months") . ")";
+ }
+
+ if (!$form->{"show_expired"}) {
+ $f .= " AND " if ($f);
+ $f .= "(validuntil >= now())";
+ }
+
+ if ($f) {
+ $f = "WHERE (inventory_accno_id notnull) AND $f";
+ } else {
+ $f = "WHERE (inventory_accno_id notnull)";
+ }
+
+ if ($form->{"sortby"} eq "partnumber") {
+ $s = "p.partnumber";
+ } elsif ($form->{"sortby"} eq "description") {
+ $s = "p.description";
+ } elsif ($form->{"sortby"} eq "name") {
+ $s = "c.name";
+ } elsif ($form->{"sortby"} eq "validuntil") {
+ $s = "l.validuntil";
+ } else {
+ $s = "l.validuntil";
+ }
+ if ($form->{"sortasc"}) {
+ $s .= " ASC";
+ } else {
+ $s .= " DESC";
+ }
+
+ $query =
+ "SELECT l.*, p.partnumber, p.description, c.name, a.invnumber "
+ . "FROM license l "
+ . "LEFT JOIN parts p ON (p.id = l.parts_id) "
+ . "LEFT JOIN customer c ON (c.id = l.customer_id) "
+ . "LEFT JOIN ar a ON "
+ . "(a.id = (SELECT i.trans_id FROM invoice i WHERE i.id = "
+ . "(SELECT li.trans_id FROM licenseinvoice li WHERE li.license_id = l.id))) "
+ . "$f ORDER BY $s";
+
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ $form->{"licenses"} = [];
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $form->{"licenses"} }, $ref);
+ }
+
+ $sth->finish();
+ $dbh->disconnect();
+ $main::lxdebug->leave_sub();
+}
+
+sub get_license {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my ($ref, $sth, $query);
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query =
+ "SELECT l.*, p.partnumber, p.description, c.name, c.street, "
+ . "c.zipcode, c.city, c.country, c.contact, c.phone, c.fax, c.homepage, "
+ . "c.email, c.notes, c.customernumber, c.language, a.invnumber "
+ . "FROM license l "
+ . "LEFT JOIN parts p ON (p.id = l.parts_id) "
+ . "LEFT JOIN customer c ON (c.id = l.customer_id) "
+ . "LEFT JOIN ar a ON "
+ . "(a.id = (SELECT i.trans_id FROM invoice i WHERE i.id = "
+ . "(SELECT li.trans_id FROM licenseinvoice li WHERE li.license_id = l.id))) "
+ . "LEFT JOIN invoice i ON "
+ . "(i.id = "
+ . "(SELECT li.trans_id FROM licenseinvoice li WHERE li.license_id = l.id)) "
+ . "WHERE l.id = "
+ . $form->{"id"};
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ $form->{"license"} = $sth->fetchrow_hashref(NAME_lc);
+ $sth->finish();
+ $dbh->disconnect();
+ $main::lxdebug->leave_sub();
+}
+
+1;
--- /dev/null
+package LXDebug;
+
+use constant {
+ NONE => 0,
+ INFO => 1,
+ DEBUG1 => 2,
+ DEBUG2 => 3,
+
+ FILE_TARGET => 0,
+ STDERR_TARGET => 1 };
+
+use POSIX qw(strftime);
+
+my $data_dumper_available;
+
+BEGIN {
+ eval("use Data::Dumper");
+ $data_dumper_available = $@ ? 0 : 1;
+
+ $global_level = NONE;
+ $global_trace_subs = 0;
+}
+
+sub new {
+ my $type = shift;
+ my $self = {};
+
+ $self->{"calldepth"} = 0;
+ $self->{"file"} = "/tmp/lx-office-debug.log";
+ $self->{"target"} = FILE_TARGET;
+ $self->{"level"} = 0;
+ $self->{"trace_subs"} = 0;
+
+ while ($_[0]) {
+ $self->{ $_[0] } = $_[1];
+ shift;
+ shift;
+ }
+
+ bless($self, $type);
+}
+
+sub set_target {
+ my ($self, $target, $file) = @_;
+
+ if ((FILE_TARGET == $target) && $file) {
+ $self->{"file"} = $file;
+ $self->{"target"} = FILE_TARGET;
+
+ } elsif (STDERR_TARGET == $target) {
+ $self->{"target"} = STDERR_TARGET;
+ }
+}
+
+sub enter_sub {
+ my ($self) = @_;
+
+ if (!$self->{"trace_subs"} && !$global_trace_subs) {
+ return;
+ }
+
+ my ($package, $filename, $line, $subroutine) = caller(1);
+ my ($dummy1, $self_filename, $self_line) = caller(0);
+
+ my $indent = " " x $self->{"calldepth"};
+ $self->{"calldepth"} += 1;
+
+ if (!defined($package)) {
+ $self->_write("enter_sub", $indent . "top-level?\n");
+ } else {
+ $self->_write("enter_sub",
+ $indent
+ . "${subroutine} in "
+ . "${self_filename}:${self_line} called from "
+ . "${filename}:${line}\n");
+ }
+}
+
+sub leave_sub {
+ my ($self) = @_;
+
+ if (!$self->{"trace_subs"} && !$global_trace_subs) {
+ return;
+ }
+
+ my ($package, $filename, $line, $subroutine) = caller(1);
+ my ($dummy1, $self_filename, $self_line) = caller(0);
+
+ $self->{"calldepth"} -= 1;
+ my $indent = " " x $self->{"calldepth"};
+
+ if (!defined($package)) {
+ $self->_write("leave_sub", $indent . "top-level?\n");
+ } else {
+ $self->_write("leave_sub",
+ $indent . "${subroutine} in " . "${self_filename}:${self_line}\n");
+ }
+}
+
+sub message {
+ my ($self, $level, $message) = @_;
+ my ($log_level) = $self->{"level"};
+
+ if ($global_level && ($global_level > $log_level)) {
+ $log_level = $global_level;
+ }
+
+ if ($log_level >= $level) {
+ $self->_write(INFO == $level
+ ? "info"
+ : DEBUG1 == $level ? "debug1" : "debug2",
+ $message);
+ }
+}
+
+sub dump {
+ my ($self, $level, $name, $variable) = @_;
+
+ if ($data_dumper_available) {
+ $self->message($level, "dumping ${name}:\n" . Dumper($variable));
+ } else {
+ $self->message($level,
+ "dumping ${name}: Data::Dumper not available; "
+ . "variable cannot be dumped");
+ }
+}
+
+sub enable_sub_tracing {
+ my ($self) = @_;
+ $self->{"trace_subs"} = 1;
+}
+
+sub disable_sub_tracing {
+ my ($self) = @_;
+ $self->{"trace_subs"} = 1;
+}
+
+sub _write {
+ my ($self, $prefix, $message) = @_;
+ my $date = strftime("%Y-%m-%d %H:%M:%S $$ ${prefix}: ", localtime(time()));
+ local *FILE;
+
+ chomp($message);
+
+ if ((FILE_TARGET == $self->{"target"})
+ && open(FILE, ">>" . $self->{"file"})) {
+ print(FILE "${date}${message}\n");
+ close(FILE);
+
+ } elsif (STDERR_TARGET == $self->{"target"}) {
+ print(STDERR "${date}${message}\n");
+ }
+}
+
+1;
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+
+package Mailer;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type) = @_;
+ my $self = {};
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+sub send {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $out) = @_;
+
+ my $boundary = time;
+ $boundary = "SL-$self->{version}-$boundary";
+ my $domain = $self->{from};
+ $domain =~ s/(.*?\@|>)//g;
+ my $msgid = "$boundary\@$domain";
+
+ $self->{charset} = "ISO-8859-1" unless $self->{charset};
+
+ if ($out) {
+ if (!open(OUT, $out)) {
+ $main::lxdebug->leave_sub();
+ return "$out : $!";
+ }
+ } else {
+ if (!open(OUT, ">-")) {
+ $main::lxdebug->leave_sub();
+ return "STDOUT : $!";
+ }
+ }
+
+ $self->{contenttype} = "text/plain" unless $self->{contenttype};
+
+ my ($cc, $bcc);
+ $cc = "Cc: $self->{cc}\n" if $self->{cc};
+ $bcc = "Bcc: $self->{bcc}\n" if $self->{bcc};
+
+ foreach my $item (qw(to cc bcc)) {
+ $self->{$item} =~ s/\</</g;
+ $self->{$item} =~ s/\$<\$/</g;
+ $self->{$item} =~ s/\>/>/g;
+ $self->{$item} =~ s/\$>\$/>/g;
+ }
+
+ print OUT qq|From: $self->{from}
+To: $self->{to}
+${cc}${bcc}Subject: $self->{subject}
+Message-ID: <$msgid>
+X-Mailer: SQL-Ledger $self->{version}
+MIME-Version: 1.0
+|;
+
+ if ($self->{attachments}) {
+ print OUT qq|Content-Type: multipart/mixed; boundary="$boundary"
+
+|;
+ if ($self->{message}) {
+ print OUT qq|--${boundary}
+Content-Type: $self->{contenttype}; charset="$self->{charset}"
+
+$self->{message}
+
+|;
+ }
+
+ foreach my $attachment (@{ $self->{attachments} }) {
+
+ my $application =
+ ($attachment =~ /(^\w+$)|\.(html|text|txt|sql)$/)
+ ? "text"
+ : "application";
+
+ open(IN, $attachment);
+ if ($?) {
+ close(OUT);
+ $main::lxdebug->leave_sub();
+ return "$attachment : $!";
+ }
+
+ my $filename = $attachment;
+
+ # strip path
+ $filename =~ s/(.*\/|$self->{fileid})//g;
+
+ print OUT qq|--${boundary}
+Content-Type: $application/$self->{format}; name="$filename"; charset="$self->{charset}"
+Content-Transfer-Encoding: BASE64
+Content-Disposition: attachment; filename="$filename"\n\n|;
+
+ my $msg = "";
+ while (<IN>) {
+ ;
+ $msg .= $_;
+ }
+ print OUT &encode_base64($msg);
+
+ close(IN);
+
+ }
+ print OUT qq|--${boundary}--\n|;
+
+ } else {
+ print OUT qq|Content-Type: $self->{contenttype}; charset="$self->{charset}"
+
+$self->{message}
+|;
+ }
+
+ close(OUT);
+
+ $main::lxdebug->leave_sub();
+
+ return "";
+}
+
+sub encode_base64 ($;$) {
+ $main::lxdebug->enter_sub();
+
+ # this code is from the MIME-Base64-2.12 package
+ # Copyright 1995-1999,2001 Gisle Aas <gisle@ActiveState.com>
+
+ my $res = "";
+ my $eol = $_[1];
+ $eol = "\n" unless defined $eol;
+ pos($_[0]) = 0; # ensure start at the beginning
+
+ $res = join '', map(pack('u', $_) =~ /^.(\S*)/, ($_[0] =~ /(.{1,45})/gs));
+
+ $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs
+ # fix padding at the end
+ my $padding = (3 - length($_[0]) % 3) % 3;
+ $res =~ s/.{$padding}$/'=' x $padding/e if $padding;
+
+ # break encoded string into lines of no more than 60 characters each
+ if (length $eol) {
+ $res =~ s/(.{1,60})/$1$eol/g;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $res;
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#=====================================================================
+#
+# routines for menu items
+#
+#=====================================================================
+
+package Menu;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type, $menufile, $level) = @_;
+
+ use SL::Inifile;
+ my $self = Inifile->new($menufile, $level);
+
+ $main::lxdebug->leave_sub();
+
+ bless $self, $type;
+}
+
+sub menuitem {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $item) = @_;
+
+ my $module = $form->{script};
+ my $action = "section_menu";
+ my $target = "";
+
+ if ($self->{$item}{module}) {
+ $module = $self->{$item}{module};
+ }
+ if ($self->{$item}{action}) {
+ $action = $self->{$item}{action};
+ }
+ if ($self->{$item}{target}) {
+ $target = $self->{$item}{target};
+ }
+
+ my $level = $form->escape($item);
+ my $str =
+ qq|<a href=$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|;
+ my @vars = qw(module action target href);
+
+ if ($self->{$item}{href}) {
+ $str = qq|<a href=$self->{$item}{href}|;
+ @vars = qw(module target href);
+ }
+
+ map { delete $self->{$item}{$_} } @vars;
+
+ # add other params
+ foreach my $key (keys %{ $self->{$item} }) {
+ $str .= "&" . $form->escape($key, 1) . "=";
+ ($value, $conf) = split /=/, $self->{$item}{$key}, 2;
+ $value = $myconfig->{$value} . "/$conf" if ($conf);
+ $str .= $form->escape($value, 1);
+ }
+
+ if ($target) {
+ $str .= qq| target=$target|;
+ }
+
+ $str .= ">";
+
+ $main::lxdebug->leave_sub();
+
+ return $str;
+}
+
+sub access_control {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $menulevel) = @_;
+
+ my @menu = ();
+
+ if ($menulevel eq "") {
+ @menu = grep { !/--/ } @{ $self->{ORDER} };
+ } else {
+ @menu = grep { /^${menulevel}--/ } @{ $self->{ORDER} };
+ }
+
+ my @a = split /;/, $myconfig->{acs};
+ my $excl = ();
+
+ # remove --AR, --AP from array
+ grep { ($a, $b) = split /--/; s/--$a$//; } @a;
+
+ map { $excl{$_} = 1 } @a;
+
+ @a = ();
+ map { push @a, $_ unless $excl{$_} } (@menu);
+
+ $main::lxdebug->leave_sub();
+
+ return @a;
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#=====================================================================
+#
+# this is the default code for the Check package
+#
+#=====================================================================
+
+sub init {
+ my $self = shift;
+
+ %{ $self->{numbername} } = (0 => 'Zero',
+ 1 => 'One',
+ 2 => 'Two',
+ 3 => 'Three',
+ 4 => 'Four',
+ 5 => 'Five',
+ 6 => 'Six',
+ 7 => 'Seven',
+ 8 => 'Eight',
+ 9 => 'Nine',
+ 10 => 'Ten',
+ 11 => 'Eleven',
+ 12 => 'Twelve',
+ 13 => 'Thirteen',
+ 14 => 'Fourteen',
+ 15 => 'Fifteen',
+ 16 => 'Sixteen',
+ 17 => 'Seventeen',
+ 18 => 'Eighteen',
+ 19 => 'Nineteen',
+ 20 => 'Twenty',
+ 30 => 'Thirty',
+ 40 => 'Forty',
+ 50 => 'Fifty',
+ 60 => 'Sixty',
+ 70 => 'Seventy',
+ 80 => 'Eighty',
+ 90 => 'Ninety',
+ 10**2 => 'Hundred',
+ 10**3 => 'Thousand',
+ 10**6 => 'Million',
+ 10**9 => 'Billion',
+ 10**12 => 'Trillion',);
+
+}
+
+sub num2text {
+ my ($self, $amount) = @_;
+
+ return $self->{numbername}{0} unless $amount;
+
+ my @textnumber = ();
+
+ # split amount into chunks of 3
+ my @num = reverse split //, $amount;
+ my @numblock = ();
+ my @a;
+ my $i;
+
+ while (@num) {
+ @a = ();
+ for (1 .. 3) {
+ push @a, shift @num;
+ }
+ push @numblock, join / /, reverse @a;
+ }
+
+ while (@numblock) {
+
+ $i = $#numblock;
+ @num = split //, $numblock[$i];
+
+ if ($numblock[$i] == 0) {
+ pop @numblock;
+ next;
+ }
+
+ if ($numblock[$i] > 99) {
+
+ # the one from hundreds
+ push @textnumber, $self->{numbername}{ $num[0] };
+
+ # add hundred designation
+ push @textnumber, $self->{numbername}{ 10**2 };
+
+ # reduce numblock
+ $numblock[$i] -= $num[0] * 100;
+
+ }
+
+ $numblock[$i] *= 1;
+
+ if ($numblock[$i] > 9) {
+
+ # tens
+ push @textnumber, $self->format_ten($numblock[$i]);
+ } elsif ($numblock[$i] > 0) {
+
+ # ones
+ push @textnumber, $self->{numbername}{ $numblock[$i] };
+ }
+
+ # add thousand, million
+ if ($i) {
+ $num = 10**($i * 3);
+ push @textnumber, $self->{numbername}{$num};
+ }
+
+ pop @numblock;
+
+ }
+
+ join ' ', @textnumber;
+
+}
+
+sub format_ten {
+ my ($self, $amount) = @_;
+
+ my $textnumber = "";
+ my @num = split //, $amount;
+
+ if ($amount > 20) {
+ $textnumber = $self->{numbername}{ $num[0] * 10 };
+ $amount = $num[1];
+ } else {
+ $textnumber = $self->{numbername}{$amount};
+ $amount = 0;
+ }
+
+ $textnumber .= " " . $self->{numbername}{$amount} if $amount;
+
+ $textnumber;
+
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1999-2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Order entry module
+# Quotation
+#======================================================================
+
+package OE;
+
+sub transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query;
+ my $ordnumber = 'ordnumber';
+ my $quotation = '0';
+ my ($null, $department_id) = split /--/, $form->{department};
+
+ my $department = " AND o.department_id = $department_id" if $department_id;
+
+ my $rate = ($form->{vc} eq 'customer') ? 'buy' : 'sell';
+
+ if ($form->{type} =~ /_quotation$/) {
+ $quotation = '1';
+ $ordnumber = 'quonumber';
+ }
+
+ my $number = $form->like(lc $form->{$ordnumber});
+ my $name = $form->like(lc $form->{ $form->{vc} });
+
+ my $query = qq|SELECT o.id, o.ordnumber, o.transdate, o.reqdate,
+ o.amount, ct.name, o.netamount, o.$form->{vc}_id,
+ ex.$rate AS exchangerate,
+ o.closed, o.quonumber, o.shippingpoint, o.shipvia,
+ e.name AS employee
+ FROM oe o
+ JOIN $form->{vc} ct ON (o.$form->{vc}_id = ct.id)
+ LEFT JOIN employee e ON (o.employee_id = e.id)
+ LEFT JOIN exchangerate ex ON (ex.curr = o.curr
+ AND ex.transdate = o.transdate)
+ WHERE o.quotation = '$quotation'
+ $department|;
+
+ # build query if type eq (ship|receive)_order
+ if ($form->{type} =~ /(ship|receive)_order/) {
+ my ($warehouse, $warehouse_id) = split /--/, $form->{warehouse};
+
+ $query = qq|SELECT DISTINCT ON (o.id) o.id, o.ordnumber, o.transdate,
+ o.reqdate, o.amount, ct.name, o.netamount, o.$form->{vc}_id,
+ ex.$rate AS exchangerate,
+ o.closed, o.quonumber, o.shippingpoint, o.shipvia,
+ e.name AS employee
+ FROM oe o
+ JOIN $form->{vc} ct ON (o.$form->{vc}_id = ct.id)
+ JOIN orderitems oi ON (oi.trans_id = o.id)
+ JOIN parts p ON (p.id = oi.parts_id)|;
+
+ if ($warehouse_id && $form->{type} eq 'ship_order') {
+ $query .= qq|
+ JOIN inventory i ON (oi.parts_id = i.parts_id)
+ |;
+ }
+
+ $query .= qq|
+ LEFT JOIN employee e ON (o.employee_id = e.id)
+ LEFT JOIN exchangerate ex ON (ex.curr = o.curr
+ AND ex.transdate = o.transdate)
+ WHERE o.quotation = '0'
+ AND (p.inventory_accno_id > 0 OR p.assembly = '1')
+ AND oi.qty <> oi.ship
+ $department|;
+
+ if ($warehouse_id && $form->{type} eq 'ship_order') {
+ $query .= qq|
+ AND i.warehouse_id = $warehouse_id
+ AND i.qty >= (oi.qty - oi.ship)
+ |;
+ }
+
+ }
+
+ if ($form->{"$form->{vc}_id"}) {
+ $query .= qq| AND o.$form->{vc}_id = $form->{"$form->{vc}_id"}|;
+ } else {
+ if ($form->{ $form->{vc} }) {
+ $query .= " AND lower(ct.name) LIKE '$name'";
+ }
+ }
+ if (!$form->{open} && !$form->{closed}) {
+ $query .= " AND o.id = 0";
+ } elsif (!($form->{open} && $form->{closed})) {
+ $query .= ($form->{open}) ? " AND o.closed = '0'" : " AND o.closed = '1'";
+ }
+
+ my $sortorder = join ', ',
+ ("o.id", $form->sort_columns(transdate, $ordnumber, name));
+ $sortorder = $form->{sort} unless $sortorder;
+
+ $query .= " AND lower($ordnumber) LIKE '$number'" if $form->{$ordnumber};
+ $query .= " AND o.transdate >= '$form->{transdatefrom}'"
+ if $form->{transdatefrom};
+ $query .= " AND o.transdate <= '$form->{transdateto}'"
+ if $form->{transdateto};
+ $query .= " ORDER by $sortorder";
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my %id = ();
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{exchangerate} = 1 unless $ref->{exchangerate};
+ push @{ $form->{OE} }, $ref if $ref->{id} != $id{ $ref->{id} };
+ $id{ $ref->{id} } = $ref->{id};
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($query, $sth, $null);
+ my $exchangerate = 0;
+
+ ($null, $form->{employee_id}) = split /--/, $form->{employee};
+ unless ($form->{employee_id}) {
+ $form->get_employee($dbh);
+ }
+
+ ($null, $form->{contact_id}) = split /--/, $form->{contact};
+ $form->{contact_id} *= 1;
+
+ my $ml = ($form->{type} eq 'sales_order') ? 1 : -1;
+
+ if ($form->{id}) {
+
+ &adj_onhand($dbh, $form, $ml) if $form->{type} =~ /_order$/;
+
+ $query = qq|DELETE FROM orderitems
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ } else {
+
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+
+ $query = qq|INSERT INTO oe (ordnumber, employee_id)
+ VALUES ('$uid', $form->{employee_id})|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT o.id FROM oe o
+ WHERE o.ordnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{id}) = $sth->fetchrow_array;
+ $sth->finish;
+ }
+
+ map { $form->{$_} =~ s/\'/\'\'/g }
+ qw(ordnumber quonumber shippingpoint shipvia notes intnotes message);
+
+ my $amount;
+ my $linetotal;
+ my $discount;
+ my $project_id;
+ my $reqdate;
+ my $taxrate;
+ my $taxamount;
+ my $fxsellprice;
+ my %taxbase;
+ my @taxaccounts;
+ my %taxaccounts;
+ my $netamount = 0;
+
+ for my $i (1 .. $form->{rowcount}) {
+
+ map {
+ $form->{"${_}_$i"} = $form->parse_amount($myconfig, $form->{"${_}_$i"})
+ } qw(qty ship);
+
+ if ($form->{"qty_$i"}) {
+
+ map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
+ qw(partnumber description unit);
+
+ # set values to 0 if nothing entered
+ $form->{"discount_$i"} =
+ $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100;
+
+ $form->{"sellprice_$i"} =
+ $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+ $fxsellprice = $form->{"sellprice_$i"};
+
+ my ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $discount =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"discount_$i"},
+ $decimalplaces);
+ $form->{"sellprice_$i"} =
+ $form->round_amount($form->{"sellprice_$i"} - $discount,
+ $decimalplaces);
+
+ $form->{"inventory_accno_$i"} *= 1;
+ $form->{"expense_accno_$i"} *= 1;
+
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2);
+
+ @taxaccounts = split / /, $form->{"taxaccounts_$i"};
+ $taxrate = 0;
+ $taxdiff = 0;
+
+ map { $taxrate += $form->{"${_}_rate"} } @taxaccounts;
+
+ if ($form->{taxincluded}) {
+ $taxamount = $linetotal * $taxrate / (1 + $taxrate);
+ $taxbase = $linetotal - $taxamount;
+
+ # we are not keeping a natural price, do not round
+ $form->{"sellprice_$i"} =
+ $form->{"sellprice_$i"} * (1 / (1 + $taxrate));
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ $taxbase = $linetotal;
+ }
+
+ if ($form->round_amount($taxrate, 7) == 0) {
+ if ($form->{taxincluded}) {
+ foreach $item (@taxaccounts) {
+ $taxamount =
+ $form->round_amount($linetotal * $form->{"${item}_rate"} /
+ (1 + abs($form->{"${item}_rate"})),
+ 2);
+
+ $taxaccounts{$item} += $taxamount;
+ $taxdiff += $taxamount;
+
+ $taxbase{$item} += $taxbase;
+ }
+ $taxaccounts{ $taxaccounts[0] } += $taxdiff;
+ } else {
+ foreach $item (@taxaccounts) {
+ $taxaccounts{$item} += $linetotal * $form->{"${item}_rate"};
+ $taxbase{$item} += $taxbase;
+ }
+ }
+ } else {
+ foreach $item (@taxaccounts) {
+ $taxaccounts{$item} +=
+ $taxamount * $form->{"${item}_rate"} / $taxrate;
+ $taxbase{$item} += $taxbase;
+ }
+ }
+
+ $netamount += $form->{"sellprice_$i"} * $form->{"qty_$i"};
+
+ $project_id = 'NULL';
+ if ($form->{"projectnumber_$i"}) {
+ $project_id = $form->{"projectnumber_$i"};
+ }
+ $reqdate =
+ ($form->{"reqdate_$i"}) ? qq|'$form->{"reqdate_$i"}'| : "NULL";
+
+ # save detail record in orderitems table
+ $query = qq|INSERT INTO orderitems (|;
+ $query .= "id, " if $form->{"orderitems_id_$i"};
+ $query .= qq|trans_id, parts_id, description, qty, sellprice, discount,
+ unit, reqdate, project_id, serialnumber, ship)
+ VALUES (|;
+ $query .= qq|$form->{"orderitems_id_$i"},|
+ if $form->{"orderitems_id_$i"};
+ $query .= qq|$form->{id}, $form->{"id_$i"},
+ '$form->{"description_$i"}', $form->{"qty_$i"},
+ $fxsellprice, $form->{"discount_$i"},
+ '$form->{"unit_$i"}', $reqdate, (SELECT id from project where projectnumber = '$project_id'),
+ '$form->{"serialnumber_$i"}', $form->{"ship_$i"})|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $form->{"sellprice_$i"} = $fxsellprice;
+ $form->{"discount_$i"} *= 100;
+ }
+ }
+
+ # set values which could be empty
+ map { $form->{$_} *= 1 }
+ qw(vendor_id customer_id taxincluded closed quotation);
+
+ $reqdate = ($form->{reqdate}) ? qq|'$form->{reqdate}'| : "NULL";
+
+ # add up the tax
+ my $tax = 0;
+ map { $tax += $form->round_amount($taxaccounts{$_}, 2) } keys %taxaccounts;
+
+ $amount = $form->round_amount($netamount + $tax, 2);
+ $netamount = $form->round_amount($netamount, 2);
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ $form->{exchangerate} = 1;
+ } else {
+ $exchangerate =
+ $form->check_exchangerate($myconfig,
+ $form->{currency},
+ $form->{transdate},
+ ($form->{vc} eq 'customer') ? 'buy' : 'sell');
+ }
+
+ $form->{exchangerate} =
+ ($exchangerate)
+ ? $exchangerate
+ : $form->parse_amount($myconfig, $form->{exchangerate});
+
+ my $quotation;
+
+ # fill in subject if there is none
+ if ($form->{type} =~ /_order$/) {
+ $quotation = '0';
+ $form->{subject} = qq|$form->{label} $form->{ordnumber}|
+ unless $form->{subject};
+ } else {
+ $quotation = '1';
+ $form->{subject} = qq|$form->{label} $form->{quonumber}|
+ unless $form->{subject};
+ }
+
+ # if there is a message stuff it into the intnotes
+ my $cc = "Cc: $form->{cc}\\r\n" if $form->{cc};
+ my $bcc = "Bcc: $form->{bcc}\\r\n" if $form->{bcc};
+ my $now = scalar localtime;
+ $form->{intnotes} .= qq|\r
+\r| if $form->{intnotes};
+
+ $form->{intnotes} .= qq|[email]\r
+Date: $now
+To: $form->{email}\r
+$cc${bcc}Subject: $form->{subject}\r
+\r
+Message: $form->{message}\r| if $form->{message};
+
+ ($null, $form->{department_id}) = split(/--/, $form->{department});
+ $form->{department_id} *= 1;
+
+ # save OE record
+ $query = qq|UPDATE oe set
+ ordnumber = '$form->{ordnumber}',
+ quonumber = '$form->{quonumber}',
+ cusordnumber = '$form->{cusordnumber}',
+ transdate = '$form->{transdate}',
+ vendor_id = $form->{vendor_id},
+ customer_id = $form->{customer_id},
+ amount = $amount,
+ netamount = $netamount,
+ reqdate = $reqdate,
+ taxincluded = '$form->{taxincluded}',
+ shippingpoint = '$form->{shippingpoint}',
+ shipvia = '$form->{shipvia}',
+ notes = '$form->{notes}',
+ intnotes = '$form->{intnotes}',
+ curr = '$form->{currency}',
+ closed = '$form->{closed}',
+ quotation = '$quotation',
+ department_id = $form->{department_id},
+ employee_id = $form->{employee_id},
+ cp_id = $form->{contact_id}
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $form->{ordtotal} = $amount;
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+
+ # add shipto
+ $form->{name} = $form->{ $form->{vc} };
+ $form->{name} =~ s/--$form->{"$form->{vc}_id"}//;
+ $form->add_shipto($dbh, $form->{id});
+
+ # save printed, emailed, queued
+ $form->save_status($dbh);
+
+ if (($form->{currency} ne $form->{defaultcurrency}) && !$exchangerate) {
+ if ($form->{vc} eq 'customer') {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate},
+ $form->{exchangerate}, 0);
+ }
+ if ($form->{vc} eq 'vendor') {
+ $form->update_exchangerate($dbh, $form->{currency}, $form->{transdate},
+ 0, $form->{exchangerate});
+ }
+ }
+
+ if ($form->{type} =~ /_order$/) {
+
+ # adjust onhand
+ &adj_onhand($dbh, $form, $ml * -1);
+ &adj_inventory($dbh, $myconfig, $form);
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub delete {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $spool) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ # delete spool files
+ my $query = qq|SELECT s.spoolfile FROM status s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ my $spoolfile;
+ my @spoolfiles = ();
+
+ while (($spoolfile) = $sth->fetchrow_array) {
+ push @spoolfiles, $spoolfile;
+ }
+ $sth->finish;
+
+ $query = qq|SELECT o.parts_id, o.ship FROM orderitems o
+ WHERE o.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ while (my ($id, $ship) = $sth->fetchrow_array) {
+ $form->update_balance($dbh, "parts", "onhand", qq|id = $id|, $ship * -1);
+ }
+ $sth->finish;
+
+ # delete inventory
+ $query = qq|DELETE FROM inventory
+ WHERE oe_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete status entries
+ $query = qq|DELETE FROM status
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete OE record
+ $query = qq|DELETE FROM oe
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # delete individual entries
+ $query = qq|DELETE FROM orderitems
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|DELETE FROM shipto
+ WHERE trans_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ if ($rc) {
+ foreach $spoolfile (@spoolfiles) {
+ unlink "$spool/$spoolfile" if $spoolfile;
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub retrieve {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query;
+
+ if ($form->{id}) {
+
+ # get default accounts and last order number
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies
+ FROM defaults d|;
+ } else {
+ $query = qq|SELECT (SELECT c.accno FROM chart c
+ WHERE d.inventory_accno_id = c.id) AS inventory_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.income_accno_id = c.id) AS income_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.expense_accno_id = c.id) AS expense_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxgain_accno_id = c.id) AS fxgain_accno,
+ (SELECT c.accno FROM chart c
+ WHERE d.fxloss_accno_id = c.id) AS fxloss_accno,
+ d.curr AS currencies,
+ current_date AS transdate, current_date AS reqdate
+ FROM defaults d|;
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ ($form->{currency}) = split /:/, $form->{currencies};
+
+ if ($form->{id}) {
+
+ # retrieve order
+ $query = qq|SELECT o.cp_id,o.ordnumber, o.transdate, o.reqdate,
+ o.taxincluded, o.shippingpoint, o.shipvia, o.notes, o.intnotes,
+ o.curr AS currency, e.name AS employee, o.employee_id,
+ o.$form->{vc}_id, cv.name AS $form->{vc}, o.amount AS invtotal,
+ o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber,
+ d.description AS department
+ FROM oe o
+ JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id)
+ LEFT JOIN employee e ON (o.employee_id = e.id)
+ LEFT JOIN department d ON (o.department_id = d.id)
+ WHERE o.id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ $query = qq|SELECT s.* FROM shipto s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ # get printed, emailed and queued
+ $query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname
+ FROM status s
+ WHERE s.trans_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{printed} .= "$ref->{formname} " if $ref->{printed};
+ $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
+ $form->{queued} .= "$ref->{formname} $ref->{spoolfile} "
+ if $ref->{spoolfile};
+ }
+ $sth->finish;
+ map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
+
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ # retrieve individual items
+ $query = qq|SELECT o.id AS orderitems_id,
+ c1.accno AS inventory_accno,
+ c2.accno AS income_accno,
+ c3.accno AS expense_accno,
+ p.partnumber, p.assembly, o.description, o.qty,
+ o.sellprice, o.parts_id AS id, o.unit, o.discount, p.bin, p.notes AS partnotes,
+ o.reqdate, o.project_id, o.serialnumber, o.ship,
+ pr.projectnumber,
+ pg.partsgroup
+ FROM orderitems o
+ JOIN parts p ON (o.parts_id = p.id)
+ LEFT JOIN chart c1 ON (p.inventory_accno_id = c1.id)
+ LEFT JOIN chart c2 ON (p.income_accno_id = c2.id)
+ LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
+ LEFT JOIN project pr ON (o.project_id = pr.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE o.trans_id = $form->{id}
+ ORDER BY o.$oid{$myconfig->{dbdriver}}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ #set expense_accno=inventory_accno if they are different => bilanz
+ $vendor_accno =
+ ($ref->{expense_accno} != $ref->{inventory_accno})
+ ? $ref->{inventory_accno}
+ : $ref->{expense_accno};
+
+ # get tax rates and description
+ $accno_id =
+ ($form->{vc} eq "customer") ? $ref->{income_accno} : $vendor_accno;
+ $query = qq|SELECT c.accno, c.description, t.rate, t.taxnumber
+ FROM chart c, tax t
+ WHERE c.id=t.chart_id AND t.taxkey in (SELECT taxkey_id from chart where accno = '$accno_id')
+ ORDER BY accno|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ $ref->{taxaccounts} = "";
+ while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
+
+ # if ($customertax{$ref->{accno}}) {
+ $ref->{taxaccounts} .= "$ptr->{accno} ";
+ if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
+ $form->{"$ptr->{accno}_rate"} = $ptr->{rate};
+ $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
+ $form->{taxaccounts} .= "$ptr->{accno} ";
+ }
+
+ }
+
+ chop $ref->{taxaccounts};
+ push @{ $form->{form_details} }, $ref;
+ $stw->finish;
+ }
+ $sth->finish;
+
+ } else {
+
+ # get last name used
+ $form->lastname_used($dbh, $myconfig, $form->{vc})
+ unless $form->{"$form->{vc}_id"};
+
+ }
+
+ $form->{exchangerate} =
+ $form->get_exchangerate($dbh, $form->{currency}, $form->{transdate},
+ ($form->{vc} eq 'customer') ? "buy" : "sell");
+
+ if ($form->{webdav}) {
+ &webdav_folder($myconfig, $form);
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub order_details {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+ my $query;
+ my $sth;
+
+ my $item;
+ my $i;
+ my @partsgroup = ();
+ my $partsgroup;
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ # sort items by partsgroup
+ for $i (1 .. $form->{rowcount}) {
+ $partsgroup = "";
+ if ($form->{"partsgroup_$i"} && $form->{groupitems}) {
+ $form->format_string("partsgroup_$i");
+ $partsgroup = $form->{"partsgroup_$i"};
+ }
+ push @partsgroup, [$i, $partsgroup];
+ }
+
+ # if there is a warehouse limit picking
+ if ($form->{warehouse_id} && $form->{formname} =~ /(pick|packing)_list/) {
+
+ # run query to check for inventory
+ $query = qq|SELECT sum(i.qty) AS qty
+ FROM inventory i
+ WHERE i.parts_id = ?
+ AND i.warehouse_id = ?|;
+ $sth = $dbh->prepare($query) || $form->dberror($query);
+
+ for $i (1 .. $form->{rowcount}) {
+ $sth->execute($form->{"id_$i"}, $form->{warehouse_id}) || $form->dberror;
+
+ ($qty) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $form->{"qty_$i"} = 0 if $qty == 0;
+
+ if ($form->parse_amount($myconfig, $form->{"ship_$i"}) > $qty) {
+ $form->{"ship_$i"} = $form->format_amount($myconfig, $qty);
+ }
+ }
+ }
+
+ my $sameitem = "";
+ foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
+ $i = $item->[0];
+
+ if ($item->[1] ne $sameitem) {
+ push(@{ $form->{description} }, qq|$item->[1]|);
+ $sameitem = $item->[1];
+
+ map { push(@{ $form->{$_} }, "") }
+ qw(runningnumber number qty ship unit bin partnotes serialnumber reqdate sellprice listprice netprice discount linetotal);
+ }
+
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+
+ if ($form->{"qty_$i"} != 0) {
+
+ # add number, description and qty to $form->{number}, ....
+ push(@{ $form->{runningnumber} }, $i);
+ push(@{ $form->{number} }, qq|$form->{"partnumber_$i"}|);
+ push(@{ $form->{description} }, qq|$form->{"description_$i"}|);
+ push(@{ $form->{qty} },
+ $form->format_amount($myconfig, $form->{"qty_$i"}));
+ push(@{ $form->{ship} },
+ $form->format_amount($myconfig, $form->{"ship_$i"}));
+ push(@{ $form->{unit} }, qq|$form->{"unit_$i"}|);
+ push(@{ $form->{bin} }, qq|$form->{"bin_$i"}|);
+ push(@{ $form->{"partnotes"} }, qq|$form->{"partnotes_$i"}|);
+ push(@{ $form->{serialnumber} }, qq|$form->{"serialnumber_$i"}|);
+ push(@{ $form->{reqdate} }, qq|$form->{"reqdate_$i"}|);
+
+ push(@{ $form->{sellprice} }, $form->{"sellprice_$i"});
+
+ push(@{ $form->{listprice} }, $form->{"listprice_$i"});
+
+ my $sellprice = $form->parse_amount($myconfig, $form->{"sellprice_$i"});
+ my ($dec) = ($sellprice =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ my $discount =
+ $form->round_amount(
+ $sellprice * $form->parse_amount($myconfig,
+ $form->{"discount_$i"}) / 100,
+ $decimalplaces);
+
+ # keep a netprice as well, (sellprice - discount)
+ $form->{"netprice_$i"} = $sellprice - $discount;
+
+ my $linetotal =
+ $form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);
+
+ push(@{ $form->{netprice} },
+ ($form->{"netprice_$i"} != 0)
+ ? $form->format_amount(
+ $myconfig, $form->{"netprice_$i"},
+ $decimalplaces
+ )
+ : " ");
+
+ $discount =
+ ($discount != 0)
+ ? $form->format_amount($myconfig, $discount * -1, $decimalplaces)
+ : " ";
+ $linetotal = ($linetotal != 0) ? $linetotal : " ";
+
+ push(@{ $form->{discount} }, $discount);
+
+ $form->{ordtotal} += $linetotal;
+
+ push(@{ $form->{linetotal} },
+ $form->format_amount($myconfig, $linetotal, 2));
+
+ my ($taxamount, $taxbase);
+ my $taxrate = 0;
+
+ map { $taxrate += $form->{"${_}_rate"} } split / /,
+ $form->{"taxaccounts_$i"};
+
+ if ($form->{taxincluded}) {
+
+ # calculate tax
+ $taxamount = $linetotal * $taxrate / (1 + $taxrate);
+ $taxbase = $linetotal / (1 + $taxrate);
+ } else {
+ $taxamount = $linetotal * $taxrate;
+ $taxbase = $linetotal;
+ }
+
+ if ($taxamount != 0) {
+ foreach my $item (split / /, $form->{"taxaccounts_$i"}) {
+ $taxaccounts{$item} +=
+ $taxamount * $form->{"${item}_rate"} / $taxrate;
+ $taxbase{$item} += $taxbase;
+ }
+ }
+
+ if ($form->{"assembly_$i"}) {
+ $sameitem = "";
+
+ # get parts and push them onto the stack
+ my $sortorder = "";
+ if ($form->{groupitems}) {
+ $sortorder =
+ qq|ORDER BY pg.partsgroup, a.$oid{$myconfig->{dbdriver}}|;
+ } else {
+ $sortorder = qq|ORDER BY a.$oid{$myconfig->{dbdriver}}|;
+ }
+
+ $query = qq|SELECT p.partnumber, p.description, p.unit, a.qty,
+ pg.partsgroup
+ FROM assembly a
+ JOIN parts p ON (a.parts_id = p.id)
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE a.bom = '1'
+ AND a.id = '$form->{"id_$i"}'
+ $sortorder|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($form->{groupitems} && $ref->{partsgroup} ne $sameitem) {
+ map { push(@{ $form->{$_} }, "") }
+ qw(runningnumber ship bin serialnumber number unit bin qty reqdate sellprice listprice netprice discount linetotal);
+ $sameitem = ($ref->{partsgroup}) ? $ref->{partsgroup} : "--";
+ push(@{ $form->{description} }, $sameitem);
+ }
+
+ push(@{ $form->{description} },
+ $form->format_amount($myconfig, $ref->{qty} * $form->{"qty_$i"}
+ )
+ . qq|, $ref->{partnumber}, $ref->{description}|);
+
+ map { push(@{ $form->{$_} }, "") }
+ qw(number unit qty runningnumber ship bin serialnumber reqdate sellprice listprice netprice discount linetotal);
+
+ }
+ $sth->finish;
+ }
+
+ }
+ }
+
+ my $tax = 0;
+ foreach $item (sort keys %taxaccounts) {
+ if ($form->round_amount($taxaccounts{$item}, 2) != 0) {
+ push(@{ $form->{taxbase} },
+ $form->format_amount($myconfig, $taxbase{$item}, 2));
+
+ $tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
+
+ push(@{ $form->{tax} }, $form->format_amount($myconfig, $taxamount, 2));
+ push(@{ $form->{taxdescription} }, $form->{"${item}_description"});
+ push(@{ $form->{taxrate} },
+ $form->format_amount($myconfig, $form->{"${item}_rate"} * 100));
+ push(@{ $form->{taxnumber} }, $form->{"${item}_taxnumber"});
+ }
+ }
+
+ $form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2);
+ $form->{ordtotal} =
+ ($form->{taxincluded}) ? $form->{ordtotal} : $form->{ordtotal} + $tax;
+
+ # format amounts
+ $form->{quototal} = $form->{ordtotal} =
+ $form->format_amount($myconfig, $form->{ordtotal}, 2);
+
+ # myconfig variables
+ map { $form->{$_} = $myconfig->{$_} }
+ (qw(company address tel fax signature businessnumber));
+ $form->{username} = $myconfig->{name};
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub project_description {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $id) = @_;
+
+ my $query = qq|SELECT p.description
+ FROM project p
+ WHERE p.id = $id|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($_) = $sth->fetchrow_array;
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+
+ return $_;
+}
+
+sub get_warehouses {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ # setup warehouses
+ my $query = qq|SELECT id, description
+ FROM warehouse|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{all_warehouses} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_inventory {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($null, $warehouse_id) = split /--/, $form->{warehouse};
+ $warehouse_id *= 1;
+
+ my $employee_id;
+ ($null, $employee_id) = split /--/, $form->{employee};
+
+ my $ml = ($form->{type} eq 'ship_order') ? -1 : 1;
+
+ my $dbh = $form->dbconnect_noauto($myconfig);
+ my $sth;
+ my $wth;
+ my $serialnumber;
+ my $ship;
+
+ $query = qq|SELECT o.serialnumber, o.ship
+ FROM orderitems o
+ WHERE o.trans_id = ?
+ AND o.id = ?
+ FOR UPDATE|;
+ $sth = $dbh->prepare($query) || $form->dberror($query);
+
+ $query = qq|SELECT sum(i.qty)
+ FROM inventory i
+ WHERE i.parts_id = ?
+ AND i.warehouse_id = ?|;
+ $wth = $dbh->prepare($query) || $form->dberror($query);
+
+ for my $i (1 .. $form->{rowcount} - 1) {
+
+ $ship =
+ (abs($form->{"ship_$i"}) > abs($form->{"qty_$i"}))
+ ? $form->{"qty_$i"}
+ : $form->{"ship_$i"};
+
+ if ($warehouse_id && $form->{type} eq 'ship_order') {
+
+ $wth->execute($form->{"id_$i"}, $warehouse_id) || $form->dberror;
+
+ ($qty) = $wth->fetchrow_array;
+ $wth->finish;
+
+ if ($ship > $qty) {
+ $ship = $qty;
+ }
+ }
+
+ if ($ship != 0) {
+
+ $ship *= $ml;
+ $query = qq|INSERT INTO inventory (parts_id, warehouse_id,
+ qty, oe_id, orderitems_id, shippingdate, employee_id)
+ VALUES ($form->{"id_$i"}, $warehouse_id,
+ $ship, $form->{"id"},
+ $form->{"orderitems_id_$i"}, '$form->{shippingdate}',
+ $employee_id)|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add serialnumber, ship to orderitems
+ $sth->execute($form->{id}, $form->{"orderitems_id_$i"})
+ || $form->dberror;
+ ($serialnumber, $ship) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $serialnumber .= " " if $serialnumber;
+ $serialnumber .= qq|$form->{"serialnumber_$i"}|;
+ $ship += $form->{"ship_$i"};
+
+ $query = qq|UPDATE orderitems SET
+ serialnumber = '$serialnumber',
+ ship = $ship
+ WHERE trans_id = $form->{id}
+ AND id = $form->{"orderitems_id_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # update order with ship via
+ $query = qq|UPDATE oe SET
+ shippingpoint = '$form->{shippingpoint}',
+ shipvia = '$form->{shipvia}'
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # update onhand for parts
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $form->{"id_$i"}|,
+ $form->{"ship_$i"} * $ml);
+
+ }
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub adj_onhand {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $form, $ml) = @_;
+
+ my $query = qq|SELECT oi.parts_id, oi.ship, p.inventory_accno_id, p.assembly
+ FROM orderitems oi
+ JOIN parts p ON (p.id = oi.parts_id)
+ WHERE oi.trans_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $query = qq|SELECT sum(p.inventory_accno_id)
+ FROM parts p
+ JOIN assembly a ON (a.parts_id = p.id)
+ WHERE a.id = ?|;
+ my $ath = $dbh->prepare($query) || $form->dberror($query);
+
+ my $ispa;
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ if ($ref->{inventory_accno_id} || $ref->{assembly}) {
+
+ # do not update if assembly consists of all services
+ if ($ref->{assembly}) {
+ $ath->execute($ref->{parts_id}) || $form->dberror($query);
+
+ ($ispa) = $sth->fetchrow_array;
+ $ath->finish;
+
+ next unless $ispa;
+
+ }
+
+ # adjust onhand in parts table
+ $form->update_balance($dbh, "parts", "onhand",
+ qq|id = $ref->{parts_id}|,
+ $ref->{ship} * $ml);
+ }
+ }
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub adj_inventory {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $myconfig, $form) = @_;
+
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ # increase/reduce qty in inventory table
+ my $query = qq|SELECT oi.id, oi.parts_id, oi.ship
+ FROM orderitems oi
+ WHERE oi.trans_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $query = qq|SELECT $oid{$myconfig->{dbdriver}} AS oid, qty,
+ (SELECT SUM(qty) FROM inventory
+ WHERE oe_id = $form->{id}
+ AND orderitems_id = ?) AS total
+ FROM inventory
+ WHERE oe_id = $form->{id}
+ AND orderitems_id = ?|;
+ my $ith = $dbh->prepare($query) || $form->dberror($query);
+
+ my $qty;
+ my $ml = ($form->{type} =~ /(ship|sales)_order/) ? -1 : 1;
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ $ith->execute($ref->{id}, $ref->{id}) || $form->dberror($query);
+
+ while (my $inv = $ith->fetchrow_hashref(NAME_lc)) {
+
+ if (($qty = (($inv->{total} * $ml) - $ref->{ship})) >= 0) {
+ $qty = $inv->{qty} if ($qty > ($inv->{qty} * $ml));
+
+ $form->update_balance($dbh, "inventory", "qty",
+ qq|$oid{$myconfig->{dbdriver}} = $inv->{oid}|,
+ $qty * -1 * $ml);
+ }
+ }
+ $ith->finish;
+
+ }
+ $sth->finish;
+
+ # delete inventory entries if qty = 0
+ $query = qq|DELETE FROM inventory
+ WHERE oe_id = $form->{id}
+ AND qty = 0|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_inventory {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($null, $warehouse_id) = split /--/, $form->{warehouse};
+ $warehouse_id *= 1;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.id, p.partnumber, p.description, p.onhand,
+ pg.partsgroup
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE p.onhand > 0|;
+
+ if ($form->{partnumber}) {
+ $var = $form->like(lc $form->{partnumber});
+ $query .= "
+ AND lower(p.partnumber) LIKE '$var'";
+ }
+ if ($form->{description}) {
+ $var = $form->like(lc $form->{description});
+ $query .= "
+ AND lower(p.description) LIKE '$var'";
+ }
+ if ($form->{partsgroup}) {
+ $var = $form->like(lc $form->{partsgroup});
+ $query .= "
+ AND lower(pg.partsgroup) LIKE '$var'";
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $query = qq|SELECT sum(i.qty), w.description, w.id
+ FROM inventory i
+ LEFT JOIN warehouse w ON (w.id = i.warehouse_id)
+ WHERE i.parts_id = ?
+ AND NOT i.warehouse_id = $warehouse_id
+ GROUP BY w.description, w.id|;
+ $wth = $dbh->prepare($query) || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ $wth->execute($ref->{id}) || $form->dberror;
+
+ while (($qty, $warehouse, $warehouse_id) = $wth->fetchrow_array) {
+ push @{ $form->{all_inventory} },
+ { 'id' => $ref->{id},
+ 'partnumber' => $ref->{partnumber},
+ 'description' => $ref->{description},
+ 'partsgroup' => $ref->{partsgroup},
+ 'qty' => $qty,
+ 'warehouse_id' => $warehouse_id,
+ 'warehouse' => $warehouse }
+ if $qty > 0;
+ }
+ $wth->finish;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ # sort inventory
+ @{ $form->{all_inventory} } =
+ sort { $a->{ $form->{sort} } cmp $b->{ $form->{sort} } }
+ @{ $form->{all_inventory} };
+
+ $main::lxdebug->leave_sub();
+
+ return @{ $form->{all_inventory} };
+}
+
+sub transfer {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|INSERT INTO inventory
+ (warehouse_id, parts_id, qty, shippingdate, employee_id)
+ VALUES (?, ?, ?, ?, ?)|;
+ $sth = $dbh->prepare($query) || $form->dberror($query);
+
+ $form->get_employee($dbh);
+
+ my @a = localtime;
+ $a[5] += 1900;
+ $a[4]++;
+ $shippingdate = "$a[5]-$a[4]-$a[3]";
+
+ for my $i (1 .. $form->{rowcount}) {
+ $qty = $form->parse_amount($myconfig, $form->{"transfer_$i"});
+
+ $qty = $form->{"qty_$i"} if ($qty > $form->{"qty_$i"});
+
+ if ($qty) {
+
+ # to warehouse
+ $sth->execute($form->{warehouse_id}, $form->{"id_$i"}, $qty,
+ $shippingdate, $form->{employee_id})
+ || $form->dberror;
+
+ $sth->finish;
+
+ # from warehouse
+ $sth->execute($form->{"warehouse_id_$i"},
+ $form->{"id_$i"}, $qty * -1, $shippingdate,
+ $form->{employee_id})
+ || $form->dberror;
+
+ $sth->finish;
+ }
+ }
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub webdav_folder {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+
+SWITCH: {
+ $path = "webdav/angebote/" . $form->{quonumber}, last SWITCH
+ if ($form->{type} eq "sales_quotation");
+ $path = "webdav/bestellungen/" . $form->{ordnumber}, last SWITCH
+ if ($form->{type} eq "sales_order");
+ $path = "webdav/anfragen/" . $form->{quonumber}, last SWITCH
+ if ($form->{type} eq "request_quotation");
+ $path = "webdav/lieferantenbestellungen/" . $form->{ordnumber}, last SWITCH
+ if ($form->{type} eq "purchase_order");
+ }
+
+ if (!-d $path) {
+ mkdir($path, 0770) or die "can't make directory $!\n";
+ } else {
+ if ($form->{id}) {
+ @files = <$path/*>;
+ foreach $file (@files) {
+ $file =~ /\/([^\/]*)$/;
+ $fname = $1;
+ $ENV{'SCRIPT_NAME'} =~ /\/([^\/]*)\//;
+ $lxerp = $1;
+ $link = "http://" . $ENV{'SERVER_NAME'} . "/" . $lxerp . "/" . $file;
+ $form->{WEBDAV}{$fname} = $link;
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Overpayment function
+# used in AR, AP, IS, IR, OE, CP
+#======================================================================
+
+package OP;
+
+sub overpayment {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $dbh, $amount, $ml) = @_;
+
+ my $fxamount = $form->round_amount($amount * $form->{exchangerate}, 2);
+ my ($paymentaccno) = split /--/, $form->{account};
+
+ my $vc_id = "$form->{vc}_id";
+
+ my $uid = time;
+ $uid .= $form->{login};
+
+ # add AR/AP header transaction with a payment
+ $query = qq|INSERT INTO $form->{arap} (invnumber, employee_id)
+ VALUES ('$uid', (SELECT e.id FROM employee e
+ WHERE e.login = '$form->{login}'))|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|SELECT a.id FROM $form->{arap} a
+ WHERE a.invnumber = '$uid'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($uid) = $sth->fetchrow_array;
+ $sth->finish;
+
+ my $invnumber = ($form->{invnumber}) ? $form->{invnumber} : $uid;
+ $query = qq|UPDATE $form->{arap} set
+ invnumber = '$invnumber',
+ $vc_id = $form->{"$form->{vc}_id"},
+ transdate = '$form->{datepaid}',
+ datepaid = '$form->{datepaid}',
+ duedate = '$form->{datepaid}',
+ netamount = 0,
+ amount = 0,
+ paid = $fxamount,
+ curr = '$form->{currency}',
+ department_id = $form->{department_id}
+ WHERE id = $uid|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add AR/AP
+ ($accno) = split /--/, $form->{ $form->{ARAP} };
+
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate, amount)
+ VALUES ($uid, (SELECT c.id FROM chart c
+ WHERE c.accno = '$accno'),
+ '$form->{datepaid}', $fxamount * $ml)|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add payment
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount, source, memo)
+ VALUES ($uid, (SELECT c.id FROM chart c
+ WHERE c.accno = '$paymentaccno'),
+ '$form->{datepaid}', $amount * $ml * -1,
+ '$form->{source}', '$form->{memo}')|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # add exchangerate difference
+ if ($fxamount != $amount) {
+ $query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
+ amount, cleared, fx_transaction)
+ VALUES ($uid, (SELECT c.id FROM chart c
+ WHERE c.accno = '$paymentaccno'),
+ '$form->{datepaid}', ($fxamount - $amount) * $ml * -1,
+ '1', '1')|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Project module
+# also used for partsgroups
+#
+#======================================================================
+
+package PE;
+
+sub projects {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $sortorder = ($form->{sort}) ? $form->{sort} : "projectnumber";
+
+ my $query = qq|SELECT p.id, p.projectnumber, p.description
+ FROM project p
+ WHERE 1 = 1|;
+
+ if ($form->{projectnumber}) {
+ my $projectnumber = $form->like(lc $form->{projectnumber});
+ $query .= " AND lower(projectnumber) LIKE '$projectnumber'";
+ }
+ if ($form->{projectdescription}) {
+ my $description = $form->like(lc $form->{projectdescription});
+ $query .= " AND lower(description) LIKE '$description'";
+ }
+ if ($form->{status} eq 'orphaned') {
+ $query .= " AND id NOT IN (SELECT p.id
+ FROM project p, acc_trans a
+ WHERE p.id = a.project_id)
+ AND id NOT IN (SELECT p.id
+ FROM project p, invoice i
+ WHERE p.id = i.project_id)
+ AND id NOT IN (SELECT p.id
+ FROM project p, orderitems o
+ WHERE p.id = o.project_id)";
+ }
+
+ $query .= qq|
+ ORDER BY $sortorder|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $i = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{project_list} }, $ref;
+ $i++;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $i;
+}
+
+sub get_project {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.*
+ FROM project p
+ WHERE p.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ # check if it is orphaned
+ $query = qq|SELECT count(*)
+ FROM acc_trans a
+ WHERE a.project_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_project {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ map { $form->{$_} =~ s/\'/\'\'/g } (projectnumber, description);
+
+ if ($form->{id}) {
+ $query = qq|UPDATE project SET
+ projectnumber = '$form->{projectnumber}',
+ description = '$form->{description}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO project
+ (projectnumber, description)
+ VALUES ('$form->{projectnumber}', '$form->{description}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub partsgroups {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $var;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $sortorder = ($form->{sort}) ? $form->{sort} : "partsgroup";
+
+ my $query = qq|SELECT g.*
+ FROM partsgroup g|;
+
+ my $where = "1 = 1";
+
+ if ($form->{partsgroup}) {
+ $var = $form->like(lc $form->{partsgroup});
+ $where .= " AND lower(g.partsgroup) LIKE '$var'";
+ }
+ $query .= qq|
+ WHERE $where
+ ORDER BY $sortorder|;
+
+ if ($form->{status} eq 'orphaned') {
+ $query = qq|SELECT g.*
+ FROM partsgroup g
+ LEFT JOIN parts p ON (p.partsgroup_id = g.id)
+ WHERE $where
+ EXCEPT
+ SELECT g.*
+ FROM partsgroup g
+ JOIN parts p ON (p.partsgroup_id = g.id)
+ WHERE $where
+ ORDER BY $sortorder|;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $i = 0;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{item_list} }, $ref;
+ $i++;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $i;
+}
+
+sub save_partsgroup {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ map { $form->{$_} =~ s/\'/\'\'/g } (partsgroup);
+
+ $form->{discount} /= 100;
+
+ if ($form->{id}) {
+ $query = qq|UPDATE partsgroup SET
+ partsgroup = '$form->{partsgroup}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO partsgroup
+ (partsgroup)
+ VALUES ('$form->{partsgroup}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_partsgroup {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT p.*
+ FROM partsgroup p
+ WHERE p.id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+ $sth->finish;
+
+ # check if it is orphaned
+ $query = qq|SELECT count(*)
+ FROM parts p
+ WHERE p.partsgroup_id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{orphaned}) = $sth->fetchrow_array;
+ $form->{orphaned} = !$form->{orphaned};
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_tuple {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM $form->{type}
+ WHERE id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Account reconciliation routines
+#
+#======================================================================
+
+package RC;
+
+sub paymentaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT c.accno, c.description
+ FROM chart c
+ WHERE c.link LIKE '%_paid%'
+ AND (c.category = 'A' OR c.category = 'L')
+ ORDER BY c.accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{PR} }, $ref;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub payment_transactions {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($query, $sth);
+
+ # get cleared balance
+ if ($form->{fromdate}) {
+ $query = qq|SELECT sum(a.amount),
+ (SELECT DISTINCT c2.category FROM chart c2
+ WHERE c2accno = '$form->{accno}') AS category
+ FROM acc_trans a
+ JOIN chart c ON (c.id = a.chart_id)
+ WHERE a.transdate < date '$form->{fromdate}'
+ AND a.cleared = '1'
+ AND c.accno = '$form->{accno}'
+ |;
+ } else {
+ $query = qq|SELECT sum(a.amount),
+ (SELECT DISTINCT c2.category FROM chart c2
+ WHERE c2.accno = '$form->{accno}') AS category
+ FROM acc_trans a
+ JOIN chart c ON (c.id = a.chart_id)
+ WHERE a.cleared = '1'
+ AND c.accno = '$form->{accno}'
+ |;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ ($form->{beginningbalance}, $form->{category}) = $sth->fetchrow_array;
+
+ $sth->finish;
+
+ my %oid = ('Pg' => 'ac.oid',
+ 'Oracle' => 'ac.rowid');
+
+ $query = qq|SELECT c.name, ac.source, ac.transdate, ac.cleared,
+ ac.fx_transaction, ac.amount, a.id,
+ $oid{$myconfig->{dbdriver}} AS oid
+ FROM customer c, acc_trans ac, ar a, chart ch
+ WHERE c.id = a.customer_id
+-- AND NOT ac.fx_transaction
+ AND ac.cleared = '0'
+ AND ac.trans_id = a.id
+ AND ac.chart_id = ch.id
+ AND ch.accno = '$form->{accno}'
+ |;
+
+ $query .= " AND ac.transdate >= '$form->{fromdate}'" if $form->{fromdate};
+ $query .= " AND ac.transdate <= '$form->{todate}'" if $form->{todate};
+
+ $query .= qq|
+
+ UNION
+ SELECT v.name, ac.source, ac.transdate, ac.cleared,
+ ac.fx_transaction, ac.amount, a.id,
+ $oid{$myconfig->{dbdriver}} AS oid
+ FROM vendor v, acc_trans ac, ap a, chart ch
+ WHERE v.id = a.vendor_id
+-- AND NOT ac.fx_transaction
+ AND ac.cleared = '0'
+ AND ac.trans_id = a.id
+ AND ac.chart_id = ch.id
+ AND ch.accno = '$form->{accno}'
+ |;
+
+ $query .= " AND ac.transdate >= '$form->{fromdate}'" if $form->{fromdate};
+ $query .= " AND ac.transdate <= '$form->{todate}'" if $form->{todate};
+
+ $query .= qq|
+
+ UNION
+ SELECT g.description, ac.source, ac.transdate, ac.cleared,
+ ac.fx_transaction, ac.amount, g.id,
+ $oid{$myconfig->{dbdriver}} AS oid
+ FROM gl g, acc_trans ac, chart ch
+ WHERE g.id = ac.trans_id
+-- AND NOT ac.fx_transaction
+ AND ac.cleared = '0'
+ AND ac.trans_id = g.id
+ AND ac.chart_id = ch.id
+ AND ch.accno = '$form->{accno}'
+ |;
+
+ $query .= " AND ac.transdate >= '$form->{fromdate}'" if $form->{fromdate};
+ $query .= " AND ac.transdate <= '$form->{todate}'" if $form->{todate};
+
+ $query .= " ORDER BY 3,7,8";
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $pr = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{PR} }, $pr;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub reconcile {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my ($query, $i);
+ my %oid = ('Pg' => 'oid',
+ 'Oracle' => 'rowid');
+
+ # clear flags
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"cleared_$i"}) {
+ $query = qq|UPDATE acc_trans SET cleared = '1'
+ WHERE $oid{$myconfig->{dbdriver}} = $form->{"oid_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # clear fx_transaction
+ if ($form->{"fxoid_$i"}) {
+ $query = qq|UPDATE acc_trans SET cleared = '1'
+ WHERE $oid{$myconfig->{dbdriver}} = $form->{"fxoid_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Benjamin Lee <benjaminlee@consultant.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# backend code for reports
+#
+#======================================================================
+
+package RP;
+
+sub income_statement {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $last_period = 0;
+ my @categories = qw(I E);
+ my $category;
+
+ $form->{decimalplaces} *= 1;
+
+ &get_accounts($dbh, $last_period, $form->{fromdate}, $form->{todate}, $form,
+ \@categories);
+
+ # if there are any compare dates
+ if ($form->{comparefromdate} || $form->{comparetodate}) {
+ $last_period = 1;
+
+ &get_accounts($dbh, $last_period,
+ $form->{comparefromdate},
+ $form->{comparetodate},
+ $form, \@categories);
+ }
+
+ # disconnect
+ $dbh->disconnect;
+
+ # now we got $form->{I}{accno}{ }
+ # and $form->{E}{accno}{ }
+
+ my %account = (
+ 'I' => { 'label' => 'income',
+ 'labels' => 'income',
+ 'ml' => 1
+ },
+ 'E' => { 'label' => 'expense',
+ 'labels' => 'expenses',
+ 'ml' => -1
+ });
+
+ my $str;
+
+ foreach $category (@categories) {
+
+ foreach $key (sort keys %{ $form->{$category} }) {
+
+ # push description onto array
+
+ $str = ($form->{l_heading}) ? $form->{padding} : "";
+
+ if ($form->{$category}{$key}{charttype} eq "A") {
+ $str .=
+ ($form->{l_accno})
+ ? "$form->{$category}{$key}{accno} - $form->{$category}{$key}{description}"
+ : "$form->{$category}{$key}{description}";
+ }
+ if ($form->{$category}{$key}{charttype} eq "H") {
+ if ($account{$category}{subtotal} && $form->{l_subtotal}) {
+ $dash = "- ";
+ push(@{ $form->{"$account{$category}{label}_account"} },
+ "$str$form->{bold}$account{$category}{subdescription}$form->{endbold}"
+ );
+ push(@{ $form->{"$account{$category}{labels}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{subthis} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ if ($last_period) {
+ push(@{ $form->{"$account{$category}{labels}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{sublast} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+
+ }
+
+ $str =
+ "$form->{br}$form->{bold}$form->{$category}{$key}{description}$form->{endbold}";
+
+ $account{$category}{subthis} = $form->{$category}{$key}{this};
+ $account{$category}{sublast} = $form->{$category}{$key}{last};
+ $account{$category}{subdescription} =
+ $form->{$category}{$key}{description};
+ $account{$category}{subtotal} = 1;
+
+ $form->{$category}{$key}{this} = 0;
+ $form->{$category}{$key}{last} = 0;
+
+ next unless $form->{l_heading};
+
+ $dash = " ";
+ }
+
+ push(@{ $form->{"$account{$category}{label}_account"} }, $str);
+
+ if ($form->{$category}{$key}{charttype} eq 'A') {
+ $form->{"total_$account{$category}{labels}_this_period"} +=
+ $form->{$category}{$key}{this} * $account{$category}{ml};
+ $dash = "- ";
+ }
+
+ push(@{ $form->{"$account{$category}{labels}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $form->{$category}{$key}{this} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ # add amount or - for last period
+ if ($last_period) {
+ $form->{"total_$account{$category}{labels}_last_period"} +=
+ $form->{$category}{$key}{last} * $account{$category}{ml};
+
+ push(@{ $form->{"$account{$category}{labels}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $form->{$category}{$key}{last} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+ }
+
+ $str = ($form->{l_heading}) ? $form->{padding} : "";
+ if ($account{$category}{subtotal} && $form->{l_subtotal}) {
+ push(@{ $form->{"$account{$category}{label}_account"} },
+ "$str$form->{bold}$account{$category}{subdescription}$form->{endbold}"
+ );
+ push(@{ $form->{"$account{$category}{labels}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{subthis} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ if ($last_period) {
+ push(@{ $form->{"$account{$category}{labels}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{sublast} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+ }
+
+ }
+
+ # totals for income and expenses
+ $form->{total_income_this_period} =
+ $form->round_amount($form->{total_income_this_period},
+ $form->{decimalplaces});
+ $form->{total_expenses_this_period} =
+ $form->round_amount($form->{total_expenses_this_period},
+ $form->{decimalplaces});
+
+ # total for income/loss
+ $form->{total_this_period} =
+ $form->{total_income_this_period} - $form->{total_expenses_this_period};
+
+ if ($last_period) {
+
+ # total for income/loss
+ $form->{total_last_period} =
+ $form->format_amount(
+ $myconfig,
+ $form->{total_income_last_period} - $form->{total_expenses_last_period},
+ $form->{decimalplaces},
+ "- ");
+
+ # totals for income and expenses for last_period
+ $form->{total_income_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_income_last_period},
+ $form->{decimalplaces}, "- ");
+ $form->{total_expenses_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_expenses_last_period},
+ $form->{decimalplaces}, "- ");
+
+ }
+
+ $form->{total_income_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_income_this_period},
+ $form->{decimalplaces}, "- ");
+ $form->{total_expenses_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_expenses_this_period},
+ $form->{decimalplaces}, "- ");
+ $form->{total_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_this_period},
+ $form->{decimalplaces}, "- ");
+
+ $main::lxdebug->leave_sub();
+}
+
+sub balance_sheet {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $last_period = 0;
+ my @categories = qw(A C L Q);
+
+ # if there are any dates construct a where
+ if ($form->{asofdate}) {
+
+ $form->{this_period} = "$form->{asofdate}";
+ $form->{period} = "$form->{asofdate}";
+
+ }
+
+ $form->{decimalplaces} *= 1;
+
+ &get_accounts($dbh, $last_period, "", $form->{asofdate}, $form,
+ \@categories);
+
+ # if there are any compare dates
+ if ($form->{compareasofdate}) {
+
+ $last_period = 1;
+ &get_accounts($dbh, $last_period, "", $form->{compareasofdate},
+ $form, \@categories);
+
+ $form->{last_period} = "$form->{compareasofdate}";
+
+ }
+
+ # disconnect
+ $dbh->disconnect;
+
+ # now we got $form->{A}{accno}{ } assets
+ # and $form->{L}{accno}{ } liabilities
+ # and $form->{Q}{accno}{ } equity
+ # build asset accounts
+
+ my $str;
+ my $key;
+
+ my %account = (
+ 'A' => { 'label' => 'asset',
+ 'labels' => 'assets',
+ 'ml' => -1
+ },
+ 'L' => { 'label' => 'liability',
+ 'labels' => 'liabilities',
+ 'ml' => 1
+ },
+ 'Q' => { 'label' => 'equity',
+ 'labels' => 'equity',
+ 'ml' => 1
+ });
+
+ foreach $category (grep { !/C/ } @categories) {
+
+ foreach $key (sort keys %{ $form->{$category} }) {
+
+ $str = ($form->{l_heading}) ? $form->{padding} : "";
+
+ if ($form->{$category}{$key}{charttype} eq "A") {
+ $str .=
+ ($form->{l_accno})
+ ? "$form->{$category}{$key}{accno} - $form->{$category}{$key}{description}"
+ : "$form->{$category}{$key}{description}";
+ }
+ if ($form->{$category}{$key}{charttype} eq "H") {
+ if ($account{$category}{subtotal} && $form->{l_subtotal}) {
+ $dash = "- ";
+ push(@{ $form->{"$account{$category}{label}_account"} },
+ "$str$form->{bold}$account{$category}{subdescription}$form->{endbold}"
+ );
+ push(@{ $form->{"$account{$category}{label}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{subthis} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ if ($last_period) {
+ push(@{ $form->{"$account{$category}{label}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{sublast} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+ }
+
+ $str =
+ "$form->{bold}$form->{$category}{$key}{description}$form->{endbold}";
+
+ $account{$category}{subthis} = $form->{$category}{$key}{this};
+ $account{$category}{sublast} = $form->{$category}{$key}{last};
+ $account{$category}{subdescription} =
+ $form->{$category}{$key}{description};
+ $account{$category}{subtotal} = 1;
+
+ $form->{$category}{$key}{this} = 0;
+ $form->{$category}{$key}{last} = 0;
+
+ next unless $form->{l_heading};
+
+ $dash = " ";
+ }
+
+ # push description onto array
+ push(@{ $form->{"$account{$category}{label}_account"} }, $str);
+
+ if ($form->{$category}{$key}{charttype} eq 'A') {
+ $form->{"total_$account{$category}{labels}_this_period"} +=
+ $form->{$category}{$key}{this} * $account{$category}{ml};
+ $dash = "- ";
+ }
+
+ push(@{ $form->{"$account{$category}{label}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $form->{$category}{$key}{this} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ if ($last_period) {
+ $form->{"total_$account{$category}{labels}_last_period"} +=
+ $form->{$category}{$key}{last} * $account{$category}{ml};
+
+ push(@{ $form->{"$account{$category}{label}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $form->{$category}{$key}{last} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+ }
+
+ $str = ($form->{l_heading}) ? $form->{padding} : "";
+ if ($account{$category}{subtotal} && $form->{l_subtotal}) {
+ push(@{ $form->{"$account{$category}{label}_account"} },
+ "$str$form->{bold}$account{$category}{subdescription}$form->{endbold}"
+ );
+ push(@{ $form->{"$account{$category}{label}_this_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{subthis} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+
+ if ($last_period) {
+ push(@{ $form->{"$account{$category}{label}_last_period"} },
+ $form->format_amount(
+ $myconfig,
+ $account{$category}{sublast} * $account{$category}{ml},
+ $form->{decimalplaces}, $dash
+ ));
+ }
+ }
+
+ }
+
+ # totals for assets, liabilities
+ $form->{total_assets_this_period} =
+ $form->round_amount($form->{total_assets_this_period},
+ $form->{decimalplaces});
+ $form->{total_liabilities_this_period} =
+ $form->round_amount($form->{total_liabilities_this_period},
+ $form->{decimalplaces});
+ $form->{total_equity_this_period} =
+ $form->round_amount($form->{total_equity_this_period},
+ $form->{decimalplaces});
+
+ # calculate earnings
+ $form->{earnings_this_period} =
+ $form->{total_assets_this_period} -
+ $form->{total_liabilities_this_period} - $form->{total_equity_this_period};
+
+ push(@{ $form->{equity_this_period} },
+ $form->format_amount($myconfig,
+ $form->{earnings_this_period},
+ $form->{decimalplaces}, "- "
+ ));
+
+ $form->{total_equity_this_period} =
+ $form->round_amount(
+ $form->{total_equity_this_period} + $form->{earnings_this_period},
+ $form->{decimalplaces});
+
+ # add liability + equity
+ $form->{total_this_period} =
+ $form->format_amount(
+ $myconfig,
+ $form->{total_liabilities_this_period} + $form->{total_equity_this_period},
+ $form->{decimalplaces},
+ "- ");
+
+ if ($last_period) {
+
+ # totals for assets, liabilities
+ $form->{total_assets_last_period} =
+ $form->round_amount($form->{total_assets_last_period},
+ $form->{decimalplaces});
+ $form->{total_liabilities_last_period} =
+ $form->round_amount($form->{total_liabilities_last_period},
+ $form->{decimalplaces});
+ $form->{total_equity_last_period} =
+ $form->round_amount($form->{total_equity_last_period},
+ $form->{decimalplaces});
+
+ # calculate retained earnings
+ $form->{earnings_last_period} =
+ $form->{total_assets_last_period} -
+ $form->{total_liabilities_last_period} -
+ $form->{total_equity_last_period};
+
+ push(@{ $form->{equity_last_period} },
+ $form->format_amount($myconfig,
+ $form->{earnings_last_period},
+ $form->{decimalplaces}, "- "
+ ));
+
+ $form->{total_equity_last_period} =
+ $form->round_amount(
+ $form->{total_equity_last_period} + $form->{earnings_last_period},
+ $form->{decimalplaces});
+
+ # add liability + equity
+ $form->{total_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_liabilities_last_period} +
+ $form->{total_equity_last_period},
+ $form->{decimalplaces},
+ "- ");
+
+ }
+
+ $form->{total_liabilities_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_liabilities_last_period},
+ $form->{decimalplaces}, "- ")
+ if ($form->{total_liabilities_last_period} != 0);
+
+ $form->{total_equity_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_equity_last_period},
+ $form->{decimalplaces}, "- ")
+ if ($form->{total_equity_last_period} != 0);
+
+ $form->{total_assets_last_period} =
+ $form->format_amount($myconfig,
+ $form->{total_assets_last_period},
+ $form->{decimalplaces}, "- ")
+ if ($form->{total_assets_last_period} != 0);
+
+ $form->{total_assets_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_assets_this_period},
+ $form->{decimalplaces}, "- ");
+
+ $form->{total_liabilities_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_liabilities_this_period},
+ $form->{decimalplaces}, "- ");
+
+ $form->{total_equity_this_period} =
+ $form->format_amount($myconfig,
+ $form->{total_equity_this_period},
+ $form->{decimalplaces}, "- ");
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_accounts {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $last_period, $fromdate, $todate, $form, $categories) = @_;
+
+ my ($null, $department_id) = split /--/, $form->{department};
+
+ my $query;
+ my $dpt_where;
+ my $dpt_join;
+ my $project;
+ my $where = "1 = 1";
+ my $glwhere = "";
+ my $subwhere = "";
+ my $item;
+
+ my $category = "AND (";
+ foreach $item (@{$categories}) {
+ $category .= qq|c.category = '$item' OR |;
+ }
+ $category =~ s/OR $/\)/;
+
+ # get headings
+ $query = qq|SELECT c.accno, c.description, c.category
+ FROM chart c
+ WHERE c.charttype = 'H'
+ $category
+ ORDER by c.accno|;
+
+ if ($form->{accounttype} eq 'gifi') {
+ $query = qq|SELECT g.accno, g.description, c.category
+ FROM gifi g
+ JOIN chart c ON (c.gifi_accno = g.accno)
+ WHERE c.charttype = 'H'
+ $category
+ ORDER BY g.accno|;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my @headingaccounts = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $form->{ $ref->{category} }{ $ref->{accno} }{description} =
+ "$ref->{description}";
+ $form->{ $ref->{category} }{ $ref->{accno} }{charttype} = "H";
+ $form->{ $ref->{category} }{ $ref->{accno} }{accno} = $ref->{accno};
+
+ push @headingaccounts, $ref->{accno};
+ }
+
+ $sth->finish;
+
+ if ($fromdate) {
+ if ($form->{method} eq 'cash') {
+ $subwhere .= " AND transdate >= '$fromdate'";
+ $glwhere = " AND ac.transdate >= '$fromdate'";
+ } else {
+ $where .= " AND ac.transdate >= '$fromdate'";
+ }
+ }
+
+ if ($todate) {
+ $where .= " AND ac.transdate <= '$todate'";
+ $subwhere .= " AND transdate <= '$todate'";
+ }
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN department t ON (a.department_id = t.id)
+ |;
+ $dpt_where = qq|
+ AND t.id = $department_id
+ |;
+ }
+
+ if ($form->{project_id}) {
+ $project = qq|
+ AND ac.project_id = $form->{project_id}
+ |;
+ }
+
+ if ($form->{accounttype} eq 'gifi') {
+
+ if ($form->{method} eq 'cash') {
+
+ $query = qq|
+
+ SELECT g.accno, sum(ac.amount) AS amount,
+ g.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN gifi g ON (g.accno = c.gifi_accno)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT '' AS accno, SUM(ac.amount) AS amount,
+ '' AS description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ar a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND c.gifi_accno = ''
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY c.category
+
+ UNION ALL
+
+ SELECT g.accno, sum(ac.amount) AS amount,
+ g.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN gifi g ON (g.accno = c.gifi_accno)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT '' AS accno, SUM(ac.amount) AS amount,
+ '' AS description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ap a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND c.gifi_accno = ''
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY c.category
+
+ UNION ALL
+
+-- add gl
+
+ SELECT g.accno, sum(ac.amount) AS amount,
+ g.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gifi g ON (g.accno = c.gifi_accno)
+ JOIN gl a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $glwhere
+ $dpt_where
+ $category
+ AND NOT (c.link = 'AR' OR c.link = 'AP')
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT '' AS accno, SUM(ac.amount) AS amount,
+ '' AS description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gl a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $glwhere
+ $dpt_where
+ $category
+ AND c.gifi_accno = ''
+ AND NOT (c.link = 'AR' OR c.link = 'AP')
+ $project
+ GROUP BY c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION ALL
+
+ SELECT g.accno AS accno, SUM(ac.sellprice * ac.qty) AS amount,
+ g.description AS description, c.category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ JOIN gifi g ON (g.accno = c.gifi_accno)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT g.accno AS accno, SUM(ac.sellprice * ac.qty) * -1 AS amount,
+ g.description AS description, c.category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ JOIN gifi g ON (g.accno = c.gifi_accno)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+ $project
+ GROUP BY g.accno, g.description, c.category
+ |;
+ }
+
+ } else {
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN dpt_trans t ON (t.trans_id = ac.trans_id)
+ |;
+ $dpt_where = qq|
+ AND t.department_id = $department_id
+ |;
+
+ }
+
+ $query = qq|
+
+ SELECT g.accno, SUM(ac.amount) AS amount,
+ g.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE $where
+ $dpt_from
+ $category
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT '' AS accno, SUM(ac.amount) AS amount,
+ '' AS description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_from
+ $category
+ AND c.gifi_accno = ''
+ $project
+ GROUP BY c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION ALL
+
+ SELECT g.accno AS accno, SUM(ac.sellprice * ac.qty) AS amount,
+ g.description AS description, c.category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT g.accno AS accno, SUM(ac.sellprice * ac.qty) * -1 AS amount,
+ g.description AS description, c.category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ $project
+ GROUP BY g.accno, g.description, c.category
+ |;
+ }
+
+ }
+
+ } else { # standard account
+
+ if ($form->{method} eq 'cash') {
+
+ $query = qq|
+
+ SELECT c.accno, sum(ac.amount) AS amount,
+ c.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ar a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.accno, c.description, c.category
+
+ UNION ALL
+
+ SELECT c.accno, sum(ac.amount) AS amount,
+ c.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ap a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.accno, c.description, c.category
+
+ UNION ALL
+
+ SELECT c.accno, sum(ac.amount) AS amount,
+ c.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gl a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $glwhere
+ $dpt_from
+ $category
+ AND NOT (c.link = 'AR' OR c.link = 'AP')
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION ALL
+
+ SELECT c.accno AS accno, SUM(ac.sellprice * ac.qty) AS amount,
+ c.description AS description, c.category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.accno, c.description, c.category
+
+ UNION ALL
+
+ SELECT c.accno AS accno, SUM(ac.sellprice) AS amount,
+ c.description AS description, c.category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+ }
+
+ } else {
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN dpt_trans t ON (t.trans_id = ac.trans_id)
+ |;
+ $dpt_where = qq|
+ AND t.department_id = $department_id
+ |;
+ }
+
+ $query = qq|
+
+ SELECT c.accno, sum(ac.amount) AS amount,
+ c.description, c.category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $category
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION ALL
+
+ SELECT c.accno AS accno, SUM(ac.sellprice * ac.qty) AS amount,
+ c.description AS description, c.category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.description, c.category
+
+ UNION ALL
+
+ SELECT c.accno AS accno, SUM(ac.sellprice * ac.qty) * -1 AS amount,
+ c.description AS description, c.category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+
+ }
+ }
+ }
+
+ my @accno;
+ my $accno;
+ my $ref;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ if ($ref->{category} eq 'C') {
+ $ref->{category} = 'A';
+ }
+
+ # get last heading account
+ @accno = grep { $_ le "$ref->{accno}" } @headingaccounts;
+ $accno = pop @accno;
+ if ($accno) {
+ if ($last_period) {
+ $form->{ $ref->{category} }{$accno}{last} += $ref->{amount};
+ } else {
+ $form->{ $ref->{category} }{$accno}{this} += $ref->{amount};
+ }
+ }
+
+ $form->{ $ref->{category} }{ $ref->{accno} }{accno} = $ref->{accno};
+ $form->{ $ref->{category} }{ $ref->{accno} }{description} =
+ $ref->{description};
+ $form->{ $ref->{category} }{ $ref->{accno} }{charttype} = "A";
+
+ if ($last_period) {
+ $form->{ $ref->{category} }{ $ref->{accno} }{last} += $ref->{amount};
+ } else {
+ $form->{ $ref->{category} }{ $ref->{accno} }{this} += $ref->{amount};
+ }
+ }
+ $sth->finish;
+
+ # remove accounts with zero balance
+ foreach $category (@{$categories}) {
+ foreach $accno (keys %{ $form->{$category} }) {
+ $form->{$category}{$accno}{last} =
+ $form->round_amount($form->{$category}{$accno}{last},
+ $form->{decimalplaces});
+ $form->{$category}{$accno}{this} =
+ $form->round_amount($form->{$category}{$accno}{this},
+ $form->{decimalplaces});
+
+ delete $form->{$category}{$accno}
+ if ( $form->{$category}{$accno}{this} == 0
+ && $form->{$category}{$accno}{last} == 0);
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_accounts_g {
+ $main::lxdebug->enter_sub();
+
+ my ($dbh, $last_period, $fromdate, $todate, $form, $category) = @_;
+
+ my ($null, $department_id) = split /--/, $form->{department};
+
+ my $query;
+ my $dpt_where;
+ my $dpt_join;
+ my $project;
+ my $where = "1 = 1";
+ my $glwhere = "";
+ my $subwhere = "";
+ my $item;
+
+ if ($fromdate) {
+ if ($form->{method} eq 'cash') {
+ $subwhere .= " AND transdate >= '$fromdate'";
+ $glwhere = " AND ac.transdate >= '$fromdate'";
+ } else {
+ $where .= " AND ac.transdate >= '$fromdate'";
+ }
+ }
+
+ if ($todate) {
+ $where .= " AND ac.transdate <= '$todate'";
+ $subwhere .= " AND transdate <= '$todate'";
+ }
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN department t ON (a.department_id = t.id)
+ |;
+ $dpt_where = qq|
+ AND t.id = $department_id
+ |;
+ }
+
+ if ($form->{project_id}) {
+ $project = qq|
+ AND ac.project_id = $form->{project_id}
+ |;
+ }
+
+ if ($form->{method} eq 'cash') {
+
+ $query = qq|
+
+ SELECT sum(ac.amount) AS amount,
+ c.$category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ar a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.$category
+
+ UNION
+
+ SELECT sum(ac.amount) AS amount,
+ c.$category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN ap a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.$category
+
+ UNION
+
+ SELECT sum(ac.amount) AS amount,
+ c.$category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gl a ON (a.id = ac.trans_id)
+ $dpt_join
+ WHERE $where
+ $glwhere
+ $dpt_from
+ AND NOT (c.link = 'AR' OR c.link = 'AP')
+ $project
+ GROUP BY c.$category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION
+
+ SELECT SUM(ac.sellprice * ac.qty) AS amount,
+ c.$category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.$category
+
+ UNION
+
+ SELECT SUM(ac.sellprice) AS amount,
+ c.$category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )
+
+ $project
+ GROUP BY c.$category
+ |;
+ }
+
+ } else {
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN dpt_trans t ON (t.trans_id = ac.trans_id)
+ |;
+ $dpt_where = qq|
+ AND t.department_id = $department_id
+ |;
+ }
+
+ $query = qq|
+
+ SELECT sum(ac.amount) AS amount,
+ c.$category
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ GROUP BY c.$category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ UNION
+
+ SELECT SUM(ac.sellprice * ac.qty) AS amount,
+ c.$category
+ FROM invoice ac
+ JOIN ar a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.income_accno_id = c.id)
+ $dpt_join
+ -- use transdate from subwhere
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'I'
+ $dpt_where
+ $project
+ GROUP BY c.$category
+
+ UNION
+
+ SELECT SUM(ac.sellprice * ac.qty) * -1 AS amount,
+ c.$category
+ FROM invoice ac
+ JOIN ap a ON (a.id = ac.trans_id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c on (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE 1 = 1 $subwhere
+ AND c.category = 'E'
+ $dpt_where
+ $project
+ GROUP BY c.$category
+ |;
+
+ }
+ }
+
+ my @accno;
+ my $accno;
+ my $ref;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($ref->{amount} < 0) {
+ $ref->{amount} *= -1;
+ }
+ if ($category eq "pos_bwa") {
+ if ($last_period) {
+ $form->{ $ref->{$category} }{kumm} += $ref->{amount};
+ } else {
+ $form->{ $ref->{$category} }{jetzt} += $ref->{amount};
+ }
+ } else {
+ $form->{ $ref->{$category} } += $ref->{amount};
+ }
+ }
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub trial_balance {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my ($query, $sth, $ref);
+ my %balance = ();
+ my %trb = ();
+ my ($null, $department_id) = split /--/, $form->{department};
+ my @headingaccounts = ();
+ my $dpt_where;
+ my $dpt_join;
+ my $project;
+
+ my $where = "1 = 1";
+ my $invwhere = $where;
+
+ if ($department_id) {
+ $dpt_join = qq|
+ JOIN dpt_trans t ON (ac.trans_id = t.trans_id)
+ |;
+ $dpt_where = qq|
+ AND t.department_id = $department_id
+ |;
+ }
+
+ # project_id only applies to getting transactions
+ # it has nothing to do with a trial balance
+ # but we use the same function to collect information
+
+ if ($form->{project_id}) {
+ $project = qq|
+ AND ac.project_id = $form->{project_id}
+ |;
+ }
+
+ # get beginning balances
+ if ($form->{fromdate}) {
+
+ if ($form->{accounttype} eq 'gifi') {
+
+ $query = qq|SELECT g.accno, c.category, SUM(ac.amount) AS amount,
+ g.description
+ FROM acc_trans ac
+ JOIN chart c ON (ac.chart_id = c.id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE ac.transdate < '$form->{fromdate}'
+ $dpt_where
+ $project
+ GROUP BY g.accno, c.category, g.description
+ |;
+
+ } else {
+
+ $query = qq|SELECT c.accno, c.category, SUM(ac.amount) AS amount,
+ c.description
+ FROM acc_trans ac
+ JOIN chart c ON (ac.chart_id = c.id)
+ $dpt_join
+ WHERE ac.transdate < '$form->{fromdate}'
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.category, c.description
+ |;
+
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $balance{ $ref->{accno} } = $ref->{amount};
+
+ if ($ref->{amount} != 0 && $form->{all_accounts}) {
+ $trb{ $ref->{accno} }{description} = $ref->{description};
+ $trb{ $ref->{accno} }{charttype} = 'A';
+ $trb{ $ref->{accno} }{category} = $ref->{category};
+ }
+
+ }
+ $sth->finish;
+
+ }
+
+ # get headings
+ $query = qq|SELECT c.accno, c.description, c.category
+ FROM chart c
+ WHERE c.charttype = 'H'
+ ORDER by c.accno|;
+
+ if ($form->{accounttype} eq 'gifi') {
+ $query = qq|SELECT g.accno, g.description, c.category
+ FROM gifi g
+ JOIN chart c ON (c.gifi_accno = g.accno)
+ WHERE c.charttype = 'H'
+ ORDER BY g.accno|;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $trb{ $ref->{accno} }{description} = $ref->{description};
+ $trb{ $ref->{accno} }{charttype} = 'H';
+ $trb{ $ref->{accno} }{category} = $ref->{category};
+
+ push @headingaccounts, $ref->{accno};
+ }
+
+ $sth->finish;
+
+ $where = " 1 = 1 ";
+
+ if ($form->{fromdate} || $form->{todate}) {
+ if ($form->{fromdate}) {
+ $tofrom .= " AND ac.transdate >= '$form->{fromdate}'";
+ $subwhere .= " AND transdate >= '$form->{fromdate}'";
+ $invwhere .= " AND a.transdate >= '$form->{fromdate}'";
+ $glwhere = " AND ac.transdate >= '$form->{fromdate}'";
+ }
+ if ($form->{todate}) {
+ $tofrom .= " AND ac.transdate <= '$form->{todate}'";
+ $invwhere .= " AND a.transdate <= '$form->{todate}'";
+ $subwhere .= " AND transdate <= '$form->{todate}'";
+ $glwhere .= " AND ac.transdate <= '$form->{todate}'";
+ }
+ }
+ if ($form->{eur}) {
+ $where .= qq| AND ((ac.trans_id in (SELECT id from ar)
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AR_paid%'
+ $subwhere
+ )) OR (ac.trans_id in (SELECT id from ap)
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%AP_paid%'
+ $subwhere
+ )) OR (ac.trans_id in (SELECT id from gl)
+ $glwhere))|;
+ } else {
+ $where .= $tofrom;
+ }
+
+ if ($form->{accounttype} eq 'gifi') {
+
+ $query = qq|SELECT g.accno, g.description, c.category,
+ SUM(ac.amount) AS amount
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ GROUP BY g.accno, g.description, c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ -- add project transactions from invoice
+
+ UNION ALL
+
+ SELECT g.accno, g.description, c.category,
+ SUM(ac.sellprice * ac.qty) AS amount
+ FROM invoice ac
+ JOIN ar a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.income_accno_id = c.id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ GROUP BY g.accno, g.description, c.category
+
+ UNION ALL
+
+ SELECT g.accno, g.description, c.category,
+ SUM(ac.sellprice * ac.qty) * -1 AS amount
+ FROM invoice ac
+ JOIN ap a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.expense_accno_id = c.id)
+ JOIN gifi g ON (c.gifi_accno = g.accno)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ GROUP BY g.accno, g.description, c.category
+ |;
+ }
+
+ $query .= qq|
+ ORDER BY accno|;
+
+ } else {
+
+ $query = qq|SELECT c.accno, c.description, c.category,
+ SUM(ac.amount) AS amount
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+
+ if ($form->{project_id}) {
+
+ $query .= qq|
+
+ -- add project transactions from invoice
+
+ UNION ALL
+
+ SELECT c.accno, c.description, c.category,
+ SUM(ac.sellprice * ac.qty) AS amount
+ FROM invoice ac
+ JOIN ar a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.income_accno_id = c.id)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.description, c.category
+
+ UNION ALL
+
+ SELECT c.accno, c.description, c.category,
+ SUM(ac.sellprice * ac.qty) * -1 AS amount
+ FROM invoice ac
+ JOIN ap a ON (ac.trans_id = a.id)
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN chart c ON (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ GROUP BY c.accno, c.description, c.category
+ |;
+ }
+
+ $query .= qq|
+ ORDER BY accno|;
+
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ # prepare query for each account
+ $query = qq|SELECT (SELECT SUM(ac.amount) * -1
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ AND ac.amount < 0
+ AND c.accno = ?) AS debit,
+
+ (SELECT SUM(ac.amount)
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ AND ac.amount > 0
+ AND c.accno = ?) AS credit
+ |;
+
+ if ($form->{accounttype} eq 'gifi') {
+
+ $query = qq|SELECT (SELECT SUM(ac.amount) * -1
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ AND ac.amount < 0
+ AND c.gifi_accno = ?) AS debit,
+
+ (SELECT SUM(ac.amount)
+ FROM acc_trans ac
+ JOIN chart c ON (c.id = ac.chart_id)
+ $dpt_join
+ WHERE $where
+ $dpt_where
+ $project
+ AND ac.amount > 0
+ AND c.gifi_accno = ?) AS credit|;
+
+ }
+
+ $drcr = $dbh->prepare($query);
+
+ if ($form->{project_id}) {
+
+ # prepare query for each account
+ $query = qq|SELECT (SELECT SUM(ac.sellprice * ac.qty) * -1
+ FROM invoice ac
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN ap a ON (ac.trans_id = a.id)
+ JOIN chart c ON (p.expense_accno_id = c.id)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ AND c.accno = ?) AS debit,
+
+ (SELECT SUM(ac.sellprice * ac.qty)
+ FROM invoice ac
+ JOIN parts p ON (ac.parts_id = p.id)
+ JOIN ar a ON (ac.trans_id = a.id)
+ JOIN chart c ON (p.income_accno_id = c.id)
+ $dpt_join
+ WHERE $invwhere
+ $dpt_where
+ $project
+ AND c.accno = ?) AS credit
+ |;
+
+ $project_drcr = $dbh->prepare($query);
+
+ }
+
+ # calculate the debit and credit in the period
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $trb{ $ref->{accno} }{description} = $ref->{description};
+ $trb{ $ref->{accno} }{charttype} = 'A';
+ $trb{ $ref->{accno} }{category} = $ref->{category};
+ $trb{ $ref->{accno} }{amount} += $ref->{amount};
+ }
+ $sth->finish;
+
+ my ($debit, $credit);
+
+ foreach my $accno (sort keys %trb) {
+ $ref = ();
+
+ $ref->{accno} = $accno;
+ map { $ref->{$_} = $trb{$accno}{$_} }
+ qw(description category charttype amount);
+
+ $ref->{balance} = $form->round_amount($balance{ $ref->{accno} }, 2);
+
+ if ($trb{$accno}{charttype} eq 'A') {
+
+ # get DR/CR
+ $drcr->execute($ref->{accno}, $ref->{accno}) || $form->dberror($query);
+
+ ($debit, $credit) = (0, 0);
+ while (($debit, $credit) = $drcr->fetchrow_array) {
+ $ref->{debit} += $debit;
+ $ref->{credit} += $credit;
+ }
+ $drcr->finish;
+
+ if ($form->{project_id}) {
+
+ # get DR/CR
+ $project_drcr->execute($ref->{accno}, $ref->{accno})
+ || $form->dberror($query);
+
+ ($debit, $credit) = (0, 0);
+ while (($debit, $credit) = $project_drcr->fetchrow_array) {
+ $ref->{debit} += $debit;
+ $ref->{credit} += $credit;
+ }
+ $project_drcr->finish;
+ }
+
+ $ref->{debit} = $form->round_amount($ref->{debit}, 2);
+ $ref->{credit} = $form->round_amount($ref->{credit}, 2);
+
+ }
+
+ # add subtotal
+ @accno = grep { $_ le "$ref->{accno}" } @headingaccounts;
+ $accno = pop @accno;
+ if ($accno) {
+ $trb{$accno}{debit} += $ref->{debit};
+ $trb{$accno}{credit} += $ref->{credit};
+ }
+
+ push @{ $form->{TB} }, $ref;
+
+ }
+
+ $dbh->disconnect;
+
+ # debits and credits for headings
+ foreach $accno (@headingaccounts) {
+ foreach $ref (@{ $form->{TB} }) {
+ if ($accno eq $ref->{accno}) {
+ $ref->{debit} = $trb{$accno}{debit};
+ $ref->{credit} = $trb{$accno}{credit};
+ }
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub aging {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+ my $invoice = ($form->{arap} eq 'ar') ? 'is' : 'ir';
+
+ $form->{todate} = $form->current_date($myconfig) unless ($form->{todate});
+
+ my $where = "1 = 1";
+ my ($name, $null);
+
+ if ($form->{"$form->{ct}_id"}) {
+ $where .= qq| AND ct.id = $form->{"$form->{ct}_id"}|;
+ } else {
+ if ($form->{ $form->{ct} }) {
+ $name = $form->like(lc $form->{ $form->{ct} });
+ $where .= qq| AND lower(ct.name) LIKE '$name'| if $form->{ $form->{ct} };
+ }
+ }
+
+ my $dpt_join;
+ if ($form->{department}) {
+ ($null, $department_id) = split /--/, $form->{department};
+ $dpt_join = qq|
+ JOIN department d ON (a.department_id = d.id)
+ |;
+
+ $where .= qq| AND a.department_id = $department_id|;
+ }
+
+ # select outstanding vendors or customers, depends on $ct
+ my $query = qq|SELECT DISTINCT ct.id, ct.name
+ FROM $form->{ct} ct, $form->{arap} a
+ $dpt_join
+ WHERE $where
+ AND a.$form->{ct}_id = ct.id
+ AND a.paid != a.amount
+ AND (a.transdate <= '$form->{todate}')
+ ORDER BY ct.name|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror;
+
+ my $buysell = ($form->{arap} eq 'ar') ? 'buy' : 'sell';
+
+ # for each company that has some stuff outstanding
+ while (my ($id) = $sth->fetchrow_array) {
+
+ $query = qq|
+
+-- between 0-30 days
+
+ SELECT $form->{ct}.id AS ctid, $form->{ct}.name,
+ street, zipcode, city, country, contact, email,
+ phone as customerphone, fax as customerfax, $form->{ct}number,
+ "invnumber", "transdate",
+ (amount - paid) as "c0", 0.00 as "c30", 0.00 as "c60", 0.00 as "c90",
+ "duedate", invoice, $form->{arap}.id,
+ (SELECT $buysell FROM exchangerate
+ WHERE $form->{arap}.curr = exchangerate.curr
+ AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate
+ FROM $form->{arap}, $form->{ct}
+ WHERE paid != amount
+ AND $form->{arap}.$form->{ct}_id = $form->{ct}.id
+ AND $form->{ct}.id = $id
+ AND (
+ transdate <= (date '$form->{todate}' - interval '0 days')
+ AND transdate >= (date '$form->{todate}' - interval '30 days')
+ )
+
+ UNION
+
+-- between 31-60 days
+
+ SELECT $form->{ct}.id AS ctid, $form->{ct}.name,
+ street, zipcode, city, country, contact, email,
+ phone as customerphone, fax as customerfax, $form->{ct}number,
+ "invnumber", "transdate",
+ 0.00 as "c0", (amount - paid) as "c30", 0.00 as "c60", 0.00 as "c90",
+ "duedate", invoice, $form->{arap}.id,
+ (SELECT $buysell FROM exchangerate
+ WHERE $form->{arap}.curr = exchangerate.curr
+ AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate
+ FROM $form->{arap}, $form->{ct}
+ WHERE paid != amount
+ AND $form->{arap}.$form->{ct}_id = $form->{ct}.id
+ AND $form->{ct}.id = $id
+ AND (
+ transdate < (date '$form->{todate}' - interval '30 days')
+ AND transdate >= (date '$form->{todate}' - interval '60 days')
+ )
+
+ UNION
+
+-- between 61-90 days
+
+ SELECT $form->{ct}.id AS ctid, $form->{ct}.name,
+ street, zipcode, city, country, contact, email,
+ phone as customerphone, fax as customerfax, $form->{ct}number,
+ "invnumber", "transdate",
+ 0.00 as "c0", 0.00 as "c30", (amount - paid) as "c60", 0.00 as "c90",
+ "duedate", invoice, $form->{arap}.id,
+ (SELECT $buysell FROM exchangerate
+ WHERE $form->{arap}.curr = exchangerate.curr
+ AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate
+ FROM $form->{arap}, $form->{ct}
+ WHERE paid != amount
+ AND $form->{arap}.$form->{ct}_id = $form->{ct}.id
+ AND $form->{ct}.id = $id
+ AND (
+ transdate < (date '$form->{todate}' - interval '60 days')
+ AND transdate >= (date '$form->{todate}' - interval '90 days')
+ )
+
+ UNION
+
+-- over 90 days
+
+ SELECT $form->{ct}.id AS ctid, $form->{ct}.name,
+ street, zipcode, city, country, contact, email,
+ phone as customerphone, fax as customerfax, $form->{ct}number,
+ "invnumber", "transdate",
+ 0.00 as "c0", 0.00 as "c30", 0.00 as "c60", (amount - paid) as "c90",
+ "duedate", invoice, $form->{arap}.id,
+ (SELECT $buysell FROM exchangerate
+ WHERE $form->{arap}.curr = exchangerate.curr
+ AND exchangerate.transdate = $form->{arap}.transdate) AS exchangerate
+ FROM $form->{arap}, $form->{ct}
+ WHERE paid != amount
+ AND $form->{arap}.$form->{ct}_id = $form->{ct}.id
+ AND $form->{ct}.id = $id
+ AND transdate < (date '$form->{todate}' - interval '90 days')
+
+ ORDER BY
+
+ ctid, transdate, invnumber
+
+ |;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror;
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{module} = ($ref->{invoice}) ? $invoice : $form->{arap};
+ $ref->{exchangerate} = 1 unless $ref->{exchangerate};
+ push @{ $form->{AG} }, $ref;
+ }
+
+ $sth->finish;
+
+ }
+
+ $sth->finish;
+
+ # disconnect
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_customer {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT ct.name, ct.email, ct.cc, ct.bcc
+ FROM $form->{ct} ct
+ WHERE ct.id = $form->{"$form->{ct}_id"}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror;
+
+ ($form->{ $form->{ct} }, $form->{email}, $form->{cc}, $form->{bcc}) =
+ $sth->fetchrow_array;
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_taxaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get tax accounts
+ my $query = qq|SELECT c.accno, c.description, t.rate
+ FROM chart c, tax t
+ WHERE c.link LIKE '%CT_tax%'
+ AND c.id = t.chart_id
+ ORDER BY c.accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror;
+
+ my $ref = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{taxaccounts} }, $ref;
+ }
+ $sth->finish;
+
+ # get gifi tax accounts
+ my $query = qq|SELECT DISTINCT ON (g.accno) g.accno, g.description,
+ sum(t.rate) AS rate
+ FROM gifi g, chart c, tax t
+ WHERE g.accno = c.gifi_accno
+ AND c.id = t.chart_id
+ AND c.link LIKE '%CT_tax%'
+ GROUP BY g.accno, g.description
+ ORDER BY accno|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror;
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{gifi_taxaccounts} }, $ref;
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub tax_report {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my ($null, $department_id) = split /--/, $form->{department};
+
+ # build WHERE
+ my $where = "1 = 1";
+
+ if ($department_id) {
+ $where .= qq|
+ AND a.department_id = $department_id
+ |;
+ }
+
+ my ($accno, $rate);
+
+ if ($form->{accno}) {
+ if ($form->{accno} =~ /^gifi_/) {
+ ($null, $accno) = split /_/, $form->{accno};
+ $rate = $form->{"$form->{accno}_rate"};
+ $accno = qq| AND ch.gifi_accno = '$accno'|;
+ } else {
+ $accno = $form->{accno};
+ $rate = $form->{"$form->{accno}_rate"};
+ $accno = qq| AND ch.accno = '$accno'|;
+ }
+ }
+ $rate *= 1;
+
+ my ($table, $ARAP);
+
+ if ($form->{db} eq 'ar') {
+ $table = "customer";
+ $ARAP = "AR";
+ }
+ if ($form->{db} eq 'ap') {
+ $table = "vendor";
+ $ARAP = "AP";
+ }
+
+ my $transdate = "a.transdate";
+
+ if ($form->{method} eq 'cash') {
+ $transdate = "a.datepaid";
+
+ my $todate =
+ ($form->{todate}) ? $form->{todate} : $form->current_date($myconfig);
+
+ $where .= qq|
+ AND ac.trans_id IN
+ (
+ SELECT trans_id
+ FROM acc_trans
+ JOIN chart ON (chart_id = id)
+ WHERE link LIKE '%${ARAP}_paid%'
+ AND transdate <= '$todate'
+ )
+ |;
+ }
+
+ # if there are any dates construct a where
+ if ($form->{fromdate} || $form->{todate}) {
+ if ($form->{fromdate}) {
+ $where .= " AND $transdate >= '$form->{fromdate}'";
+ }
+ if ($form->{todate}) {
+ $where .= " AND $transdate <= '$form->{todate}'";
+ }
+ }
+
+ my $ml = ($form->{db} eq 'ar') ? 1 : -1;
+
+ my $sortorder = join ', ', $form->sort_columns(qw(transdate invnumber name));
+ $sortorder = $form->{sort} unless $sortorder;
+
+ $query = qq|SELECT a.id, '0' AS invoice, $transdate AS transdate,
+ a.invnumber, n.name, a.netamount,
+ ac.amount * $ml AS tax
+ FROM acc_trans ac
+ JOIN $form->{db} a ON (a.id = ac.trans_id)
+ JOIN chart ch ON (ch.id = ac.chart_id)
+ JOIN $table n ON (n.id = a.${table}_id)
+ WHERE $where
+ $accno
+ AND a.invoice = '0'
+ UNION
+ SELECT a.id, '1' AS invoice, $transdate AS transdate,
+ a.invnumber, n.name, i.sellprice * i.qty AS netamount,
+ i.sellprice * i.qty * $rate * $ml AS tax
+ FROM acc_trans ac
+ JOIN $form->{db} a ON (a.id = ac.trans_id)
+ JOIN chart ch ON (ch.id = ac.chart_id)
+ JOIN $table n ON (n.id = a.${table}_id)
+ JOIN ${table}tax t ON (t.${table}_id = n.id)
+ JOIN invoice i ON (i.trans_id = a.id)
+ JOIN partstax p ON (p.parts_id = i.parts_id)
+ WHERE $where
+ $accno
+ AND a.invoice = '1'
+ ORDER by $sortorder|;
+
+ if ($form->{report} =~ /nontaxable/) {
+
+ # only gather up non-taxable transactions
+ $query = qq|SELECT a.id, '0' AS invoice, $transdate AS transdate,
+ a.invnumber, n.name, a.netamount
+ FROM acc_trans ac
+ JOIN $form->{db} a ON (a.id = ac.trans_id)
+ JOIN $table n ON (n.id = a.${table}_id)
+ WHERE $where
+ AND a.invoice = '0'
+ AND a.netamount = a.amount
+ UNION
+ SELECT a.id, '1' AS invoice, $transdate AS transdate,
+ a.invnumber, n.name, i.sellprice * i.qty AS netamount
+ FROM acc_trans ac
+ JOIN $form->{db} a ON (a.id = ac.trans_id)
+ JOIN $table n ON (n.id = a.${table}_id)
+ JOIN invoice i ON (i.trans_id = a.id)
+ WHERE $where
+ AND a.invoice = '1'
+ AND (
+ a.${table}_id NOT IN (
+ SELECT ${table}_id FROM ${table}tax t (${table}_id)
+ ) OR
+ i.parts_id NOT IN (
+ SELECT parts_id FROM partstax p (parts_id)
+ )
+ )
+ GROUP BY a.id, a.invnumber, $transdate, n.name, i.sellprice, i.qty
+ ORDER by $sortorder|;
+ }
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TR} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub paymentaccounts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $ARAP = uc $form->{db};
+
+ # get A(R|P)_paid accounts
+ my $query = qq|SELECT c.accno, c.description
+ FROM chart c
+ WHERE c.link LIKE '%${ARAP}_paid%'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{PR} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub payments {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $ml = 1;
+ if ($form->{db} eq 'ar') {
+ $table = 'customer';
+ $ml = -1;
+ }
+ if ($form->{db} eq 'ap') {
+ $table = 'vendor';
+ }
+
+ my ($query, $sth);
+ my $dpt_join;
+ my $where;
+
+ if ($form->{department_id}) {
+ $dpt_join = qq|
+ JOIN dpt_trans t ON (t.trans_id = ac.trans_id)
+ |;
+
+ $where = qq|
+ AND t.department_id = $form->{department_id}
+ |;
+ }
+
+ if ($form->{fromdate}) {
+ $where .= " AND ac.transdate >= '$form->{fromdate}'";
+ }
+ if ($form->{todate}) {
+ $where .= " AND ac.transdate <= '$form->{todate}'";
+ }
+ if (!$form->{fx_transaction}) {
+ $where .= " AND ac.fx_transaction = '0'";
+ }
+
+ my $invnumber;
+ my $reference;
+ if ($form->{reference}) {
+ $reference = $form->like(lc $form->{reference});
+ $invnumber = " AND lower(a.invnumber) LIKE '$reference'";
+ $reference = " AND lower(g.reference) LIKE '$reference'";
+ }
+ if ($form->{source}) {
+ my $source = $form->like(lc $form->{source});
+ $where .= " AND lower(ac.source) LIKE '$source'";
+ }
+ if ($form->{memo}) {
+ my $memo = $form->like(lc $form->{memo});
+ $where .= " AND lower(ac.memo) LIKE '$memo'";
+ }
+
+ my $sortorder = join ', ',
+ $form->sort_columns(qw(name invnumber ordnumber transdate source));
+
+ # cycle through each id
+ foreach my $accno (split(/ /, $form->{paymentaccounts})) {
+
+ $query = qq|SELECT c.id, c.accno, c.description
+ FROM chart c
+ WHERE c.accno = '$accno'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+ push @{ $form->{PR} }, $ref;
+ $sth->finish;
+
+ $query = qq|SELECT c.name, a.invnumber, a.ordnumber,
+ ac.transdate, ac.amount * $ml AS paid, ac.source,
+ a.invoice, a.id, ac.memo, '$form->{db}' AS module
+ FROM acc_trans ac
+ JOIN $form->{db} a ON (ac.trans_id = a.id)
+ JOIN $table c ON (c.id = a.${table}_id)
+ $dpt_join
+ WHERE ac.chart_id = $ref->{id}
+ $where
+ $invnumber
+
+ UNION
+ SELECT g.description, g.reference, NULL AS ordnumber,
+ ac.transdate, ac.amount * $ml AS paid, ac.source,
+ '0' as invoice, g.id, ac.memo, 'gl' AS module
+ FROM acc_trans ac
+ JOIN gl g ON (g.id = ac.trans_id)
+ $dpt_join
+ WHERE ac.chart_id = $ref->{id}
+ $where
+ $reference
+ AND (ac.amount * $ml) > 0
+ ORDER BY $sortorder|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $pr = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ $ref->{id} } }, $pr;
+ }
+ $sth->finish;
+
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub bwa {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $last_period = 0;
+ my $category = "pos_bwa";
+ my @categories =
+ qw(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40);
+
+ $form->{decimalplaces} *= 1;
+
+ &get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate},
+ $form, $category);
+
+ # if there are any compare dates
+ if ($form->{fromdate} || $form->{todate}) {
+ $last_period = 1;
+ if ($form->{fromdate}) {
+ $form->{fromdate} =~ /[0-9]*\.[0-9]*\.([0-9]*)/;
+ $year = $1;
+ } else {
+ $form->{todate} =~ /[0-9]*\.[0-9]*\.([0-9]*)/;
+ $year = $1;
+ }
+ $kummfromdate = $form->{comparefromdate};
+ $kummtodate = $form->{comparetodate};
+ &get_accounts_g($dbh, $last_period, $kummfromdate, $kummtodate, $form,
+ $category);
+ }
+
+ @periods = qw(jetzt kumm);
+ @gesamtleistung = qw(1 2 3);
+ @gesamtkosten = qw (10 11 12 13 14 15 16 17 18 19 20);
+ @ergebnisse =
+ qw (rohertrag betriebrohertrag betriebsergebnis neutraleraufwand neutralerertrag ergebnisvorsteuern ergebnis gesamtleistung gesamtkosten);
+
+ foreach $key (@periods) {
+ $form->{ "$key" . "gesamtleistung" } = 0;
+ $form->{ "$key" . "gesamtkosten" } = 0;
+
+ foreach $category (@categories) {
+
+ if (defined($form->{$category}{$key})) {
+ $form->{"$key$category"} =
+ $form->format_amount($myconfig,
+ $form->round_amount($form->{$category}{$key}, 2
+ ));
+ }
+ }
+ foreach $item (@gesamtleistung) {
+ $form->{ "$key" . "gesamtleistung" } += $form->{$item}{$key};
+ }
+ foreach $item (@gesamtkosten) {
+ $form->{ "$key" . "gesamtkosten" } += $form->{$item}{$key};
+ }
+ $form->{ "$key" . "rohertrag" } =
+ $form->{ "$key" . "gesamtleistung" } - $form->{4}{$key};
+ $form->{ "$key" . "betriebrohertrag" } =
+ $form->{ "$key" . "rohertrag" } + $form->{5}{$key};
+ $form->{ "$key" . "betriebsergebnis" } =
+ $form->{ "$key" . "betriebrohertrag" } -
+ $form->{ "$key" . "gesamtkosten" };
+ $form->{ "$key" . "neutraleraufwand" } =
+ $form->{30}{$key} + $form->{31}{$key};
+ $form->{ "$key" . "neutralertrag" } =
+ $form->{32}{$key} + $form->{33}{$key} + $form->{34}{$key};
+ $form->{ "$key" . "ergebnisvorsteuern" } =
+ $form->{ "$key" . "betriebsergebnis" } -
+ ($form->{ "$key" . "neutraleraufwand" } +
+ $form->{ "$key" . "neutralertrag" });
+ $form->{ "$key" . "ergebnis" } =
+ $form->{ "$key" . "ergebnisvorsteuern" } + $form->{35}{$key};
+
+ if ($form->{ "$key" . "gesamtleistung" } > 0) {
+ foreach $category (@categories) {
+ if (defined($form->{$category}{$key})) {
+ $form->{ "$key" . "gl" . "$category" } =
+ $form->format_amount(
+ $myconfig,
+ $form->round_amount(
+ ($form->{$category}{$key} /
+ $form->{ "$key" . "gesamtleistung" } * 100
+ ),
+ 2
+ ));
+ }
+ }
+ foreach $item (@ergebnisse) {
+ $form->{ "$key" . "gl" . "$item" } =
+ $form->format_amount($myconfig,
+ $form->round_amount(
+ ( $form->{ "$key" . "$item" } /
+ $form->{ "$key" . "gesamtleistung" } * 100
+ ),
+ 2
+ ));
+ }
+ }
+
+ if ($form->{ "$key" . "gesamtkosten" } > 0) {
+ foreach $category (@categories) {
+ if (defined($form->{$category}{$key})) {
+ $form->{ "$key" . "gk" . "$category" } =
+ $form->format_amount($myconfig,
+ $form->round_amount(
+ ($form->{$category}{$key} /
+ $form->{ "$key" . "gesamtkosten" } * 100
+ ),
+ 2
+ ));
+ }
+ }
+ foreach $item (@ergebnisse) {
+ $form->{ "$key" . "gk" . "$item" } =
+ $form->format_amount($myconfig,
+ $form->round_amount(
+ ($form->{ "$key" . "$item" } /
+ $form->{ "$key" . "gesamtkosten" } * 100
+ ),
+ 2
+ ));
+ }
+ }
+
+ if ($form->{10}{$key} > 0) {
+ foreach $category (@categories) {
+ if (defined($form->{$category}{$key})) {
+ $form->{ "$key" . "pk" . "$category" } =
+ $form->format_amount(
+ $myconfig,
+ $form->round_amount(
+ ($form->{$category}{$key} / $form->{10}{$key} * 100), 2
+ ));
+ }
+ }
+ foreach $item (@ergebnisse) {
+ $form->{ "$key" . "pk" . "$item" } =
+ $form->format_amount($myconfig,
+ $form->round_amount(
+ ($form->{ "$key" . "$item" } /
+ $form->{10}{$key} * 100
+ ),
+ 2
+ ));
+ }
+ }
+
+ if ($form->{4}{$key} > 0) {
+ foreach $category (@categories) {
+ if (defined($form->{$category}{$key})) {
+ $form->{ "$key" . "auf" . "$category" } =
+ $form->format_amount(
+ $myconfig,
+ $form->round_amount(
+ ($form->{$category}{$key} / $form->{4}{$key} * 100), 2
+ ));
+ }
+ }
+ foreach $item (@ergebnisse) {
+ $form->{ "$key" . "auf" . "$item" } =
+ $form->format_amount($myconfig,
+ $form->round_amount(
+ ($form->{ "$key" . "$item" } /
+ $form->{4}{$key} * 100
+ ),
+ 2
+ ));
+ }
+ }
+
+ foreach $item (@ergebnisse) {
+ $form->{ "$key" . "$item" } =
+ $form->format_amount($myconfig,
+ $form->round_amount($form->{ "$key" . "$item" }, 2
+ ));
+ }
+
+ }
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub ustva {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $last_period = 0;
+ my $category = "pos_ustva";
+ my @categories_cent = qw(51r 86r 97r 93r 96 66 43 45 53 62 65 67);
+ my @categories_euro = qw(48 51 86 91 97 93 94);
+ $form->{decimalplaces} *= 1;
+
+ foreach $item (@categories_cent) {
+ $form->{"$item"} = 0;
+ }
+ foreach $item (@categories_euro) {
+ $form->{"$item"} = 0;
+ }
+
+ &get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate},
+ $form, $category);
+
+ # foreach $item (@categories_cent) {
+ # if ($form->{$item}{"jetzt"} > 0) {
+ # $form->{$item} = $form->{$item}{"jetzt"};
+ # delete $form->{$item}{"jetzt"};
+ # }
+ # }
+ # foreach $item (@categories_euro) {
+ # if ($form->{$item}{"jetzt"} > 0) {
+ # $form->{$item} = $form->{$item}{"jetzt"};
+ # delete $form->{$item}{"jetzt"};
+ # } foreach $item (@categories_cent) {
+ # if ($form->{$item}{"jetzt"} > 0) {
+ # $form->{$item} = $form->{$item}{"jetzt"};
+ # delete $form->{$item}{"jetzt"};
+ # }
+ # }
+ # foreach $item (@categories_euro) {
+ # if ($form->{$item}{"jetzt"} > 0) {
+ # $form->{$item} = $form->{$item}{"jetzt"};
+ # delete $form->{$item}{"jetzt"};
+ # }
+ # }
+ #
+ # }
+
+ $form->{"51r"} = $form->{"51"} * 0.16;
+ $form->{"86r"} = $form->{"86"} * 0.07;
+ $form->{"97r"} = $form->{"97"} * 0.16;
+ $form->{"93r"} = $form->{"93"} * 0.07;
+ $form->{"96"} = $form->{"94"} * 0.16;
+ $form->{"43"} =
+ $form->{"51r"} + $form->{"86r"} + $form->{"97r"} + $form->{"93r"} +
+ $form->{"96"};
+ $form->{"45"} = $form->{"43"};
+ $form->{"53"} = $form->{"43"};
+ $form->{"62"} = $form->{"43"} - $form->{"66"};
+ $form->{"65"} = $form->{"43"} - $form->{"66"};
+ $form->{"67"} = $form->{"43"} - $form->{"66"};
+
+ foreach $item (@categories_cent) {
+ $form->{$item} =
+ $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2));
+ }
+
+ foreach $item (@categories_euro) {
+ $form->{$item} =
+ $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0));
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub income_statement {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $last_period = 0;
+ my $category = "pos_eur";
+ my @categories_einnahmen = qw(1 2 3 4 5 6 7);
+ my @categories_ausgaben =
+ qw(8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31);
+
+ my @ergebnisse = qw(sumeura sumeurb guvsumme);
+
+ $form->{decimalplaces} *= 1;
+
+ foreach $item (@categories_einnahmen) {
+ $form->{$item} = 0;
+ }
+ foreach $item (@categories_ausgaben) {
+ $form->{$item} = 0;
+ }
+
+ foreach $item (@ergebnisse) {
+ $form->{$item} = 0;
+ }
+
+ &get_accounts_g($dbh, $last_period, $form->{fromdate}, $form->{todate},
+ $form, $category);
+
+ foreach $item (@categories_einnahmen) {
+ $form->{"eur${item}"} =
+ $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2));
+ $form->{"sumeura"} += $form->{$item};
+ }
+ foreach $item (@categories_ausgaben) {
+ $form->{"eur${item}"} =
+ $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2));
+ $form->{"sumeurb"} += $form->{$item};
+ }
+
+ $form->{"guvsumme"} = $form->{"sumeura"} - $form->{"sumeurb"};
+
+ foreach $item (@ergebnisse) {
+ $form->{$item} =
+ $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2));
+ }
+ $main::lxdebug->leave_sub();
+}
+1;
+
--- /dev/null
+#=====================================================================
+# Lx-Office ERP
+# Copyright (c) 2004 by Udo Spallek, Aachen
+#
+# Author: Udo Spallek
+# Email: udono@gmx.net
+# Web: http://www.lx-office.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+# Utilities for ustva
+#=====================================================================
+
+package USTVA;
+
+sub create_steuernummer {
+ $main::lxdebug->enter_sub();
+
+ $part = $form->{part};
+ $patterncount = $form->{patterncount};
+ $delimiter = $form->{delimiter};
+ $elster_pattern = $form->{elster_pattern};
+
+ # rebuild steuernummer and elstersteuernummer
+ # es gibt eine gespeicherte steuernummer $form->{steuernummer}
+ # und die parts und delimiter
+
+ my $h = 0;
+ my $i = 0;
+
+ $steuernummer_new = $part;
+ $elstersteuernummer_new = $elster_FFFF;
+ $elstersteuernummer_new .= '0';
+
+ for ($h = 1; $h < $patterncount; $h++) {
+ $steuernummer_new .= qq|$delimiter|;
+ for ($i = 1; $i <= length($elster_pattern); $i++) {
+ $steuernummer_new .= $form->{"part_$h\_$i"};
+ $elstersteuernummer_new .= $form->{"part_$h\_$i"};
+ }
+ }
+ if ($form->{steuernummer} ne $steuernummer_new) {
+ $form->{steuernummer} = $steuernummer_new;
+ $form->{elstersteuernummer} = $elstersteuernummer_new;
+ $form->{steuernummer_new} = $steuernummer_new;
+ }
+ $main::lxdebug->leave_sub();
+ return ($steuernummer_new, $elstersteuernummer_new);
+}
+
+sub steuernummer_input {
+ $main::lxdebug->enter_sub();
+
+ ($elsterland, $elsterFFFF, $steuernummer) = @_;
+
+ $elster_land = $elsterland;
+ $elster_FFFF = $elsterFFFF;
+ $steuernummer = '0000000000' if ($steuernummer eq '');
+
+ # $steuernummer formatieren (nur Zahlen) -> $stnr
+ $stnr = $steuernummer;
+ $stnr =~ s/\D+//g;
+
+ #Pattern description Elstersteuernummer
+ my %elster_STNRformat = (
+ 'Mecklenburg Vorpommern' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Hessen' => '0FF BBB UUUUP', # ' ' 3
+ 'Nordrhein Westfalen' => 'FFF/BBBB/UUUP', # '/' 3
+ 'Schleswig Holstein' => 'FF BBB UUUUP', # ' ' 2
+ 'Berlin' => 'FF/BBB/UUUUP', # '/' 3
+ 'Thüringen' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Sachsen' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Hamburg' => 'FF/BBB/UUUUP', # '/' 3
+ 'Baden Würtemberg' => 'FF/BBB/UUUUP', # '/' 2
+ 'Sachsen Anhalt' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Saarland' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Bremen' => 'FF BBB UUUUP', # ' ' 3
+ 'Bayern' => 'FFF/BBB/UUUUP', # '/' 3
+ 'Rheinland Pfalz' => 'FF/BBB/UUUU/P', # '/' 4
+ 'Niedersachsen' => 'FF/BBB/UUUUP', # '/' 3
+ 'Brandenburg' => 'FFF/BBB/UUUUP', # '/' 3
+ );
+
+ #split the pattern
+ $elster_pattern = $elster_STNRformat{$elster_land};
+ my @elster_pattern = split(' ', $elster_pattern);
+ my $delimiter = ' ';
+ my $patterncount = @elster_pattern;
+ if ($patterncount < 2) {
+ @elster_pattern = ();
+ @elster_pattern = split('/', $elster_pattern);
+ $delimiter = '/';
+ $patterncount = @elster_pattern;
+ }
+
+ # no we have an array of patternparts and a delimiter
+ # create the first automated and fixed part and delimiter
+
+ print qq|<b><font size="+1">|;
+ $part = '';
+SWITCH: {
+ $elster_pattern[0] eq 'FFF' && do {
+ $part = substr($elster_FFFF, 1, 4);
+ print qq|$part|;
+ last SWITCH;
+ };
+ $elster_pattern[0] eq '0FF' && do {
+ $part = '0' . substr($elster_FFFF, 2, 4);
+ print qq|$part|;
+ last SWITCH;
+ };
+ $elster_pattern[0] eq 'FF' && do {
+ $part = substr($elster_FFFF, 2, 4);
+ print qq|$part|;
+ last SWITCH;
+ };
+ 1 == 1 && do {
+ print qq|Fehler!|;
+ last SWITCH;
+ };
+ }
+
+ #now the rest of the Steuernummer ...
+ print qq|</b></font>|;
+ print qq|\n
+ <input type=hidden name="elster_pattern" value="$elster_pattern">
+ <input type=hidden name="patterncount" value="$patterncount">
+ <input type=hidden name="patternlength" value="$patterncount">
+ <input type=hidden name="delimiter" value="$delimiter">
+ <input type=hidden name="part" value="$part">
+ |;
+ my $h = 0;
+ my $i = 0;
+ my $j = 0;
+ $k = 0;
+
+ for ($h = 1; $h < $patterncount; $h++) {
+ print qq| $delimiter \n|;
+ for ($i = 1; $i <= length($elster_pattern[$h]); $i++) {
+ print qq|<select name="part_$h\_$i">\n|;
+
+ for ($j = 0; $j <= 9; $j++) {
+ print qq| <option value="$j"|;
+ if ($steuernummer ne '') {
+ if ($j eq substr($stnr, length($part) + $k, 1)) {
+ print qq| selected|;
+ }
+ }
+ print qq|>$j</option>\n|;
+ }
+ $k++;
+ print qq|</select>\n|;
+ }
+ }
+ $main::lxdebug->leave_sub();
+}
+
+sub fa_auswahl {
+ $main::lxdebug->enter_sub();
+
+ use SL::Form;
+
+ # Referenz wird übergeben, hash of hash wird nicht
+ # in neues Hash kopiert, sondern direkt über die Referenz verändert
+ # Prototyp für diese Konstruktion
+
+ my ($land, $elsterFFFF, $elster_init) =
+ @_; #Referenz auf Hash von Hash übergeben
+ my $terminal = '';
+ my $FFFF = $elsterFFFF;
+ my $ffff = '';
+ my $checked = '';
+ $checked = 'checked' if ($elsterFFFF eq '' and $land eq '');
+
+ #if ($ENV{HTTP_USER_AGENT} =~ /(mozilla|opera|w3m)/i){
+ #$terminal='mozilla';
+ #} elsif ($ENV{HTTP_USER_AGENT} =~ /(links|lynx)/i){
+ #$terminal = 'lynx';
+ #}
+
+ #if ( $terminal eq 'mozilla' or $terminal eq 'js' ) {
+ print qq|
+ <br>
+ <script language="Javascript">
+ function update_auswahl()
+ {
+ var elsterBLAuswahl = document.verzeichnis.elsterland_new;
+ var elsterFAAuswahl = document.verzeichnis.elsterFFFF_new;
+
+ elsterFAAuswahl.options.length = 0; // dropdown aufräumen
+ |;
+
+ foreach $elster_land (sort keys %$elster_init) {
+ print qq|
+ if (elsterBLAuswahl.options[elsterBLAuswahl.selectedIndex].
+ value == "$elster_land")
+ {
+ |;
+ my $j = 0;
+ my %elster_land_fa = ();
+ $FFFF = '';
+ for $FFFF (keys %{ $elster_init->{$elster_land} }) {
+ $elster_land_fa{$FFFF} = $elster_init->{$elster_land}->{$FFFF}->[0];
+ }
+ foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
+ keys(%elster_land_fa)) {
+ print qq|
+ elsterFAAuswahl.options[$j] = new Option("$elster_land_fa{$ffff} ($ffff)","$ffff");|;
+ $j++;
+ }
+ print qq|
+ }|;
+ }
+ print qq|
+ }
+ </script>
+
+ <table width="100%">
+ <tr>
+ <td>
+ Bundesland
+ </td>
+ <td>
+ <select size="1" name="elsterland_new" onchange="update_auswahl()">|;
+ if ($land eq '') {
+ print qq|<option value="Auswahl" $checked>hier auswählen...</option>\n|;
+ }
+ foreach $elster_land (sort keys %$elster_init) {
+ print qq|
+ <option value="$elster_land"|;
+ if ($elster_land eq $land and $checked eq '') {
+ print qq| selected|;
+ }
+ print qq|>$elster_land</option>
+ |;
+ }
+ print qq|
+ </td>
+ </tr>
+ |;
+
+ my $elster_land = '';
+ $elster_land = ($land ne '') ? $land : '';
+ %elster_land_fa = ();
+ for $FFFF (keys %{ $elster_init->{$elster_land} }) {
+ $elster_land_fa{$FFFF} = $elster_init->{$elster_land}->{$FFFF}->[0];
+ }
+
+ print qq|
+ <tr>
+ <td>Finanzamt
+ </td>
+ <td>
+ <select size="1" name="elsterFFFF_new">|;
+ if ($elsterFFFF eq '') {
+ print qq|<option value="Auswahl" $checked>hier auswählen...</option>|;
+ } else {
+ foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
+ keys(%elster_land_fa)) {
+
+ print qq|
+ <option value="$ffff"|;
+ if ($ffff eq $elsterFFFF and $checked eq '') {
+ print qq| selected|;
+ }
+ print qq|>$elster_land_fa{$ffff} ($ffff)</option>|;
+ }
+ }
+ print qq|
+ </td>
+ </tr>
+ </table>
+ </select>|;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub info {
+ $main::lxdebug->enter_sub();
+
+ my $msg = $_[0];
+
+ if ($ENV{HTTP_USER_AGENT}) {
+ $msg =~ s/\n/<br>/g;
+
+ print qq|<body><h2 class=info>Hinweis</h2>
+
+ <p><b>$msg</b>
+ <br>
+ <br>
+ <hr>
+ <input type=button value="zurück" onClick="history.go(-1)">
+ </body>
+ |;
+
+ exit;
+
+ } else {
+
+ if ($form->{error_function}) {
+ &{ $form->{error_function} }($msg);
+ } else {
+ die "Hinweis: $msg\n";
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub stichtag {
+ $main::lxdebug->enter_sub();
+
+ # noch nicht fertig
+ # soll mal eine Erinnerungsfunktion für USTVA Abgaben werden, die automatisch
+ # den Termin der nächsten USTVA anzeigt.
+ #
+ #
+ my ($today, $FA_dauerfrist, $FA_voranmeld) = @_;
+
+ #$today zerlegen:
+
+ #$today =today * 1;
+ $today =~ /(\d\d\d\d)(\d\d)(\d\d)/;
+ $year = $1;
+ $month = $2;
+ $day = $3;
+ $yy = $year;
+ $mm = $month;
+ $yymmdd = "$year$month$day" * 1;
+ $mmdd = "$month$day" * 1;
+ $stichtag = '';
+
+ #$tage_bis = '1234';
+ #$ical = '...vcal format';
+
+ #if ($FA_voranmeld eq 'month'){
+
+ %liste = ("0110" => 'December',
+ "0210" => 'January',
+ "0310" => 'February',
+ "0410" => 'March',
+ "0510" => 'April',
+ "0610" => 'May',
+ "0710" => 'June',
+ "0810" => 'July',
+ "0910" => 'August',
+ "1010" => 'September',
+ "1110" => 'October',
+ "1210" => 'November');
+
+ #$mm += $dauerfrist
+ #$month *= 1;
+ $month += 1 if ($day > 10);
+ $month = sprintf("%02d", $month);
+ $stichtag = $year . $month . "10";
+ $ust_va = $month . "10";
+
+ foreach $date (%liste) {
+ $ust_va = $liste{$date} if ($date eq $stichtag);
+ }
+
+ #} elsif ($FA_voranmeld eq 'quarter'){
+ #1;
+
+ #}
+
+ #@stichtag = ('10.04.2004', '10.05.2004');
+
+ #@liste = ['0110', '0210', '0310', '0410', '0510', '0610', '0710', '0810', '0910',
+ # '1010', '1110', '1210', ];
+ #
+ #foreach $key (@liste){
+ # #if ($ddmm < ('0110' * 1));
+ # if ($ddmm ){}
+ # $stichtag = $liste[$key - 1] if ($ddmm > $key);
+ #
+ #}
+ #
+ #$stichtag =~ /([\d]\d)(\d\d)$/
+ #$stichtag = "$1.$2.$yy"
+ #$stichtag=$1;
+ $main::lxdebug->leave_sub();
+ return ($stichtag, $description, $tage_bis, $ical);
+}
+
+sub query_finanzamt {
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form) = @_;
+ my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr);
+
+ #Test, if table finanzamt exist
+ my $table = 'finanzamt';
+ my $filename = "sql/$table.sql";
+
+ my $tst = $dbh->prepare("SELECT * FROM $table");
+ $tst->execute;
+ if ($DBI::err) {
+
+ #There is no table, read the table from sql/finanzamt.sql
+ print qq|<p>Bitte warten, Tabelle $table wird einmalig in Datenbank:
+ $myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...</p>|;
+ process_query($form, $dbh, $filename) || $self->error(DBI->errstr);
+
+ #execute second last call
+ my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr);
+ $dbh->disconnect();
+ }
+ $tst->finish();
+
+ #$dbh->disconnect();
+
+ my @vars = (
+ 'FA_Land_Nr', # 0
+ 'FA_BUFA_Nr', # 1
+ #'FA_Verteiler', # 2
+ 'FA_Name', # 3
+ 'FA_Strasse', # 4
+ 'FA_PLZ', # 5
+ 'FA_Ort', # 6
+ 'FA_Telefon', # 7
+ 'FA_Fax', # 8
+ 'FA_PLZ_Grosskunden', # 9
+ 'FA_PLZ_Postfach', # 10
+ 'FA_Postfach', # 11
+ 'FA_BLZ_1', # 12
+ 'FA_Kontonummer_1', # 13
+ 'FA_Bankbezeichnung_1', # 14
+ #'FA_BankIBAN_1', # 15
+ #'FA_BankBIC_1', # 16
+ #'FA_BankInhaber_BUFA_Nr_1', # 17
+ 'FA_BLZ_2', # 18
+ 'FA_Kontonummer_2', # 19
+ 'FA_Bankbezeichnung_2', # 20
+ #'FA_BankIBAN_2', # 21
+ #'FA_BankBIC_2', # 22
+ #'FA_BankInhaber_BUFA_Nr_2', # 23
+ 'FA_Oeffnungszeiten', # 24
+ 'FA_Email', # 25
+ 'FA_Internet' # 26
+ #'FA_zustaendige_Hauptstelle_BUFA_Nr', # 27
+ #'FA_zustaendige_vorgesetzte_Finanzbehoerde' # 28
+ );
+
+ my $field = join(', ', @vars);
+
+ my $query = "SELECT $field FROM finanzamt ORDER BY FA_Land_nr";
+ my $sth = $dbh->prepare($query) or $self->error($dbh->errstr);
+ $sth->execute || $form->dberror($query);
+ my $array_ref = $sth->fetchall_arrayref();
+ my $land = '';
+ foreach my $row (@$array_ref) {
+ my $FA_finanzamt = $row;
+ $land = 'Schleswig Holstein' if (@$FA_finanzamt[0] eq '1');
+ $land = 'Hamburg' if (@$FA_finanzamt[0] eq '2');
+ $land = 'Niedersachsen' if (@$FA_finanzamt[0] eq '3');
+ $land = 'Bremen' if (@$FA_finanzamt[0] eq '4');
+ $land = 'Nordrhein Westfalen' if (@$FA_finanzamt[0] eq '5');
+ $land = 'Hessen' if (@$FA_finanzamt[0] eq '6');
+ $land = 'Rheinland Pfalz' if (@$FA_finanzamt[0] eq '7');
+ $land = 'Baden Würtemberg' if (@$FA_finanzamt[0] eq '8');
+ $land = 'Bayern' if (@$FA_finanzamt[0] eq '9');
+ $land = 'Saarland' if (@$FA_finanzamt[0] eq '10');
+ $land = 'Berlin' if (@$FA_finanzamt[0] eq '11');
+ $land = 'Brandenburg' if (@$FA_finanzamt[0] eq '12');
+ $land = 'Mecklenburg Vorpommern' if (@$FA_finanzamt[0] eq '13');
+ $land = 'Sachsen' if (@$FA_finanzamt[0] eq '14');
+ $land = 'Sachsen Anhalt' if (@$FA_finanzamt[0] eq '15');
+ $land = 'Thüringen' if (@$FA_finanzamt[0] eq '16');
+
+ my $ffff = @$FA_finanzamt[1];
+
+ my $rec = {};
+ $rec->{$land} = $ffff;
+
+ shift @$row;
+ shift @$row;
+
+ $finanzamt{$land}{$ffff} = [@$FA_finanzamt];
+ }
+
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return \%finanzamt;
+}
+
+sub process_query {
+ $main::lxdebug->enter_sub();
+
+ # Copyright D. Simander -> SL::Form under Gnu GPL.
+ my ($form, $dbh, $filename) = @_;
+
+ # return unless (-f $filename);
+
+ open(FH, "$filename") or $form->error("$filename : $!\n");
+ my $query = "";
+ my $sth;
+ my @quote_chars;
+
+ while (<FH>) {
+
+ # Remove DOS and Unix style line endings.
+ s/[\r\n]//g;
+
+ # don't add comments or empty lines
+ next if /^(--.*|\s+)$/;
+
+ for (my $i = 0; $i < length($_); $i++) {
+ my $char = substr($_, $i, 1);
+
+ # Are we inside a string?
+ if (@quote_chars) {
+ if ($char eq $quote_chars[-1]) {
+ pop(@quote_chars);
+ }
+ $query .= $char;
+
+ } else {
+ if (($char eq "'") || ($char eq "\"")) {
+ push(@quote_chars, $char);
+
+ } elsif ($char eq ";") {
+
+ # Query is complete. Send it.
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $sth->finish;
+
+ $char = "";
+ $query = "";
+ }
+
+ $query .= $char;
+ }
+ }
+ }
+
+ close FH;
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#=====================================================================
+#
+# user related functions
+#
+#=====================================================================
+
+package User;
+
+sub new {
+ $main::lxdebug->enter_sub();
+
+ my ($type, $memfile, $login) = @_;
+ my $self = {};
+
+ if ($login ne "") {
+ &error("", "$memfile locked!") if (-f "${memfile}.LCK");
+
+ open(MEMBER, "$memfile") or &error("", "$memfile : $!");
+
+ while (<MEMBER>) {
+ if (/^\[$login\]/) {
+ while (<MEMBER>) {
+ last if /^\[/;
+ next if /^(#|\s)/;
+
+ # remove comments
+ s/\s#.*//g;
+
+ # remove any trailing whitespace
+ s/^\s*(.*?)\s*$/$1/;
+
+ ($key, $value) = split /=/, $_, 2;
+
+ if (($key eq "stylesheet") && ($value eq "sql-ledger.css")) {
+ $value = "lx-office-erp.css";
+ }
+
+ $self->{$key} = $value;
+ }
+
+ $self->{login} = $login;
+
+ last;
+ }
+ }
+ close MEMBER;
+ }
+
+ $main::lxdebug->leave_sub();
+ bless $self, $type;
+}
+
+sub country_codes {
+ $main::lxdebug->enter_sub();
+
+ my %cc = ();
+ my @language = ();
+
+ # scan the locale directory and read in the LANGUAGE files
+ opendir DIR, "locale";
+
+ my @dir = grep !/(^\.\.?$|\..*)/, readdir DIR;
+
+ foreach my $dir (@dir) {
+ next unless open(FH, "locale/$dir/LANGUAGE");
+ @language = <FH>;
+ close FH;
+
+ $cc{$dir} = "@language";
+ }
+
+ closedir(DIR);
+
+ $main::lxdebug->leave_sub();
+
+ return %cc;
+}
+
+sub login {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form, $userspath) = @_;
+
+ my $rc = -3;
+
+ if ($self->{login}) {
+
+ if ($self->{password}) {
+ $form->{password} = crypt $form->{password},
+ substr($self->{login}, 0, 2);
+ if ($self->{password} ne $form->{password}) {
+ $main::lxdebug->leave_sub();
+ return -1;
+ }
+ }
+
+ unless (-e "$userspath/$self->{login}.conf") {
+ $self->create_config("$userspath/$self->{login}.conf");
+ }
+
+ do "$userspath/$self->{login}.conf";
+ $myconfig{dbpasswd} = unpack 'u', $myconfig{dbpasswd};
+
+ # check if database is down
+ my $dbh =
+ DBI->connect($myconfig{dbconnect}, $myconfig{dbuser},
+ $myconfig{dbpasswd})
+ or $self->error(DBI::errstr);
+
+ # we got a connection, check the version
+ my $query = qq|SELECT version FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($dbversion) = $sth->fetchrow_array;
+ $sth->finish;
+
+ # add login to employee table if it does not exist
+ # no error check for employee table, ignore if it does not exist
+ $query = qq|SELECT e.id FROM employee e WHERE e.login = '$self->{login}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute;
+
+ my ($login) = $sth->fetchrow_array;
+ $sth->finish;
+
+ if (!$login) {
+ $query = qq|INSERT INTO employee (login, name, workphone, role)
+ VALUES ('$self->{login}', '$myconfig{name}',
+ '$myconfig{tel}', 'user')|;
+ $dbh->do($query);
+ }
+ $dbh->disconnect;
+
+ $rc = 0;
+
+ if ($form->{dbversion} ne $dbversion) {
+
+ # update the tables
+ open FH, ">$userspath/nologin" or die "
+$!";
+
+ map { $form->{$_} = $myconfig{$_} }
+ qw(dbname dbhost dbport dbdriver dbuser dbpasswd);
+
+ $form->{dbupdate} = "db$myconfig{dbname}";
+ $form->{ $form->{dbupdate} } = 1;
+
+ $form->info("Upgrading Dataset $myconfig{dbname} ...");
+
+ # required for Oracle
+ $form->{dbdefault} = $sid;
+
+ # ignore HUP, QUIT in case the webserver times out
+ $SIG{HUP} = 'IGNORE';
+ $SIG{QUIT} = 'IGNORE';
+
+ $self->dbupdate($form);
+
+ # remove lock file
+ unlink "$userspath/nologin";
+
+ $form->info("... done");
+
+ $rc = -2;
+
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub dbconnect_vars {
+ $main::lxdebug->enter_sub();
+
+ my ($form, $db) = @_;
+
+ my %dboptions = (
+ 'Pg' => { 'yy-mm-dd' => 'set DateStyle to \'ISO\'',
+ 'yyyy-mm-dd' => 'set DateStyle to \'ISO\'',
+ 'mm/dd/yy' => 'set DateStyle to \'SQL, US\'',
+ 'mm-dd-yy' => 'set DateStyle to \'POSTGRES, US\'',
+ 'dd/mm/yy' => 'set DateStyle to \'SQL, EUROPEAN\'',
+ 'dd-mm-yy' => 'set DateStyle to \'POSTGRES, EUROPEAN\'',
+ 'dd.mm.yy' => 'set DateStyle to \'GERMAN\''
+ },
+ 'Oracle' => {
+ 'yy-mm-dd' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'YY-MM-DD\'',
+ 'yyyy-mm-dd' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD\'',
+ 'mm/dd/yy' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'MM/DD/YY\'',
+ 'mm-dd-yy' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'MM-DD-YY\'',
+ 'dd/mm/yy' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'DD/MM/YY\'',
+ 'dd-mm-yy' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'DD-MM-YY\'',
+ 'dd.mm.yy' => 'ALTER SESSION SET NLS_DATE_FORMAT = \'DD.MM.YY\'',
+ });
+
+ $form->{dboptions} = $dboptions{ $form->{dbdriver} }{ $form->{dateformat} };
+
+ if ($form->{dbdriver} eq 'Pg') {
+ $form->{dbconnect} = "dbi:Pg:dbname=$db";
+ }
+
+ if ($form->{dbdriver} eq 'Oracle') {
+ $form->{dbconnect} = "dbi:Oracle:sid=$form->{sid}";
+ }
+
+ if ($form->{dbhost}) {
+ $form->{dbconnect} .= ";host=$form->{dbhost}";
+ }
+ if ($form->{dbport}) {
+ $form->{dbconnect} .= ";port=$form->{dbport}";
+ }
+
+ $main::lxdebug->leave_sub();
+}
+
+sub dbdrivers {
+ $main::lxdebug->enter_sub();
+
+ my @drivers = DBI->available_drivers();
+
+ $main::lxdebug->leave_sub();
+
+ return (grep { /(Pg|Oracle)/ } @drivers);
+}
+
+sub dbsources {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ my @dbsources = ();
+ my ($sth, $query);
+
+ $form->{dbdefault} = $form->{dbuser} unless $form->{dbdefault};
+ $form->{sid} = $form->{dbdefault};
+ &dbconnect_vars($form, $form->{dbdefault});
+
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ if ($form->{dbdriver} eq 'Pg') {
+
+ $query = qq|SELECT datname FROM pg_database|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($db) = $sth->fetchrow_array) {
+
+ if ($form->{only_acc_db}) {
+
+ next if ($db =~ /^template/);
+
+ &dbconnect_vars($form, $db);
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ $query = qq|SELECT p.tablename FROM pg_tables p
+ WHERE p.tablename = 'defaults'
+ AND p.tableowner = '$form->{dbuser}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ if ($sth->fetchrow_array) {
+ push @dbsources, $db;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+ next;
+ }
+ push @dbsources, $db;
+ }
+ }
+
+ if ($form->{dbdriver} eq 'Oracle') {
+ if ($form->{only_acc_db}) {
+ $query = qq|SELECT o.owner FROM dba_objects o
+ WHERE o.object_name = 'DEFAULTS'
+ AND o.object_type = 'TABLE'|;
+ } else {
+ $query = qq|SELECT username FROM dba_users|;
+ }
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($db) = $sth->fetchrow_array) {
+ push @dbsources, $db;
+ }
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return @dbsources;
+}
+
+sub dbcreate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ my %dbcreate = (
+ 'Pg' => qq|CREATE DATABASE "$form->{db}"|,
+ 'Oracle' =>
+ qq|CREATE USER "$form->{db}" DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP IDENTIFIED BY "$form->{db}"|
+ );
+
+ $dbcreate{Pg} .= " WITH ENCODING = '$form->{encoding}'" if $form->{encoding};
+
+ $form->{sid} = $form->{dbdefault};
+ &dbconnect_vars($form, $form->{dbdefault});
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+ my $query = qq|$dbcreate{$form->{dbdriver}}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{dbdriver} eq 'Oracle') {
+ $query = qq|GRANT CONNECT,RESOURCE TO "$form->{db}"|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ $dbh->disconnect;
+
+ # setup variables for the new database
+ if ($form->{dbdriver} eq 'Oracle') {
+ $form->{dbuser} = $form->{db};
+ $form->{dbpasswd} = $form->{db};
+ }
+
+ &dbconnect_vars($form, $form->{db});
+
+ $dbh = DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ # create the tables
+ my $filename = qq|sql/lx-office.sql|;
+ $self->process_query($form, $dbh, $filename);
+
+ # load gifi
+ ($filename) = split /_/, $form->{chart};
+ $filename =~ s/_//;
+ $self->process_query($form, $dbh, "sql/${filename}-gifi.sql");
+
+ # load chart of accounts
+ $filename = qq|sql/$form->{chart}-chart.sql|;
+ $self->process_query($form, $dbh, $filename);
+
+ # create indices
+ # Indices sind auch in lx-office.sql
+ # $filename = qq|sql/$form->{dbdriver}-indices.sql|;
+ # $self->process_query($form, $dbh, $filename);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub process_query {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form, $dbh, $filename) = @_;
+
+ # return unless (-f $filename);
+
+ open(FH, "$filename") or $form->error("$filename : $!\n");
+ my $query = "";
+ my $sth;
+ my @quote_chars;
+
+ while (<FH>) {
+
+ # Remove DOS and Unix style line endings.
+ s/[\r\n]//g;
+
+ # don't add comments or empty lines
+ next if /^(--.*|\s+)$/;
+
+ for (my $i = 0; $i < length($_); $i++) {
+ my $char = substr($_, $i, 1);
+
+ # Are we inside a string?
+ if (@quote_chars) {
+ if ($char eq $quote_chars[-1]) {
+ pop(@quote_chars);
+ }
+ $query .= $char;
+
+ } else {
+ if (($char eq "'") || ($char eq "\"")) {
+ push(@quote_chars, $char);
+
+ } elsif ($char eq ";") {
+
+ # Query is complete. Send it.
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ $sth->finish;
+
+ $char = "";
+ $query = "";
+ }
+
+ $query .= $char;
+ }
+ }
+ }
+
+ close FH;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub dbdelete {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ my %dbdelete = ('Pg' => qq|DROP DATABASE "$form->{db}"|,
+ 'Oracle' => qq|DROP USER $form->{db} CASCADE|);
+
+ $form->{sid} = $form->{dbdefault};
+ &dbconnect_vars($form, $form->{dbdefault});
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+ my $query = qq|$dbdelete{$form->{dbdriver}}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub dbsources_unused {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form, $memfile) = @_;
+
+ my @dbexcl = ();
+ my @dbsources = ();
+
+ $form->error('File locked!') if (-f "${memfile}.LCK");
+
+ # open members file
+ open(FH, "$memfile") or $form->error("$memfile : $!");
+
+ while (<FH>) {
+ if (/^dbname=/) {
+ my ($null, $item) = split /=/;
+ push @dbexcl, $item;
+ }
+ }
+
+ close FH;
+
+ $form->{only_acc_db} = 1;
+ my @db = &dbsources("", $form);
+
+ push @dbexcl, $form->{dbdefault};
+
+ foreach $item (@db) {
+ unless (grep /$item$/, @dbexcl) {
+ push @dbsources, $item;
+ }
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return @dbsources;
+}
+
+sub dbneedsupdate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ my %dbsources = ();
+ my $query;
+
+ $form->{sid} = $form->{dbdefault};
+ &dbconnect_vars($form, $form->{dbdefault});
+
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ if ($form->{dbdriver} eq 'Pg') {
+
+ $query = qq|SELECT d.datname FROM pg_database d, pg_user u
+ WHERE d.datdba = u.usesysid
+ AND u.usename = '$form->{dbuser}'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($db) = $sth->fetchrow_array) {
+
+ next if ($db =~ /^template/);
+
+ &dbconnect_vars($form, $db);
+
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ $query = qq|SELECT t.tablename FROM pg_tables t
+ WHERE t.tablename = 'defaults'|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ if ($sth->fetchrow_array) {
+ $query = qq|SELECT version FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute;
+
+ if (my ($version) = $sth->fetchrow_array) {
+ $dbsources{$db} = $version;
+ }
+ $sth->finish;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+ }
+ $sth->finish;
+ }
+
+ if ($form->{dbdriver} eq 'Oracle') {
+ $query = qq|SELECT o.owner FROM dba_objects o
+ WHERE o.object_name = 'DEFAULTS'
+ AND o.object_type = 'TABLE'|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my ($db) = $sth->fetchrow_array) {
+
+ $form->{dbuser} = $db;
+ &dbconnect_vars($form, $db);
+
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ $query = qq|SELECT version FROM defaults|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute;
+
+ if (my ($version) = $sth->fetchrow_array) {
+ $dbsources{$db} = $version;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+ }
+ $sth->finish;
+ }
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return %dbsources;
+}
+
+## LINET
+sub calc_version {
+ $main::lxdebug->enter_sub();
+
+ my (@v, $version, $i);
+
+ @v = split(/\./, $_[0]);
+ while (scalar(@v) < 4) {
+ push(@v, 0);
+ }
+ $version = 0;
+ for ($i = 0; $i < 4; $i++) {
+ $version *= 1000;
+ $version += $v[$i];
+ }
+
+ $main::lxdebug->leave_sub();
+ return $version;
+}
+
+sub cmp_script_version {
+ my ($a_from, $a_to, $b_from, $b_to);
+ my ($i, $res_a, $res_b);
+ my ($my_a, $my_b) = ($a, $b);
+
+ $my_a =~ s/.*-upgrade-//;
+ $my_a =~ s/.sql$//;
+ $my_b =~ s/.*-upgrade-//;
+ $my_b =~ s/.sql$//;
+ ($my_a_from, $my_a_to) = split(/-/, $my_a);
+ ($my_b_from, $my_b_to) = split(/-/, $my_b);
+
+ $res_a = calc_version($my_a_from);
+ $res_b = calc_version($my_b_from);
+
+ if ($res_a == $res_b) {
+ $res_a = calc_version($my_a_to);
+ $res_b = calc_version($my_b_to);
+ }
+
+ return $res_a <=> $res_b;
+}
+## /LINET
+
+sub dbupdate {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $form) = @_;
+
+ $form->{sid} = $form->{dbdefault};
+
+ my @upgradescripts = ();
+ my $query;
+ my $rc = -2;
+
+ if ($form->{dbupdate}) {
+
+ # read update scripts into memory
+ opendir SQLDIR, "sql/." or $form - error($!);
+ ## LINET
+ @upgradescripts =
+ sort(cmp_script_version
+ grep(/$form->{dbdriver}-upgrade-.*?\.sql$/, readdir(SQLDIR)));
+ ## /LINET
+ closedir SQLDIR;
+ }
+
+ foreach my $db (split / /, $form->{dbupdate}) {
+
+ next unless $form->{$db};
+
+ # strip db from dataset
+ $db =~ s/^db//;
+ &dbconnect_vars($form, $db);
+
+ my $dbh =
+ DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd})
+ or $form->dberror;
+
+ # check version
+ $query = qq|SELECT version FROM defaults|;
+ my $sth = $dbh->prepare($query);
+
+ # no error check, let it fall through
+ $sth->execute;
+
+ my $version = $sth->fetchrow_array;
+ $sth->finish;
+
+ next unless $version;
+
+ ## LINET
+ $version = calc_version($version);
+ ## /LINET
+
+ foreach my $upgradescript (@upgradescripts) {
+ my $a = $upgradescript;
+ $a =~ s/^$form->{dbdriver}-upgrade-|\.sql$//g;
+
+ my ($mindb, $maxdb) = split /-/, $a;
+ ## LINET
+ $mindb = calc_version($mindb);
+ $maxdb = calc_version($maxdb);
+ ## /LINET
+
+ next if ($version >= $maxdb);
+
+ # if there is no upgrade script exit
+ last if ($version < $mindb);
+
+ # apply upgrade
+ $self->process_query($form, $dbh, "sql/$upgradescript");
+
+ $version = $maxdb;
+
+ }
+
+ $rc = 0;
+ $dbh->disconnect;
+
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub create_config {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $filename) = @_;
+
+ @config = &config_vars;
+
+ open(CONF, ">$filename") or $self->error("$filename : $!");
+
+ # create the config file
+ print CONF qq|# configuration file for $self->{login}
+
+\%myconfig = (
+|;
+
+ foreach $key (sort @config) {
+ $self->{$key} =~ s/\'/\\\'/g;
+ print CONF qq| $key => '$self->{$key}',\n|;
+ }
+
+ print CONF qq|);\n\n|;
+
+ close CONF;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_member {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $memberfile, $userspath) = @_;
+
+ my $newmember = 1;
+
+ # format dbconnect and dboptions string
+ &dbconnect_vars($self, $self->{dbname});
+
+ $self->error('File locked!') if (-f "${memberfile}.LCK");
+ open(FH, ">${memberfile}.LCK") or $self->error("${memberfile}.LCK : $!");
+ close(FH);
+
+ open(CONF, "+<$memberfile") or $self->error("$memberfile : $!");
+
+ @config = <CONF>;
+
+ seek(CONF, 0, 0);
+ truncate(CONF, 0);
+
+ while ($line = shift @config) {
+ if ($line =~ /^\[$self->{login}\]/) {
+ $newmember = 0;
+ last;
+ }
+ print CONF $line;
+ }
+
+ # remove everything up to next login or EOF
+ while ($line = shift @config) {
+ last if ($line =~ /^\[/);
+ }
+
+ # this one is either the next login or EOF
+ print CONF $line;
+
+ while ($line = shift @config) {
+ print CONF $line;
+ }
+
+ print CONF qq|[$self->{login}]\n|;
+
+ if ((($self->{dbpasswd} ne $self->{old_dbpasswd}) || $newmember)
+ && $self->{root}) {
+ $self->{dbpasswd} = pack 'u', $self->{dbpasswd};
+ chop $self->{dbpasswd};
+ }
+ if (defined($self->{new_password})) {
+ if ($self->{new_password} ne $self->{old_password}) {
+ $self->{password} = crypt $self->{new_password},
+ substr($self->{login}, 0, 2)
+ if $self->{new_password};
+ }
+ } else {
+ if ($self->{password} ne $self->{old_password}) {
+ $self->{password} = crypt $self->{password}, substr($self->{login}, 0, 2)
+ if $self->{password};
+ }
+ }
+
+ if ($self->{'root login'}) {
+ @config = ("password");
+ } else {
+ @config = &config_vars;
+ }
+
+ # replace \r\n with \n
+ map { $self->{$_} =~ s/\r\n/\\n/g } qw(address signature);
+ foreach $key (sort @config) {
+ print CONF qq|$key=$self->{$key}\n|;
+ }
+
+ print CONF "\n";
+ close CONF;
+ unlink "${memberfile}.LCK";
+
+ # create conf file
+ $self->create_config("$userspath/$self->{login}.conf")
+ unless $self->{'root login'};
+
+ $main::lxdebug->leave_sub();
+}
+
+sub config_vars {
+ $main::lxdebug->enter_sub();
+
+ my @conf = qw(acs address admin businessnumber charset company countrycode
+ currency dateformat dbconnect dbdriver dbhost dbport dboptions
+ dbname dbuser dbpasswd email fax name numberformat password
+ printer role sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen
+ anfragen lieferantenbestellungen einkaufsrechnungen steuernummer ustid duns);
+
+ $main::lxdebug->leave_sub();
+
+ return @conf;
+}
+
+sub error {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $msg) = @_;
+
+ if ($ENV{HTTP_USER_AGENT}) {
+ print qq|Content-Type: text/html
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+<body bgcolor=ffffff>
+
+<h2><font color=red>Error!</font></h2>
+<p><b>$msg</b>|;
+
+ }
+
+ die "Error: $msg\n";
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#
+# XIII form retrieval
+#
+#======================================================================
+
+package XIII;
+
+sub retrieve_form {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+ my $query = qq|SELECT f.line
+ FROM xiii_forms f
+ WHERE f.file = '$form->{file}'
+ AND f.dbname = '$myconfig->{dbname}'
+ ORDER BY f.oid|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref;
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{body} }, $ref->{line};
+ }
+
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_form {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM xiii_forms
+ WHERE file = '$form->{file}'
+ AND dbname = '$myconfig->{dbname}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ # commit and redirect
+ $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+sub save_form {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database, turn AutoCommit off
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my $query = qq|DELETE FROM xiii_forms
+ WHERE file = '$form->{file}'
+ AND dbname = '$myconfig->{dbname}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq|INSERT INTO xiii_forms (line, file, dbname)
+ VALUES (?, '$form->{file}', '$myconfig->{dbname}')|;
+
+ $sth = $dbh->prepare($query);
+
+ foreach $line (split /\r/, $form->{body}) {
+ $sth->execute($line) || $form->dberror($query);
+ $sth->finish;
+ }
+
+ $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
+1;
+
--- /dev/null
+#!/usr/bin/perl
+#
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#######################################################################
+#
+# this script is the frontend called from bin/$terminal/$script
+# all the accounting modules are linked to this script which in
+# turn execute the same script in bin/$terminal/
+#
+#######################################################################
+
+# setup defaults, DO NOT CHANGE
+$userspath = "users";
+$templates = "templates";
+$memberfile = "users/members";
+$sendmail = "| /usr/sbin/sendmail -t";
+########## end ###########################################
+
+$| = 1;
+
+use SL::LXDebug;
+$lxdebug = LXDebug->new();
+
+use SL::Form;
+
+eval { require "lx-erp.conf"; };
+
+$form = new Form;
+
+# name of this script
+$0 =~ tr/\\/\//;
+$pos = rindex $0, '/';
+$script = substr($0, $pos + 1);
+
+# we use $script for the language module
+$form->{script} = $script;
+
+# strip .pl for translation files
+$script =~ s/\.pl//;
+
+# pull in DBI
+use DBI;
+
+# check for user config file, could be missing or ???
+eval { require("$userspath/$form->{login}.conf"); };
+if ($@) {
+ $locale = new Locale "$language", "$script";
+
+ $form->{callback} = "";
+ $msg1 = $locale->text('You are logged out!');
+ $msg2 = $locale->text('Login');
+ $form->redirect("$msg1 <p><a href=login.pl target=_top>$msg2</a>");
+}
+
+$myconfig{dbpasswd} = unpack 'u', $myconfig{dbpasswd};
+map { $form->{$_} = $myconfig{$_} } qw(stylesheet charset)
+ unless (($form->{action} eq 'save') && ($form->{type} eq 'preferences'));
+
+# locale messages
+$locale = new Locale "$myconfig{countrycode}", "$script";
+
+# check password
+$form->error($locale->text('Incorrect Password!'))
+ if ($form->{password} ne $myconfig{password});
+
+$form->{path} =~ s/\.\.\///g;
+if ($form->{path} !~ /^bin\//) {
+ $form->error($locale->text('Invalid path!') . "\n");
+}
+
+# did sysadmin lock us out
+if (-e "$userspath/nologin") {
+ $form->error($locale->text('System currently down for maintenance!'));
+}
+
+# pull in the main code
+require "$form->{path}/$form->{script}";
+
+# customized scripts
+if (-f "$form->{path}/custom_$form->{script}") {
+ eval { require "$form->{path}/custom_$form->{script}"; };
+ $form->error($@) if ($@);
+}
+
+# customized scripts for login
+if (-f "$form->{path}/$form->{login}_$form->{script}") {
+ eval { require "$form->{path}/$form->{login}_$form->{script}"; };
+ $form->error($@) if ($@);
+}
+
+if ($form->{action}) {
+
+ # window title bar, user info
+ $form->{titlebar} =
+ "Lx-Office "
+ . $locale->text('Version')
+ . " $form->{version} - $myconfig{name} - $myconfig{dbname}";
+
+ &{ $locale->findsub($form->{action}) };
+} else {
+ $form->error($locale->text('action= not defined!'));
+}
+
+# end
+
--- /dev/null
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (c) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Christopher Browne
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#######################################################################
+#
+# menu for text based browsers (lynx)
+#
+# CHANGE LOG:
+# DS. 2000-07-04 Created
+# DS. 2001-08-07 access control
+# CBB 2002-02-09 Refactored HTML out to subroutines
+#######################################################################
+
+$menufile = "menu.ini";
+use SL::Menu;
+
+
+1;
+# end of main
+
+
+
+sub display {
+
+ $menu = new Menu "$menufile";
+ $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
+ $menu = new Menu "$form->{login}_$menufile" if (-f "$form->{login}_$menufile");
+
+ @menuorder = $menu->access_control(\%myconfig);
+
+ $form->{title} = "SQL-Ledger $form->{version}";
+
+ $form->header;
+
+ $offset = int (21 - $#menuorder)/2;
+
+ print "<pre>";
+ print "\n" x $offset;
+ print "</pre>";
+
+ print qq|<center><table>|;
+
+ map { print "<tr><td>".$menu->menuitem(\%myconfig, \%$form, $_).$locale->text($_).qq|</a></td></tr>|; } @menuorder;
+
+ print qq'
+</table>
+
+</body>
+</html>
+';
+
+ # display the company logo
+# $argv = "login=$form->{login}&password=$form->{password}&path=$form->{path}&action=company_logo&noheader=1";
+# exec "./login.pl", $argv;
+
+}
+
+
+sub section_menu {
+
+ $menu = new Menu "$menufile", $form->{level};
+
+ # build tiered menus
+ @menuorder = $menu->access_control(\%myconfig, $form->{level});
+
+ foreach $item (@menuorder) {
+ $a = $item;
+ $item =~ s/^$form->{level}--//;
+ push @neworder, $a unless ($item =~ /--/);
+ }
+ @menuorder = @neworder;
+
+ $level = $form->{level};
+ $level =~ s/--/ /g;
+
+ $form->{title} = $locale->text($level);
+
+ $form->header;
+
+ $offset = int (21 - $#menuorder)/2;
+ print "<pre>";
+ print "\n" x $offset;
+ print "</pre>";
+
+ print qq|<center><table>|;
+
+ foreach $item (@menuorder) {
+ $label = $item;
+ $label =~ s/$form->{level}--//g;
+
+ # remove target
+ $menu->{$item}{target} = "";
+
+ print "<tr><td>".$menu->menuitem(\%myconfig, \%$form, $item, $form->{level}).$locale->text($label)."</a></td></tr>";
+ }
+
+ print qq'</table>
+
+</body>
+</html>
+';
+
+}
+
+
+sub acc_menu {
+
+ §ion_menu;
+
+}
+
+
+sub menubar {
+ $menu = new Menu "$menufile", "";
+
+ # build menubar
+ @menuorder = $menu->access_control(\%myconfig, "");
+
+ @neworder = ();
+ map { push @neworder, $_ unless ($_ =~ /--/) } @menuorder;
+ @menuorder = @neworder;
+
+ print "<p>";
+ $form->{script} = "menu.pl";
+
+ foreach $item (@menuorder) {
+ $label = $item;
+
+ # remove target
+ $menu->{$item}{target} = "";
+
+ print $menu->menuitem(\%myconfig, \%$form, $item, "").$locale->text($label)." | ";
+ }
+
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# setup module
+# add/edit/delete users
+#
+#======================================================================
+
+$menufile = "menu.ini";
+
+use SL::Form;
+use SL::User;
+
+$form = new Form;
+
+$locale = new Locale $language, "admin";
+
+eval { require DBI; };
+$form->error($locale->text('DBI not installed!')) if ($@);
+
+# customization
+if (-f "$form->{path}/custom_$form->{script}") {
+ eval { require "$form->{path}/custom_$form->{script}"; };
+ $form->error($@) if ($@);
+}
+
+$form->{stylesheet} = "lx-office-erp.css";
+$form->{favicon} = "favicon.ico";
+
+if ($form->{action}) {
+
+ $subroutine = $locale->findsub($form->{action});
+
+ if ($subroutine eq 'login') {
+ if ($form->{rpw}) {
+ $form->{rpw} = crypt $form->{rpw}, "ro";
+ }
+ }
+
+ &check_password;
+
+ &$subroutine;
+
+} else {
+
+ # if there are no drivers bail out
+ $form->error($locale->text('No Database Drivers available!'))
+ unless (User->dbdrivers);
+
+ # create memberfile
+ if (!-f $memberfile) {
+ open(FH, ">$memberfile") or $form->error("$memberfile : $!");
+ print FH qq|# SQL-Ledger Accounting members
+
+[root login]
+password=
+
+|;
+ close FH;
+ }
+
+ &adminlogin;
+
+}
+
+1;
+
+# end
+
+sub adminlogin {
+
+ $form->{title} =
+ qq|Lx-Office ERP $form->{version} | . $locale->text('Administration');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<div align=center>
+
+<a href="http://www.lx-office.org"><img src="image/lx-office-erp.png" border=0></a>
+<h1 class=login>|
+ . $locale->text('Version')
+ . qq| $form->{version}<p>|
+ . $locale->text('Administration')
+ . qq|</h1>
+
+<form method=post action="$form->{script}">
+
+<table>
+ <tr>
+ <th>| . $locale->text('Password') . qq|</th>
+ <td><input type=password name=rpw></td>
+ <td><input type=submit class=submit name=action value="|
+ . $locale->text('Login')
+ . qq|"></td>
+ </tr>
+<input type=hidden name=action value=login>
+<input type=hidden name=root value="root login">
+<input type=hidden name=path value=$form->{path}>
+</table>
+
+
+</form>
+
+<a href=http://www.lx-office.org>Lx-Office |
+ . $locale->text('website') . qq|</a>
+
+</div>
+
+</body>
+</html>
+|;
+
+}
+
+sub login {
+
+ &list_users;
+
+}
+
+sub add_user {
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Administration') . " / "
+ . $locale->text('Add User');
+
+ $form->{Oracle_sid} = $sid;
+ $form->{Oracle_dbport} = '1521';
+ $form->{Oracle_dbhost} = `hostname`;
+
+ if (-f "css/lx-office-erp.css") {
+ $myconfig->{stylesheet} = "lx-office-erp.css";
+ }
+ $myconfig->{vclimit} = 200;
+
+ &form_header;
+ &form_footer;
+
+}
+
+sub edit {
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Administration') . " / "
+ . $locale->text('Edit User');
+ $form->{edit} = 1;
+
+ &form_header;
+ &form_footer;
+
+}
+
+sub form_footer {
+
+ if ($form->{edit}) {
+ $delete =
+ qq|<input type=submit class=submit name=action value="|
+ . $locale->text('Delete') . qq|">
+<input type=hidden name=edit value=1>|;
+ }
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+
+<input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">
+$delete
+
+</form>
+
+</body>
+</html>
+|;
+
+}
+
+sub list_users {
+
+ $form->error($locale->text('File locked!')) if (-f "${memberfile}.LCK");
+
+ open(FH, "$memberfile") or $form->error("$memberfile : $!");
+
+ $nologin = qq|
+<input type=submit class=submit name=action value="|
+ . $locale->text('Lock System') . qq|">|;
+
+ if (-e "$userspath/nologin") {
+ $nologin = qq|
+<input type=submit class=submit name=action value="|
+ . $locale->text('Unlock System') . qq|">|;
+ }
+
+ while (<FH>) {
+ chop;
+
+ if (/^\[.*\]/) {
+ $login = $_;
+ $login =~ s/(\[|\])//g;
+ }
+
+ if (/^(name=|company=|templates=|dbuser=|dbdriver=|dbname=|dbhost=)/) {
+ chop($var = $&);
+ ($null, $member{$login}{$var}) = split /=/, $_, 2;
+ }
+ }
+
+ close(FH);
+
+ # type=submit $locale->text('Pg Database Administration')
+ # type=submit $locale->text('Oracle Database Administration')
+
+ foreach $item (User->dbdrivers) {
+ $dbdrivers .=
+ qq|<input name=action type=submit class=submit value="|
+ . $locale->text("$item Database Administration") . qq|">|;
+ }
+
+ $column_header{login} = qq|<th>| . $locale->text('Login') . qq|</th>|;
+ $column_header{name} = qq|<th>| . $locale->text('Name') . qq|</th>|;
+ $column_header{company} = qq|<th>| . $locale->text('Company') . qq|</th>|;
+ $column_header{dbdriver} = qq|<th>| . $locale->text('Driver') . qq|</th>|;
+ $column_header{dbhost} = qq|<th>| . $locale->text('Host') . qq|</th>|;
+ $column_header{dataset} = qq|<th>| . $locale->text('Dataset') . qq|</th>|;
+ $column_header{templates} =
+ qq|<th>| . $locale->text('Templates') . qq|</th>|;
+
+ @column_index = qw(login name company dbdriver dbhost dataset templates);
+
+ $form->{title} = "Lx-Office ERP " . $locale->text('Administration');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <tr class=listheading>
+ <th>$form->{title}</th>
+ </tr>
+ <tr size=5></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $key (sort keys %member) {
+ $href =
+ "$script?action=edit&login=$key&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}";
+ $href =~ s/ /%20/g;
+
+ $member{$key}{templates} =~ s/^$templates\///;
+ $member{$key}{dbhost} = $locale->text('localhost')
+ unless $member{$key}{dbhost};
+ $member{$key}{dbname} = $member{$key}{dbuser}
+ if ($member{$key}{dbdriver} eq 'Oracle');
+
+ $column_data{login} = qq|<td><a href=$href>$key</a></td>|;
+ $column_data{name} = qq|<td>$member{$key}{name}</td>|;
+ $column_data{company} = qq|<td>$member{$key}{company}</td>|;
+ $column_data{dbdriver} = qq|<td>$member{$key}{dbdriver}</td>|;
+ $column_data{dbhost} = qq|<td>$member{$key}{dbhost}</td>|;
+ $column_data{dataset} = qq|<td>$member{$key}{dbname}</td>|;
+ $column_data{templates} = qq|<td>$member{$key}{templates}</td>|;
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+<input type=hidden name=root value="$form->{root}">
+
+<br><input type=submit class=submit name=action value="|
+ . $locale->text('Add User') . qq|">
+<input type=submit class=submit name=action value="|
+ . $locale->text('Change Admin Password') . qq|">
+
+$dbdrivers
+$nologin
+
+</form>
+
+| . $locale->text('Click on login name to edit!') . qq|
+<br>
+|
+ . $locale->text(
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.'
+ )
+ . qq|
+
+<p>
+
+<form method=post action=login.pl>
+
+<table border=0 width=100%>
+ <tr class=listheading>
+ <th>Lx-Office ERP | . $locale->text('Login') . qq|</th>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Name') . qq|</th>
+ <td><input class=login name=login></td>
+ <td> </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input class=login type=password name=password></td>
+ <td><input type=submit name=action value="|
+ . $locale->text('Login')
+ . qq|"></td>
+ </tr>
+<input type=hidden name=path value=$form->{path}>
+ </table>
+ </td>
+ </tr>
+</table>
+
+</form>
+
+<hr size=3 noshade>
+
+</body>
+</html>
+|;
+
+}
+
+sub form_header {
+
+ # if there is a login, get user
+ if ($form->{login}) {
+
+ # get user
+ $myconfig = new User "$memberfile", "$form->{login}";
+
+ $myconfig->{signature} =~ s/\\n/\r\n/g;
+ $myconfig->{address} =~ s/\\n/\r\n/g;
+
+ # strip basedir from templates directory
+ $myconfig->{templates} =~ s/^$templates\///;
+
+ # $myconfig->{dbpasswd} = unpack 'u', $myconfig->{dbpasswd};
+ }
+
+ foreach $item (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)) {
+ $dateformat .=
+ ($item eq $myconfig->{dateformat})
+ ? "<option selected>$item\n"
+ : "<option>$item\n";
+ }
+
+ foreach $item (qw(1,000.00 1000.00 1.000,00 1000,00)) {
+ $numberformat .=
+ ($item eq $myconfig->{numberformat})
+ ? "<option selected>$item\n"
+ : "<option>$item\n";
+ }
+
+ %countrycodes = User->country_codes;
+ $countrycodes = "";
+ foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
+ keys %countrycodes) {
+ $countrycodes .=
+ ($myconfig->{countrycode} eq $key)
+ ? "<option selected value=$key>$countrycodes{$key}"
+ : "<option value=$key>$countrycodes{$key}";
+ }
+ $countrycodes = qq|<option value="">American English\n$countrycodes|;
+
+ # is there a templates basedir
+ if (!-d "$templates") {
+ $form->error( $locale->text('Directory')
+ . ": $templates "
+ . $locale->text('does not exist'));
+ }
+
+ opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!");
+ @all = grep !/^\.\.?$/, readdir TEMPLATEDIR;
+ closedir TEMPLATEDIR;
+
+ @allhtml = sort grep /\.html/, @all;
+ @alldir = grep !/\.(html|tex)$/, @all;
+
+ @allhtml = reverse grep !/Default/, @allhtml;
+ push @allhtml, 'Default';
+ @allhtml = reverse @allhtml;
+
+ foreach $item (@alldir) {
+ if ($item eq $myconfig->{templates}) {
+ $usetemplates .= qq|<option selected>$item\n|;
+ } else {
+ $usetemplates .= qq|<option>$item\n|;
+ }
+ }
+
+ $lastitem = $allhtml[0];
+ $lastitem =~ s/-.*//g;
+ $mastertemplates = qq|<option>$lastitem\n|;
+ foreach $item (@allhtml) {
+ $item =~ s/-.*//g;
+
+ if ($item ne $lastitem) {
+ $mastertemplates .= qq|<option>$item\n|;
+ $lastitem = $item;
+ }
+ }
+
+ opendir CSS, "css/.";
+ @all = grep /.*\.css$/, readdir CSS;
+ closedir CSS;
+
+ foreach $item (@all) {
+ if ($item eq $myconfig->{stylesheet}) {
+ $selectstylesheet .= qq|<option selected>$item\n|;
+ } else {
+ $selectstylesheet .= qq|<option>$item\n|;
+ }
+ }
+ $selectstylesheet .= "<option>\n";
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr class=listheading><th colspan=2>$form->{title}</th></tr>
+ <tr size=5></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Login') . qq|</th>
+ <td><input name=login value="$myconfig->{login}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input type=password name=password size=8 value=$myconfig->{password}></td>
+ <input type=hidden name=old_password value=$myconfig->{password}>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Name') . qq|</th>
+ <td><input name=name size=15 value="$myconfig->{name}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email size=30 value="$myconfig->{email}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Signature') . qq|</th>
+ <td><textarea name=signature rows=3 cols=35>$myconfig->{signature}</textarea></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Phone') . qq|</th>
+ <td><input name=tel size=14 value="$myconfig->{tel}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Fax') . qq|</th>
+ <td><input name=fax size=14 value="$myconfig->{fax}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Company') . qq|</th>
+ <td><input name=company size=35 value="$myconfig->{company}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Address') . qq|</th>
+ <td><textarea name=address rows=4 cols=35>$myconfig->{address}</textarea></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Steuernummer') . qq|</th>
+ <td><input name=steuernummer size=14 value="$myconfig->{steuernummer}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Ust-IDNr') . qq|</th>
+ <td><input name=ustid size=14 value="$myconfig->{ustid}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('DUNS-Nr') . qq|</th>
+ <td><input name=duns size=14 value="$myconfig->{duns}"></td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Date Format') . qq|</th>
+ <td><select name=dateformat>$dateformat</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Number Format') . qq|</th>
+ <td><select name=numberformat>$numberformat</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Dropdown Limit') . qq|</th>
+ <td><input name=vclimit value="$myconfig->{vclimit}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Language') . qq|</th>
+ <td><select name=countrycode>$countrycodes</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Character Set') . qq|</th>
+ <td><input name=charset value="$myconfig->{charset}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Stylesheet') . qq|</th>
+ <td><select name=userstylesheet>$selectstylesheet</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Printer') . qq|</th>
+ <td><input name=printer size=20 value="$myconfig->{printer}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Use Templates') . qq|</th>
+ <td><select name=usetemplates>$usetemplates</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('New Templates') . qq|</th>
+ <td><input name=newtemplates></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Setup Templates') . qq|</th>
+ <td><select name=mastertemplates>$mastertemplates</select></td>
+ </tr>
+ <input type=hidden name=templates value=$myconfig->{templates}>
+ </table>
+ </td>
+ </tr>
+ <tr class=listheading>
+ <th colspan=2>| . $locale->text('Database') . qq|</th>
+ </tr>|;
+
+ # list section for database drivers
+ foreach $item (User->dbdrivers) {
+
+ print qq|
+ <tr>
+ <td colspan=2>
+ <table>
+ <tr>|;
+
+ $checked = "";
+ if ($myconfig->{dbdriver} eq $item) {
+ map { $form->{"${item}_$_"} = $myconfig->{$_} }
+ qw(dbhost dbport dbuser dbpasswd dbname sid);
+ $checked = "checked";
+ }
+
+ print qq|
+ <th align=right>| . $locale->text('Driver') . qq|</th>
+ <td><input name=dbdriver type=radio class=radio value=$item $checked> $item</td>
+ <th align=right>| . $locale->text('Host') . qq|</th>
+ <td><input name="${item}_dbhost" size=30 value=$form->{"${item}_dbhost"}></td>
+ </tr>
+ <tr>|;
+
+ if ($item eq 'Pg') {
+ print qq|
+ <th align=right>| . $locale->text('Dataset') . qq|</th>
+ <td><input name=Pg_dbname size=15 value=$form->{Pg_dbname}></td>
+ <th align=right>| . $locale->text('Port') . qq|</th>
+ <td><input name=Pg_dbport size=4 value=$form->{Pg_dbport}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('User') . qq|</th>
+ <td><input name="${item}_dbuser" size=15 value=$form->{"${item}_dbuser"}></td>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input name="${item}_dbpasswd" type=password size=10 value=$form->{"${item}_dbpasswd"}></td>
+ </tr>|;
+
+ }
+
+ if ($item eq 'Oracle') {
+ print qq|
+ <th align=right>SID</th>
+ <td><input name=Oracle_sid value=$form->{Oracle_sid}></td>
+ <th align=right>| . $locale->text('Port') . qq|</th>
+ <td><input name=Oracle_dbport size=4 value=$form->{Oracle_dbport}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Dataset') . qq|</th>
+ <td><input name="${item}_dbuser" size=15 value=$form->{"${item}_dbuser"}></td>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input name="${item}_dbpasswd" type=password size=10 value=$form->{"${item}_dbpasswd"}></td>
+
+ </tr>|;
+ }
+
+ print qq|
+ <input type=hidden name=old_dbpasswd value=$myconfig->{dbpasswd}>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=2 noshade></td>
+ </tr>
+|;
+
+ }
+
+ # access control
+ open(FH, $menufile) or $form->error("$menufile : $!");
+
+ # scan for first menu level
+ @a = <FH>;
+ close(FH);
+
+ if (open(FH, "custom_$menufile")) {
+ push @a, <FH>;
+ }
+ close(FH);
+
+ foreach $item (@a) {
+ next unless $item =~ /\[/;
+ next if $item =~ /\#/;
+
+ $item =~ s/(\[|\])//g;
+ chop $item;
+
+ if ($item =~ /--/) {
+ ($level, $menuitem) = split /--/, $item, 2;
+ } else {
+ $level = $item;
+ $menuitem = $item;
+ push @acsorder, $item;
+ }
+
+ push @{ $acs{$level} }, $menuitem;
+
+ }
+
+ %role = ('admin' => $locale->text('Administrator'),
+ 'user' => $locale->text('User'),
+ 'manager' => $locale->text('Manager'),
+ 'supervisor' => $locale->text('Supervisor'));
+
+ $selectrole = "";
+ foreach $item (qw(user supervisor manager admin)) {
+ $selectrole .=
+ ($myconfig->{role} eq $item)
+ ? "<option selected value=$item>$role{$item}\n"
+ : "<option value=$item>$role{$item}\n";
+ }
+
+ print qq|
+ <tr class=listheading>
+ <th colspan=2>| . $locale->text('Access Control') . qq|</th>
+ </tr>
+ <tr>
+ <td><select name=role>$selectrole</select></td>
+ </tr>
+|;
+
+ foreach $item (split /;/, $myconfig->{acs}) {
+ ($key, $value) = split /--/, $item, 2;
+ $excl{$key}{$value} = 1;
+ }
+
+ foreach $key (@acsorder) {
+
+ $checked = "checked";
+ if ($form->{login}) {
+ $checked = ($excl{$key}{$key}) ? "" : "checked";
+ }
+
+ # can't have variable names with spaces
+ # the 1 is for apache 2
+ $item = $form->escape("${key}--$key", 1);
+
+ $acsheading = $key;
+ $acsheading =~ s/ / /g;
+
+ $acsheading = qq|
+ <th align=left><input name="$item" class=checkbox type=checkbox value=1 $checked> $acsheading</th>\n|;
+ $menuitems .= "$item;";
+ $acsdata = "
+ <td>";
+
+ foreach $item (@{ $acs{$key} }) {
+ next if ($key eq $item);
+
+ $checked = "checked";
+ if ($form->{login}) {
+ $checked = ($excl{$key}{$item}) ? "" : "checked";
+ }
+
+ $acsitem = $form->escape("${key}--$item", 1);
+
+ $acsdata .= qq|
+ <br><input name="$acsitem" class=checkbox type=checkbox value=1 $checked> $item|;
+ $menuitems .= "$acsitem;";
+ }
+
+ $acsdata .= "
+ </td>";
+
+ print qq|
+ <tr valign=top>$acsheading $acsdata
+ </tr>
+|;
+ }
+
+ print qq|<input type=hidden name=acs value="$menuitems">
+|;
+ if ($webdav) {
+ @webdavdirs =
+ qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen);
+ foreach $directory (@webdavdirs) {
+ if ($myconfig->{$directory}) {
+ $webdav{"${directory}c"} = "checked";
+ } else {
+ $webdav{"${directory}c"} = "";
+ }
+ }
+ print qq|
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+ <tr class=listheading>
+ <th colspan=2>| . $locale->text('WEBDAV-Zugriff') . qq|</th>
+ </tr>
+ <table width=100%>
+ <tr>
+ <td><input name=angebote class=checkbox type=checkbox value=1 $webdav{angebotec}> Angebot</td>
+ <td><input name=bestellungen class=checkbox type=checkbox value=1 $webdav{bestellungenc}> Bestellung</td>
+ <td><input name=rechnungen class=checkbox type=checkbox value=1 $webdav{rechnungenc}> Rechnung</td>
+ </tr>
+ <tr>
+ <td><input name=anfragen class=checkbox type=checkbox value=1 $webdav{anfragenc}> Angebot</td>
+ <td><input name=lieferantenbestellungen class=checkbox type=checkbox value=1 $webdav{lieferantenbestellungenc}> Lieferantenbestellung</td>
+ <td><input name=einkaufsrechnungen class=checkbox type=checkbox value=1 $webdav{einkaufsrechnungenc}> Einkaufsrechnung</td>
+ </tr>
+ </table>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+|;
+ }
+ print qq|
+</table>
+</div>
+|;
+
+}
+
+sub save {
+
+ # no driver checked
+ $form->error($locale->text('Database Driver not checked!'))
+ unless $form->{dbdriver};
+
+ # no spaces allowed in login name
+ ($form->{login}) = split / /, $form->{login};
+
+ $form->isblank("login", $locale->text('Login name missing!'));
+
+ # check for duplicates
+ if (!$form->{edit}) {
+ $temp = new User "$memberfile", "$form->{login}";
+
+ if ($temp->{login}) {
+ $form->error("$form->{login} " . $locale->text('is already a member!'));
+ }
+ }
+
+ # no spaces allowed in directories
+ ($form->{newtemplates}) = split / /, $form->{newtemplates};
+
+ if ($form->{newtemplates}) {
+ $form->{templates} = $form->{newtemplates};
+ } else {
+ $form->{templates} =
+ ($form->{usetemplates}) ? $form->{usetemplates} : $form->{login};
+ }
+
+ # is there a basedir
+ if (!-d "$templates") {
+ $form->error( $locale->text('Directory')
+ . ": $templates "
+ . $locale->text('does not exist'));
+ }
+
+ # add base directory to $form->{templates}
+ $form->{templates} = "$templates/$form->{templates}";
+
+ $myconfig = new User "$memberfile", "$form->{login}";
+
+ # redo acs variable and delete all the acs codes
+ @acs = split /;/, $form->{acs};
+
+ $form->{acs} = "";
+ foreach $item (@acs) {
+ $item = $form->escape($item, 1);
+
+ if (!$form->{$item}) {
+ $form->{acs} .= $form->unescape($form->unescape($item)) . ";";
+ }
+ delete $form->{$item};
+ }
+
+ # check which database was filled in
+ if ($form->{dbdriver} eq 'Oracle') {
+ $form->{sid} = $form->{Oracle_sid},;
+ $form->{dbhost} = $form->{Oracle_dbhost},;
+ $form->{dbport} = $form->{Oracle_dbport};
+ $form->{dbpasswd} = $form->{Oracle_dbpasswd};
+ $form->{dbuser} = $form->{Oracle_dbuser};
+ $form->{dbname} = $form->{Oracle_dbuser};
+
+ $form->isblank("dbhost", $locale->text('Hostname missing!'));
+ $form->isblank("dbport", $locale->text('Port missing!'));
+ $form->isblank("dbuser", $locale->text('Dataset missing!'));
+ }
+ if ($form->{dbdriver} eq 'Pg') {
+ $form->{dbhost} = $form->{Pg_dbhost};
+ $form->{dbport} = $form->{Pg_dbport};
+ $form->{dbpasswd} = $form->{Pg_dbpasswd};
+ $form->{dbuser} = $form->{Pg_dbuser};
+ $form->{dbname} = $form->{Pg_dbname};
+
+ $form->isblank("dbname", $locale->text('Dataset missing!'));
+ $form->isblank("dbuser", $locale->text('Database User missing!'));
+ }
+
+ if ($webdav) {
+ @webdavdirs =
+ qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen);
+ foreach $directory (@webdavdirs) {
+ if ($form->{$directory}) {
+ $form->{$directory} = $form->{$directory};
+ } else {
+ $form->{$directory} = 0;
+ }
+ }
+ }
+
+ foreach $item (keys %{$form}) {
+ $myconfig->{$item} = $form->{$item};
+ }
+
+ delete $myconfig->{stylesheet};
+ if ($form->{userstylesheet}) {
+ $myconfig->{stylesheet} = $form->{userstylesheet};
+ }
+
+ $myconfig->save_member($memberfile, $userspath);
+
+ if ($webdav) {
+ @webdavdirs =
+ qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen);
+ foreach $directory (@webdavdirs) {
+ $file = "webdav/" . $directory . "/webdav-user";
+ if ($form->{$directory}) {
+ if (open(HTACCESS, "$file")) {
+ while (<HTACCESS>) {
+ ($login, $password) = split(/:/, $_);
+ if ($login ne $form->{login}) {
+ $newfile .= $_;
+ }
+ }
+ close(HTACCESS);
+ }
+ open(HTACCESS, "> $file") or die "cannot open $file $!\n";
+ $newfile .= $myconfig->{login} . ":" . $myconfig->{password} . "\n";
+ print(HTACCESS $newfile);
+ close(HTACCESS);
+ } else {
+ $form->{$directory} = 0;
+ if (open(HTACCESS, "$file")) {
+ while (<HTACCESS>) {
+ ($login, $password) = split(/:/, $_);
+ if ($login ne $form->{login}) {
+ $newfile .= $_;
+ }
+ }
+ close(HTACCESS);
+ }
+ open(HTACCESS, "> $file") or die "cannot open $file $!\n";
+ print(HTACCESS $newfile);
+ close(HTACCESS);
+ }
+ }
+ }
+
+ # create user template directory and copy master files
+ if (!-d "$form->{templates}") {
+ umask(002);
+
+ if (mkdir "$form->{templates}", oct("771")) {
+
+ umask(007);
+
+ # copy templates to the directory
+ opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
+ @templates = grep /$form->{mastertemplates}.*?\.(html|tex)$/,
+ readdir TEMPLATEDIR;
+ closedir TEMPLATEDIR;
+
+ foreach $file (@templates) {
+ open(TEMP, "$templates/$file")
+ or $form->error("$templates/$file : $!");
+
+ $file =~ s/$form->{mastertemplates}-//;
+ open(NEW, ">$form->{templates}/$file")
+ or $form->error("$form->{templates}/$file : $!");
+
+ while ($line = <TEMP>) {
+ print NEW $line;
+ }
+ close(TEMP);
+ close(NEW);
+ }
+ } else {
+ $form->error("$!: $form->{templates}");
+ }
+ }
+
+ $form->redirect($locale->text('User saved!'));
+
+}
+
+sub delete {
+
+ $form->{templates} =
+ ($form->{templates})
+ ? "$templates/$form->{templates}"
+ : "$templates/$form->{login}";
+
+ $form->error($locale->text('File locked!')) if (-f ${memberfile} . LCK);
+ open(FH, ">${memberfile}.LCK") or $form->error("${memberfile}.LCK : $!");
+ close(FH);
+
+ open(CONF, "+<$memberfile") or $form->error("$memberfile : $!");
+
+ @config = <CONF>;
+
+ seek(CONF, 0, 0);
+ truncate(CONF, 0);
+
+ while ($line = shift @config) {
+
+ if ($line =~ /^\[/) {
+ last if ($line =~ /\[$form->{login}\]/);
+ $login = &login_name($line);
+ }
+
+ if ($line =~ /^templates=/) {
+ $user{$login} = &get_value($line);
+ }
+
+ print CONF $line;
+ }
+
+ # remove everything up to next login or EOF
+ # and save template variable
+ while ($line = shift @config) {
+ if ($line =~ /^templates=/) {
+ $templatedir = &get_value($line);
+ }
+ last if ($line =~ /^\[/);
+ }
+
+ # this one is either the next login or EOF
+ print CONF $line;
+
+ $login = &login_name($line);
+
+ while ($line = shift @config) {
+ if ($line =~ /^\[/) {
+ $login = &login_name($line);
+ }
+
+ if ($line =~ /^templates=/) {
+ $user{$login} = &get_value($line);
+ }
+
+ print CONF $line;
+ }
+
+ close(CONF);
+ unlink "${memberfile}.LCK";
+
+ # scan %user for $templatedir
+ foreach $login (keys %user) {
+ last if ($found = ($templatedir eq $user{$login}));
+ }
+
+ # if found keep directory otherwise delete
+ if (!$found) {
+
+ # delete it if there is a template directory
+ $dir = "$form->{templates}";
+ if (-d "$dir") {
+ unlink <$dir/*.html>;
+ unlink <$dir/*.tex>;
+ rmdir "$dir";
+ }
+ }
+
+ # delete config file for user
+ unlink "$userspath/$form->{login}.conf";
+
+ $form->redirect($locale->text('User deleted!'));
+
+}
+
+sub login_name {
+ my $login = shift;
+
+ $login =~ s/\[\]//g;
+ return ($login) ? $login : undef;
+
+}
+
+sub get_value {
+ my $line = shift;
+
+ my ($null, $value) = split(/=/, $line, 2);
+
+ # remove comments
+ $value =~ s/\s#.*//g;
+
+ # remove any trailing whitespace
+ $value =~ s/^\s*(.*?)\s*$/$1/;
+
+ $value;
+}
+
+sub change_admin_password {
+
+ $form->{title} =
+ qq|Lx-Office ERP |
+ . $locale->text('Administration') . " / "
+ . $locale->text('Change Admin Password');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<h2>| . $locale->text('Change Admin Password') . qq|</h2>
+
+<form method=post action=$form->{script}>
+
+<b>|
+ . $locale->text('Password')
+ . qq|</b> <input type=password name=password size=8>
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+
+<p>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Change Password') . qq|">
+
+</form>
+
+</body>
+</html>
+|;
+
+}
+
+sub change_password {
+
+ $root->{password} = $form->{password};
+
+ $root->{'root login'} = 1;
+ $root->save_member($memberfile);
+
+ $form->{callback} =
+ "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+
+ $form->redirect($locale->text('Password changed!'));
+
+}
+
+sub check_password {
+
+ $root = new User "$memberfile", $form->{root};
+
+ if ($root->{password}) {
+ if ($root->{password} ne $form->{rpw}) {
+ $form->error($locale->text('Incorrect Password!'));
+ }
+ }
+
+}
+
+sub pg_database_administration {
+
+ $form->{dbdriver} = 'Pg';
+ &dbselect_source;
+
+}
+
+sub oracle_database_administration {
+
+ $form->{dbdriver} = 'Oracle';
+ &dbselect_source;
+
+}
+
+sub dbdriver_defaults {
+
+ # load some defaults for the selected driver
+ %driverdefaults = (
+ 'Pg' => { dbport => '5432',
+ dbuser => 'postgres',
+ dbdefault => 'template1',
+ dbhost => 'localhost',
+ connectstring => $locale->text('Connect to')
+ },
+ 'Oracle' => { dbport => '1521',
+ dbuser => 'oralin',
+ dbdefault => $sid,
+ dbhost => `hostname`,
+ connectstring => 'SID'
+ });
+
+ map { $form->{$_} = $driverdefaults{ $form->{dbdriver} }{$_} }
+ keys %{ $driverdefaults{Pg} };
+
+}
+
+sub dbselect_source {
+
+ &dbdriver_defaults;
+
+ $msg{Pg} =
+ $locale->text(
+ 'Leave host and port field empty unless you want to make a remote connection.'
+ );
+ $msg{Oracle} =
+ $locale->text(
+ 'You must enter a host and port for local and remote connections!');
+
+ $form->{title} =
+ "Lx-Office ERP / " . $locale->text('Database Administration');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<center>
+<h2>$form->{title}</h2>
+
+<form method=post action=$form->{script}>
+
+<table>
+<tr><td>
+
+<table>
+
+ <tr class=listheading>
+ <th colspan=4>| . $locale->text('Database') . qq|</th>
+ </tr>
+
+<input type=hidden name=dbdriver value=$form->{dbdriver}>
+
+ <tr><td>
+ <table>
+
+ <tr>
+
+ <th align=right>| . $locale->text('Host') . qq|</th>
+ <td><input name=dbhost size=25 value=$form->{dbhost}></td>
+ <th align=right>| . $locale->text('Port') . qq|</th>
+ <td><input name=dbport size=5 value=$form->{dbport}></td>
+
+ </tr>
+
+ <tr>
+
+ <th align=right>| . $locale->text('User') . qq|</th>
+ <td><input name=dbuser size=10 value=$form->{dbuser}></td>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input type=password name=dbpasswd size=10></td>
+
+ </tr>
+
+ <tr>
+
+ <th align=right>$form->{connectstring}</th>
+ <td colspan=3><input name=dbdefault size=10 value=$form->{dbdefault}></td>
+
+ </tr>
+
+</table>
+
+</td></tr>
+</table>
+
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+
+<br>
+
+<input type=submit class=submit name=action value="|
+ . $locale->text('Create Dataset') . qq|">
+<input type=submit class=submit name=action value="|
+ . $locale->text('Update Dataset') . qq|">
+<input type=submit class=submit name=action value="|
+ . $locale->text('Delete Dataset') . qq|">
+
+</form>
+
+</td></tr>
+</table>
+
+<p>|
+ . $locale->text(
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!'
+ )
+
+ . qq|
+<br>$msg{$form->{dbdriver}}
+
+
+</body>
+</html>
+|;
+
+}
+
+sub continue {
+
+ &{ $form->{nextsub} };
+
+}
+
+sub update_dataset {
+
+ %needsupdate = User->dbneedsupdate(\%$form);
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Database Administration') . " / "
+ . $locale->text('Update Dataset');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<center>
+<h2>$form->{title}</h2>
+|;
+
+ foreach $key (sort keys %needsupdate) {
+ if ($needsupdate{$key} ne $form->{dbversion}) {
+ $upd .= qq|<input name="db$key" type=checkbox value=1 checked> $key\n|;
+ $form->{dbupdate} .= "db$key ";
+ }
+ }
+
+ chop $form->{dbupdate};
+
+ if ($form->{dbupdate}) {
+
+ print qq|
+<table width=100%>
+<form method=post action=$form->{script}>
+
+<input type=hidden name=dbdriver value=$form->{dbdriver}>
+<input type=hidden name=dbhost value=$form->{dbhost}>
+<input type=hidden name=dbport value=$form->{dbport}>
+<input type=hidden name=dbuser value=$form->{dbuser}>
+<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
+<input type=hidden name=dbdefault value=$form->{dbdefault}>
+
+<tr class=listheading>
+ <th>| . $locale->text('The following Datasets need to be updated') . qq|</th>
+</tr>
+<tr>
+<td>
+
+$upd
+
+</td>
+</tr>
+<tr>
+<td>
+
+<input name=dbupdate type=hidden value="$form->{dbupdate}">
+
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+
+<input type=hidden name=nextsub value=dbupdate>
+
+<hr size=3 noshade>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</td></tr>
+</table>
+</form>
+|;
+
+ } else {
+
+ print $locale->text('All Datasets up to date!');
+
+ }
+
+ print qq|
+
+</body>
+</html>
+|;
+
+}
+
+sub dbupdate {
+
+ User->dbupdate(\%$form);
+
+ $form->redirect($locale->text('Dataset updated!'));
+
+}
+
+sub create_dataset {
+
+ foreach $item (sort User->dbsources(\%$form)) {
+ $dbsources .= "[$item] ";
+ }
+
+ opendir SQLDIR, "sql/." or $form - error($!);
+ foreach $item (sort grep /-chart\.sql/, readdir SQLDIR) {
+ next if ($item eq 'Default-chart.sql');
+ $item =~ s/-chart\.sql//;
+ push @charts,
+ qq| <input name=chart class=radio type=radio value="$item"> $item|;
+ }
+ closedir SQLDIR;
+
+ $selectencoding = qq|<option>
+ <option value=SQL_ASCII>ASCII
+ <option value=EUC_JP>Japanese Extended UNIX Code
+ <option value=EUC_CN>Chinese Extended UNIX Code
+ <option value=EUC_KR>Korean Extended UNIX Code
+ <option value=EUC_TW>Taiwan Extended UNIX Code
+ <option value=UNICODE>UTF-8 Unicode
+ <option value=MULE_INTERNAL>Mule internal type
+ <option value=LATIN1>ISO 8859-1
+ <option value=LATIN2>ISO 8859-2
+ <option value=LATIN3>ISO 8859-3
+ <option value=LATIN4>ISO 8859-4
+ <option value=LATIN5>ISO 8859-5
+ <option value=KOI8>KOI8-R
+ <option value=WIN>Windows CP1251
+ <option value=ALT>Windows CP866
+ |;
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Database Administration') . " / "
+ . $locale->text('Create Dataset');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<center>
+<h2>$form->{title}</h2>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr class=listheading>
+ <th colspan=2> </th>
+ </tr>
+
+ <tr>
+
+ <th align=right nowrap>| . $locale->text('Existing Datasets') . qq|</th>
+ <td>$dbsources</td>
+
+ </tr>
+
+ <tr>
+
+ <th align=right nowrap>| . $locale->text('Create Dataset') . qq|</th>
+ <td><input name=db></td>
+
+ </tr>
+
+ <tr>
+
+ <th align=right nowrap>| . $locale->text('Multibyte Encoding') . qq|</th>
+ <td><select name=encoding>$selectencoding</select></td>
+
+ </tr>
+
+ <tr>
+
+ <th align=right nowrap>|
+ . $locale->text('Create Chart of Accounts')
+ . qq|</th>
+ <td>@charts</td>
+
+ </tr>
+
+ <tr><td colspan=2>
+<p>
+<input type=hidden name=dbdriver value=$form->{dbdriver}>
+<input type=hidden name=dbuser value=$form->{dbuser}>
+<input type=hidden name=dbhost value=$form->{dbhost}>
+<input type=hidden name=dbport value=$form->{dbport}>
+<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
+<input type=hidden name=dbdefault value=$form->{dbdefault}>
+
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=rpw value=$form->{rpw}>
+
+<input type=hidden name=nextsub value=dbcreate>
+
+<hr size=3 noshade>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+ </td></tr>
+</table>
+
+</form>
+
+
+</body>
+</html>
+|;
+
+}
+
+sub dbcreate {
+
+ $form->isblank("db", $locale->text('Dataset missing!'));
+
+ User->dbcreate(\%$form);
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Database Administration') . " / "
+ . $locale->text('Create Dataset');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<center>
+<h2>$form->{title}</h2>
+
+<form method=post action=$form->{script}>|
+
+ . $locale->text('Dataset')
+ . " $form->{db} "
+ . $locale->text('successfully created!')
+
+ . qq|
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value="$form->{path}">
+<input type=hidden name=rpw value="$form->{rpw}">
+
+<input type=hidden name=nextsub value=list_users>
+
+<p><input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+
+</body>
+</html>
+|;
+
+}
+
+sub delete_dataset {
+
+ if (@dbsources = User->dbsources_unused(\%$form, $memberfile)) {
+ foreach $item (sort @dbsources) {
+ $dbsources .=
+ qq|<input name=db class=radio type=radio value=$item> $item |;
+ }
+ } else {
+ $form->error($locale->text('Nothing to delete!'));
+ }
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Database Administration') . " / "
+ . $locale->text('Delete Dataset');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+<h2>$form->{title}</h2>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr class=listheading>
+ <th>|
+ . $locale->text('The following Datasets are not in use and can be deleted')
+ . qq|</th>
+ </tr>
+
+ <tr>
+ <td>
+ $dbsources
+ </td>
+ </tr>
+
+ <tr><td>
+<p>
+<input type=hidden name=dbdriver value=$form->{dbdriver}>
+<input type=hidden name=dbuser value=$form->{dbuser}>
+<input type=hidden name=dbhost value=$form->{dbhost}>
+<input type=hidden name=dbport value=$form->{dbport}>
+<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
+<input type=hidden name=dbdefault value=$form->{dbdefault}>
+
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value="$form->{path}">
+<input type=hidden name=rpw value="$form->{rpw}">
+
+<input type=hidden name=nextsub value=dbdelete>
+
+<hr size=3 noshade>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+ </td></tr>
+</table>
+
+</form>
+
+</body>
+</html>
+|;
+
+}
+
+sub dbdelete {
+
+ if (!$form->{db}) {
+ $form->error($locale->text('No Dataset selected!'));
+ }
+
+ User->dbdelete(\%$form);
+
+ $form->{title} =
+ "Lx-Office ERP "
+ . $locale->text('Database Administration') . " / "
+ . $locale->text('Delete Dataset');
+
+ $form->header;
+
+ print qq|
+<body class=admin>
+
+
+<center>
+<h2>$form->{title}</h2>
+
+<form method=post action=$form->{script}>
+
+$form->{db} | . $locale->text('successfully deleted!')
+
+ . qq|
+
+<input type=hidden name=root value="$form->{root}">
+<input type=hidden name=path value="$form->{path}">
+<input type=hidden name=rpw value="$form->{rpw}">
+
+<input type=hidden name=nextsub value=list_users>
+
+<p><input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+
+</body>
+</html>
+|;
+
+}
+
+sub unlock_system {
+
+ unlink "$userspath/nologin";
+
+ $form->{callback} =
+ "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+
+ $form->redirect($locale->text('Lockfile removed!'));
+
+}
+
+sub lock_system {
+
+ open(FH, ">$userspath/nologin")
+ or $form->error($locale->text('Cannot create Lock!'));
+ close(FH);
+
+ $form->{callback} =
+ "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+
+ $form->redirect($locale->text('Lockfile created!'));
+
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# administration
+#
+#======================================================================
+
+use SL::AM;
+use SL::CA;
+use SL::Form;
+use SL::User;
+
+1;
+
+# end of main
+
+sub add { &{"add_$form->{type}"} }
+sub edit { &{"edit_$form->{type}"} }
+sub save { &{"save_$form->{type}"} }
+sub delete { &{"delete_$form->{type}"} }
+
+sub add_account {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+ $form->{charttype} = "A";
+ AM->get_account(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &account_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_account {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+ AM->get_account(\%myconfig, \%$form);
+
+ foreach my $item (split(/:/, $form->{link})) {
+ $form->{$item} = "checked";
+ }
+
+ &account_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub account_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Account");
+
+ $checked{ $form->{charttype} } = "checked";
+ $checked{"$form->{category}_"} = "checked";
+ $checked{CT_tax} = ($form->{CT_tax}) ? "" : "checked";
+
+ $form->{description} =~ s/\"/"/g;
+
+ if (@{ $form->{TAXKEY} }) {
+ $form->{selecttaxkey} = "<option value=0>Keine Steuer 0%\n";
+ foreach $item (@{ $form->{TAXKEY} }) {
+ if ($item->{taxkey} == $form->{taxkey_id}) {
+ $form->{selecttaxkey} .=
+ "<option value=$item->{taxkey} selected>$item->{taxdescription}\n";
+ } else {
+ $form->{selecttaxkey} .=
+ "<option value=$item->{taxkey}>$item->{taxdescription}\n";
+ }
+
+ }
+ }
+
+ $taxkey = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxkey_id>$form->{selecttaxkey}</select></td>
+ <input type=hidden name=selecttaxkey value="$form->{selecttaxkey}">
+ </tr>|;
+
+ $form->{selectustva} = "<option>\n";
+ %ustva = (48 => "Steuerfrei, Zeile 48",
+ 51 => "Steuerpflichtig 16%, Zeile 51",
+ 86 => "Steuerpflichtig 7%, Zeile 86",
+ 91 => "Steuerfrei, Zeile 91",
+ 97 => "Steuerpflichtig 16%, Zeile 97",
+ 93 => "Steuerpflichtig 7%, Zeile 93",
+ 94 => "Steuerpflichtig 16%, Zeile 94",
+ 66 => "Vorsteuer, Zeile 66");
+ foreach $item (sort({ $a <=> $b } keys %ustva)) {
+ if ($item == $form->{pos_ustva}) {
+ $form->{selectustva} .= "<option value=$item selected>$ustva{$item}\n";
+ } else {
+ $form->{selectustva} .= "<option value=$item>$ustva{$item}\n";
+ }
+
+ }
+
+ $ustva = qq|
+ <tr>
+ <th align=right>| . $locale->text('Umsatzsteuervoranmeldung') . qq|</th>
+ <td><select name=pos_ustva>$form->{selectustva}</select></td>
+ <input type=hidden name=selectustva value="$form->{selectustva}">
+ </tr>|;
+
+ $form->{selecteur} = "<option>\n";
+ %eur = (1 => "Umsatzerlöse",
+ 2 => "sonstige Erlöse",
+ 3 => "Privatanteile",
+ 4 => "Zinserträge",
+ 5 => "Ausserordentliche Erträge",
+ 6 => "Vereinnahmte Umsatzst.",
+ 7 => "Umsatzsteuererstattungen",
+ 8 => "Wareneingänge",
+ 9 => "Löhne und Gehälter",
+ 10 => "Gesetzl. sozialer Aufw.",
+ 11 => "Mieten",
+ 12 => "Gas, Strom, Wasser",
+ 13 => "Instandhaltung",
+ 14 => "Steuern, Versich., Beiträge",
+ 15 => "Kfz-Steuern",
+ 16 => "Kfz-Versicherungen",
+ 17 => "Sonst. Fahrtkosten",
+ 18 => "Werbe- und Reisekosten",
+ 19 => "Instandhaltung u. Werkzeuge",
+ 20 => "Fachzeitschriften, Bücher",
+ 21 => "Miete für Einrichtungen",
+ 22 => "Rechts- und Beratungskosten",
+ 23 => "Bürobedarf, Porto, Telefon",
+ 24 => "Sonstige Aufwendungen",
+ 25 => "Abschreibungen auf Anlagever.",
+ 26 => "Abschreibungen auf GWG",
+ 27 => "Vorsteuer",
+ 28 => "Umsatzsteuerzahlungen",
+ 29 => "Zinsaufwand",
+ 30 => "Ausserordentlicher Aufwand",
+ 31 => "Betriebliche Steuern");
+ foreach $item (sort({ $a <=> $b } keys(%eur))) {
+ if ($item == $form->{pos_eur}) {
+ $form->{selecteur} .= "<option value=$item selected>$eur{$item}\n";
+ } else {
+ $form->{selecteur} .= "<option value=$item>$eur{$item}\n";
+ }
+
+ }
+
+ $eur = qq|
+ <tr>
+ <th align=right>| . $locale->text('EÜR') . qq|</th>
+ <td><select name=pos_eur>$form->{selecteur}</select></td>
+ <input type=hidden name=selecteur value="$form->{selecteur}">
+ </tr>|;
+
+ $form->{selectbwa} = "<option>\n";
+
+ %bwapos = (1 => 'Umsatzerlöse',
+ 2 => 'Best.Verdg.FE/UE',
+ 3 => 'Aktiv.Eigenleistung',
+ 4 => 'Mat./Wareneinkauf',
+ 5 => 'So.betr.Erlöse',
+ 10 => 'Personalkosten',
+ 11 => 'Raumkosten',
+ 12 => 'Betriebl.Steuern',
+ 13 => 'Vers./Beiträge',
+ 14 => 'Kfz.Kosten o.St.',
+ 15 => 'Werbe-Reisek.',
+ 16 => 'Kosten Warenabgabe',
+ 17 => 'Abschreibungen',
+ 18 => 'Rep./instandhlt.',
+ 19 => 'Übrige Steuern',
+ 20 => 'Sonst.Kosten',
+ 30 => 'Zinsauwand',
+ 31 => 'Sonst.neutr.Aufw.',
+ 32 => 'Zinserträge',
+ 33 => 'Sonst.neutr.Ertrag',
+ 34 => 'Verr.kalk.Kosten',
+ 35 => 'Steuern Eink.u.Ertr.');
+ foreach $item (sort({ $a <=> $b } keys %bwapos)) {
+ if ($item == $form->{pos_bwa}) {
+ $form->{selectbwa} .= "<option value=$item selected>$bwapos{$item}\n";
+ } else {
+ $form->{selectbwa} .= "<option value=$item>$bwapos{$item}\n";
+ }
+
+ }
+
+ $bwa = qq|
+ <tr>
+ <th align=right>| . $locale->text('BWA') . qq|</th>
+ <td><select name=pos_bwa>$form->{selectbwa}</select></td>
+ <input type=hidden name=selectbwa value="$form->{selectbwa}">
+ </tr>|;
+
+ $form->{selectbilanz} = "<option>\n";
+ foreach $item ((1, 2, 3, 4)) {
+ if ($item == $form->{pos_bilanz}) {
+ $form->{selectbilanz} .= "<option value=$item selected>$item\n";
+ } else {
+ $form->{selectbilanz} .= "<option value=$item>$item\n";
+ }
+
+ }
+
+ $bilanz = qq|
+ <tr>
+ <th align=right>| . $locale->text('Bilanz') . qq|</th>
+ <td><select name=pos_bilanz>$form->{selectbilanz}</select></td>
+ <input type=hidden name=selectbilanz value="$form->{selectbilanz}">
+ </tr>|;
+
+ # this is for our parser only!
+ # type=submit $locale->text('Add Account')
+ # type=submit $locale->text('Edit Account')
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=account>
+
+<input type=hidden name=inventory_accno_id value=$form->{inventory_accno_id}>
+<input type=hidden name=income_accno_id value=$form->{income_accno_id}>
+<input type=hidden name=expense_accno_id value=$form->{expense_accno_id}>
+<input type=hidden name=fxgain_accno_id values=$form->{fxgain_accno_id}>
+<input type=hidden name=fxloss_accno_id values=$form->{fxloss_accno_id}>
+
+<table border=0 width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Account Number') . qq|</th>
+ <td><input name=accno size=20 value=$form->{accno}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description size=40 value="$form->{description}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Account Type') . qq|</th>
+ <td>
+ <table>
+ <tr valign=top>
+ <td><input name=category type=radio class=radio value=A $checked{A_}> |
+ . $locale->text('Asset')
+ . qq|\n<br>
+ <input name=category type=radio class=radio value=L $checked{L_}> |
+ . $locale->text('Liability')
+ . qq|\n<br>
+ <input name=category type=radio class=radio value=Q $checked{Q_}> |
+ . $locale->text('Equity')
+ . qq|\n<br>
+ <input name=category type=radio class=radio value=I $checked{I_}> |
+ . $locale->text('Revenue')
+ . qq|\n<br>
+ <input name=category type=radio class=radio value=E $checked{E_}> |
+ . $locale->text('Expense')
+ . qq|</td>
+ <td width=50> </td>
+ <td>
+ <input name=charttype type=radio class=radio value="H" $checked{H}> |
+ . $locale->text('Heading') . qq|<br>
+ <input name=charttype type=radio class=radio value="A" $checked{A}> |
+ . $locale->text('Account')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ if ($form->{charttype} eq "A") {
+ print qq|
+ <tr>
+ <td colspan=2>
+ <table>
+ <tr>
+ <th align=left>|
+ . $locale->text('Is this a summary account to record')
+ . qq|</th>
+ <td>
+ <input name=AR type=checkbox class=checkbox value=AR $form->{AR}> |
+ . $locale->text('AR')
+ . qq| <input name=AP type=checkbox class=checkbox value=AP $form->{AP}> |
+ . $locale->text('AP')
+ . qq| <input name=IC type=checkbox class=checkbox value=IC $form->{IC}> |
+ . $locale->text('Inventory')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=2>| . $locale->text('Include in drop-down menus') . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td colspan=2>
+ <table width=100%>
+ <tr>
+ <th align=left>| . $locale->text('Receivables') . qq|</th>
+ <th align=left>| . $locale->text('Payables') . qq|</th>
+ <th align=left>| . $locale->text('Parts Inventory') . qq|</th>
+ <th align=left>| . $locale->text('Service Items') . qq|</th>
+ </tr>
+ <tr>
+ <td>
+ <input name=AR_amount type=checkbox class=checkbox value=AR_amount $form->{AR_amount}> |
+ . $locale->text('Revenue')
+ . qq|\n<br>
+ <input name=AR_paid type=checkbox class=checkbox value=AR_paid $form->{AR_paid}> |
+ . $locale->text('Receipt')
+ . qq|\n<br>
+ <input name=AR_tax type=checkbox class=checkbox value=AR_tax $form->{AR_tax}> |
+ . $locale->text('Tax') . qq|
+ </td>
+ <td>
+ <input name=AP_amount type=checkbox class=checkbox value=AP_amount $form->{AP_amount}> |
+ . $locale->text('Expense/Asset')
+ . qq|\n<br>
+ <input name=AP_paid type=checkbox class=checkbox value=AP_paid $form->{AP_paid}> |
+ . $locale->text('Payment')
+ . qq|\n<br>
+ <input name=AP_tax type=checkbox class=checkbox value=AP_tax $form->{AP_tax}> |
+ . $locale->text('Tax') . qq|
+ </td>
+ <td>
+ <input name=IC_sale type=checkbox class=checkbox value=IC_sale $form->{IC_sale}> |
+ . $locale->text('Revenue')
+ . qq|\n<br>
+ <input name=IC_cogs type=checkbox class=checkbox value=IC_cogs $form->{IC_cogs}> |
+ . $locale->text('COGS')
+ . qq|\n<br>
+ <input name=IC_taxpart type=checkbox class=checkbox value=IC_taxpart $form->{IC_taxpart}> |
+ . $locale->text('Tax') . qq|
+ </td>
+ <td>
+ <input name=IC_income type=checkbox class=checkbox value=IC_income $form->{IC_income}> |
+ . $locale->text('Revenue')
+ . qq|\n<br>
+ <input name=IC_expense type=checkbox class=checkbox value=IC_expense $form->{IC_expense}> |
+ . $locale->text('Expense')
+ . qq|\n<br>
+ <input name=IC_taxservice type=checkbox class=checkbox value=IC_taxservice $form->{IC_taxservice}> |
+ . $locale->text('Tax') . qq|
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ }
+
+ print qq|
+ $taxkey
+ $ustva
+ $eur
+ $bwa
+ $bilanz
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">
+|;
+
+ if ($form->{id} && $form->{orphaned}) {
+ print qq|<input type=submit class=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_account {
+ $lxdebug->enter_sub();
+
+ $form->isblank("accno", $locale->text('Account Number missing!'));
+ $form->isblank("category", $locale->text('Account Type missing!'));
+
+ $form->redirect($locale->text('Account saved!'))
+ if (AM->save_account(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot save account!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub list_account {
+ $lxdebug->enter_sub();
+
+ CA->all_accounts(\%myconfig, \%$form);
+
+ $form->{title} = $locale->text('Chart of Accounts');
+
+ # construct callback
+ $callback =
+ "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ @column_index = qw(accno gifi_accno description debit credit link);
+
+ $column_header{accno} = qq|<th>| . $locale->text('Account') . qq|</a></th>|;
+ $column_header{gifi_accno} =
+ qq|<th>| . $locale->text('GIFI') . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th>| . $locale->text('Description') . qq|</a></th>|;
+ $column_header{debit} = qq|<th>| . $locale->text('Debit') . qq|</a></th>|;
+ $column_header{credit} = qq|<th>| . $locale->text('Credit') . qq|</a></th>|;
+ $column_header{link} = qq|<th>| . $locale->text('Link') . qq|</a></th>|;
+
+ $form->header;
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr height=5></tr>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+</tr>
+|;
+
+ # escape callback
+ $callback = $form->escape($callback);
+
+ foreach $ca (@{ $form->{CA} }) {
+
+ $ca->{debit} = " ";
+ $ca->{credit} = " ";
+
+ if ($ca->{amount} > 0) {
+ $ca->{credit} =
+ $form->format_amount(\%myconfig, $ca->{amount}, 2, " ");
+ }
+ if ($ca->{amount} < 0) {
+ $ca->{debit} =
+ $form->format_amount(\%myconfig, -$ca->{amount}, 2, " ");
+ }
+
+ $ca->{link} =~ s/:/<br>/og;
+
+ if ($ca->{charttype} eq "H") {
+ print qq|<tr class=listheading>|;
+
+ $column_data{accno} =
+ qq|<th><a href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</a></th>|;
+ $column_data{gifi_accno} =
+ qq|<th><a href=$form->{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno}</a> </th>|;
+ $column_data{description} = qq|<th>$ca->{description} </th>|;
+ $column_data{debit} = qq|<th> </th>|;
+ $column_data{credit} = qq| <th> </th>|;
+ $column_data{link} = qq|<th> </th>|;
+
+ } else {
+ $i++;
+ $i %= 2;
+ print qq|
+<tr valign=top class=listrow$i>|;
+ $column_data{accno} =
+ qq|<td><a href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</a></td>|;
+ $column_data{gifi_accno} =
+ qq|<td><a href=$form->{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno}</a> </td>|;
+ $column_data{description} = qq|<td>$ca->{description} </td>|;
+ $column_data{debit} = qq|<td align=right>$ca->{debit}</td>|;
+ $column_data{credit} = qq|<td align=right>$ca->{credit}</td>|;
+ $column_data{link} = qq|<td>$ca->{link} </td>|;
+
+ }
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print "</tr>\n";
+ }
+
+ print qq|
+ <tr><td colspan=$colspan><hr size=3 noshade></td></tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_account {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Delete Account');
+
+ foreach $id (
+ qw(inventory_accno_id income_accno_id expense_accno_id fxgain_accno_id fxloss_accno_id)
+ ) {
+ if ($form->{id} == $form->{$id}) {
+ $form->error($locale->text('Cannot delete default account!'));
+ }
+ }
+
+ $form->redirect($locale->text('Account deleted!'))
+ if (AM->delete_account(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot delete account!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub list_gifi {
+ $lxdebug->enter_sub();
+
+ @{ $form->{fields} } = (accno, description);
+ $form->{table} = "gifi";
+ $form->{sortorder} = "accno";
+
+ AM->gifi_accounts(\%myconfig, \%$form);
+
+ $form->{title} = $locale->text('GIFI');
+
+ # construct callback
+ $callback =
+ "$form->{script}?action=list_gifi&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ @column_index = qw(accno description);
+
+ $column_header{accno} = qq|<th>| . $locale->text('GIFI') . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th>| . $locale->text('Description') . qq|</a></th>|;
+
+ $form->header;
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+</tr>
+|;
+
+ # escape callback
+ $callback = $form->escape($callback);
+
+ foreach $ca (@{ $form->{ALL} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+<tr valign=top class=listrow$i>|;
+
+ $column_data{accno} =
+ qq|<td><a href=$form->{script}?action=edit_gifi&coa=1&accno=$ca->{accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</td>|;
+ $column_data{description} = qq|<td>$ca->{description} </td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print "</tr>\n";
+ }
+
+ print qq|
+ <tr>
+ <td colspan=$colspan><hr size=3 noshade></td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub add_gifi {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ # construct callback
+ $form->{callback} =
+ "$form->{script}?action=list_gifi&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $form->{coa} = 1;
+
+ &gifi_header;
+ &gifi_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_gifi {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_gifi(\%myconfig, \%$form);
+
+ &gifi_header;
+ &gifi_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub gifi_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} GIFI");
+
+ # $locale->text('Add GIFI')
+ # $locale->text('Edit GIFI')
+
+ $form->{description} =~ s/\"/"/g;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{accno}>
+<input type=hidden name=type value=gifi>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('GIFI') . qq|</th>
+ <td><input name=accno size=20 value=$form->{accno}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description size=60 value="$form->{description}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub gifi_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br><input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">|;
+
+ if ($form->{coa}) {
+ print qq|
+<input type=submit class=submit name=action value="|
+ . $locale->text('Copy to COA') . qq|">
+|;
+
+ if ($form->{accno} && $form->{orphaned}) {
+ print qq|<input type=submit class=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_gifi {
+ $lxdebug->enter_sub();
+
+ $form->isblank("accno", $locale->text('GIFI missing!'));
+ AM->save_gifi(\%myconfig, \%$form);
+ $form->redirect($locale->text('GIFI saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub copy_to_coa {
+ $lxdebug->enter_sub();
+
+ $form->isblank("accno", $locale->text('GIFI missing!'));
+
+ AM->save_gifi(\%myconfig, \%$form);
+
+ delete $form->{id};
+ $form->{gifi_accno} = $form->{accno};
+ $form->{title} = "Add";
+ $form->{charttype} = "A";
+
+ &account_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_gifi {
+ $lxdebug->enter_sub();
+
+ AM->delete_gifi(\%myconfig, \%$form);
+ $form->redirect($locale->text('GIFI deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub add_department {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+ $form->{role} = "P";
+
+ $form->{callback} =
+ "$form->{script}?action=add_department&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &department_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_department {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_department(\%myconfig, \%$form);
+
+ &department_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_department {
+ $lxdebug->enter_sub();
+
+ AM->departments(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_department&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Departments');
+
+ @column_index = qw(description cost profit);
+
+ $column_header{description} =
+ qq|<th class=listheading width=90%>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_header{cost} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Cost Center')
+ . qq|</th>|;
+ $column_header{profit} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Profit Center')
+ . qq|</th>|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (@{ $form->{ALL} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $costcenter = ($ref->{role} eq "C") ? "X" : "";
+ $profitcenter = ($ref->{role} eq "P") ? "X" : "";
+
+ $column_data{description} =
+ qq|<td><a href=$form->{script}?action=edit_department&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
+ $column_data{cost} = qq|<td align=center>$costcenter</td>|;
+ $column_data{profit} = qq|<td align=center>$profitcenter</td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=department>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+ </body>
+ </html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub department_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Department");
+
+ # $locale->text('Add Department')
+ # $locale->text('Edit Department')
+
+ $form->{description} =~ s/\"/"/g;
+
+ if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
+ $description =
+ qq|<textarea name="description" rows=$rows cols=60 wrap=soft>$form->{description}</textarea>|;
+ } else {
+ $description =
+ qq|<input name=description size=60 value="$form->{description}">|;
+ }
+
+ $costcenter = "checked" if $form->{role} eq "C";
+ $profitcenter = "checked" if $form->{role} eq "P";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=department>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td>$description</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type=radio style=radio name=role value="C" $costcenter> |
+ . $locale->text('Cost Center') . qq|
+ <input type=radio style=radio name=role value="P" $profitcenter> |
+ . $locale->text('Profit Center') . qq|
+ </td>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_department {
+ $lxdebug->enter_sub();
+
+ $form->isblank("description", $locale->text('Description missing!'));
+ AM->save_department(\%myconfig, \%$form);
+ $form->redirect($locale->text('Department saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_department {
+ $lxdebug->enter_sub();
+
+ AM->delete_department(\%myconfig, \%$form);
+ $form->redirect($locale->text('Department deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub add_business {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_business&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &business_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_business {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_business(\%myconfig, \%$form);
+
+ &business_header;
+
+ $form->{orphaned} = 1;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_business {
+ $lxdebug->enter_sub();
+
+ AM->business(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_business&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Type of Business');
+
+ @column_index = qw(description discount customernumberinit);
+
+ $column_header{description} =
+ qq|<th class=listheading width=60%>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_header{discount} =
+ qq|<th class=listheading width=10%>|
+ . $locale->text('Discount')
+ . qq| %</th>|;
+ $column_header{customernumberinit} =
+ qq|<th class=listheading>|
+ . $locale->text('Customernumberinit')
+ . qq|</th>|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (@{ $form->{ALL} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $discount =
+ $form->format_amount(\%myconfig, $ref->{discount} * 100, 1, " ");
+ $description =
+ ($ref->{salesman})
+ ? "<b>$ref->{description}</b>"
+ : "$ref->{description}";
+ $column_data{description} =
+ qq|<td><a href=$form->{script}?action=edit_business&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$description</td>|;
+ $column_data{discount} = qq|<td align=right>$discount</td>|;
+ $column_data{customernumberinit} =
+ qq|<td align=right>$ref->{customernumberinit}</td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=business>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+ </form>
+
+ </body>
+ </html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub business_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Business");
+ $form->{salesman} = "checked" if $form->{salesman};
+
+ # $locale->text('Add Business')
+ # $locale->text('Edit Business')
+
+ $form->{description} =~ s/\"/"/g;
+ $form->{discount} =
+ $form->format_amount(\%myconfig, $form->{discount} * 100);
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=business>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Type of Business') . qq|</th>
+ <td><input name=description size=30 value="$form->{description}"></td>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('Discount') . qq| %</th>
+ <td><input name=discount size=5 value=$form->{discount}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Customernumberinit') . qq|</th>
+ <td><input name=customernumberinit size=10 value=$form->{customernumberinit}></td>
+ </tr>
+ <tr>
+ <td align=right>| . $locale->text('Salesman') . qq|</td>
+ <td><input name=salesman class=checkbox type=checkbox value=1 $form->{salesman}></td>
+ </tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_business {
+ $lxdebug->enter_sub();
+
+ $form->isblank("description", $locale->text('Description missing!'));
+ AM->save_business(\%myconfig, \%$form);
+ $form->redirect($locale->text('Business saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_business {
+ $lxdebug->enter_sub();
+
+ AM->delete_business(\%myconfig, \%$form);
+ $form->redirect($locale->text('Business deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub add_sic {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &sic_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_sic {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_sic(\%myconfig, \%$form);
+
+ &sic_header;
+
+ $form->{orphaned} = 1;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_sic {
+ $lxdebug->enter_sub();
+
+ AM->sic(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Standard Industrial Codes');
+
+ @column_index = qw(code description);
+
+ $column_header{code} =
+ qq|<th class=listheading>| . $locale->text('Code') . qq|</th>|;
+ $column_header{description} =
+ qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (@{ $form->{ALL} }) {
+
+ $i++;
+ $i %= 2;
+
+ if ($ref->{sictype} eq 'H') {
+ print qq|
+ <tr valign=top class=listheading>
+|;
+ $column_data{code} =
+ qq|<th><a href=$form->{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}</th>|;
+ $column_data{description} = qq|<th>$ref->{description}</th>|;
+
+ } else {
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $column_data{code} =
+ qq|<td><a href=$form->{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{code}</td>|;
+ $column_data{description} = qq|<td>$ref->{description}</td>|;
+
+ }
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=sic>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+ </body>
+ </html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub sic_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} SIC");
+
+ # $locale->text('Add SIC')
+ # $locale->text('Edit SIC')
+
+ $form->{code} =~ s/\"/"/g;
+ $form->{description} =~ s/\"/"/g;
+
+ $checked = ($form->{sictype} eq 'H') ? "checked" : "";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=type value=sic>
+<input type=hidden name=id value=$form->{code}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Code') . qq|</th>
+ <td><input name=code size=10 value=$form->{code}></td>
+ <tr>
+ <tr>
+ <td></td>
+ <th align=left><input name=sictype type=checkbox style=checkbox value="H" $checked> |
+ . $locale->text('Heading')
+ . qq|</th>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description size=60 value="$form->{description}"></td>
+ </tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_sic {
+ $lxdebug->enter_sub();
+
+ $form->isblank("code", $locale->text('Code missing!'));
+ $form->isblank("description", $locale->text('Description missing!'));
+ AM->save_sic(\%myconfig, \%$form);
+ $form->redirect($locale->text('SIC saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_sic {
+ $lxdebug->enter_sub();
+
+ AM->delete_sic(\%myconfig, \%$form);
+ $form->redirect($locale->text('SIC deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub display_stylesheet {
+ $lxdebug->enter_sub();
+
+ $form->{file} = "css/$myconfig{stylesheet}";
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ $form->{file} =~ s/^(.:)*?\/|\.\.\///g;
+ $form->{file} =~ s/^\/*//g;
+ $form->{file} =~ s/$userspath//;
+
+ $form->error("$!: $form->{file}") unless -f $form->{file};
+
+ AM->load_template(\%$form);
+
+ $form->{title} = $form->{file};
+
+ # if it is anything but html
+ if ($form->{file} !~ /\.html$/) {
+ $form->{body} = "<pre>\n$form->{body}\n</pre>";
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+$form->{body}
+
+<form method=post action=$form->{script}>
+
+<input name=file type=hidden value=$form->{file}>
+<input name=type type=hidden value=template>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input name=action type=submit class=submit value="|
+ . $locale->text('Edit') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_template {
+ $lxdebug->enter_sub();
+
+ AM->load_template(\%$form);
+
+ $form->{title} = $locale->text('Edit Template');
+
+ # convert   to &nbsp;
+ $form->{body} =~ s/ /&nbsp;/gi;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input name=file type=hidden value=$form->{file}>
+<input name=type type=hidden value=template>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input name=callback type=hidden value="$form->{script}?action=display_form&file=$form->{file}&path=$form->{path}&login=$form->{login}&password=$form->{password}">
+
+<textarea name=body rows=25 cols=70>
+$form->{body}
+</textarea>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print q|
+ </form>
+
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_template {
+ $lxdebug->enter_sub();
+
+ AM->save_template(\%$form);
+ $form->redirect($locale->text('Template saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub config {
+ $lxdebug->enter_sub();
+
+ # get defaults for account numbers and last numbers
+ AM->defaultaccounts(\%myconfig, \%$form);
+
+ foreach $item (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)) {
+ $dateformat .=
+ ($item eq $myconfig{dateformat})
+ ? "<option selected>$item\n"
+ : "<option>$item\n";
+ }
+
+ foreach $item (qw(1,000.00 1000.00 1.000,00 1000,00)) {
+ $numberformat .=
+ ($item eq $myconfig{numberformat})
+ ? "<option selected>$item\n"
+ : "<option>$item\n";
+ }
+
+ foreach $item (qw(name company address signature)) {
+ $myconfig{$item} =~ s/\"/"/g;
+ }
+
+ foreach $item (qw(address signature)) {
+ $myconfig{$item} =~ s/\\n/\r\n/g;
+ }
+
+ %countrycodes = User->country_codes;
+ $countrycodes = '';
+ foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
+ keys %countrycodes) {
+ $countrycodes .=
+ ($myconfig{countrycode} eq $key)
+ ? "<option selected value=$key>$countrycodes{$key}\n"
+ : "<option value=$key>$countrycodes{$key}\n";
+ }
+ $countrycodes = "<option>American English\n$countrycodes";
+
+ foreach $key (keys %{ $form->{IC} }) {
+ foreach $accno (sort keys %{ $form->{IC}{$key} }) {
+ $myconfig{$key} .=
+ ($form->{IC}{$key}{$accno}{id} == $form->{defaults}{$key})
+ ? "<option selected>$accno--$form->{IC}{$key}{$accno}{description}\n"
+ : "<option>$accno--$form->{IC}{$key}{$accno}{description}\n";
+ }
+ }
+
+ opendir CSS, "css/.";
+ @all = grep /.*\.css$/, readdir CSS;
+ closedir CSS;
+
+ foreach $item (@all) {
+ if ($item eq $myconfig{stylesheet}) {
+ $selectstylesheet .= qq|<option selected>$item\n|;
+ } else {
+ $selectstylesheet .= qq|<option>$item\n|;
+ }
+ }
+ $selectstylesheet .= "<option>\n";
+
+ $form->{title} = $locale->text('Edit Preferences for') . qq| $form->{login}|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=old_password value=$myconfig{password}>
+<input type=hidden name=type value=preferences>
+<input type=hidden name=role value=$myconfig{role}>
+
+<table width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Name') . qq|</th>
+ <td><input name=name size=15 value="$myconfig{name}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input type=password name=new_password size=10 value=$myconfig{password}></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email size=30 value="$myconfig{email}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Signature') . qq|</th>
+ <td><textarea name=signature rows=3 cols=50>$myconfig{signature}</textarea></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Phone') . qq|</th>
+ <td><input name=tel size=14 value="$myconfig{tel}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Fax') . qq|</th>
+ <td><input name=fax size=14 value="$myconfig{fax}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Company') . qq|</th>
+ <td><input name=company size=30 value="$myconfig{company}"></td>
+ </tr>
+ <tr valign=top>
+ <th align=right>| . $locale->text('Address') . qq|</th>
+ <td><textarea name=address rows=4 cols=50>$myconfig{address}</textarea></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Date Format') . qq|</th>
+ <td><select name=dateformat>$dateformat</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Number Format') . qq|</th>
+ <td><select name=numberformat>$numberformat</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Dropdown Limit') . qq|</th>
+ <td><input name=vclimit size=10 value="$myconfig{vclimit}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Language') . qq|</th>
+ <td><select name=countrycode>$countrycodes</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Character Set') . qq|</th>
+ <td><input name=charset size=20 value="$myconfig{charset}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Stylesheet') . qq|</th>
+ <td><select name=usestylesheet>$selectstylesheet</select></td>
+ </tr>
+ <input name=printer type=hidden value="$myconfig{printer}">
+ <tr class=listheading>
+ <th colspan=2> </th>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Business Number') . qq|</th>
+ <td><input name=businessnumber size=25 value="$myconfig{businessnumber}"></td>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <table width=100%>
+ <tr>
+ <th align=right>| . $locale->text('Year End') . qq| (mm/dd)</th>
+ <td><input name=yearend size=5 value=$form->{defaults}{yearend}></td>
+ <th align=right>| . $locale->text('Weight Unit') . qq|</th>
+ <td><input name=weightunit size=5 value="$form->{defaults}{weightunit}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class=listheading>
+ <th colspan=2>|
+ . $locale->text('Last Numbers & Default Accounts')
+ . qq|</th>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Inventory Account') . qq|</th>
+ <td><select name=inventory_accno>$myconfig{IC}</select></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Revenue Account') . qq|</th>
+ <td><select name=income_accno>$myconfig{IC_income}</select></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Expense Account') . qq|</th>
+ <td><select name=expense_accno>$myconfig{IC_expense}</select></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Foreign Exchange Gain') . qq|</th>
+ <td><select name=fxgain_accno>$myconfig{FX_gain}</select></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Foreign Exchange Loss') . qq|</th>
+ <td><select name=fxloss_accno>$myconfig{FX_loss}</select></td>
+ </tr>
+ <tr>
+ <td colspan=2>|
+ . $locale->text(
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies'
+ )
+ . qq|<br><input name=curr size=40 value="$form->{defaults}{curr}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Last Invoice Number') . qq|</th>
+ <td><input name=invnumber size=10 value=$form->{defaults}{invnumber}></td>
+ <th align=right nowrap>|
+ . $locale->text('Last Customer Number')
+ . qq|</th>
+ <td><input name=customernumber size=10 value=$form->{defaults}{customernumber}></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Last Sales Order Number')
+ . qq|</th>
+ <td><input name=sonumber size=10 value=$form->{defaults}{sonumber}></td>
+ <th align=right nowrap>|
+ . $locale->text('Last Vendor Number')
+ . qq|</th>
+ <td><input name=vendornumber size=10 value=$form->{defaults}{vendornumber}></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Last Purchase Order Number')
+ . qq|</th>
+ <td><input name=ponumber size=10 value=$form->{defaults}{ponumber}></td>
+ <th align=right nowrap>|
+ . $locale->text('Last Article Number')
+ . qq|</th>
+ <td><input name=articlenumber size=10 value=$form->{defaults}{articlenumber}></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Last Sales Quotation Number')
+ . qq|</th>
+ <td><input name=sqnumber size=10 value=$form->{defaults}{sqnumber}></td>
+ <th align=right nowrap>|
+ . $locale->text('Last Service Number')
+ . qq|</th>
+ <td><input name=servicenumber size=10 value=$form->{defaults}{servicenumber}></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Last RFQ Number') . qq|</th>
+ <td><input name=rfqnumber size=10 value=$form->{defaults}{rfqnumber}></td>
+ <th align=right nowrap></th>
+ <td></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr class=listheading>
+ <th colspan=2>| . $locale->text('Tax Accounts') . qq|</th>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <table>
+ <tr>
+ <th> </th>
+ <th>| . $locale->text('Rate') . qq| (%)</th>
+ <th>| . $locale->text('Number') . qq|</th>
+ </tr>
+|;
+
+ foreach $accno (sort keys %{ $form->{taxrates} }) {
+ print qq|
+ <tr>
+ <th align=right>$form->{taxrates}{$accno}{description}</th>
+ <td><input name=$form->{taxrates}{$accno}{id} size=6 value=$form->{taxrates}{$accno}{rate}></td>
+ <td><input name="taxnumber_$form->{taxrates}{$accno}{id}" value="$form->{taxrates}{$accno}{taxnumber}"></td>
+ </tr>
+|;
+ $form->{taxaccounts} .= "$form->{taxrates}{$accno}{id} ";
+ }
+
+ chop $form->{taxaccounts};
+
+ print qq|
+<input name=taxaccounts type=hidden value="$form->{taxaccounts}">
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_preferences {
+ $lxdebug->enter_sub();
+
+ $form->{stylesheet} = $form->{usestylesheet};
+
+ $form->redirect($locale->text('Preferences saved!'))
+ if (
+ AM->save_preferences(\%myconfig, \%$form, $memberfile, $userspath, $webdav
+ ));
+ $form->error($locale->text('Cannot save preferences!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub backup {
+ $lxdebug->enter_sub();
+
+ if ($form->{media} eq 'email') {
+ $form->error($locale->text('No email address for') . " $myconfig{name}")
+ unless ($myconfig{email});
+
+ $form->{OUT} = "$sendmail";
+
+ }
+
+ AM->backup(\%myconfig, \%$form, $userspath);
+
+ if ($form->{media} eq 'email') {
+ $form->redirect($locale->text('Backup sent to') . qq| $myconfig{email}|);
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub audit_control {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Audit Control');
+
+ AM->closedto(\%myconfig, \%$form);
+
+ if ($form->{revtrans}) {
+ $checked{Y} = "checked";
+ } else {
+ $checked{N} = "checked";
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<table width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td>|
+ . $locale->text('Enforce transaction reversal for all dates')
+ . qq|</th>
+ <td><input name=revtrans class=radio type=radio value="1" $checked{Y}> |
+ . $locale->text('Yes')
+ . qq| <input name=revtrans class=radio type=radio value="0" $checked{N}> |
+ . $locale->text('No')
+ . qq|</td>
+ </tr>
+ <tr>
+ <th>| . $locale->text('Close Books up to') . qq|</th>
+ <td><input name=closedto size=11 title="$myconfig{dateformat}" value=$form->{closedto}></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<hr size=3 noshade>
+
+<br>
+<input type=hidden name=nextsub value=doclose>
+
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub doclose {
+ $lxdebug->enter_sub();
+
+ AM->closebooks(\%myconfig, \%$form);
+
+ if ($form->{revtrans}) {
+ $form->redirect(
+ $locale->text('Transaction reversal enforced for all dates'));
+ } else {
+ if ($form->{closedto}) {
+ $form->redirect(
+ $locale->text('Transaction reversal enforced up to') . " "
+ . $locale->date(\%myconfig, $form->{closedto}, 1));
+ } else {
+ $form->redirect($locale->text('Books are open'));
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub add_warehouse {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_warehouse&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &warehouse_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_warehouse {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_warehouse(\%myconfig, \%$form);
+
+ &warehouse_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_warehouse {
+ $lxdebug->enter_sub();
+
+ AM->warehouses(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_warehouse&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Warehouses');
+
+ @column_index = qw(description);
+
+ $column_header{description} =
+ qq|<th class=listheading width=100%>|
+ . $locale->text('Description')
+ . qq|</th>|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (@{ $form->{ALL} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $column_data{description} =
+ qq|<td><a href=$form->{script}?action=edit_warehouse&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=warehouse>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+ </body>
+ </html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub warehouse_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Warehouse");
+
+ # $locale->text('Add Warehouse')
+ # $locale->text('Edit Warehouse')
+
+ $form->{description} =~ s/\"/"/g;
+
+ if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
+ $description =
+ qq|<textarea name="description" rows=$rows cols=60 wrap=soft>$form->{description}</textarea>|;
+ } else {
+ $description =
+ qq|<input name=description size=60 value="$form->{description}">|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=warehouse>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td>$description</td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_warehouse {
+ $lxdebug->enter_sub();
+
+ $form->isblank("description", $locale->text('Description missing!'));
+ AM->save_warehouse(\%myconfig, \%$form);
+ $form->redirect($locale->text('Warehouse saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_warehouse {
+ $lxdebug->enter_sub();
+
+ AM->delete_warehouse(\%myconfig, \%$form);
+ $form->redirect($locale->text('Warehouse deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub continue {
+ $lxdebug->enter_sub();
+
+ &{ $form->{nextsub} };
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Accounts Payables
+#
+#======================================================================
+
+use SL::AP;
+use SL::IR;
+use SL::PE;
+
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &create_links;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ &create_links;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ &form_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub create_links {
+ $lxdebug->enter_sub();
+
+ $form->create_links("AP", \%myconfig, "vendor");
+ $taxincluded = $form->{taxincluded};
+ $duedate = $form->{duedate};
+
+ IR->get_vendor(\%myconfig, \%$form);
+
+ $form->{duedate} = $duedate if $duedate;
+ $form->{oldvendor} = "$form->{vendor}--$form->{vendor_id}";
+
+ # build the popup menus
+ $form->{taxincluded} = ($form->{id}) ? $form->{taxincluded} : "checked";
+
+ map {
+ $tax .=
+ qq|<option value=\"$_->{taxkey}--$_->{rate}\">$_->{taxdescription} |
+ . ($_->{rate} * 100) . qq| %|
+ } @{ $form->{TAX} };
+ $form->{taxchart} = $tax;
+ $form->{selecttaxchart} = $tax;
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $curr[0];
+
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ # vendors
+ if (@{ $form->{all_vendor} }) {
+ $form->{vendor} = qq|$form->{vendor}--$form->{vendor_id}|;
+ map { $form->{selectvendor} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_vendor} });
+ }
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $form->{employee} = "$form->{employee}--$form->{employee_id}";
+
+ # forex
+ $form->{forex} = $form->{exchangerate};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ foreach $key (keys %{ $form->{AP_links} }) {
+ foreach $ref (@{ $form->{AP_links}{$key} }) {
+ if ($key eq "AP_paid") {
+ $form->{"select$key"} .=
+ "<option value=\"$ref->{accno}\">$ref->{accno}--$ref->{description}</option>\n";
+ } else {
+ $form->{"select$key"} .=
+ "<option value=\"$ref->{accno}--$ref->{taxkey}\">$ref->{accno}--$ref->{description}</option>\n";
+ }
+ }
+
+ $form->{$key} = $form->{"select$key"};
+
+ # if there is a value we have an old entry
+ $j = 0;
+ for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
+
+ if ($key eq "AP_paid") {
+ $j++;
+ $form->{"AP_paid_$j"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"paid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{amount};
+ $form->{"datepaid_$j"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{transdate};
+ $form->{"source_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{source};
+ $form->{"memo_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{memo};
+
+ $form->{"forex_$j"} = $form->{"exchangerate_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{exchangerate};
+ $form->{"AP_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}";
+ $form->{paidaccounts}++;
+ } else {
+
+ $akey = $key;
+ $akey =~ s/AP_//;
+
+ if ($key eq "AP_tax") {
+ $form->{"${key}_$form->{acc_trans}{$key}->[$i-1]->{accno}"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"} =
+ $form->round_amount(
+ $form->{acc_trans}{$key}->[$i - 1]->{amount} / $exchangerate * -1,
+ 2);
+ if ($form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"} > 0) {
+ $totaltax +=
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"};
+ $taxrate +=
+ $form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"};
+ } else {
+ $totalwithholding +=
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"};
+ $withholdingrate +=
+ $form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"};
+ }
+ $formtax =
+ $form->round_amount(
+ $form->{acc_trans}{$key}->[$i - 1]->{amount} / $exchangerate,
+ 2) * -1;
+ } else {
+ $form->{"${akey}_$i"} =
+ $form->round_amount(
+ $form->{acc_trans}{$key}->[$i - 1]->{amount} / $exchangerate,
+ 2);
+ if ($akey eq 'amount') {
+ $form->{"${akey}_$i"} *= -1;
+ $totalamount += $form->{"${akey}_$i"};
+ $form->{taxrate} = $form->{acc_trans}{$key}->[$i - 1]->{rate};
+ $form->{rowcount}++;
+ $form->{"oldprojectnumber_$i"} = $form->{"projectnumber_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{projectnumber}";
+ $form->{"project_id_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{project_id}";
+ }
+ $form->{"${key}_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"select${key}"} =~
+ /(<option value=\"$form->{acc_trans}{$key}->[$i-1]->{accno}--[^\"]*\">$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}<\/option>\n)/;
+ $test = $1;
+ $form->{"select${key}"} = $1;
+ if ($akey eq 'amount') {
+ $form->{selecttaxchart} =~
+ /(<option value=\"$form->{acc_trans}{$key}->[$i-1]->{taxkey}--[^<]*)/;
+ $form->{selecttaxchart} = $1;
+ }
+ }
+ }
+ }
+ }
+
+ $form->{taxincluded} = $taxincluded if ($form->{id});
+ $form->{paidaccounts} = 1 if not defined $form->{paidaccounts};
+
+ if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {
+
+ # add tax to amounts and invtotal
+ for $i (1 .. 1) {
+ $taxamount =
+ ($totaltax + $totalwithholding) * $form->{"amount_$i"} / $totalamount;
+ $tax = $form->round_amount($taxamount, 2);
+ $diff += ($taxamount - $tax);
+ $form->{"amount_$i"} += $tax;
+ }
+ $form->{amount_1} += $form->round_amount($diff, 2);
+ }
+
+ # check if calculated is equal to stored
+ if ($form->{taxincluded} && $form->{taxrate} && $witholdingrate) {
+ if ($form->{"taxrate"} > 0) {
+ $taxamount =
+ $form->round_amount(
+ ($form->{amount_1} - ($form->{amount_1} / ($form->{taxrate} + 1))),
+ 2);
+ } else {
+ $taxamount =
+ $form->round_amount(
+ ($totalamount + $totaltax + $totalwithholding) * $withholdingrate /
+ (1 - $withholdingrate),
+ 2
+ ) * $form->{"taxrate"} / $withholdingrate;
+ }
+ } else {
+ $taxamount = $totalamount * $form->{"taxrate"};
+ }
+ $taxamount = $form->round_amount($taxamount, 2);
+ $form->{tax} = $taxamount;
+
+ $form->{tax} = $formtax;
+
+ $form->{invtotal} = $totalamount + $totaltax + $totalwithholding;
+ $form->{rowcount}++ if $form->{id};
+
+ $form->{locked} =
+ ($form->datetonum($form->{transdate}, \%myconfig) <=
+ $form->datetonum($form->{closedto}, \%myconfig));
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $title = $form->{title};
+ $form->{title} = $locale->text("$title Accounts Payables Transaction");
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+
+ # type=submit $locale->text('Add Accounts Payables Transaction')
+ # type=submit $locale->text('Edit Accounts Payables Transaction')
+
+ # set option selected
+ foreach $item (qw(vendor currency department)) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+ $readonly = ($form->{id}) ? "readonly" : "";
+
+ $form->{radier} =
+ ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
+ $readonly = ($form->{radier}) ? "" : $readonly;
+
+ map { $form->{$_} =~ s/\"/"/g } qw(AP_amount AP taxchart);
+
+ # format amounts
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} =
+ $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+
+ $exchangerate = qq|
+<input type=hidden name=forex value=$form->{forex}>
+|;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{forex}) {
+ $exchangerate .= qq|
+ <tr>
+ <th align=right>| . $locale->text('Exchangerate') . qq|</th>
+ <td><input type=hidden name=exchangerate value=$form->{exchangerate}>$form->{exchangerate}</td>
+ </tr>
+|;
+ } else {
+ $exchangerate .= qq|
+ <th align=right>| . $locale->text('Exchangerate') . qq|</th>
+ <td><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+|;
+ }
+ }
+
+ $taxincluded = "";
+
+ $taxincluded = qq|
+ <tr>
+ <td align=right><input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}></td>
+ <th align=left nowrap>|
+ . $locale->text('Tax Included')
+ . qq|</th>
+ </tr>
+|;
+
+ if (($rows = $form->numtextrows($form->{notes}, 50)) < 2) {
+ $rows = 2;
+ }
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=50 wrap=soft $readonly>$form->{notes}</textarea>|;
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
+
+ $vendor =
+ ($form->{selectvendor})
+ ? qq|<select name=vendor>$form->{selectvendor}</select>|
+ : qq|<input name=vendor value="$form->{vendor}" size=35>|;
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}> $readonly</td>
+ <td><input type=button name=transdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}> $readonly</td>
+ <td><input type=button name=duedate id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1",
+ "duedate", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}> $readonly</td>|;
+ $button2 =
+ qq|<td><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}> $readonly</td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=sort value=$form->{sort}>
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=locked value=$form->{locked}>
+<input type=hidden name=title value="$title">
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Vendor') . qq|</th>
+ <td colspan=3>$vendor</td>
+ <input type=hidden name=selectvendor value="$form->{selectvendor}">
+ <input type=hidden name=oldvendor value="$form->{oldvendor}">
+ <input type=hidden name=vendor_id value="$form->{vendor_id}">
+ <input type=hidden name=terms value=$form->{terms}>
+ </tr>
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table width=100%>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Credit Limit') . qq|</th>
+ <td>$form->{creditlimit}</td>
+ <th align=left nowrap>| . $locale->text('Remaining') . qq|</th>
+ <td class="plus$n">$form->{creditremaining}</td>
+ <input type=hidden name=creditlimit value=$form->{creditlimit}>
+ <input type=hidden name=creditremaining value=$form->{creditremaining}>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+ <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+ <input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
+ <input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
+ $exchangerate
+ </tr>
+ $department
+ $taxincluded
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}" $readonly></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name=ordnumber size=11 value="$form->{ordnumber}" $readonly></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Due Date') . qq|</th>
+ $button2
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <input type=hidden name=AP_amount value="$form->{AP_amount}">
+ <input type=hidden name=taxchart value="$form->{taxchart}">
+ <input type=hidden name=rowcount value=$form->{rowcount}>
+ <tr>
+ <td>
+ <table width=100%>
+
+$jsscript
+|;
+
+ $amount = $locale->text('Amount');
+ $project = $locale->text('Project');
+
+ for $i (1 .. 1) {
+
+ # $form->{"selectAP_amount"} =~ s/ selected//;
+ # $form->{"selectAP_amount"} =~ s/option>\Q$form->{"AP_amount_$i"}\E/option selected>$form->{"AP_amount_$i"}/;
+
+ # format amounts
+ $form->{"amount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"amount_$i"}, 2);
+
+ print qq|
+ <tr>
+ <th align=right nowrap>$amount</th>
+ <td><input name="amount_$i" size=10 value=$form->{"amount_$i"} $readonly></td>
+ <th>$project</th>
+ <td><input name="projectnumber_$i" size=20 value="$form->{"projectnumber_$i"}">
+ <input type=hidden name="project_id_$i" value=$form->{"project_id_$i"}>
+ <input type=hidden name="oldprojectnumber_$i" value="$form->{"oldprojectnumber_$i"}"></td>
+ <td width=50%><select name="AP_amountselected">$form->{selectAP_amount}</select></td>
+ </tr>
+|;
+ $amount = "";
+ $project = "";
+ }
+
+ $taxlabel =
+ ($form->{taxincluded})
+ ? $locale->text('Tax Included')
+ : $locale->text('Tax');
+
+ # format and reverse tax
+ $form->{"tax"} = $form->format_amount(\%myconfig, $form->{"tax"}, 2);
+
+ print qq|
+ <tr>
+ <th align=right nowrap>${taxlabel}</th>
+ <td><input name="tax" size=10 value=$form->{"tax"} $readonly></td>
+ <td align=right><input name=taxcheck class=checkbox type=checkbox value=1></td>
+ <td align=left nowrap>| . $locale->text('Correct Tax') . qq|</td>
+ <td><select name=taxchartselected>$form->{"selecttaxchart"}</select></td>
+ </tr>
+|;
+
+ $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
+
+ print qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Total') . qq|</th>
+ <td>$form->{invtotal}</td>
+
+ <input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
+ <input type=hidden name=oldtotalpaid value=$form->{oldtotalpaid}>
+
+ <input type=hidden name=taxaccounts value="$form->{taxaccounts}">
+
+ <td colspan=2></td>
+ <td><select name=APselected>$form->{selectAP}</select></td>
+ <input type=hidden name=AP value="$form->{AP}">
+
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
+ <td colspan=5>$notes</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th class=listheading colspan=6>| . $locale->text('Payments') . qq|</th>
+ </tr>
+|;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ @column_index = qw(datepaid source memo paid AP_paid);
+ } else {
+ @column_index = qw(datepaid source memo paid exchangerate AP_paid);
+ }
+
+ $column_data{datepaid} = "<th>" . $locale->text('Date') . "</th>";
+ $column_data{paid} = "<th>" . $locale->text('Amount') . "</th>";
+ $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>";
+ $column_data{AP_paid} = "<th>" . $locale->text('Account') . "</th>";
+ $column_data{source} = "<th>" . $locale->text('Source') . "</th>";
+ $column_data{memo} = "<th>" . $locale->text('Memo') . "</th>";
+
+ print "
+ <tr>
+";
+ map { print "$column_data{$_}\n" } @column_index;
+ print "
+ </tr>
+";
+
+ $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
+ for $i (1 .. $form->{paidaccounts}) {
+ print "
+ <tr>
+";
+
+ $form->{"selectAP_paid_$i"} = $form->{selectAP_paid};
+ $form->{"selectAP_paid_$i"} =~
+ s/option value=\"$form->{"AP_paid_$i"}\">/option value=\"$form->{"AP_paid_$i"}\" selected>/;
+
+ # format amounts
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ $form->{"exchangerate_$i"} =
+ $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
+
+ $exchangerate = qq| |;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{"forex_$i"}) {
+ $exchangerate =
+ qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
+ } else {
+ $exchangerate =
+ qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
+ }
+ }
+
+ $exchangerate .= qq|
+<input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
+|;
+
+ $column_data{"paid_$i"} =
+ qq|<td align=center><input name="paid_$i" size=11 value=$form->{"paid_$i"}></td>|;
+ $column_data{"AP_paid_$i"} =
+ qq|<td align=center><select name="AP_paid_$i">$form->{"selectAP_paid_$i"}</select></td>|;
+ $column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|;
+ $column_data{"datepaid_$i"} =
+ qq|<td align=center><input name="datepaid_$i" size=11 title="($myconfig{'dateformat'})" value=$form->{"datepaid_$i"}></td>|;
+ $column_data{"source_$i"} =
+ qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|;
+ $column_data{"memo_$i"} =
+ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|;
+
+ map { print qq|$column_data{"${_}_$i"}\n| } @column_index;
+
+ print "
+ </tr>
+";
+ }
+ map { $form->{$_} =~ s/\"/"/g } qw(selectAP_paid);
+ print qq|
+ <input type=hidden name=paidaccounts value=$form->{paidaccounts}>
+ <input type=hidden name=selectAP_paid value="$form->{selectAP_paid}">
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+|;
+
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ if ($form->{id} && $form->{radier}) {
+
+ # print qq|<input class=submit type=submit name=action value="|.$locale->text('Update').qq|">
+ # |;
+
+ if (!$form->{revtrans}) {
+ if (!$form->{locked}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">
+|;
+ }
+ }
+
+ if ($transdate > $closedto) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Post as new') . qq|">
+|;
+ }
+
+ } else {
+ if (($transdate > $closedto) && !$form->{id}) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print "
+</form>
+
+</body>
+</html>
+";
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ my $display = shift;
+
+ # if ($display) {
+ # goto TAXCALC;
+ # }
+
+ $form->{invtotal} = 0;
+
+ $form->{selectAP_amount} = $form->{AP_amount};
+ $form->{selectAP_amount} =~
+ s/value=\"$form->{AP_amountselected}\"/value=\"$form->{AP_amountselected}\" selected/;
+
+ $form->{selectAP} = $form->{AP};
+ $form->{selectAP} =~
+ s/value=\"$form->{APselected}\"/value=\"$form->{APselected}\" selected/;
+
+ ($AP_amountaccno, $AP_amounttaxkey) =
+ split(/--/, $form->{AP_amountselected});
+ $form->{selecttaxchart} = $form->{taxchart};
+ $form->{selecttaxchart} =~
+ s/value=\"$AP_amounttaxkey--([^\"]*)\"/value=\"$AP_amounttaxkey--$1\" selected/;
+
+ $form->{rate} = $1;
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ @flds = qw(amount AP_amount projectnumber oldprojectnumber project_id);
+ $count = 0;
+ for $i (1 .. 1) {
+ $form->{"amount_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"amount_$i"});
+ if ($form->{"amount_$i"}) {
+ push @a, {};
+ my $j = $#a;
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+ $form->redo_rows(\@flds, \@a, $count, $form->{rowcount});
+
+ $form->{invtotal} += $form->{"amount_1"};
+
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{transdate}, 'sell'
+ )));
+
+ $form->{invdate} = $form->{transdate};
+ $save_AP = $form->{AP};
+ &check_name(vendor);
+ $form->{AP} = $save_AP;
+
+ &check_project;
+
+TAXCALC:
+
+ # recalculate taxes
+
+ @taxaccounts = split / /, $form->{taxaccounts};
+
+ $form->{"tax"} = $form->parse_amount(\%myconfig, $form->{"tax"});
+
+ if ($form->{taxincluded} && $form->{"rate"}) {
+ $taxrate = $form->{"rate"};
+ $withholdingrate = 0;
+
+ $amount =
+ $form->round_amount(
+ ($form->{invtotal} - ($form->{invtotal} / ($taxrate + 1))),
+ 2);
+ $form->{"tax"} = $form->round_amount($amount, 2);
+ $taxdiff += ($amount - $form->{"tax"});
+
+ if (abs $taxdiff >= 0.005) {
+ $form->{"tax"} += $form->round_amount($taxdiff, 2);
+ $taxdiff = 0;
+ }
+ $totaltax += $form->{"tax"};
+
+ } else {
+ $form->{"tax"} =
+ $form->round_amount($form->{invtotal} * $form->{"rate"}, 2);
+ $totaltax += $form->{"tax"};
+
+ }
+
+ $form->{invtotal} =
+ ($form->{taxincluded}) ? $form->{invtotal} : $form->{invtotal} + $totaltax;
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(paid exchangerate);
+
+ $totalpaid += $form->{"paid_$i"};
+
+ $form->{"exchangerate_$i"} = $exchangerate
+ if (
+ $form->{"forex_$i"} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'sell'
+ )));
+ }
+ }
+
+ $form->{creditremaining} -=
+ ($form->{invtotal} - $totalpaid + $form->{oldtotalpaid} -
+ $form->{oldinvtotal});
+ $form->{oldinvtotal} = $form->{invtotal};
+ $form->{oldtotalpaid} = $totalpaid;
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ # check if there is a vendor, invoice and due date
+ $form->isblank("transdate", $locale->text("Invoice Date missing!"));
+ $form->isblank("duedate", $locale->text("Due Date missing!"));
+ $form->isblank("vendor", $locale->text('Vendor missing!'));
+
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+
+ $form->error($locale->text('Cannot post transaction for a closed period!'))
+ if ($transdate <= $closedto);
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+ delete($form->{AP});
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
+
+ $form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
+
+ $form->error($locale->text('Cannot post payment for a closed period!'))
+ if ($datepaid <= $closedto);
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = $form->{exchangerate}
+ if ($transdate == $datepaid);
+ $form->isblank("exchangerate_$i",
+ $locale->text('Exchangerate for payment missing!'));
+ }
+
+ }
+ }
+
+ # if old vendor ne vendor redo form
+ ($vendor) = split /--/, $form->{vendor};
+ if ($form->{oldvendor} ne "$vendor--$form->{vendor_id}") {
+ &update;
+ exit;
+ }
+ ($debitaccno, $debittaxkey) = split /--/, $form->{AP_amountselected};
+ ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
+ ($payablesaccno, $payablestaxkey) = split /--/, $form->{APselected};
+ $form->{AP}{amount_1} = $debitaccno;
+ $form->{AP}{payables} = $payablesaccno;
+ $form->{taxkey} = $taxkey;
+
+ $form->{id} = 0 if $form->{postasnew};
+
+ $form->redirect($locale->text('Transaction posted!'))
+ if (AP->post_transaction(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post transaction!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub post_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{postasnew} = 1;
+ &post;
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Confirm!');
+
+ $form->header;
+
+ delete $form->{header};
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>$form->{title}</h2>
+
+<h4>|
+ . $locale->text('Are you sure you want to delete Transaction')
+ . qq| $form->{invnumber}</h4>
+
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Transaction deleted!'))
+ if (AP->delete_transaction(\%myconfig, \%$form, $spool));
+ $form->error($locale->text('Cannot delete transaction!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ # setup vendor selection
+ $form->all_vc(\%myconfig, "vendor", "AP");
+
+ if (@{ $form->{all_vendor} }) {
+ map { $vendor .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{all_vendor} };
+ $vendor = qq|<select name=vendor><option>\n$vendor\n</select>|;
+ } else {
+ $vendor = qq|<input name=vendor size=35>|;
+ }
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $form->{title} = $locale->text('AP Transactions');
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdatefrom id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdateto name=transdateto id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger1",
+ "transdateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Vendor') . qq|</th>
+ <td colspan=3>$vendor</td>
+ </tr>
+ $department
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td colspan=3><input name=invnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td colspan=3><input name=ordnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
+ <td colspan=3><input name=notes size=40></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('From') . qq|</th>
+ $button1
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ $button2
+ </tr>
+ <input type=hidden name=sort value=transdate>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td>
+ <table width=100%>
+ <tr>
+ <td align=right><input name=open class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Open') . qq|</td>
+ <td align=right><input name=closed class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Closed') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('ID') . qq|</td>
+ <td align=right><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Invoice Number') . qq|</td>
+ <td align=right><input name="l_ordnumber" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Order Number') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Vendor') . qq|</td>
+ <td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Invoice Date') . qq|</td>
+ <td align=right><input name="l_netamount" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Amount') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_tax" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Tax') . qq|</td>
+ <td align=right><input name="l_amount" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Total') . qq|</td>
+ <td align=right><input name="l_datepaid" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Date Paid') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_paid" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Paid') . qq|</td>
+ <td align=right><input name="l_duedate" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Due Date') . qq|</td>
+ <td align=right><input name="l_due" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Amount Due') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_notes" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Notes') . qq|</td>
+ <td align=right><input name="l_employee" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Employee') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+$jsscript
+
+<br>
+<input type=hidden name=nextsub value=$form->{nextsub}>
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub ap_transactions {
+ $lxdebug->enter_sub();
+
+ $form->{vendor} = $form->unescape($form->{vendor});
+ ($form->{vendor}, $form->{vendor_id}) = split(/--/, $form->{vendor});
+
+ AP->ap_transactions(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=ap_transactions&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ $href = $callback;
+
+ if ($form->{vendor}) {
+ $callback .= "&vendor=" . $form->escape($form->{vendor}, 1);
+ $href .= "&vendor=" . $form->escape($form->{vendor});
+ $option .= $locale->text('Vendor') . " : $form->{vendor}";
+ }
+ if ($form->{department}) {
+ $callback .= "&department=" . $form->escape($form->{department}, 1);
+ $href .= "&department=" . $form->escape($form->{department});
+ ($department) = split /--/, $form->{department};
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Department') . " : $department";
+ }
+ if ($form->{invnumber}) {
+ $callback .= "&invnumber=" . $form->escape($form->{invnumber}, 1);
+ $href .= "&invnumber=" . $form->escape($form->{invnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Invoice Number') . " : $form->{invnumber}";
+ }
+ if ($form->{ordnumber}) {
+ $callback .= "&ordnumber=" . $form->escape($form->{ordnumber}, 1);
+ $href .= "&ordnumber=" . $form->escape($form->{ordnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Order Number') . " : $form->{ordnumber}";
+ }
+ if ($form->{notes}) {
+ $callback .= "¬es=" . $form->escape($form->{notes}, 1);
+ $href .= "¬es=" . $form->escape($form->{notes});
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Notes') . " : $form->{notes}";
+ }
+
+ if ($form->{transdatefrom}) {
+ $callback .= "&transdatefrom=$form->{transdatefrom}";
+ $href .= "&transdatefrom=$form->{transdatefrom}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $callback .= "&transdateto=$form->{transdateto}";
+ $href .= "&transdateto=$form->{transdateto}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('Bis') . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ if ($form->{open}) {
+ $callback .= "&open=$form->{open}";
+ $href .= "&open=$form->{open}";
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Open');
+ }
+ if ($form->{closed}) {
+ $callback .= "&closed=$form->{closed}";
+ $href .= "&closed=$form->{closed}";
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Closed');
+ }
+
+ @columns =
+ $form->sort_columns(
+ qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee)
+ );
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
+ }
+
+ $column_header{id} =
+ qq|<th><a class=listheading href=$href&sort=id>|
+ . $locale->text('ID')
+ . qq|</a></th>|;
+ $column_header{transdate} =
+ qq|<th><a class=listheading href=$href&sort=transdate>|
+ . $locale->text('Date')
+ . qq|</a></th>|;
+ $column_header{duedate} =
+ qq|<th><a class=listheading href=$href&sort=duedate>|
+ . $locale->text('Due Date')
+ . qq|</a></th>|;
+ $column_header{due} =
+ qq|<th class=listheading>| . $locale->text('Amount Due') . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th><a class=listheading href=$href&sort=invnumber>|
+ . $locale->text('Invoice')
+ . qq|</a></th>|;
+ $column_header{ordnumber} =
+ qq|<th><a class=listheading href=$href&sort=ordnumber>|
+ . $locale->text('Order')
+ . qq|</a></th>|;
+ $column_header{name} =
+ qq|<th><a class=listheading href=$href&sort=name>|
+ . $locale->text('Vendor')
+ . qq|</a></th>|;
+ $column_header{netamount} =
+ qq|<th class=listheading>| . $locale->text('Amount') . qq|</th>|;
+ $column_header{tax} =
+ qq|<th class=listheading>| . $locale->text('Tax') . qq|</th>|;
+ $column_header{amount} =
+ qq|<th class=listheading>| . $locale->text('Total') . qq|</th>|;
+ $column_header{paid} =
+ qq|<th class=listheading>| . $locale->text('Paid') . qq|</th>|;
+ $column_header{datepaid} =
+ qq|<th><a class=listheading href=$href&sort=datepaid>|
+ . $locale->text('Date Paid')
+ . qq|</a></th>|;
+ $column_header{notes} =
+ qq|<th class=listheading>| . $locale->text('Notes') . qq|</th>|;
+ $column_header{employee} =
+ "<th><a class=listheading href=$href&sort=employee>"
+ . $locale->text('Employee') . "</th>";
+
+ $form->{title} = $locale->text('AP Transactions');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort and escape callback
+ $form->{callback} = "$callback&sort=$form->{sort}";
+ $callback = $form->escape($form->{callback});
+
+ if (@{ $form->{AP} }) {
+ $sameitem = $form->{AP}->[0]->{ $form->{sort} };
+ }
+
+ # sums and tax on reports by Antonio Gallardo
+ #
+ foreach $ap (@{ $form->{AP} }) {
+
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $ap->{ $form->{sort} }) {
+ &ap_subtotal;
+ $sameitem = $ap->{ $form->{sort} };
+ }
+ }
+
+ $column_data{netamount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ap->{netamount}, 2, " ")
+ . "</td>";
+ $column_data{tax} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ap->{amount} - $ap->{netamount},
+ 2, " ")
+ . "</td>";
+ $column_data{amount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ap->{amount}, 2, " ") . "</td>";
+ $column_data{paid} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ap->{paid}, 2, " ") . "</td>";
+ $column_data{due} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ap->{amount} - $ap->{paid},
+ 2, " ")
+ . "</td>";
+
+ $totalnetamount += $ap->{netamount};
+ $totalamount += $ap->{amount};
+ $totalpaid += $ap->{paid};
+ $totaldue += ($ap->{amount} - $ap->{paid});
+
+ $subtotalnetamount += $ap->{netamount};
+ $subtotalamount += $ap->{amount};
+ $subtotalpaid += $ap->{paid};
+ $subtotaldue += ($ap->{amount} - $ap->{paid});
+
+ $column_data{transdate} = "<td>$ap->{transdate} </td>";
+ $column_data{duedate} = "<td>$ap->{duedate} </td>";
+ $column_data{datepaid} = "<td>$ap->{datepaid} </td>";
+
+ $module = ($ap->{invoice}) ? "ir.pl" : $form->{script};
+
+ $column_data{invnumber} =
+ qq|<td><a href="$module?action=edit&path=$form->{path}&id=$ap->{id}&login=$form->{login}&password=$form->{password}&callback=$callback">$ap->{invnumber}</a></td>|;
+ $column_data{id} = "<td>$ap->{id}</td>";
+ $column_data{ordnumber} = "<td>$ap->{ordnumber} </td>";
+ $column_data{name} = "<td>$ap->{name}</td>";
+ $ap->{notes} =~ s/\r\n/<br>/g;
+ $column_data{notes} = "<td>$ap->{notes} </td>";
+ $column_data{employee} = "<td>$ap->{employee} </td>";
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i >
+";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &ap_subtotal;
+ }
+
+ # print totals
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{netamount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalnetamount, 2, " ") . "</th>";
+ $column_data{tax} = "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount - $totalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount, 2, " ") . "</th>";
+ $column_data{paid} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalpaid, 2, " ") . "</th>";
+ $column_data{due} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totaldue, 2, " ") . "</th>";
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('AP Transaction') . qq|">
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Vendor Invoice') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub ap_subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{netamount} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ")
+ . "</th>";
+ $column_data{tax} = "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount, 2, " ") . "</th>";
+ $column_data{paid} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalpaid, 2, " ") . "</th>";
+ $column_data{due} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotaldue, 2, " ") . "</th>";
+
+ $subtotalnetamount = 0;
+ $subtotalamount = 0;
+ $subtotalpaid = 0;
+ $subtotaldue = 0;
+
+ print "<tr class=listsubtotal>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Accounts Receivables
+#
+#======================================================================
+
+use SL::AR;
+use SL::IS;
+use SL::PE;
+
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+ $form->{callback} =
+ "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &create_links;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ &create_links;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ &form_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub create_links {
+ $lxdebug->enter_sub();
+
+ $form->create_links("AR", \%myconfig, "customer");
+ $duedate = $form->{duedate};
+
+ $taxincluded = $form->{taxincluded};
+
+ IS->get_customer(\%myconfig, \%$form);
+
+ $form->{duedate} = $duedate if $duedate;
+ $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $curr[0];
+
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ # customers
+ if (@{ $form->{all_customer} }) {
+ $form->{customer} = "$form->{customer}--$form->{customer_id}";
+ map { $form->{selectcustomer} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_customer} });
+ }
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $form->{employee} = "$form->{employee}--$form->{employee_id}";
+
+ # sales staff
+ if (@{ $form->{all_employees} }) {
+ $form->{selectemployee} = "";
+ map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_employees} });
+ }
+
+ # build the popup menus
+ $form->{taxincluded} = ($form->{id}) ? $form->{taxincluded} : "checked";
+
+ map {
+ $tax .=
+ qq|<option value=\"$_->{taxkey}--$_->{rate}\">$_->{taxdescription} |
+ . ($_->{rate} * 100) . qq| %|
+ } @{ $form->{TAX} };
+ $form->{taxchart} = $tax;
+ $form->{selecttaxchart} = $tax;
+
+ # forex
+ $form->{forex} = $form->{exchangerate};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+ foreach $key (keys %{ $form->{AR_links} }) {
+
+ foreach $ref (@{ $form->{AR_links}{$key} }) {
+ if ($key eq "AR_paid") {
+ $form->{"select$key"} .=
+ "<option value=\"$ref->{accno}\">$ref->{accno}--$ref->{description}</option>\n";
+ } else {
+ $form->{"select$key"} .=
+ "<option value=\"$ref->{accno}--$ref->{taxkey}\">$ref->{accno}--$ref->{description}</option>\n";
+ }
+ }
+
+ $form->{$key} = $form->{"select$key"};
+
+ # if there is a value we have an old entry
+ $j = 0;
+ for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
+ if ($key eq "AR_paid") {
+ $j++;
+ $form->{"AR_paid_$j"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+
+ # reverse paid
+ $form->{"paid_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{amount} * -1;
+ $form->{"datepaid_$j"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{transdate};
+ $form->{"source_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{source};
+ $form->{"memo_$j"} = $form->{acc_trans}{$key}->[$i - 1]->{memo};
+
+ $form->{"forex_$j"} = $form->{"exchangerate_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{exchangerate};
+ $form->{"AR_paid_$j"} = "$form->{acc_trans}{$key}->[$i-1]->{accno}";
+ $form->{paidaccounts}++;
+ } else {
+
+ $akey = $key;
+ $akey =~ s/AR_//;
+
+ if ($key eq "AR_tax") {
+ $form->{"${key}_$form->{acc_trans}{$key}->[$i-1]->{accno}"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"} =
+ $form->round_amount(
+ $form->{acc_trans}{$key}->[$i - 1]->{amount} / $exchangerate,
+ 2);
+
+ if ($form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"} > 0) {
+ $totaltax +=
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"};
+ $taxrate +=
+ $form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"};
+ } else {
+ $totalwithholding +=
+ $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"};
+ $withholdingrate +=
+ $form->{"$form->{acc_trans}{$key}->[$i-1]->{accno}_rate"};
+ }
+
+ } else {
+ $form->{"${akey}_$i"} =
+ $form->round_amount(
+ $form->{acc_trans}{$key}->[$i - 1]->{amount} / $exchangerate,
+ 2);
+ if ($akey eq 'amount') {
+ $form->{rowcount}++;
+ $totalamount += $form->{"${akey}_$i"};
+
+ $form->{"oldprojectnumber_$i"} = $form->{"projectnumber_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{projectnumber}";
+ $form->{taxrate} = $form->{acc_trans}{$key}->[$i - 1]->{rate};
+ $form->{"project_id_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{project_id}";
+ }
+ $form->{"${key}_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"${key}_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+ $form->{"select${key}"} =~
+ /(<option value=\"$form->{acc_trans}{$key}->[$i-1]->{accno}--[^\"]*\">$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}<\/option>\n)/;
+ $test = $1;
+ $form->{"select${key}"} = $1;
+ if ($akey eq 'amount') {
+ $form->{selecttaxchart} =~
+ /(<option value=\"$form->{acc_trans}{$key}->[$i-1]->{taxkey}--[^<]*)/;
+ $form->{selecttaxchart} = $1;
+ }
+ }
+ }
+ }
+ }
+
+ $form->{taxincluded} = $taxincluded if ($form->{id});
+ $form->{paidaccounts} = 1 if not defined $form->{paidaccounts};
+
+ if ($form->{taxincluded} && $form->{taxrate} && $totalamount) {
+
+ # add tax to amounts and invtotal
+ for $i (1 .. 1) {
+ $taxamount =
+ ($totaltax + $totalwithholding) * $form->{"amount_$i"} / $totalamount;
+ $tax = $form->round_amount($taxamount, 2);
+ $diff += ($taxamount - $tax);
+ $form->{"amount_$i"} += $tax;
+ }
+ $form->{amount_1} += $form->round_amount($diff, 2);
+ }
+
+ # check if calculated is equal to stored
+ if ($form->{taxincluded} && $form->{taxrate} && $withholdingrate) {
+ if ($form->{"taxrate"} > 0) {
+ $taxamount =
+ $form->round_amount(
+ ($form->{amount_1} - ($form->{amount_1} / ($form->{taxrate} + 1))),
+ 2);
+ } else {
+ $taxamount =
+ $form->round_amount(
+ ($totalamount + $totaltax + $totalwithholding) * $withholdingrate /
+ (1 - $withholdingrate),
+ 2
+ ) * $form->{"taxrate"} / $withholdingrate;
+ }
+ } else {
+ $taxamount = $totalamount * $form->{"taxrate"};
+ }
+ $taxamount = $form->round_amount($taxamount, 2);
+ $form->{tax} = $taxamount;
+
+ $form->{invtotal} = $totalamount + $totaltax + $totalwithholding;
+
+ $form->{locked} =
+ ($form->datetonum($form->{transdate}, \%myconfig) <=
+ $form->datetonum($form->{closedto}, \%myconfig));
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $title = $form->{title};
+ $form->{title} = $locale->text("$title Accounts Receivables Transaction");
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+
+ # $locale->text('Add Accounts Receivables Transaction')
+ # $locale->text('Edit Accounts Receivables Transaction')
+
+ $readonly = ($form->{id}) ? "readonly" : "";
+
+ $form->{radier} =
+ ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
+ $readonly = ($form->{radier}) ? "" : $readonly;
+
+ # set option selected
+ foreach $item (qw(customer currency department employee)) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ map { $form->{$_} =~ s/\"/"/g } qw(AR_amount AR taxchart);
+
+ # format amounts
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} =
+ $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+
+ $exchangerate = qq|
+<input type=hidden name=forex value=$form->{forex}>
+|;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{forex}) {
+ $exchangerate .= qq|
+ <th align=right>| . $locale->text('Exchangerate') . qq|</th>
+ <td><input type=hidden name=exchangerate value=$form->{exchangerate}>$form->{exchangerate}</td>
+|;
+ } else {
+ $exchangerate .= qq|
+ <th align=right>| . $locale->text('Exchangerate') . qq|</th>
+ <td><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+|;
+ }
+ }
+
+ $taxincluded = "";
+
+ $taxincluded = qq|
+ <tr>
+ <td align=right><input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}></td>
+ <th align=left nowrap>| . $locale->text('Tax Included') . qq|</th>
+ </tr>
+|;
+
+ if (($rows = $form->numtextrows($form->{notes}, 50)) < 2) {
+ $rows = 2;
+ }
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=50 wrap=soft>$form->{notes}</textarea>|;
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
+
+ $customer =
+ ($form->{selectcustomer})
+ ? qq|<select name=customer>$form->{selectcustomer}</select>|
+ : qq|<input name=customer value="$form->{customer}" size=35>|;
+
+ $employee = qq|
+ <input type=hidden name=employee value="$form->{employee}">
+|;
+
+ if ($form->{selectemployee}) {
+ $employee = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Salesperson') . qq|</th>
+ <td colspan=2><select name=employee>$form->{selectemployee}</select></td>
+ <input type=hidden name=selectemployee value="$form->{selectemployee}">
+ </tr>
+|;
+ }
+
+ $form->{fokus} = "arledger.customer";
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}></td>
+ <td><input type=button name=transdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>
+ <td><input type=button name=duedate id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1",
+ "duedate", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}></td>|;
+ $button2 =
+ qq|<td><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body onLoad="fokus()">
+
+<form method=post name="arledger" action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=sort value=$form->{sort}>
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=locked value=$form->{locked}>
+<input type=hidden name=title value="$title">
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Customer') . qq|</th>
+ <td colspan=3>$customer</td>
+ <input type=hidden name=selectcustomer value="$form->{selectcustomer}">
+ <input type=hidden name=oldcustomer value="$form->{oldcustomer}">
+ <input type=hidden name=customer_id value="$form->{customer_id}">
+ <input type=hidden name=terms value=$form->{terms}>
+ </tr>
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table width=100%>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Credit Limit') . qq|</th>
+ <td>$form->{creditlimit}</td>
+ <th align=left nowrap>| . $locale->text('Remaining') . qq|</th>
+ <td class="plus$n">$form->{creditremaining}</td>
+ <input type=hidden name=creditlimit value=$form->{creditlimit}>
+ <input type=hidden name=creditremaining value=$form->{creditremaining}>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+ <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+ <input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
+ <input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
+ $exchangerate
+ </tr>
+ $department
+ $taxincluded
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ $employee
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Due Date') . qq|</th>
+ $button2
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+
+$jsscript
+
+ <input type=hidden name=AR_amount value="$form->{AR_amount}">
+ <input type=hidden name=taxchart value="$form->{taxchart}">
+ <input type=hidden name=rowcount value=$form->{rowcount}>
+|;
+
+ $form->{"tax"} = $form->format_amount(\%myconfig, $form->{"tax"}, 2);
+
+ $amount = $locale->text('Amount');
+ $project = $locale->text('Project');
+
+ for $i (1 .. 1) {
+
+ # format amounts
+ $form->{"amount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"amount_$i"}, 2);
+
+ print qq|
+ <tr>
+ <th align=right>$amount</th>
+ <td><input name="amount_$i" size=10 value=$form->{"amount_$i"}></td>
+ <th>$project</th>
+ <td><input name="projectnumber_$i" size=20 value="$form->{"projectnumber_$i"}">
+ <input type=hidden name="project_id_$i" value=$form->{"project_id_$i"}>
+ <input type=hidden name="oldprojectnumber_$i" value="$form->{"oldprojectnumber_$i"}"></td>
+ <td width=50%><select name="AR_amountselected">$form->{"selectAR_amount"}</select></td>
+ </tr>
+|;
+ $amount = "";
+ $project = "";
+ }
+
+ $taxlabel =
+ ($form->{taxincluded})
+ ? $locale->text('Tax Included')
+ : $locale->text('Tax');
+
+ print qq|
+ <tr>
+ <th align=right nowrap>$taxlabel</th>
+ <td><input name="tax" size=10 value=$form->{"tax"}></td>
+ <td align=right></td>
+ <td></td>
+ <td><select name="taxchartselected">$form->{"selecttaxchart"}</select></td>
+ </tr>
+|;
+
+ $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
+
+ print qq|
+ <tr>
+
+ <th align=right>| . $locale->text('Total') . qq|</th>
+ <th align=left>$form->{invtotal}</th>
+
+ <input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
+ <input type=hidden name=oldtotalpaid value=$form->{oldtotalpaid}>
+
+ <input type=hidden name=taxaccounts value="$form->{taxaccounts}">
+
+ <td colspan=2></td>
+ <td><select name=ARselected>$form->{selectAR}</select></td>
+ <input type=hidden name=AR value="$form->{AR}">
+
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Notes') . qq|</th>
+ <td colspan=4>$notes</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th colspan=6 class=listheading>|
+ . $locale->text('Incoming Payments')
+ . qq|</th>
+ </tr>
+|;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ @column_index = qw(datepaid source memo paid AR_paid);
+ } else {
+ @column_index = qw(datepaid source memo paid exchangerate AR_paid);
+ }
+
+ $column_data{datepaid} = "<th>" . $locale->text('Date') . "</th>";
+ $column_data{paid} = "<th>" . $locale->text('Amount') . "</th>";
+ $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>";
+ $column_data{AR_paid} = "<th>" . $locale->text('Account') . "</th>";
+ $column_data{source} = "<th>" . $locale->text('Source') . "</th>";
+ $column_data{memo} = "<th>" . $locale->text('Memo') . "</th>";
+
+ print "
+ <tr>
+";
+ map { print "$column_data{$_}\n" } @column_index;
+ print "
+ </tr>
+";
+
+ $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
+ for $i (1 .. $form->{paidaccounts}) {
+ print "
+ <tr>
+";
+
+ $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
+ $form->{"selectAR_paid_$i"} =~
+ s/option value=\"$form->{"AR_paid_$i"}\">/option value=\"$form->{"AR_paid_$i"}\" selected>/;
+
+ # format amounts
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ $form->{"exchangerate_$i"} =
+ $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
+
+ $exchangerate = qq| |;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{"forex_$i"}) {
+ $exchangerate =
+ qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
+ } else {
+ $exchangerate =
+ qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
+ }
+ }
+
+ $exchangerate .= qq|
+<input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
+|;
+
+ $column_data{paid} =
+ qq|<td align=center><input name="paid_$i" size=11 value=$form->{"paid_$i"}></td>|;
+ $column_data{AR_paid} =
+ qq|<td align=center><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
+ $column_data{exchangerate} = qq|<td align=center>$exchangerate</td>|;
+ $column_data{datepaid} =
+ qq|<td align=center><input name="datepaid_$i" size=11 value=$form->{"datepaid_$i"}></td>|;
+ $column_data{source} =
+ qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|;
+ $column_data{memo} =
+ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|;
+
+ map { print qq|$column_data{$_}\n| } @column_index;
+
+ print "
+ </tr>
+";
+ }
+ map { $form->{$_} =~ s/\"/"/g } qw(selectAR_paid);
+ print qq|
+<input type=hidden name=paidaccounts value=$form->{paidaccounts}>
+<input type=hidden name=selectAR_paid value="$form->{selectAR_paid}">
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+|;
+
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ if ($form->{id} && $form->{radier}) {
+
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+|;
+
+ if (!$form->{revtrans}) {
+ if (!$form->{locked}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">
+|;
+ }
+ }
+
+ if ($transdate > $closedto) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Post as new') . qq|">
+|;
+ }
+
+ } else {
+ if ($transdate > $closedto) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print "
+</form>
+
+</body>
+</html>
+";
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ my $display = shift;
+
+ # if ($display) {
+ # goto TAXCALC;
+ # }
+
+ $form->{invtotal} = 0;
+
+ $form->{selectAR_amount} = $form->{AR_amount};
+ $form->{selectAR_amount} =~
+ s/value=\"$form->{AR_amountselected}\"/value=\"$form->{AR_amountselected}\" selected/;
+
+ $form->{selectAR} = $form->{AR};
+
+ $form->{selectAR} =~
+ s/value=\"$form->{ARselected}\"/value=\"$form->{ARselected}\" selected/;
+
+ ($AR_amountaccno, $AR_amounttaxkey) =
+ split(/--/, $form->{AR_amountselected});
+ $form->{selecttaxchart} = $form->{taxchart};
+ $form->{selecttaxchart} =~
+ s/value=\"$AR_amounttaxkey--([^\"]*)\"/value=\"$AR_amounttaxkey--$1\" selected/;
+
+ $form->{rate} = $1;
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ @flds = qw(amount AR_amount projectnumber oldprojectnumber project_id);
+ $count = 0;
+ @a = ();
+ for $i (1 .. 1) {
+ $form->{"amount_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"amount_$i"});
+ if ($form->{"amount_$i"}) {
+ push @a, {};
+ $j = $#a;
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{rowcount});
+
+ map { $form->{invtotal} += $form->{"amount_$_"} } (1 .. 1);
+
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{transdate}, 'buy'
+ )));
+
+ $form->{invdate} = $form->{transdate};
+ $save_AR = $form->{AR};
+ &check_name(customer);
+ $form->{AR} = $save_AR;
+
+ &check_project;
+
+TAXCALC:
+
+ # recalculate taxes
+
+ @taxaccounts = split / /, $form->{taxaccounts};
+
+ $form->{"tax"} = $form->parse_amount(\%myconfig, $form->{"tax"});
+
+ if ($form->{taxincluded} && $form->{"rate"}) {
+ $taxrate = $form->{"rate"};
+ $withholdingrate = 0;
+
+ $amount =
+ $form->round_amount(
+ ($form->{invtotal} - ($form->{invtotal} / ($taxrate + 1))),
+ 2);
+ $form->{"tax"} = $form->round_amount($amount, 2);
+ $taxdiff += ($amount - $form->{"tax"});
+
+ if (abs $taxdiff >= 0.005) {
+ $form->{"tax"} += $form->round_amount($taxdiff, 2);
+ $taxdiff = 0;
+ }
+ $totaltax += $form->{"tax"};
+
+ } else {
+ $form->{"tax"} =
+ $form->round_amount($form->{invtotal} * $form->{"rate"}, 2);
+ $totaltax += $form->{"tax"};
+
+ }
+
+ $form->{invtotal} =
+ ($form->{taxincluded}) ? $form->{invtotal} : $form->{invtotal} + $totaltax;
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(paid exchangerate);
+
+ $totalpaid += $form->{"paid_$i"};
+
+ $form->{"exchangerate_$i"} = $exchangerate
+ if (
+ $form->{"forex_$i"} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy'
+ )));
+ }
+ }
+
+ $form->{creditremaining} -=
+ ($form->{invtotal} - $totalpaid + $form->{oldtotalpaid} -
+ $form->{oldinvtotal});
+ $form->{oldinvtotal} = $form->{invtotal};
+ $form->{oldtotalpaid} = $totalpaid;
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ # check if there is an invoice number, invoice and due date
+ $form->isblank("transdate", $locale->text('Invoice Date missing!'));
+ $form->isblank("duedate", $locale->text('Due Date missing!'));
+ $form->isblank("customer", $locale->text('Customer missing!'));
+
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+
+ $form->error($locale->text('Cannot post transaction for a closed period!'))
+ if ($transdate <= $closedto);
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
+ delete($form->{AR});
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
+
+ $form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
+
+ $form->error($locale->text('Cannot post payment for a closed period!'))
+ if ($datepaid <= $closedto);
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = $form->{exchangerate}
+ if ($transdate == $datepaid);
+ $form->isblank("exchangerate_$i",
+ $locale->text('Exchangerate for payment missing!'));
+ }
+ }
+ }
+
+ # if oldcustomer ne customer redo form
+ ($customer) = split /--/, $form->{customer};
+ if ($form->{oldcustomer} ne "$customer--$form->{customer_id}") {
+ &update;
+ exit;
+ }
+
+ ($creditaccno, $credittaxkey) = split /--/, $form->{AR_amountselected};
+ ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
+ ($receivablesaccno, $payablestaxkey) = split /--/, $form->{ARselected};
+ $form->{AR}{amount_1} = $creditaccno;
+ $form->{AR}{receivables} = $receivablesaccno;
+ $form->{taxkey} = $taxkey;
+
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber")
+ unless $form->{invnumber};
+
+ $form->{id} = 0 if $form->{postasnew};
+
+ $form->redirect($locale->text('Transaction posted!'))
+ if (AR->post_transaction(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post transaction!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub post_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{postasnew} = 1;
+ &post;
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Confirm!');
+
+ $form->header;
+
+ delete $form->{header};
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>$form->{title}</h2>
+
+<h4>|
+ . $locale->text('Are you sure you want to delete Transaction')
+ . qq| $form->{invnumber}</h4>
+
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Transaction deleted!'))
+ if (AR->delete_transaction(\%myconfig, \%$form, $spool));
+ $form->error($locale->text('Cannot delete transaction!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ # setup customer selection
+ $form->all_vc(\%myconfig, "customer", "AR");
+
+ if (@{ $form->{all_customer} }) {
+ map { $customer .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{all_customer} };
+ $customer = qq|<select name=customer><option>\n$customer</select>|;
+ } else {
+ $customer = qq|<input name=customer size=35>|;
+ }
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $form->{title} = $locale->text('AR Transactions');
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdatefrom id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdateto name=transdateto id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger1",
+ "transdateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->{fokus} = "search.customer";
+ $form->header;
+
+ print qq|
+<body onLoad="fokus()">
+
+<form method=post name="search" action=$form->{script}>
+
+<table width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Customer') . qq|</th>
+ <td colspan=3>$customer</td>
+ </tr>
+ $department
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td colspan=3><input name=invnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td colspan=3><input name=ordnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
+ <td colspan=3><input name=notes size=40></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('From') . qq|</th>
+ $button1
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ $button2
+ </tr>
+ <input type=hidden name=sort value=transdate>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td>
+ <table width=100%>
+ <tr>
+ <td align=right><input name=open class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Open') . qq|</td>
+ <td align=right><input name=closed class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Closed') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('ID') . qq|</td>
+ <td align=right><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Invoice Number') . qq|</td>
+ <td align=right><input name="l_ordnumber" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Order Number') . qq|</td>
+ <td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Invoice Date') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Customer') . qq|</td>
+ <td align=right><input name="l_netamount" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Amount') . qq|</td>
+ <td align=right><input name="l_tax" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Tax') . qq|</td>
+ <td align=right><input name="l_amount" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_datepaid" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Date Paid') . qq|</td>
+ <td align=right><input name="l_paid" class=checkbox type=checkbox value=Y checked></td>
+ <td nowrap>| . $locale->text('Paid') . qq|</td>
+ <td align=right><input name="l_duedate" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Due Date') . qq|</td>
+ <td align=right><input name="l_due" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Amount Due') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_notes" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Notes') . qq|</td>
+ <td align=right><input name="l_employee" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Salesperson') . qq|</td>
+ <td align=right><input name="l_shippingpoint" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Shipping Point') . qq|</td>
+ <td align=right><input name="l_shipvia" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Ship via') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=$form->{nextsub}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+
+$jsscript
+
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub ar_transactions {
+ $lxdebug->enter_sub();
+
+ $form->{customer} = $form->unescape($form->{customer});
+ ($form->{customer}, $form->{customer_id}) = split(/--/, $form->{customer});
+
+ AR->ar_transactions(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=ar_transactions&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ $href = $callback;
+
+ if ($form->{customer}) {
+ $callback .= "&customer=" . $form->escape($form->{customer}, 1);
+ $href .= "&customer=" . $form->escape($form->{customer});
+ $option = $locale->text('Customer') . " : $form->{customer}";
+ }
+ if ($form->{department}) {
+ $callback .= "&department=" . $form->escape($form->{department}, 1);
+ $href .= "&department=" . $form->escape($form->{department});
+ ($department) = split /--/, $form->{department};
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Department') . " : $department";
+ }
+ if ($form->{invnumber}) {
+ $callback .= "&invnumber=" . $form->escape($form->{invnumber}, 1);
+ $href .= "&invnumber=" . $form->escape($form->{invnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Invoice Number') . " : $form->{invnumber}";
+ }
+ if ($form->{ordnumber}) {
+ $callback .= "&ordnumber=" . $form->escape($form->{ordnumber}, 1);
+ $href .= "&ordnumber=" . $form->escape($form->{ordnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Order Number') . " : $form->{ordnumber}";
+ }
+ if ($form->{notes}) {
+ $callback .= "¬es=" . $form->escape($form->{notes}, 1);
+ $href .= "¬es=" . $form->escape($form->{notes});
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Notes') . " : $form->{notes}";
+ }
+
+ if ($form->{transdatefrom}) {
+ $callback .= "&transdatefrom=$form->{transdatefrom}";
+ $href .= "&transdatefrom=$form->{transdatefrom}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $callback .= "&transdateto=$form->{transdateto}";
+ $href .= "&transdateto=$form->{transdateto}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('Bis') . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ if ($form->{open}) {
+ $callback .= "&open=$form->{open}";
+ $href .= "&open=$form->{open}";
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Open');
+ }
+ if ($form->{closed}) {
+ $callback .= "&closed=$form->{closed}";
+ $href .= "&closed=$form->{closed}";
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Closed');
+ }
+
+ @columns =
+ $form->sort_columns(
+ qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee shippingpoint shipvia)
+ );
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
+ }
+
+ $column_header{id} =
+ "<th><a class=listheading href=$href&sort=id>"
+ . $locale->text('ID')
+ . "</a></th>";
+ $column_header{transdate} =
+ "<th><a class=listheading href=$href&sort=transdate>"
+ . $locale->text('Date')
+ . "</a></th>";
+ $column_header{duedate} =
+ "<th><a class=listheading href=$href&sort=duedate>"
+ . $locale->text('Due Date')
+ . "</a></th>";
+ $column_header{invnumber} =
+ "<th><a class=listheading href=$href&sort=invnumber>"
+ . $locale->text('Invoice')
+ . "</a></th>";
+ $column_header{ordnumber} =
+ "<th><a class=listheading href=$href&sort=ordnumber>"
+ . $locale->text('Order')
+ . "</a></th>";
+ $column_header{name} =
+ "<th><a class=listheading href=$href&sort=name>"
+ . $locale->text('Customer')
+ . "</a></th>";
+ $column_header{netamount} =
+ "<th class=listheading>" . $locale->text('Amount') . "</th>";
+ $column_header{tax} =
+ "<th class=listheading>" . $locale->text('Tax') . "</th>";
+ $column_header{amount} =
+ "<th class=listheading>" . $locale->text('Total') . "</th>";
+ $column_header{paid} =
+ "<th class=listheading>" . $locale->text('Paid') . "</th>";
+ $column_header{datepaid} =
+ "<th><a class=listheading href=$href&sort=datepaid>"
+ . $locale->text('Date Paid')
+ . "</a></th>";
+ $column_header{due} =
+ "<th class=listheading>" . $locale->text('Amount Due') . "</th>";
+ $column_header{notes} =
+ "<th class=listheading>" . $locale->text('Notes') . "</th>";
+ $column_header{employee} =
+ "<th><a class=listheading href=$href&sort=employee>"
+ . $locale->text('Salesperson') . "</th>";
+
+ $column_header{shippingpoint} =
+ "<th><a class=listheading href=$href&sort=shippingpoint>"
+ . $locale->text('Shipping Point')
+ . "</a></th>";
+ $column_header{shipvia} =
+ "<th><a class=listheading href=$href&sort=shipvia>"
+ . $locale->text('Ship via')
+ . "</a></th>";
+
+ $form->{title} = $locale->text('AR Transactions');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort and escape callback, this one we use for the add sub
+ $form->{callback} = $callback .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ if (@{ $form->{AR} }) {
+ $sameitem = $form->{AR}->[0]->{ $form->{sort} };
+ }
+
+ # sums and tax on reports by Antonio Gallardo
+ #
+ foreach $ar (@{ $form->{AR} }) {
+
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $ar->{ $form->{sort} }) {
+ &ar_subtotal;
+ }
+ }
+
+ $column_data{netamount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ar->{netamount}, 2, " ")
+ . "</td>";
+ $column_data{tax} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ar->{amount} - $ar->{netamount},
+ 2, " ")
+ . "</td>";
+ $column_data{amount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ar->{amount}, 2, " ") . "</td>";
+ $column_data{paid} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ar->{paid}, 2, " ") . "</td>";
+ $column_data{due} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ar->{amount} - $ar->{paid},
+ 2, " ")
+ . "</td>";
+
+ $subtotalnetamount += $ar->{netamount};
+ $subtotalamount += $ar->{amount};
+ $subtotalpaid += $ar->{paid};
+ $subtotaldue += $ar->{amount} - $ar->{paid};
+
+ $totalnetamount += $ar->{netamount};
+ $totalamount += $ar->{amount};
+ $totalpaid += $ar->{paid};
+ $totaldue += ($ar->{amount} - $ar->{paid});
+
+ $column_data{transdate} = "<td>$ar->{transdate} </td>";
+ $column_data{id} = "<td>$ar->{id}</td>";
+ $column_data{datepaid} = "<td>$ar->{datepaid} </td>";
+ $column_data{duedate} = "<td>$ar->{duedate} </td>";
+
+ $module = ($ar->{invoice}) ? "is.pl" : $form->{script};
+
+ $column_data{invnumber} =
+ "<td><a href=$module?action=edit&id=$ar->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber}</a></td>";
+ $column_data{ordnumber} = "<td>$ar->{ordnumber} </td>";
+ $column_data{name} = "<td>$ar->{name}</td>";
+ $ar->{notes} =~ s/\r\n/<br>/g;
+ $column_data{notes} = "<td>$ar->{notes} </td>";
+ $column_data{shippingpoint} = "<td>$ar->{shippingpoint} </td>";
+ $column_data{shipvia} = "<td>$ar->{shipvia} </td>";
+ $column_data{employee} = "<td>$ar->{employee} </td>";
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i>
+";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &ar_subtotal;
+ }
+
+ # print totals
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{netamount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalnetamount, 2, " ") . "</th>";
+ $column_data{tax} = "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount - $totalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount, 2, " ") . "</th>";
+ $column_data{paid} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalpaid, 2, " ") . "</th>";
+ $column_data{due} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totaldue, 2, " ") . "</th>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('AR Transaction') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Sales Invoice') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub ar_subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{tax} = "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount, 2, " ") . "</th>";
+ $column_data{paid} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalpaid, 2, " ") . "</th>";
+ $column_data{due} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotaldue, 2, " ") . "</th>";
+
+ $subtotalnetamount = 0;
+ $subtotalamount = 0;
+ $subtotalpaid = 0;
+ $subtotaldue = 0;
+
+ $sameitem = $ar->{ $form->{sort} };
+
+ print "<tr class=listsubtotal>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print "
+</tr>
+";
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# common routines for gl, ar, ap, is, ir, oe
+#
+
+# any custom scripts for this one
+if (-f "$form->{path}/custom_arap.pl") {
+ eval { require "$form->{path}/custom_arap.pl"; };
+}
+if (-f "$form->{path}/$form->{login}_arap.pl") {
+ eval { require "$form->{path}/$form->{login}_arap.pl"; };
+}
+
+1;
+
+# end of main
+
+sub check_name {
+ $lxdebug->enter_sub();
+
+ my ($name) = @_;
+
+ my ($new_name, $new_id) = split /--/, $form->{$name};
+ my $i = 0;
+
+ # if we use a selection
+ if ($form->{"select$name"}) {
+ if ($form->{"old$name"} ne $form->{$name}) {
+
+ # this is needed for is, ir and oe
+
+ # for credit calculations
+ $form->{oldinvtotal} = 0;
+ $form->{oldtotalpaid} = 0;
+ $form->{calctax} = 1;
+
+ $form->{"${name}_id"} = $new_id;
+
+ IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
+ IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
+
+ $form->{$name} = $form->{"old$name"} = "$new_name--$new_id";
+
+ $i = 1;
+ }
+ } else {
+
+ # check name, combine name and id
+ if ($form->{"old$name"} ne qq|$form->{$name}--$form->{"${name}_id"}|) {
+
+ # this is needed for is, ir and oe
+
+ # for credit calculations
+ $form->{oldinvtotal} = 0;
+ $form->{oldtotalpaid} = 0;
+ $form->{calctax} = 1;
+
+ # return one name or a list of names in $form->{name_list}
+ if (($i = $form->get_name(\%myconfig, $name)) > 1) {
+ &select_name($name);
+ exit;
+ }
+
+ if ($i == 1) {
+
+ # we got one name
+ $form->{"${name}_id"} = $form->{name_list}[0]->{id};
+ $form->{$name} = $form->{name_list}[0]->{name};
+ $form->{"old$name"} = qq|$form->{$name}--$form->{"${name}_id"}|;
+
+ IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
+ IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
+
+ } else {
+
+ # name is not on file
+ $msg = ucfirst $name . " not on file or locked!";
+ $form->error($locale->text($msg));
+ }
+ }
+ }
+
+ $lxdebug->leave_sub();
+
+ return $i;
+}
+
+# $locale->text('Customer not on file!')
+# $locale->text('Vendor not on file!')
+
+sub select_name {
+ $lxdebug->enter_sub();
+
+ my ($table) = @_;
+
+ @column_index = qw(ndx name address);
+
+ $label = ucfirst $table;
+ $column_data{ndx} = qq|<th> </th>|;
+ $column_data{name} =
+ qq|<th class=listheading>| . $locale->text($label) . qq|</th>|;
+ $column_data{address} =
+ qq|<th class=listheading>| . $locale->text('Address') . qq|</th>|;
+
+ # list items with radio button on a form
+ $form->header;
+
+ $title = $locale->text('Select from one of the names below');
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$title</th>
+ </tr>
+ <tr space=5></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ my $i = 0;
+ foreach $ref (@{ $form->{name_list} }) {
+ $checked = ($i++) ? "" : "checked";
+
+ $ref->{name} =~ s/\"/"/g;
+
+ $column_data{ndx} =
+ qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
+ $column_data{name} =
+ qq|<td><input name="new_name_$i" type=hidden value="$ref->{name}">$ref->{name}</td>|;
+ $column_data{address} = qq|<td>$ref->{address} </td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+<input name="new_id_$i" type=hidden value=$ref->{id}>
+
+|;
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input name=lastndx type=hidden value=$i>
+
+|;
+
+ # delete variables
+ map { delete $form->{$_} } qw(action name_list header);
+
+ # save all other form variables
+ foreach $key (keys %${form}) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<input type=hidden name=nextsub value=name_selected>
+
+<input type=hidden name=vc value=$table>
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub name_selected {
+ $lxdebug->enter_sub();
+
+ # replace the variable with the one checked
+
+ # index for new item
+ $i = $form->{ndx};
+
+ $form->{ $form->{vc} } = $form->{"new_name_$i"};
+ $form->{"$form->{vc}_id"} = $form->{"new_id_$i"};
+ $form->{"old$form->{vc}"} =
+ qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
+
+ # delete all the new_ variables
+ for $i (1 .. $form->{lastndx}) {
+ map { delete $form->{"new_${_}_$i"} } (id, name);
+ }
+
+ map { delete $form->{$_} } qw(ndx lastndx nextsub);
+
+ IS->get_customer(\%myconfig, \%$form) if ($form->{vc} eq 'customer');
+ IR->get_vendor(\%myconfig, \%$form) if ($form->{vc} eq 'vendor');
+
+ &update(1);
+
+ $lxdebug->leave_sub();
+}
+
+sub add_transaction {
+ $lxdebug->enter_sub();
+
+ my ($module) = @_;
+
+ delete $form->{script};
+ $form->{action} = "add";
+ $form->{type} = "invoice" if $module =~ /(is|ir)/;
+
+ $form->{callback} = $form->escape($form->{callback}, 1);
+ map { $argv .= "$_=$form->{$_}&" } keys %$form;
+
+ $form->{callback} = "$module.pl?$argv";
+
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
+sub check_project {
+ $lxdebug->enter_sub();
+
+ for $i (1 .. $form->{rowcount}) {
+ $form->{"project_id_$i"} = "" unless $form->{"projectnumber_$i"};
+ if ($form->{"projectnumber_$i"} ne $form->{"oldprojectnumber_$i"}) {
+ if ($form->{"projectnumber_$i"}) {
+
+ # get new project
+ $form->{projectnumber} = $form->{"projectnumber_$i"};
+ if (($rows = PE->projects(\%myconfig, $form)) > 1) {
+
+ # check form->{project_list} how many there are
+ $form->{rownumber} = $i;
+ &select_project;
+ exit;
+ }
+
+ if ($rows == 1) {
+ $form->{"project_id_$i"} = $form->{project_list}->[0]->{id};
+ $form->{"projectnumber_$i"} =
+ $form->{project_list}->[0]->{projectnumber};
+ $form->{"oldprojectnumber_$i"} =
+ $form->{project_list}->[0]->{projectnumber};
+ } else {
+
+ # not on file
+ $form->error($locale->text('Project not on file!'));
+ }
+ } else {
+ $form->{"oldprojectnumber_$i"} = "";
+ }
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub select_project {
+ $lxdebug->enter_sub();
+
+ @column_index = qw(ndx projectnumber description);
+
+ $column_data{ndx} = qq|<th> </th>|;
+ $column_data{projectnumber} = qq|<th>| . $locale->text('Number') . qq|</th>|;
+ $column_data{description} =
+ qq|<th>| . $locale->text('Description') . qq|</th>|;
+
+ # list items with radio button on a form
+ $form->header;
+
+ $title = $locale->text('Select from one of the projects below');
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=rownumber value=$form->{rownumber}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$title</th>
+ </tr>
+ <tr space=5></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ my $i = 0;
+ foreach $ref (@{ $form->{project_list} }) {
+ $checked = ($i++) ? "" : "checked";
+
+ $ref->{name} =~ s/\"/"/g;
+
+ $column_data{ndx} =
+ qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
+ $column_data{projectnumber} =
+ qq|<td><input name="new_projectnumber_$i" type=hidden value="$ref->{projectnumber}">$ref->{projectnumber}</td>|;
+ $column_data{description} = qq|<td>$ref->{description}</td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+<input name="new_id_$i" type=hidden value=$ref->{id}>
+
+|;
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input name=lastndx type=hidden value=$i>
+
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action project_list header);
+
+ # save all other form variables
+ foreach $key (keys %${form}) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<input type=hidden name=nextsub value=project_selected>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub project_selected {
+ $lxdebug->enter_sub();
+
+ # replace the variable with the one checked
+
+ # index for new item
+ $i = $form->{ndx};
+
+ $form->{"projectnumber_$form->{rownumber}"} =
+ $form->{"new_projectnumber_$i"};
+ $form->{"oldprojectnumber_$form->{rownumber}"} =
+ $form->{"new_projectnumber_$i"};
+ $form->{"project_id_$form->{rownumber}"} = $form->{"new_id_$i"};
+
+ # delete all the new_ variables
+ for $i (1 .. $form->{lastndx}) {
+ map { delete $form->{"new_${_}_$i"} } qw(id projectnumber description);
+ }
+
+ map { delete $form->{$_} } qw(ndx lastndx nextsub);
+
+ if ($form->{update}) {
+ &{ $form->{update} };
+ } else {
+ &update;
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+sub gl_transaction { &add }
+sub ar_transaction { &add_transaction(ar) }
+sub ap_transaction { &add_transaction(ap) }
+sub sales_invoice { &add_transaction(is) }
+sub vendor_invoice { &add_transaction(ir) }
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Batch printing
+#
+#======================================================================
+
+use SL::BP;
+
+1;
+
+# end of main
+
+sub search {
+ $lxdebug->enter_sub();
+
+ # $locale->text('Sales Invoices')
+ # $locale->text('Packing Lists')
+ # $locale->text('Sales Orders')
+ # $locale->text('Purchase Orders')
+ # $locale->text('Quotations')
+ # $locale->text('RFQs')
+ # $locale->text('Checks')
+ # $locale->text('Receipts')
+
+ # setup customer/vendor selection
+ BP->get_vc(\%myconfig, \%$form);
+
+ if (@{ $form->{"all_$form->{vc}"} }) {
+ map { $name .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{"all_$form->{vc}"} };
+ $name = qq|<select name=$form->{vc}><option>\n$name</select>|;
+ } else {
+ $name = qq|<input name=$form->{vc} size=35>|;
+ }
+
+ # $locale->text('Customer')
+ # $locale->text('Vendor')
+
+ %label = (
+ invoice =>
+ { title => 'Sales Invoices', name => 'Customer', l_invnumber => 'Y' },
+ packing_list =>
+ { title => 'Packing Lists', name => 'Customer', l_invnumber => 'Y' },
+ sales_order =>
+ { title => 'Sales Orders', name => 'Customer', l_ordnumber => 'Y' },
+ purchase_order =>
+ { title => 'Purchase Orders', name => 'Vendor', l_ordnumber => 'Y' },
+ sales_quotation =>
+ { title => 'Quotations', name => 'Customer', l_quonumber => 'Y' },
+ request_quotation =>
+ { title => 'RFQs', name => 'Vendor', l_quonumber => 'Y' },
+ check => { title => 'Checks', name => 'Vendor' },
+ receipt => { title => 'Receipts', name => 'Customer' });
+
+ $label{invoice}{invnumber} = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td colspan=3><input name=invnumber size=20></td>
+ </tr>
+|;
+ $label{invoice}{ordnumber} = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td colspan=3><input name=ordnumber size=20></td>
+ </tr>
+|;
+ $label{sales_quotation}{quonumber} = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Quotation Number') . qq|</th>
+ <td colspan=3><input name=quonumber size=20></td>
+ </tr>
+|;
+
+ $label{check}{chknumber} = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Reference') . qq|</th>
+ <td colspan=3><input name=chknumber size=20></td>
+ </tr>
+|;
+
+ $label{packing_list}{invnumber} = $label{invoice}{invnumber};
+ $label{packing_list}{ordnumber} = $label{invoice}{ordnumber};
+ $label{sales_order}{ordnumber} = $label{invoice}{ordnumber};
+ $label{purchase_order}{ordnumber} = $label{invoice}{ordnumber};
+ $label{request_quotation}{quonumber} = $label{sales_quotation}{quonumber};
+ $label{receipt}{rctnumber} = $label{check}{chknumber};
+
+ # do one call to text
+ $form->{title} =
+ $locale->text('Print') . " "
+ . $locale->text($label{ $form->{type} }{title});
+
+ if ($form->{type} =~ /(check|receipt)/) {
+ if (BP->payment_accounts(\%myconfig, \%$form)) {
+ $account = qq|
+ <tr>
+ <th align=right>| . $locale->text('Account') . qq|</th>
+|;
+
+ if ($form->{accounts}) {
+ $account .= qq|
+ <td colspan=3><select name=account>
+|;
+ foreach $ref (@{ $form->{accounts} }) {
+ $account .= qq|
+ <option>$ref->{accno}--$ref->{description}
+|;
+ }
+
+ $account .= qq|
+ </select>
+|;
+ } else {
+ $account .= qq|
+ <td colspan=3><input name=account></td>
+|;
+
+ }
+
+ $account .= qq|
+ </tr>
+|;
+
+ }
+ }
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdatefrom id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdateto name=transdateto id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger1",
+ "transdateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=vc value=$form->{vc}>
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=title value="$form->{title}">
+
+<table width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>Kunde</th>
+ <td colspan=3>$name</td>
+ </tr>
+ $account
+ $label{$form->{type}}{invnumber}
+ $label{$form->{type}}{ordnumber}
+ $label{$form->{type}}{quonumber}
+ $label{$form->{type}}{chknumber}
+ $label{$form->{type}}{rctnumber}
+ <tr>
+ <th align=right nowrap>| . $locale->text('From') . qq|</th>
+ $button1
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ $button2
+ </tr>
+ <input type=hidden name=sort value=transdate>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=list_spool>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+
+$jsscript
+
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub remove {
+ $lxdebug->enter_sub();
+
+ $selected = 0;
+
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"checked_$i"}) {
+ $selected = 1;
+ last;
+ }
+ }
+
+ $form->error('Nothing selected!') unless $selected;
+
+ $form->{title} = $locale->text('Confirm!');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ map { delete $form->{$_} } qw(action header);
+
+ foreach $key (keys %$form) {
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>$form->{title}</h2>
+
+<h4>|
+ . $locale->text(
+ 'Are you sure you want to remove the marked entries from the queue?')
+ . qq|</h4>
+
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->info($locale->text('Removing marked entries from queue ...'));
+ $form->{callback} .= "&header=1" if $form->{callback};
+
+ $form->redirect($locale->text('Removed spoolfiles!'))
+ if (BP->delete_spool(\%myconfig, \%$form, $spool));
+ $form->error($locale->text('Cannot remove files!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub print {
+ $lxdebug->enter_sub();
+
+ if ($form->{callback}) {
+ map { $form->{callback} .= "&checked_$_=1" if $form->{"checked_$_"} }
+ (1 .. $form->{rowcount});
+ $form->{callback} .= "&header=1";
+ }
+
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"checked_$i"}) {
+ $form->{OUT} = "| $myconfig{printer}";
+ $form->info($locale->text('Printing ... '));
+
+ if (BP->print_spool(\%myconfig, \%$form, $spool)) {
+ print $locale->text('done');
+ $form->redirect($locale->text('Marked entries printed!'));
+ }
+ exit;
+ }
+ }
+
+ $form->error('Nothing selected!');
+
+ $lxdebug->leave_sub();
+}
+
+sub list_spool {
+ $lxdebug->enter_sub();
+
+ $form->{ $form->{vc} } = $form->unescape($form->{ $form->{vc} });
+ ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) =
+ split(/--/, $form->{ $form->{vc} });
+
+ BP->get_spoolfiles(\%myconfig, \%$form);
+
+ $title = $form->escape($form->{title});
+ $href =
+ "$form->{script}?action=list_spool&path=$form->{path}&login=$form->{login}&password=$form->{password}&vc=$form->{vc}&type=$form->{type}&title=$title";
+
+ $title = $form->escape($form->{title}, 1);
+ $callback =
+ "$form->{script}?action=list_spool&path=$form->{path}&login=$form->{login}&password=$form->{password}&vc=$form->{vc}&type=$form->{type}&title=$title";
+
+ if ($form->{ $form->{vc} }) {
+ $callback .= "&$form->{vc}=" . $form->escape($form->{ $form->{vc} }, 1);
+ $href .= "&$form->{vc}=" . $form->escape($form->{ $form->{vc} });
+ $option =
+ ($form->{vc} eq 'customer')
+ ? $locale->text('Customer')
+ : $locale->text('Vendor');
+ $option .= " : $form->{$form->{vc}}";
+ }
+ if ($form->{account}) {
+ $callback .= "&account=" . $form->escape($form->{account}, 1);
+ $href .= "&account=" . $form->escape($form->{account});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Account') . " : $form->{account}";
+ }
+ if ($form->{invnumber}) {
+ $callback .= "&invnumber=" . $form->escape($form->{invnumber}, 1);
+ $href .= "&invnumber=" . $form->escape($form->{invnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Invoice Number') . " : $form->{invnumber}";
+ }
+ if ($form->{ordnumber}) {
+ $callback .= "&ordnumber=" . $form->escape($form->{ordnumber}, 1);
+ $href .= "&ordnumber=" . $form->escape($form->{ordnumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Order Number') . " : $form->{ordnumber}";
+ }
+ if ($form->{quonumber}) {
+ $callback .= "&quonumber=" . $form->escape($form->{quonumber}, 1);
+ $href .= "&quonumber=" . $form->escape($form->{quonumber});
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Quotation Number') . " : $form->{quonumber}";
+ }
+
+ if ($form->{transdatefrom}) {
+ $callback .= "&transdatefrom=$form->{transdatefrom}";
+ $href .= "&transdatefrom=$form->{transdatefrom}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $callback .= "&transdateto=$form->{transdateto}";
+ $href .= "&transdateto=$form->{transdateto}";
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('To') . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+
+ $name = ucfirst $form->{vc};
+
+ @columns = (transdate);
+ if ($form->{type} =~ /(invoice|packing_list|check|receipt)/) {
+ push @columns, "invnumber";
+ }
+ if ($form->{type} =~ /_order$/) {
+ push @columns, "ordnumber";
+ }
+ if ($form->{type} =~ /_quotation$/) {
+ push @columns, "quonumber";
+ }
+
+ push @columns, (name, spoolfile);
+ @column_index = $form->sort_columns(@columns);
+ unshift @column_index, "checked";
+
+ $column_header{checked} = "<th class=listheading> </th>";
+ $column_header{transdate} =
+ "<th><a class=listheading href=$href&sort=transdate>"
+ . $locale->text('Date')
+ . "</a></th>";
+ $column_header{invnumber} =
+ "<th><a class=listheading href=$href&sort=invnumber>"
+ . $locale->text('Invoice')
+ . "</a></th>";
+ $column_header{ordnumber} =
+ "<th><a class=listheading href=$href&sort=ordnumber>"
+ . $locale->text('Order')
+ . "</a></th>";
+ $column_header{quonumber} =
+ "<th><a class=listheading href=$href&sort=quonumber>"
+ . $locale->text('Quotation')
+ . "</a></th>";
+ $column_header{name} =
+ "<th><a class=listheading href=$href&sort=name>"
+ . $locale->text($name)
+ . "</a></th>";
+ $column_header{spoolfile} =
+ "<th class=listheading>" . $locale->text('Spoolfile') . "</th>";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort and escape callback, this one we use for the add sub
+ $form->{callback} = $callback .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ $i = 0;
+
+ foreach $ref (@{ $form->{SPOOL} }) {
+
+ $i++;
+
+ $form->{"checked_$i"} = "checked" if $form->{"checked_$i"};
+
+ if ($ref->{invoice}) {
+ $ref->{module} = ($ref->{module} eq 'ar') ? "is" : "ir";
+ }
+ $module = "$ref->{module}.pl";
+
+ $column_data{transdate} = "<td>$ref->{transdate} </td>";
+
+ if ($spoolfile eq $ref->{spoolfile}) {
+ $column_data{checked} = qq|<td></td>|;
+ } else {
+ $column_data{checked} =
+ qq|<td><input name=checked_$i type=checkbox style=checkbox $form->{"checked_$i"} $form->{"checked_$i"}></td>|;
+ }
+
+ $column_data{invnumber} =
+ "<td><a href=$module?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&type=$form->{type}&callback=$callback>$ref->{invnumber}</a></td>";
+ $column_data{ordnumber} =
+ "<td><a href=$module?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&type=$form->{type}&callback=$callback>$ref->{ordnumber}</a></td>";
+ $column_data{quonumber} =
+ "<td><a href=$module?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&type=$form->{type}&callback=$callback>$ref->{quonumber}</a></td>";
+ $column_data{name} = "<td>$ref->{name}</td>";
+ $column_data{spoolfile} =
+ qq|<td><a href=$spool/$ref->{spoolfile}>$ref->{spoolfile}</a></td>
+<input type=hidden name="spoolfile_$i" value=$ref->{spoolfile}>
+|;
+
+ $spoolfile = $ref->{spoolfile};
+
+ $j++;
+ $j %= 2;
+ print "
+ <tr class=listrow$j>
+";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ print qq|
+<input type=hidden name=rowcount value=$i>
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=title value="$form->{title}">
+<input type=hidden name=vc value="$form->{vc}">
+<input type=hidden name=type value="$form->{type}">
+<input type=hidden name=sort value="$form->{sort}">
+
+<input type=hidden name=account value="$form->{account}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+|;
+
+ if ($myconfig{printer}) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Select all') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Remove') . qq|">
+|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub select_all {
+ $lxdebug->enter_sub();
+
+ map { $form->{"checked_$_"} = 1 } (1 .. $form->{rowcount});
+ &list_spool;
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# module for Chart of Accounts, Income Statement and Balance Sheet
+# search and edit transactions posted by the GL, AR and AP
+#
+#======================================================================
+
+use SL::CA;
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+
+sub chart_of_accounts {
+ $lxdebug->enter_sub();
+
+ CA->all_accounts(\%myconfig, \%$form);
+
+ @column_index = qw(accno gifi_accno description debit credit);
+
+ $column_header{accno} =
+ qq|<th class=listheading>| . $locale->text('Account') . qq|</th>\n|;
+ $column_header{gifi_accno} =
+ qq|<th class=listheading>| . $locale->text('GIFI') . qq|</th>\n|;
+ $column_header{description} =
+ qq|<th class=listheading>| . $locale->text('Description') . qq|</th>\n|;
+ $column_header{debit} =
+ qq|<th class=listheading>| . $locale->text('Debit') . qq|</th>\n|;
+ $column_header{credit} =
+ qq|<th class=listheading>| . $locale->text('Credit') . qq|</th>\n|;
+
+ $form->{title} = $locale->text('Chart of Accounts');
+
+ $colspan = $#column_index + 1;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table border=0 width=100%>
+ <tr><th class=listtop colspan=$colspan>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr class=listheading>|;
+
+ map { print $column_header{$_} } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ca (@{ $form->{CA} }) {
+
+ $description = $form->escape($ca->{description});
+ $gifi_description = $form->escape($ca->{gifi_description});
+
+ $href =
+ qq|$form->{script}?path=$form->{path}&action=list&accno=$ca->{accno}&login=$form->{login}&password=$form->{password}&description=$description&gifi_accno=$ca->{gifi_accno}&gifi_description=$gifi_description|;
+
+ if ($ca->{charttype} eq "H") {
+ print qq|<tr class=listheading>|;
+ map { $column_data{$_} = "<th>$ca->{$_}</th>"; } qw(accno description);
+ $column_data{gifi_accno} = "<th>$ca->{gifi_accno} </th>";
+ } else {
+ $i++;
+ $i %= 2;
+ print qq|<tr class=listrow$i>|;
+ $column_data{accno} = "<td><a href=$href>$ca->{accno}</a></td>";
+ $column_data{gifi_accno} =
+ "<td><a href=$href&accounttype=gifi>$ca->{gifi_accno}</a> </td>";
+ $column_data{description} = "<td>$ca->{description}</td>";
+ }
+
+ $column_data{debit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ca->{debit}, 2, " ")
+ . "</td>\n";
+ $column_data{credit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ca->{credit}, 2, " ")
+ . "</td>\n";
+
+ $totaldebit += $ca->{debit};
+ $totalcredit += $ca->{credit};
+
+ map { print $column_data{$_} } @column_index;
+
+ print qq|
+</tr>
+|;
+ }
+
+ map { $column_data{$_} = "<td> </td>"; }
+ qw(accno gifi_accno description);
+
+ $column_data{debit} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totaldebit, 2, 0) . "</th>";
+ $column_data{credit} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totalcredit, 2, 0) . "</th>";
+
+ print "<tr class=listtotal>";
+
+ map { print $column_data{$_} } @column_index;
+
+ print qq|
+</tr>
+<tr>
+ <td colspan=$colspan><hr size=3 noshade></td>
+</tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('List Transactions');
+ if ($form->{accounttype} eq 'gifi') {
+ $form->{title} .= " - " . $locale->text('GIFI') . " $form->{gifi_accno}";
+ } else {
+ $form->{title} .= " - " . $locale->text('Account') . " $form->{accno}";
+ }
+
+ # get departments
+ $form->all_departments(\%myconfig);
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $form->header;
+
+ map { $form->{$_} =~ s/\"/"/g; } qw(description gifi_description);
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=accno value=$form->{accno}>
+<input type=hidden name=description value="$form->{description}">
+<input type=hidden name=sort value=transdate>
+<input type=hidden name=eur value=$eur>
+<input type=hidden name=accounttype value=$form->{accounttype}>
+<input type=hidden name=gifi_accno value=$form->{gifi_accno}>
+<input type=hidden name=gifi_description value="$form->{gifi_description}">
+
+<table border=0 width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr
+ <tr valign=top>
+ <td>
+ <table>
+ $department
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}"></td>
+ <th align=right>| . $locale->text('To') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td colspan=3>
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td><hr size=3 noshade></td></tr>
+</table>
+
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=password value=$form->{password}>
+
+<br><input class=submit type=submit name=action value="|
+ . $locale->text('List Transactions') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_transactions {
+ $lxdebug->enter_sub();
+
+ CA->all_transactions(\%myconfig, \%$form);
+
+ $description = $form->escape($form->{description});
+ $gifi_description = $form->escape($form->{gifi_description});
+ $department = $form->escape($form->{department});
+ $projectnumber = $form->escape($form->{projectnumber});
+ $title = $form->escape($form->{title});
+
+ # construct href
+ $href =
+ "$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
+
+ $description = $form->escape($form->{description}, 1);
+ $gifi_description = $form->escape($form->{gifi_description}, 1);
+ $department = $form->escape($form->{department}, 1);
+ $projectnumber = $form->escape($form->{projectnumber}, 1);
+ $title = $form->escape($form->{title}, 1);
+
+ # construct callback
+ $callback =
+ "$form->{script}?path=$form->{path}&action=list_transactions&accno=$form->{accno}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&description=$description&accounttype=$form->{accounttype}&gifi_accno=$form->{gifi_accno}&gifi_description=$gifi_description&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title";
+
+ # figure out which column comes first
+ $column_header{transdate} =
+ qq|<th><a class=listheading href=$href&sort=transdate>|
+ . $locale->text('Date')
+ . qq|</a></th>|;
+ $column_header{reference} =
+ qq|<th><a class=listheading href=$href&sort=reference>|
+ . $locale->text('Reference')
+ . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th><a class=listheading href=$href&sort=description>|
+ . $locale->text('Description')
+ . qq|</a></th>|;
+ $column_header{debit} = qq|<th>| . $locale->text('Debit') . qq|</th>|;
+ $column_header{credit} = qq|<th>| . $locale->text('Credit') . qq|</th>|;
+ $column_header{balance} = qq|<th>| . $locale->text('Balance') . qq|</th>|;
+
+ @column_index =
+ $form->sort_columns(qw(transdate reference description debit credit));
+
+ if ($form->{accounttype} eq 'gifi') {
+ map { $form->{$_} = $form->{"gifi_$_"} } qw(accno description);
+ }
+ if ($form->{accno}) {
+ push @column_index, "balance";
+ }
+
+ $form->{title} =
+ ($form->{accounttype} eq 'gifi')
+ ? $locale->text('GIFI')
+ : $locale->text('Account');
+
+ $form->{title} .= " $form->{accno} - $form->{description}";
+
+ if ($form->{department}) {
+ ($department) = split /--/, $form->{department};
+ $options = $locale->text('Department') . " : $department<br>";
+ }
+ if ($form->{projectnumber}) {
+ $options .= $locale->text('Project Number');
+ $options .= " : $form->{projectnumber}<br>";
+ }
+
+ if ($form->{fromdate} || $form->{todate}) {
+ if ($form->{fromdate}) {
+ $fromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ }
+ if ($form->{todate}) {
+ $todate = $locale->date(\%myconfig, $form->{todate}, 1);
+ }
+
+ $form->{period} = "$fromdate - $todate";
+ } else {
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ }
+
+ $options .= $form->{period};
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$options</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort to callback
+ $callback = $form->escape($callback . "&sort=$form->{sort}");
+
+ if (@{ $form->{CA} }) {
+ $sameitem = $form->{CA}->[0]->{ $form->{sort} };
+ }
+
+ $ml = ($form->{category} =~ /(A|E)/) ? -1 : 1;
+ if ($form->{accno} && $form->{balance}) {
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
+ . "</td>";
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+ map { print $column_data{$_} } @column_index;
+ print qq|
+ </tr>
+|;
+ }
+
+ foreach $ca (@{ $form->{CA} }) {
+
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $ca->{ $form->{sort} }) {
+ &ca_subtotal;
+ }
+ }
+
+ # construct link to source
+ $href =
+ "<a href=$ca->{module}.pl?path=$form->{path}&action=edit&id=$ca->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{reference}</a>";
+
+ $column_data{debit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ca->{debit}, 2, " ") . "</td>";
+ $column_data{credit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ca->{credit}, 2, " ") . "</td>";
+
+ $form->{balance} += $ca->{amount};
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
+ . "</td>";
+
+ $subtotaldebit += $ca->{debit};
+ $subtotalcredit += $ca->{credit};
+
+ $totaldebit += $ca->{debit};
+ $totalcredit += $ca->{credit};
+
+ $column_data{transdate} = qq|<td>$ca->{transdate}</td>|;
+ $column_data{reference} = qq|<td>$href</td>|;
+ $column_data{description} = qq|<td>$ca->{description}</td>|;
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+
+ map { print $column_data{$_} } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &ca_subtotal;
+ }
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{debit} =
+ "<th align=right>"
+ . $form->format_amount(\%myconfig, $totaldebit, 2, " ") . "</th>";
+ $column_data{credit} =
+ "<th align=right>"
+ . $form->format_amount(\%myconfig, $totalcredit, 2, " ") . "</th>";
+ $column_data{balance} =
+ "<th align=right>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0) . "</th>";
+
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { print $column_data{$_} } @column_index;
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub ca_subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{debit} =
+ "<th align=right>"
+ . $form->format_amount(\%myconfig, $subtotaldebit, 2, " ") . "</th>";
+ $column_data{credit} =
+ "<th align=right>"
+ . $form->format_amount(\%myconfig, $subtotalcredit, 2, " ") . "</th>";
+
+ $subtotaldebit = 0;
+ $subtotalcredit = 0;
+
+ $sameitem = $ca->{ $form->{sort} };
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Payment module
+#
+#======================================================================
+
+use SL::CP;
+use SL::OP;
+use SL::IS;
+use SL::IR;
+
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+sub payment {
+ $lxdebug->enter_sub();
+
+ $form->{ARAP} = ($form->{type} eq 'receipt') ? "AR" : "AP";
+ $form->{arap} = lc $form->{ARAP};
+
+ # setup customer/vendor selection for open invoices
+ if ($form->{all_vc}) {
+ $form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP});
+ } else {
+ CP->get_openvc(\%myconfig, \%$form);
+ }
+
+ $form->{"select$form->{vc}"} = "";
+
+ if ($form->{"all_$form->{vc}"}) {
+ $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
+ map { $form->{"select$form->{vc}"} .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{"all_$form->{vc}"} };
+ }
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ CP->paymentaccounts(\%myconfig, \%$form);
+
+ $form->{selectaccount} = "";
+ $form->{"select$form->{ARAP}"} = "";
+
+ map { $form->{selectaccount} .= "<option>$_->{accno}--$_->{description}\n" }
+ @{ $form->{PR}{"$form->{ARAP}_paid"} };
+ map {
+ $form->{"select$form->{ARAP}"} .=
+ "<option>$_->{accno}--$_->{description}\n"
+ } @{ $form->{PR}{ $form->{ARAP} } };
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} =
+ $curr[0];
+
+ $form->{selectcurrency} = "";
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ $form->{media} = "screen";
+
+ &form_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $vclabel = ucfirst $form->{vc};
+ $vclabel = $locale->text($vclabel);
+
+ if ($form->{type} eq 'receipt') {
+ $form->{title} = $locale->text('Receipt');
+ $form->{origtitle} = "Receipt";
+ }
+ if ($form->{type} eq 'check') {
+ $form->{title} = $locale->text('Payment');
+ $form->{origtitle} = "Payment";
+ }
+
+ # $locale->text('Customer')
+ # $locale->text('Vendor')
+
+ if ($form->{ $form->{vc} } eq "") {
+ map { $form->{"addr$_"} = "" } (1 .. 4);
+ }
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+ if ($form->{forex}) {
+ $exchangerate = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+ <td colspan=3><input type=hidden name=exchangerate size=10 value=$form->{exchangerate}>$form->{exchangerate}</td>
+ </tr>
+|;
+ } else {
+ $exchangerate = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+ <td colspan=3><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+ </tr>
+|;
+ }
+ }
+
+ foreach $item ($form->{vc}, account, currency, $form->{ARAP}, department) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ $vc =
+ ($form->{"select$form->{vc}"})
+ ? qq|<select name=$form->{vc}>$form->{"select$form->{vc}"}\n</select>|
+ : qq|<input name=$form->{vc} size=35 value="$form->{$form->{vc}}">|;
+
+ if ($form->{all_vc}) {
+ $allvc = "checked";
+ $form->{openinvoices} = "";
+ } else {
+ $allvc = "";
+ $form->{openinvoices} = 1;
+ }
+
+ # $locale->text('AR')
+ # $locale->text('AP')
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=datepaid id=datepaid size=11 title="$myconfig{dateformat}" value="$form->{datepaid}">
+ <input type=button name=datepaid id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "datepaid", "BL", "trigger1", "",
+ "", "");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->header;
+
+ $arap = lc $form->{ARAP};
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=vc value=$form->{vc}>
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=formname value=$form->{type}>
+<input type=hidden name=queued value="$form->{queued}">
+<input type=hidden name=arap value=$arap>
+<input type=hidden name=ARAP value=$form->{ARAP}>
+<input type=hidden name=openinvoices value=$form->{openinvoices}>
+<input type=hidden name=title value="$form->{title}">
+<input type=hidden name=origtitle value="$form->{origtitle}">
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <td align=right>
+ <input name=all_vc type=checkbox style=checkbox value=Y $allvc>
+ <input type=hidden name="oldall_vc" value="$form->{all_vc}"></td>
+ <th align=left>| . $locale->text('All') . qq|</th>
+ </tr>
+ <tr>
+ <th align=right>$vclabel</th>
+ <td>$vc</td>
+ <input type=hidden name="select$form->{vc}" value="$form->{"select$form->{vc}"}">
+ <input type=hidden name="$form->{vc}_id" value=$form->{"$form->{vc}_id"}>
+ <input type=hidden name="old$form->{vc}" value="$form->{"old$form->{vc}"}">
+ </tr>
+ <tr valign=top>
+ <th align=right nowrap>| . $locale->text('Address') . qq|</th>
+ <td colspan=2>
+ <table>
+ <tr>
+ <td>$form->{street}</td>
+ </tr>
+ <tr>
+ <td>$form->{zipcode}</td>
+ </tr>
+ <tr>
+ <td>$form->{city}</td>
+ </tr>
+ <tr>
+ <td>$form->{country}</td>
+ </tr>
+ </table>
+ </td>
+ <input type=hidden name=street value="$form->{street}">
+ <input type=hidden name=zipcode value="$form->{zipcode}">
+ <input type=hidden name=city value="$form->{city}">
+ <input type=hidden name=country value="$form->{country}">
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Memo') . qq|</th>
+ <td colspan=2><input name="memo" size=30 value="$form->{memo}"></td>
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ $department
+ <tr>
+ <th align=right nowrap>| . $locale->text($form->{ARAP}) . qq|</th>
+ <td colspan=3><select name=$form->{ARAP}>$form->{"select$form->{ARAP}"}</select>
+ </td>
+ <input type=hidden name="select$form->{ARAP}" value="$form->{"select$form->{ARAP}"}">
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Account') . qq|</th>
+ <td colspan=3><select name=account>$form->{selectaccount}</select>
+ <input type=hidden name=selectaccount value="$form->{selectaccount}">
+ </td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+ <input type=hidden name=oldcurrency value=$form->{oldcurrency}>
+ </tr>
+ $exchangerate
+ <tr>
+ <th align=right nowrap>| . $locale->text('Source') . qq|</th>
+ <td colspan=3><input name=source value="$form->{source}" size=10></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Amount') . qq|</th>
+ <td colspan=3><input name=amount size=10 value=|
+ . $form->format_amount(\%myconfig, $form->{amount}, 2)
+ . qq|></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+$jsscript
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_invoices {
+ $lxdebug->enter_sub();
+
+ @column_index = qw(invnumber transdate amount due checked paid);
+
+ $colspan = $#column_index + 1;
+
+ $invoice = $locale->text('Invoices');
+
+ print qq|
+ <input type=hidden name=column_index value="id @column_index">
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th class=listheading colspan=$colspan>$invoice</th>
+ </tr>
+|;
+
+ $column_data{invnumber} =
+ qq|<th nowrap class=listheading>| . $locale->text('Invoice') . "</th>";
+ $column_data{transdate} =
+ qq|<th nowrap class=listheading>| . $locale->text('Date') . "</th>";
+ $column_data{amount} =
+ qq|<th nowrap class=listheading>| . $locale->text('Amount') . "</th>";
+ $column_data{due} =
+ qq|<th nowrap class=listheading>| . $locale->text('Due') . "</th>";
+ $column_data{paid} =
+ qq|<th nowrap class=listheading>| . $locale->text('Amount') . "</th>";
+ $column_data{checked} =
+ qq|<th nowrap class=listheading>| . $locale->text('Select') . "</th>";
+
+ print qq|
+ <tr>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+ print qq|
+ </tr>
+|;
+
+ for $i (1 .. $form->{rowcount}) {
+
+ map {
+ $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(amount due paid);
+
+ $totalamount += $form->{"amount_$i"};
+ $totaldue += $form->{"due_$i"};
+ $totalpaid += $form->{"paid_$i"};
+
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2)
+ } qw(amount due paid);
+
+ $column_data{invnumber} = qq|<td>$form->{"invnumber_$i"}</td>
+ <input type=hidden name="invnumber_$i" value="$form->{"invnumber_$i"}">
+ <input type=hidden name="id_$i" value=$form->{"id_$i"}>|;
+ $column_data{transdate} = qq|<td width=15%>$form->{"transdate_$i"}</td>
+ <input type=hidden name="transdate_$i" value=$form->{"transdate_$i"}>|;
+ $column_data{amount} =
+ qq|<td align=right width=15%>$form->{"amount_$i"}</td>
+ <input type=hidden name="amount_$i" value=$form->{"amount_$i"}>|;
+ $column_data{due} = qq|<td align=right width=15%>$form->{"due_$i"}</td>
+ <input type=hidden name="due_$i" value=$form->{"due_$i"}>|;
+
+ $column_data{paid} =
+ qq|<td align=right width=15%><input name="paid_$i" size=10 value=$form->{"paid_$i"}></td>|;
+
+ $form->{"checked_$i"} = ($form->{"checked_$i"}) ? "checked" : "";
+ $column_data{checked} =
+ qq|<td align=center width=10%><input name="checked_$i" type=checkbox style=checkbox $form->{"checked_$i"}></td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+ print qq|
+ </tr>
+|;
+ }
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{amount} =
+ qq|<th class=listtotal align=right>|
+ . $form->format_amount(\%myconfig, $totalamount, 2, " ")
+ . qq|</th>|;
+ $column_data{due} =
+ qq|<th class=listtotal align=right>|
+ . $form->format_amount(\%myconfig, $totaldue, 2, " ")
+ . qq|</th>|;
+ $column_data{paid} =
+ qq|<th class=listtotal align=right>|
+ . $form->format_amount(\%myconfig, $totalpaid, 2, " ")
+ . qq|</th>|;
+
+ print qq|
+ <tr class=listtotal>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ $form->{DF}{ $form->{format} } = "selected";
+ $form->{OP}{ $form->{media} } = "selected";
+
+ $media = qq|
+ <option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
+
+ if ($myconfig{printer} && $latex) {
+ $media .= qq|
+ <option value=printer $form->{OP}{printer}>|
+ . $locale->text('Printer');
+ }
+ if ($latex) {
+ $media .= qq|
+ <option value=queue $form->{OP}{queue}>| . $locale->text('Queue');
+ $format .= qq|
+ <option value=postscript $form->{DF}{postscript}>|
+ . $locale->text('Postscript') . qq|
+ <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
+ }
+
+ print qq|
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+<input type=hidden name=rowcount value=$form->{rowcount}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+
+ if ($latex) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">|;
+ }
+
+ print qq|
+<select name=format>$format</select>
+<select name=media>$media</select>
+|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ my ($new_name_selected) = @_;
+
+ if ($form->{vc} eq 'customer') {
+ $buysell = "buy";
+ } else {
+ $buysell = "sell";
+ }
+
+ # if we switched to all_vc
+ if ($form->{all_vc} ne $form->{oldall_vc}) {
+
+ $form->{openinvoices} = ($form->{all_vc}) ? 0 : 1;
+
+ $form->{"select$form->{vc}"} = "";
+
+ if ($form->{all_vc}) {
+ $form->all_vc(\%myconfig, $form->{vc}, $form->{ARAP});
+
+ if ($form->{"all_$form->{vc}"}) {
+ map {
+ $form->{"select$form->{vc}"} .=
+ "<option>$_->{name}--$_->{id}\n"
+ } @{ $form->{"all_$form->{vc}"} };
+ }
+ } else {
+ CP->get_openvc(\%myconfig, \%$form);
+
+ if ($form->{"all_$form->{vc}"}) {
+ $newvc =
+ qq|$form->{"all_$form->{vc}"}[0]->{name}--$form->{"all_$form->{vc}"}[0]->{id}|;
+ map {
+ $form->{"select$form->{vc}"} .=
+ "<option>$_->{name}--$_->{id}\n"
+ } @{ $form->{"all_$form->{vc}"} };
+ }
+
+ # if the name is not the same
+ if ($form->{"select$form->{vc}"} !~ /$form->{$form->{vc}}/) {
+ $form->{ $form->{vc} } = $newvc;
+ }
+ }
+ }
+
+ # get customer and invoices
+ $updated = &check_name($form->{vc});
+
+ if ($new_name_selected || $updated) {
+ CP->get_openinvoices(\%myconfig, \%$form);
+ ($newvc) = split /--/, $form->{ $form->{vc} };
+ $form->{"old$form->{vc}"} = qq|$newvc--$form->{"$form->{vc}_id"}|;
+ $updated = 1;
+ }
+
+ if ($form->{currency} ne $form->{oldcurrency}) {
+ $form->{oldcurrency} = $form->{currency};
+ if (!$updated) {
+ CP->get_openinvoices(\%myconfig, \%$form);
+ $updated = 1;
+ }
+ }
+
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{datepaid}, $buysell
+ )));
+
+ $amount = $form->{amount} = $form->parse_amount(\%myconfig, $form->{amount});
+
+ if ($updated) {
+ $form->{rowcount} = 0;
+
+ $form->{queued} = "";
+
+ $i = 0;
+ foreach $ref (@{ $form->{PR} }) {
+ $i++;
+ $form->{"id_$i"} = $ref->{id};
+ $form->{"invnumber_$i"} = $ref->{invnumber};
+ $form->{"transdate_$i"} = $ref->{transdate};
+ $ref->{exchangerate} = 1 unless $ref->{exchangerate};
+ $form->{"amount_$i"} = $ref->{amount} / $ref->{exchangerate};
+ $form->{"due_$i"} =
+ ($ref->{amount} - $ref->{paid}) / $ref->{exchangerate};
+ $form->{"checked_$i"} = "";
+ $form->{"paid_$i"} = "";
+
+ # need to format
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2)
+ } qw(amount due);
+
+ }
+ $form->{rowcount} = $i;
+ }
+
+ # recalculate
+ $amount = $form->{amount};
+ for $i (1 .. $form->{rowcount}) {
+
+ map {
+ $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(amount due paid);
+
+ if ($form->{"checked_$i"}) {
+
+ # calculate paid_$i
+ if (!$form->{"paid_$i"}) {
+ $form->{"paid_$i"} = $form->{"due_$i"};
+ }
+
+ $amount -= $form->{"paid_$i"};
+ } else {
+ $form->{"paid_$i"} = "";
+ }
+
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2)
+ } qw(amount due paid);
+
+ }
+
+ &form_header;
+ &list_invoices;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ &check_form;
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->error($locale->text('Exchangerate missing!'))
+ unless $form->{exchangerate};
+ }
+
+ $msg1 = "$form->{origtitle} posted!";
+ $msg2 = "Cannot post $form->{origtitle}!";
+
+ # $locale->text('Payment posted!')
+ # $locale->text('Receipt posted!')
+ # $locale->text('Cannot post Payment!')
+ # $locale->text('Cannot post Receipt!')
+
+ $form->redirect($locale->text($msg1))
+ if (CP->process_payment(\%myconfig, \%$form));
+ $form->error($locale->text($msg2));
+
+ $lxdebug->leave_sub();
+}
+
+sub print {
+ $lxdebug->enter_sub();
+
+ &check_form;
+
+ ($whole, $form->{decimal}) = split /\./, $form->{amount};
+
+ $form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
+
+ $form->{decimal} .= "00";
+ $form->{decimal} = substr($form->{decimal}, 0, 2);
+
+ $check = new CP $myconfig{countrycode};
+ $check->init;
+ $form->{text_amount} = $check->num2text($whole);
+
+ &{"$form->{vc}_details"};
+
+ $form->{callback} = "";
+
+ $form->{templates} = "$myconfig{templates}";
+ $form->{IN} = "$form->{formname}.tex";
+
+ if ($form->{format} eq 'postscript') {
+ $form->{postscript} = 1;
+ }
+ if ($form->{format} eq 'pdf') {
+ $form->{pdf} = 1;
+ }
+
+ if ($form->{media} eq 'printer') {
+ $form->{OUT} = "| $myconfig{printer}";
+ }
+ if ($form->{media} eq 'queue') {
+ %queued = split / /, $form->{queued};
+
+ if ($filename = $queued{ $form->{formname} }) {
+ unlink "$spool/$filename";
+ $filename =~ s/\..*$//g;
+ } else {
+ $filename = time;
+ $filename .= $$;
+ }
+ $filename .= ($form->{postscript}) ? '.ps' : '.pdf';
+ $form->{queued} = "$form->{formname} $filename";
+ $form->{OUT} = ">$spool/$filename";
+
+ $form->update_status(\%myconfig);
+
+ }
+
+ $form->{company} = $myconfig{company};
+ $form->{address} = $myconfig{address};
+
+ @a =
+ qw(name invnumber company address text_amount street zipcode city country memo);
+ $form->format_string(@a);
+
+ $form->parse_template(\%myconfig, $userspath);
+
+ if ($form->{media} ne 'screen') {
+ $form->{callback} =
+ "$form->{script}?action=payment&vc=$form->{vc}&path=$form->{path}&login=$form->{login}&password=$form->{password}&all_vc=$form->{all_vc}";
+
+ $form->redirect if (CP->process_payment(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post payment!'));
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub customer_details { IS->customer_details(\%myconfig, \%$form) }
+sub vendor_details { IR->vendor_details(\%myconfig, \%$form) }
+
+sub check_form {
+ $lxdebug->enter_sub();
+
+ &check_name($form->{vc});
+
+ if ($form->{currency} ne $form->{oldcurrency}) {
+ &update;
+ exit;
+ }
+
+ $form->error($locale->text('Date missing!')) unless $form->{datepaid};
+
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ $datepaid = $form->datetonum($form->{datepaid}, \%myconfig);
+
+ $form->error($locale->text('Cannot process payment for a closed period!'))
+ if ($datepaid <= $closedto);
+
+ $amount = $form->parse_amount(\%myconfig, $form->{amount});
+ $form->{amount} = $amount;
+
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"paid_$i"}) {
+ $amount -= $form->parse_amount($myconfig, $form->{"paid_$i"});
+
+ push(@{ $form->{paid} }, $form->{"paid_$i"});
+ push(@{ $form->{due} }, $form->{"due_$i"});
+ push(@{ $form->{invnumber} }, $form->{"invnumber_$i"});
+ push(@{ $form->{invdate} }, $form->{"transdate_$i"});
+ }
+ }
+
+ if ($form->round_amount($amount, 2) != 0) {
+ push(@{ $form->{paid} }, $form->format_amount(\%myconfig, $amount, 2));
+ push(@{ $form->{due} }, $form->format_amount(\%myconfig, 0, "0"));
+ push(@{ $form->{invnumber} },
+ ($form->{ARAP} eq 'AR')
+ ? $locale->text('Deposit')
+ : $locale->text('Prepayment'));
+ push(@{ $form->{invdate} }, $form->{datepaid});
+ }
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Reed White <alta@alta-research.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# customer/vendor module
+#
+#======================================================================
+
+# $locale->text('Customers')
+# $locale->text('Vendors')
+# $locale->text('Add Customer')
+# $locale->text('Add Vendor')
+
+use SL::CT;
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ CT->taxaccounts(\%myconfig, \%$form);
+
+ &form_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ $label = ucfirst $form->{db};
+ $form->{title} = $locale->text($label . "s");
+
+ if ($form->{db} eq 'vendor') {
+ $gifi = qq|
+ <td><input name="l_gifi_accno" type=checkbox class=checkbox value=Y> |
+ . $locale->text('GIFI')
+ . qq|</td>
+|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=db value=$form->{db}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text($label . ' Number') . qq|</th>
+ <td><input name=$form->{db}number size=35></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
+ <td><input name=name size=35></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
+ <td><input name=contact size=35></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email size=35></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input name=status class=radio type=radio value=all checked> |
+ . $locale->text('All') . qq|
+ <input name=status class=radio type=radio value=orphaned> |
+ . $locale->text('Orphaned')
+ . qq|</td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td>
+ <table>
+ <tr>
+ <td><input name="l_id" type=checkbox class=checkbox value=Y> |
+ . $locale->text('ID')
+ . qq|</td>
+ <td><input name="l_$form->{db}number" type=checkbox class=checkbox value=Y> |
+ . $locale->text($label . ' Number')
+ . qq|</td>
+ <td><input name="l_name" type=checkbox class=checkbox value=Y checked> |
+ . $locale->text('Company Name')
+ . qq|</td>
+ <td><input name="l_address" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Address')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_contact" type=checkbox class=checkbox value=Y checked> |
+ . $locale->text('Contact')
+ . qq|</td>
+ <td><input name="l_phone" type=checkbox class=checkbox value=Y checked> |
+ . $locale->text('Phone')
+ . qq|</td>
+ <td><input name="l_fax" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Fax')
+ . qq|</td>
+ <td><input name="l_email" type=checkbox class=checkbox value=Y checked> |
+ . $locale->text('E-mail')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_taxnumber" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Tax Number')
+ . qq|</td>
+ $gifi
+ <td><input name="l_sic_code" type=checkbox class=checkbox value=Y> |
+ . $locale->text('SIC')
+ . qq|</td>
+ <td><input name="l_business" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Type of Business')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_invnumber" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Invoices')
+ . qq|</td>
+ <td><input name="l_ordnumber" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Orders')
+ . qq|</td>
+ <td><input name="l_quonumber" type=checkbox class=checkbox value=Y> |
+ . $locale->text('Quotations')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=list_names>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+}
+
+sub list_names {
+ $lxdebug->enter_sub();
+
+ CT->search(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=list_names&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
+ $href = $callback;
+
+ @columns =
+ $form->sort_columns(id, name,
+ "$form->{db}number", address,
+ contact, phone,
+ fax, email,
+ taxnumber, gifi_accno,
+ sic_code, business,
+ invnumber, ordnumber,
+ quonumber);
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+ $number =
+ ($form->{db} eq "customer")
+ ? $locale->text('Customer Number')
+ : $locale->text('Vendor Number');
+
+ if ($form->{status} eq 'all') {
+ $option = $locale->text('All');
+ }
+ if ($form->{status} eq 'orphaned') {
+ $option .= $locale->text('Orphaned');
+ }
+ if ($form->{name}) {
+ $callback .= "&name=" . $form->escape($form->{name}, 1);
+ $href .= "&name=" . $form->escape($form->{name});
+ $option .= "\n<br>" . $locale->text('Name') . " : $form->{name}";
+ }
+ if ($form->{contact}) {
+ $callback .= "&contact=" . $form->escape($form->{contact}, 1);
+ $href .= "&contact=" . $form->escape($form->{contact});
+ $option .= "\n<br>" . $locale->text('Contact') . " : $form->{contact}";
+ }
+ if ($form->{"$form->{db}number"}) {
+ $callback .=
+ qq|&$form->{db}number=| . $form->escape($form->{"$form->{db}number"}, 1);
+ $href .=
+ "&$form->{db}number=" . $form->escape($form->{"$form->{db}number"});
+ $option .=
+ "\n<br>" . $locale->text('Number') . qq| : $form->{"$form->{db}number"}|;
+ }
+ if ($form->{email}) {
+ $callback .= "&email=" . $form->escape($form->{email}, 1);
+ $href .= "&email=" . $form->escape($form->{email});
+ $option .= "\n<br>" . $locale->text('E-mail') . " : $form->{email}";
+ }
+
+ $form->{callback} = "$callback&sort=$form->{sort}";
+ $callback = $form->escape($form->{callback});
+
+ $column_header{id} =
+ qq|<th class=listheading>| . $locale->text('ID') . qq|</th>|;
+ $column_header{"$form->{db}number"} =
+ qq|<th><a class=listheading href=$href&sort=$form->{db}number>$number</a></th>|;
+ $column_header{name} =
+ qq|<th><a class=listheading href=$href&sort=name>|
+ . $locale->text('Name')
+ . qq|</a></th>|;
+ $column_header{address} =
+ qq|<th><a class=listheading href=$href&sort=address>|
+ . $locale->text('Address')
+ . qq|</a></th>|;
+ $column_header{contact} =
+ qq|<th><a class=listheading href=$href&sort=contact>|
+ . $locale->text('Contact')
+ . qq|</a></th>|;
+ $column_header{phone} =
+ qq|<th><a class=listheading href=$href&sort=phone>|
+ . $locale->text('Phone')
+ . qq|</a></th>|;
+ $column_header{fax} =
+ qq|<th><a class=listheading href=$href&sort=fax>|
+ . $locale->text('Fax')
+ . qq|</a></th>|;
+ $column_header{email} =
+ qq|<th><a class=listheading href=$href&sort=email>|
+ . $locale->text('E-mail')
+ . qq|</a></th>|;
+ $column_header{cc} =
+ qq|<th><a class=listheading href=$href&sort=cc>|
+ . $locale->text('Cc')
+ . qq|</a></th>|;
+
+ $column_header{taxnumber} =
+ qq|<th><a class=listheading href=$href&sort=taxnumber>|
+ . $locale->text('Tax Number')
+ . qq|</a></th>|;
+ $column_header{gifi_accno} =
+ qq|<th><a class=listheading href=$href&sort=gifi_accno>|
+ . $locale->text('GIFI')
+ . qq|</a></th>|;
+ $column_header{sic_code} =
+ qq|<th><a class=listheading href=$href&sort=sic_code>|
+ . $locale->text('SIC')
+ . qq|</a></th>|;
+ $column_header{business} =
+ qq|<th><a class=listheading href=$href&sort=business>|
+ . $locale->text('Type of Business')
+ . qq|</a></th>|;
+
+ $column_header{invnumber} =
+ qq|<th><a class=listheading href=$href&sort=invnumber>|
+ . $locale->text('Invoice')
+ . qq|</a></th>|;
+ $column_header{ordnumber} =
+ qq|<th><a class=listheading href=$href&sort=ordnumber>|
+ . $locale->text('Order')
+ . qq|</a></th>|;
+ $column_header{quonumber} =
+ qq|<th><a class=listheading href=$href&sort=quonumber>|
+ . $locale->text('Quotation')
+ . qq|</a></th>|;
+
+ $label = ucfirst $form->{db} . "s";
+ $form->{title} = $locale->text($label);
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $ordertype = ($form->{db} eq 'customer') ? 'sales_order' : 'purchase_order';
+ $quotationtype =
+ ($form->{db} eq 'customer') ? 'sales_quotation' : 'request_quotation';
+
+ foreach $ref (@{ $form->{CT} }) {
+
+ if ($ref->{id} eq $sameid) {
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+ } else {
+ map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
+
+ map { $column_data{$_} = "<td>$ref->{$_} </td>" }
+ (invnumber, ordnumber, quonumber);
+
+ $column_data{name} =
+ "<td align=left><a href=$form->{script}?action=edit&id=$ref->{id}&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&callback=$callback>$ref->{name} </td>";
+
+ if ($ref->{email}) {
+ $email = $ref->{email};
+ $email =~ s/</\</;
+ $email =~ s/>/\>/;
+
+ $column_data{email} =
+ qq|<td><a href="mailto:$ref->{email}">$email</a></td>|;
+ }
+
+ }
+
+ if ($ref->{formtype} eq 'invoice') {
+ $column_data{invnumber} =
+ "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} </td>";
+ }
+
+ if ($ref->{formtype} eq 'order') {
+ $column_data{ordnumber} =
+ "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} </td>";
+ }
+
+ if ($ref->{formtype} eq 'quotation') {
+ $column_data{quonumber} =
+ "<td><a href=$ref->{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} </td>";
+ }
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i>
+";
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $sameid = $ref->{id};
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+<input name=db type=hidden value=$form->{db}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ # $locale->text('Edit Customer')
+ # $locale->text('Edit Vendor')
+
+ CT->get_tuple(\%myconfig, \%$form);
+
+ # format " into "
+ map { $form->{$_} =~ s/\"/"/g } keys %$form;
+
+ $form->{title} = "Edit";
+
+ # format discount
+ $form->{discount} *= 100;
+
+ &form_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0);
+
+ if ($myconfig{role} eq 'admin') {
+ $bcc = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Bcc') . qq|</th>
+ <td><input name=bcc size=35 value="$form->{bcc}"></td>
+ </tr>
+|;
+ }
+ $form->{obsolete} = "checked" if $form->{obsolete};
+ %langs = (de => "deutsch", en => "englisch", fr => "französisch");
+ $lang = qq|<option value=""></option>|;
+ foreach $item (keys %langs) {
+ if ($form->{language} eq $item) {
+ $lang .= qq|<option value="$item" selected>$langs{$item}</option>|;
+ } else {
+ $lang .= qq|<option value="$item">$langs{$item}</option>|;
+ }
+ }
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if (($form->{tax}{$item}{taxable}) || !($form->{id})) {
+ $taxable .=
+ qq| <input name="tax_$item" value=1 class=checkbox type=checkbox checked> <b>$form->{tax}{$item}{description}</b>|;
+ } else {
+ $taxable .=
+ qq| <input name="tax_$item" value=1 class=checkbox type=checkbox> <b>$form->{tax}{$item}{description}</b>|;
+ }
+ }
+
+##LINET
+ $taxable = "";
+
+ if ($taxable) {
+ $tax = qq|
+ <tr>
+ <th align=right>| . $locale->text('Taxable') . qq|</th>
+ <td colspan=2>
+ <table>
+ <tr>
+ <td>$taxable</td>
+ <td><input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}></td>
+ <th align=left>| . $locale->text('Tax Included') . qq|</th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ }
+
+ $form->{selectbusiness} = qq|<option>\n|;
+ map {
+ $form->{selectbusiness} .= qq|<option value=$_->{id}>$_->{description}\n|
+ } @{ $form->{all_business} };
+ if ($form->{business_save}) {
+ $form->{selectbusiness} = $form->{business_save};
+ }
+ $form->{selectbusiness} =~
+ s/<option value=$form->{business}>/<option value=$form->{business} selected>/;
+
+ $label = ucfirst $form->{db};
+ $form->{title} = $locale->text("$form->{title} $label");
+ if ($form->{title_save}) {
+ $form->{title} = $form->{title_save};
+ }
+ if ($form->{db} eq 'vendor') {
+ $customer = qq|
+ <th align=right>| . $locale->text('Kundennummer') . qq|</th>
+ <td><input name=v_customer_id size=10 tabindex=18 maxlength=35 value="$form->{v_customer_id}"></td>
+|;
+ }
+
+ if ($form->{db} eq 'customer') {
+
+ $customer = qq|
+ <th align=right>| . $locale->text('KNr. beim Kunden') . qq|</th>
+ <td><input name=c_vendor_id size=10 tabindex=18 maxlength=35 value="$form->{c_vendor_id}"></td>
+|;
+ }
+ $business_salesman = "";
+ $business = "<th></th><td></td>";
+ if ($vertreter) {
+ $business_salesman = qq|
+ <tr>
+ <td colspan=3>
+ <table>
+ <th align=right>| . $locale->text('Type of Business') . qq|</th>
+ <td><select name=business tabindex=1>$form->{selectbusiness}</select></td>
+ <th align=right>| . $locale->text('Salesman') . qq|</th>
+ <td><input name=salesman tabindex=2 value="$form->{salesman}"></td>
+ <input type=hidden name=salesman_id value="$form->{salesman_id}">
+ <input type=hidden name=oldsalesman value="$form->{oldsalesman}">
+ </table>
+ </td>
+ <tr>|;
+ $business = qq|
+ <th align=right>| . $locale->text('Username') . qq|</th>
+ <td><input name=username maxlength=50 tabindex=22 value="$form->{username}"></td>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input name=user_password maxlength=12 tabindex=23 value="$form->{user_password}"></td>|;
+ } else {
+ $business = qq|
+ <th align=right>| . $locale->text('Type of Business') . qq|</th>
+ <td><select name=business tabindex=22>$form->{selectbusiness}</select></td>
+ |;
+ }
+
+## LINET: Create a drop-down box with all prior titles and greetings.
+ CT->query_titles_and_greetings(\%myconfig, \%$form);
+
+ $select_title = qq| <select name=selected_cp_title><option></option>|;
+ map({ $select_title .= qq|<option>$_</option>|; } @{ $form->{TITLES} });
+ $select_title .= qq|</select>|;
+
+ $select_greeting =
+ qq| <select name=selected_cp_greeting><option></option>|;
+ map(
+ { $select_greeting .= qq|<option>$_</option>|; } @{ $form->{GREETINGS} });
+ $select_greeting .= qq|</select>|;
+## /LINET
+
+ # $locale->text('Customer Number')
+ # $locale->text('Vendor Number')
+ $form->{fokus} = "ct.name";
+ $form->header;
+
+ print qq|
+<body onLoad="fokus()">
+<form method=post name="ct" action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th class=listheading colspan=2 width=50%>|
+ . $locale->text('Billing Address')
+ . qq|</th>
+ <th class=listheading width=50%>|
+ . $locale->text('Shipping Address')
+ . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ $business_salesman
+ <tr>
+ <th align=right nowrap>| . $locale->text($label . ' Number') . qq|</th>
+ <td><input name="$form->{db}number" size=35 maxlength=35 value="$form->{"$form->{db}number"}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
+ <td><input name=name size=35 maxlength=35 tabindex=1 value="$form->{name}"></td>
+ <td><input name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Abteilung') . qq|</th>
+ <td><input name=department_1 size=16 maxlength=75 tabindex=2 value="$form->{department_1}">
+ <input name=department_2 size=16 maxlength=75 tabindex=3 value="$form->{department_2}"></td>
+ <td><input name=shiptodepartment_1 size=16 maxlength=75 value="$form->{shiptodepartment_1}">
+ <input name=shiptodepartment_2 size=16 maxlength=75 value="$form->{shiptodepartment_2}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Street') . qq|</th>
+ <td><input name=street size=35 tabindex=4 maxlength=75 value="$form->{street}"></td>
+ <td><input name=shiptostreet size=35 maxlength=35 value="$form->{shiptostreet}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Zipcode') . "/"
+ . $locale->text('City')
+ . qq|</th>
+ <td><input name=zipcode size=5 tabindex=5 maxlength=10 value="$form->{zipcode}">
+ <input name=city size=30 tabindex=6 maxlength=75 value="$form->{city}"></td>
+ <td><input name=shiptozipcode size=5 maxlength=10 value="$form->{shiptozipcode}">
+ <input name=shiptocity size=30 maxlength=75 value="$form->{shiptocity}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Country') . qq|</th>
+ <td><input name=country size=35 tabindex=7 maxlength=75 value="$form->{country}"></td>
+ <td><input name=shiptocountry size=35 maxlength=35 value="$form->{shiptocountry}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
+ <td><input name=contact size=28 tabindex=8 maxlength=75 value="$form->{contact}"></td>
+ <td><input name=shiptocontact size=30 maxlength=75 value="$form->{shiptocontact}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Phone') . qq|</th>
+ <td><input name=phone size=30 tabindex=9 maxlength=30 value="$form->{phone}"></td>
+ <td><input name=shiptophone size=30 maxlength=30 value="$form->{shiptophone}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Fax') . qq|</th>
+ <td><input name=fax size=30 tabindex=10 maxlength=30 value="$form->{fax}"></td>
+ <td><input name=shiptofax size=30 maxlength=30 value="$form->{shiptofax}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email tabindex=11 size=45 value="$form->{email}"></td>
+ <td><input name=shiptoemail size=45 value="$form->{shiptoemail}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Homepage') . qq|</th>
+ <td><input name=homepage tabindex=12 size=45 value="$form->{homepage}"></td>
+ </tr>
+ <tr>
+ </tr>|;
+##LINET - added fields for contact person
+ print qq| <tr>
+ <td colspan=3>
+ <input type=hidden name=cp_id value=$form->{cp_id}>
+ <table>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Contact Person')
+ . qq|</th>
+ </tr>
+ <tr>
+ <th></th>
+ <th align=left nowrap>| . $locale->text('Greeting') . qq|</th>
+ <td><input name=cp_greeting size=30 maxlength=30 value="$form->{cp_greeting}">
+ $select_greeting</td>
+ <th align=left nowrap>| . $locale->text('Title') . qq|</th>
+ <td><input name=cp_title size=30 maxlength=30 value="$form->{cp_title}">
+ $select_title</td>
+ </tr>
+ <tr>
+ <th></th>
+ <th align=left nowrap>|
+ . $locale->text('Given Name')
+ . qq|</th>
+ <td><input name=cp_givenname size=30 maxlength=40 value="$form->{cp_givenname}"></td>
+ <th align=left nowrap>| . $locale->text('Name') . qq|</th>
+ <td><input name=cp_name size=30 maxlength=40 value="$form->{cp_name}"></td>
+ </tr>
+ <tr>
+ <th></th>
+ <th align=left nowrap>| . $locale->text('Phone1') . qq|</th>
+ <td><input name=cp_phone1 size=30 maxlength=30 value="$form->{cp_phone1}"></td>
+ <th align=left nowrap>| . $locale->text('Phone2') . qq|</th>
+ <td><input name=cp_phone2 size=30 maxlength=30 value="$form->{cp_phone2}"></td>
+ </tr>
+ <tr>
+ <th></th>
+ <th align=left nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=cp_email size=30 maxlength=40 value="$form->{cp_email}"></td>
+ <th></th>
+ <th></th>
+ </tr> </table>
+ </td>
+ </tr>
+ <tr height="5"></tr>|;
+##/LINET
+ print qq| $bcc
+ $tax
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Credit Limit') . qq|</th>
+ <td><input name=creditlimit tabindex=13 size=9 value="$form->{creditlimit}"></td>
+ <th align=right>| . $locale->text('Terms: Net') . qq|</th>
+ <td><input name=terms tabindex=14 size=2 value="$form->{terms}">|
+ . $locale->text('days')
+ . qq|</td>
+ <th align=right>| . $locale->text('Discount') . qq|</th>
+ <td><input name=discount tabindex=15 size=4 value="$form->{discount}">
+ %</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Tax Number / SSN') . qq|</th>
+ <td><input name=taxnumber tabindex=16 size=20 value="$form->{taxnumber}"></td>
+ <th align=right>| . $locale->text('USt-IdNr.') . qq|</th>
+ <td><input name=ustid tabindex=17 size=20 value="$form->{ustid}"></td>
+ $customer
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Account Number') . qq|</th>
+ <td><input name=account_number size=10 tabindex=19 value="$form->{account_number}"></td>
+ <th align=right>| . $locale->text('Bank Code Number') . qq|</th>
+ <td><input name=bank_code size=10 tabindex=20 value="$form->{bank_code}"></td>
+ <th align=right>| . $locale->text('Bank') . qq|</th>
+ <td><input name=bank size=30 tabindex=21 value="$form->{bank}"></td>
+ </tr>
+ <tr>
+ $business
+ <th align=right>| . $locale->text('Language') . qq|</th>
+ <td><select name=language tabindex=23>$lang
+ </select></td>|;
+
+ print qq| </tr>
+ <tr>
+ <td align=right>| . $locale->text('Obsolete') . qq|</td>
+ <td><input name=obsolete class=checkbox type=checkbox value=1 $form->{obsolete}></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Notes') . qq|</th>
+ </tr>
+ <tr>
+ <td><textarea name=notes rows=3 cols=60 wrap=soft>$form->{notes}</textarea></td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ $label = ucfirst $form->{db};
+ $quotation =
+ ($form->{db} eq 'customer')
+ ? $locale->text('Save and Quotation')
+ : $locale->text('Save and RFQ');
+ $arap =
+ ($form->{db} eq 'customer')
+ ? $locale->text('Save and AR Transaction')
+ : $locale->text('Save and AP Transaction');
+ if ($vertreter) {
+ $update_button =
+ qq|<input class=submit type=submit name=action accesskey="u" value="|
+ . $locale->text("Update") . qq|">|;
+ } else {
+ $update_button = "";
+ }
+
+##<input class=submit type=submit name=action value="|.$locale->text("Save and Quotation").qq|">
+##<input class=submit type=submit name=action value="|.$locale->text("Save and RFQ").qq|">
+##<input class=submit type=submit name=action value="|.$locale->text("Save and AR Transaction").qq|">
+##<input class=submit type=submit name=action value="|.$locale->text("Save and AP Transaction").qq|">
+
+ print qq|
+<input name=id type=hidden value=$form->{id}>
+<input name=taxaccounts type=hidden value="$form->{taxaccounts}">
+<input name=business_save type=hidden value="$form->{selectbusiness}">
+<input name=title_save type=hidden value="$form->{title}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=callback value="$form->{callback}">
+<input type=hidden name=db value=$form->{db}>
+
+<br>
+$update_button
+<input class=submit type=submit name=action accesskey="s" value="|
+ . $locale->text("Save") . qq|">
+<input class=submit type=submit name=action value="$arap">
+<input class=submit type=submit name=action value="|
+ . $locale->text("Save and Invoice") . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text("Save and Order") . qq|">
+<input class=submit type=submit name=action value="$quotation">
+|;
+
+ if ($form->{id} && $form->{status} eq 'orphaned') {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Delete')
+ . qq|">\n|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub add_transaction {
+ $lxdebug->enter_sub();
+
+ $form->isblank("name", $locale->text("Name missing!"));
+ &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+
+ $form->{callback} = $form->escape($form->{callback}, 1);
+ $name = $form->escape("$form->{name}", 1);
+
+ $form->{callback} =
+ "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
+
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_ap_transaction {
+ $lxdebug->enter_sub();
+
+ $form->{script} = "ap.pl";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_ar_transaction {
+ $lxdebug->enter_sub();
+
+ $form->{script} = "ar.pl";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_invoice {
+ $lxdebug->enter_sub();
+
+ $form->{script} = ($form->{db} eq 'customer') ? "is.pl" : "ir.pl";
+ $form->{type} = "invoice";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_rfq {
+ $lxdebug->enter_sub();
+
+ $form->{script} = "oe.pl";
+ $form->{type} = "request_quotation";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_quotation {
+ $lxdebug->enter_sub();
+
+ $form->{script} = "oe.pl";
+ $form->{type} = "sales_quotation";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_and_order {
+ $lxdebug->enter_sub();
+
+ $form->{script} = "oe.pl";
+ $form->{type} =
+ ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
+ &add_transaction;
+
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ # $locale->text('Customer saved!')
+ # $locale->text('Vendor saved!')
+
+ $msg = ucfirst $form->{db};
+ $imsg .= " saved!";
+
+ $form->isblank("name", $locale->text("Name missing!"));
+ if ($vertreter && $form->{db} eq "customer") {
+ $form->isblank("salesman_id", $locale->text("Salesman missing!"));
+ }
+ &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+
+ $form->redirect($locale->text($msg));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ # $locale->text('Customer deleted!')
+ # $locale->text('Cannot delete customer!')
+ # $locale->text('Vendor deleted!')
+ # $locale->text('Cannot delete vendor!')
+
+ CT->delete(\%myconfig, \%$form);
+
+ $msg = ucfirst $form->{db};
+ $msg .= " deleted!";
+ $form->redirect($locale->text($msg));
+
+ $msg = "Cannot delete $form->{db}";
+ $form->error($locale->text($msg));
+
+ $lxdebug->leave_sub();
+}
+
+sub display {
+ $lxdebug->enter_sub();
+
+ &form_header();
+ &form_footer();
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ &check_salesman($form->{salesman});
+
+ # $form->get_salesman(\%myconfig, $form->{salesman});
+ &display();
+ $lxdebug->leave_sub();
+}
+
+sub check_salesman {
+ $lxdebug->enter_sub();
+
+ my ($name) = @_;
+
+ my ($new_name, $new_id) = split /--/, $form->{$name};
+ my $i = 0;
+
+ # check name, combine name and id
+ if ($form->{"oldsalesman"} ne $form->{"salesman"}) {
+
+ # return one name or a list of names in $form->{name_list}
+ if (($i = $form->get_salesman(\%myconfig, $name)) > 1) {
+ &select_salesman($name);
+ exit;
+ }
+
+ if ($i == 1) {
+
+ # we got one name
+ $form->{"salesman_id"} = $form->{salesman_list}[0]->{id};
+ $form->{salesman} = $form->{salesman_list}[0]->{name};
+ $form->{"oldsalesman"} = $form->{salesman};
+
+ } else {
+
+ # name is not on file
+ # $locale->text('Customer not on file!')
+ # $locale->text('Vendor not on file!')
+ $msg = ucfirst $name . " not on file or locked!";
+ $form->error($locale->text($msg));
+ }
+ }
+
+ $lxdebug->leave_sub();
+
+ return $i;
+}
+
+sub select_salesman {
+ $lxdebug->enter_sub();
+
+ my ($table) = @_;
+
+ @column_index = qw(ndx name);
+
+ $label = ucfirst $table;
+ $column_data{ndx} = qq|<th> </th>|;
+ $column_data{name} =
+ qq|<th class=listheading>| . $locale->text($label) . qq|</th>|;
+
+ # list items with radio button on a form
+ $form->header;
+
+ $title = $locale->text('Select from one of the names below');
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$title</th>
+ </tr>
+ <tr space=5></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ my $i = 0;
+ foreach $ref (@{ $form->{salesman_list} }) {
+ $checked = ($i++) ? "" : "checked";
+
+ $ref->{name} =~ s/\"/"/g;
+
+ $column_data{ndx} =
+ qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
+ $column_data{name} =
+ qq|<td><input name="new_name_$i" type=hidden value="$ref->{name}">$ref->{name}</td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+<input name="new_id_$i" type=hidden value=$ref->{id}>
+
+|;
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input name=lastndx type=hidden value=$i>
+
+|;
+
+ # delete variables
+ map { delete $form->{$_} } qw(action name_list header);
+
+ # save all other form variables
+ foreach $key (keys %${form}) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<input type=hidden name=nextsub value=salesman_selected>
+
+<input type=hidden name=vc value=$table>
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub salesman_selected {
+ $lxdebug->enter_sub();
+
+ # replace the variable with the one checked
+
+ # index for new item
+ $i = $form->{ndx};
+
+ $form->{salesman} = $form->{"new_name_$i"};
+ $form->{"salesman_id"} = $form->{"new_id_$i"};
+ $form->{"oldsalesman"} = $form->{salesman};
+
+ # delete all the new_ variables
+ for $i (1 .. $form->{lastndx}) {
+ map { delete $form->{"new_${_}_$i"} } (id, name);
+ }
+
+ map { delete $form->{$_} } qw(ndx lastndx nextsub);
+
+ &update(1);
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
--- /dev/null
+#=====================================================================
+# Lx-Office ERP
+# Copyright (c) 2004
+#
+# Author: Philip Reetz
+# Email: p.reetz@linet-services.de
+# Web: http://www.lx-office.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Datev export module
+#
+#======================================================================
+
+use SL::DATEV;
+
+1;
+
+# end of main
+
+sub continue { &{ $form->{nextsub} } }
+
+sub export {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("DATEX - Export Assistent");
+
+ DATEV->get_datev_stamm(\%myconfig, \%$form);
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text("DATEV Angaben") . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <td align=left nowrap>| . $locale->text("Beraternummer") . qq|</td>
+ <td><input name=beraternr size=10 maxlength=7 value="$form->{beraternr}"></td>
+
+ <td align=left nowrap>| . $locale->text("DFV-Kennzeichen") . qq|</td>
+ <td><input name=dfvkz size=5 maxlength=2 value="$form->{dfvkz}"></td>
+ </tr>
+ <tr>
+ <td align=left nowrap>| . $locale->text("Beratername") . qq|</td>
+ <td><input name=beratername size=10 maxlength=9 value="$form->{beratername}"></td>
+
+ <td align=left nowrap>| . $locale->text("Password") . qq|</td>
+ <td><input name=passwort size=5 maxlength=4 value="$form->{passwort}"></td>
+ </tr>
+ <tr>
+ <td align=left nowrap>| . $locale->text("Mandantennummer") . qq|</td>
+ <td><input name=mandantennr size=10 maxlength=5 value="$form->{mandantennr}"></td>
+
+ <td align=left nowrap>| . $locale->text("Datenträgernummer") . qq|</td>
+ <td><input name=datentraegernr size=5 maxlength=3 value="$form->{datentraegernr}"></td>
+ </tr>
+ <tr>
+ <td><input checked name=kne type=checkbox class=checkbox value=1> |
+ . $locale->text("Kontonummernerweiterung (KNE)")
+ . qq|</td>
+ <td></td>
+
+ <td align=left nowrap>| . $locale->text("Abrechnungsnummer") . qq|</td>
+ <td><input name=abrechnungsnr size=5 maxlength=3 value="$form->{abrechnungsnr}"></td>
+ </tr>
+ <tr>
+ <td><input name=exporttype type=radio class=radio value=0 checked> |
+ . $locale->text("Export Buchungsdaten")
+ . qq|</td>
+ <td></td>
+
+ <td><input name=exporttype type=radio class=radio value=1> |
+ . $locale->text("Export Stammdaten")
+ . qq|</td>
+ <td></td>
+ </td>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=export2>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+}
+
+sub export2 {
+ $lxdebug->enter_sub();
+
+ if ($form->{exporttype} == 0) {
+ &export_bewegungsdaten();
+ } else {
+ &export_stammdaten();
+ }
+ $lxdebug->leave_sub();
+}
+
+sub export_bewegungsdaten {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("DATEX - Export Assistent");
+
+ $form->{allemonate} =
+ qq|<option value=1>|
+ . $locale->text('January')
+ . qq|</option>
+ <option value=2>|
+ . $locale->text('February')
+ . qq|</option>
+ <option value=3>|
+ . $locale->text('March')
+ . qq|</option>
+ <option value=4>|
+ . $locale->text('April')
+ . qq|</option>
+ <option value=5>|
+ . $locale->text('May')
+ . qq|</option>
+ <option value=6>|
+ . $locale->text('June')
+ . qq|</option>
+ <option value=7>|
+ . $locale->text('July')
+ . qq|</option>
+ <option value=8>|
+ . $locale->text('August')
+ . qq|</option>
+ <option value=9>|
+ . $locale->text('September')
+ . qq|</option>
+ <option value=10>|
+ . $locale->text('October')
+ . qq|</option>
+ <option value=11>|
+ . $locale->text('November')
+ . qq|</option>
+ <option value=12>|
+ . $locale->text('December')
+ . qq|</option>|;
+
+ $form->{allequartale} =
+ qq|<option selected value=1>|
+ . $locale->text('I')
+ . qq|</option>
+ <option value=2>| . $locale->text('II') . qq|</option>
+ <option value=3>|
+ . $locale->text('III')
+ . qq|</option>
+ <option value=4>|
+ . $locale->text('IV')
+ . qq|</option>|;
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text("Zeitraum") . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <td align=left><input checked name=zeitraum class=radio type=radio value=monat> </td><td align=left>|
+ . $locale->text('Monat')
+ . qq|</td>
+ <td align=left></td>
+ <td align=left></td>
+ <td align=left><select name=monat>$form->{allemonate}</select></td>
+ </tr>
+ <tr>
+ <td align=left><input name=zeitraum class=radio type=radio value=quartal> </td><td align=left>|
+ . $locale->text('Quartal')
+ . qq|</td>
+ <td align=left></td>
+ <td align=left></td>
+ <td align=left><select name=quartal>$form->{allequartale}</select></td>
+ </tr>
+ <tr>
+ <td align=left><input name=zeitraum class=radio type=radio value=zeit> </td><td align=left>|
+ . $locale->text('Datum von')
+ . qq|</td>
+ <td align=left><input name=transdatefrom size=8></td>
+ <td align=left>| . $locale->text('bis') . qq|</td>
+ <td align=left><input name=transdateto size=8></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=beraternr value="$form->{beraternr}">
+<input type=hidden name=dfvkz value="$form->{dfvkz}">
+<input type=hidden name=beratername value="$form->{beratername}">
+<input type=hidden name=passwort value="$form->{passwort}">
+<input type=hidden name=mandantennr value="$form->{mandantennr}">
+<input type=hidden name=datentraegernr value="$form->{datentraegernr}">
+<input type=hidden name=kne value="$form->{kne}">
+<input type=hidden name=abrechnungsnr value="$form->{abrechnungsnr}">
+
+<input type=hidden name=exporttype value="$form->{exporttype}">
+
+<input type=hidden name=nextsub value=export3>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub export_stammdaten {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("DATEX - Export Assistent");
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text("Konten") . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <td align=left>| . $locale->text('Von Konto: ') . qq|</td>
+ <td align=left><input name=accnofrom size=8 maxlength=8></td>
+ </tr>
+ <tr>
+ <td align=left>| . $locale->text('Bis Konto: ') . qq|</td>
+ <td align=left><input name=accnoto size=8 maxlength=8></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+<input type=hidden name=beraternr value="$form->{beraternr}">
+<input type=hidden name=dfvkz value="$form->{dfvkz}">
+<input type=hidden name=beratername value="$form->{beratername}">
+<input type=hidden name=passwort value="$form->{passwort}">
+<input type=hidden name=mandantennr value="$form->{mandantennr}">
+<input type=hidden name=datentraegernr value="$form->{datentraegernr}">
+<input type=hidden name=kne value="$form->{kne}">
+<input type=hidden name=abrechnungsnr value="$form->{abrechnungsnr}">
+
+<input type=hidden name=exporttype value="$form->{exporttype}">
+
+<input type=hidden name=nextsub value=export3>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub export3 {
+ $lxdebug->enter_sub();
+
+ DATEV->save_datev_stamm(\%myconfig, \%$form);
+
+ if ($form->{kne}) {
+ if (DATEV->kne_export(\%myconfig, \%$form)) {
+ $form->redirect($locale->text('KNE Export erfolgreich!'));
+ }
+ } else {
+ if (DATEV->obe_export(\%myconfig, \%$form)) {
+ $form->redirect($locale->text('OBE Export erfolgreich!'));
+ }
+ }
+ $lxdebug->leave_sub();
+}
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Genereal Ledger
+#
+#======================================================================
+
+use SL::GL;
+use SL::PE;
+
+use Data::Dumper;
+
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ # we use this only to set a default date
+ GL->transaction(\%myconfig, \%$form);
+
+ map {
+ $chart .=
+ "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}</option>"
+ } @{ $form->{chart} };
+ map {
+ $tax .=
+ qq|<option value="$_->{taxkey}--$_->{rate}">$_->{taxdescription} |
+ . ($_->{rate} * 100) . qq| %|
+ } @{ $form->{TAX} };
+
+ $form->{chart} = $chart;
+
+ $form->{debitchart} = $chart;
+ $form->{creditchart} = $chart;
+ $form->{taxchart} = $tax;
+
+ $form->{debit} = 0;
+ $form->{credit} = 0;
+ $form->{tax} = 0;
+
+ $form->{creditrowcount} = 2;
+ $form->{debitrowcount} = 2;
+
+ # departments
+ $form->all_departments(\%myconfig);
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ GL->transaction(\%myconfig, \%$form);
+
+ map {
+ if ($form->{debitaccno} eq $_->{accno}) {
+ $form->{debitchart} .=
+ "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}";
+ }
+ } @{ $form->{chart} };
+ map {
+ if ($form->{creditaccno} eq $_->{accno}) {
+ $form->{creditchart} .=
+ "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}";
+ }
+ } @{ $form->{chart} };
+ map {
+ $tax .=
+ qq|<option value="$_->{taxkey}--$_->{rate}">$_->{taxdescription} |
+ . ($_->{rate} * 100) . qq| %|
+ } @{ $form->{TAX} };
+
+ if ($form->{creditrowcount} > 2) {
+ for $i (2 .. $form->{creditrowcount}) {
+ map {
+ if ($form->{"creditchartselected_$i"} eq $_->{accno}) {
+ $form->{"creditchartselected_$i"} = "$_->{accno}--$_->{taxkey_id}";
+ }
+ } @{ $form->{chart} };
+ map {
+ if ($form->{"taxchartselected_$i"} eq $_->{taxkey}) {
+ $form->{"taxchartselected_$i"} = "$_->{taxkey}--$_->{rate}";
+ }
+ } @{ $form->{TAX} };
+ }
+ }
+ if ($form->{debitrowcount} > 2) {
+ for $i (2 .. $form->{debitrowcount}) {
+ map {
+ if ($form->{"debitchartselected_$i"} eq $_->{accno}) {
+ $form->{"debitchartselected_$i"} = "$_->{accno}--$_->{taxkey_id}";
+ }
+ } @{ $form->{chart} };
+ map {
+ if ($form->{"taxchartselected_$i"} eq $_->{taxkey}) {
+ $form->{"taxchartselected_$i"} = "$_->{taxkey}--$_->{rate}";
+ }
+ } @{ $form->{TAX} };
+ }
+ }
+ map {
+ $chart .=
+ "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}</option>"
+ } @{ $form->{chart} };
+ $form->{chart} = $chart;
+ map {
+ $tax .=
+ qq|<option value="$_->{taxkey}--$_->{rate}">$_->{taxdescription} |
+ . ($_->{rate} * 100) . qq| %|
+ } @{ $form->{TAX} };
+ $form->{taxchart} = $tax;
+
+ if ($form->{tax} < 0) {
+ $form->{tax} = $form->{tax} * (-1);
+ }
+
+ $form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
+
+ # departments
+ $form->all_departments(\%myconfig);
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $form->{locked} =
+ ($form->datetonum($form->{transdate}, \%myconfig) <=
+ $form->datetonum($form->{closedto}, \%myconfig));
+
+ $form->{title} = "Edit";
+
+ &form_header;
+
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Buchungsjournal');
+
+ $form->all_departments(\%myconfig);
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=datefrom id=datefrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=datefrom id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=dateto id=dateto size=11 title="$myconfig{dateformat}">
+ <input type=button name=dateto id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "datefrom", "BR", "trigger1",
+ "dateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=datefrom id=datefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 =
+ qq|<td><input name=dateto id=dateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=sort value=transdate>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Reference') . qq|</th>
+ <td><input name=reference size=20></td>
+ <th align=right>| . $locale->text('Source') . qq|</th>
+ <td><input name=source size=20></td>
+ </tr>
+ $department
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td colspan=3><input name=description size=40></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Notes') . qq|</th>
+ <td colspan=3><input name=notes size=40></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ $button1
+ $button2
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td>
+ <input name="category" class=radio type=radio value=X checked> |
+ . $locale->text('All') . qq|
+ <input name="category" class=radio type=radio value=A> |
+ . $locale->text('Asset') . qq|
+ <input name="category" class=radio type=radio value=L> |
+ . $locale->text('Liability') . qq|
+ <input name="category" class=radio type=radio value=I> |
+ . $locale->text('Revenue') . qq|
+ <input name="category" class=radio type=radio value=E> |
+ . $locale->text('Expense') . qq|
+ </td>
+ </tr>
+ <tr>
+ <table>
+ <tr>
+ <td align=right><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('ID') . qq|</td>
+ <td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Date') . qq|</td>
+ <td align=right><input name="l_reference" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Reference') . qq|</td>
+ <td align=right><input name="l_description" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Description') . qq|</td>
+ <td align=right><input name="l_notes" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Notes') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_debit" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Debit') . qq|</td>
+ <td align=right><input name="l_credit" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Credit') . qq|</td>
+ <td align=right><input name="l_source" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Source') . qq|</td>
+ <td align=right><input name="l_accno" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Account') . qq|</td>
+ <td align=right><input name="l_gifi_accno" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('GIFI') . qq|</td>
+ </tr>
+ <tr>
+ <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </tr>
+ </table>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+$jsscript
+
+<input type=hidden name=nextsub value=generate_report>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+}
+
+sub generate_report {
+ $lxdebug->enter_sub();
+
+ $form->{sort} = "transdate" unless $form->{sort};
+
+ GL->all_transactions(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=generate_report&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $href = $callback;
+
+ %acctype = ('A' => $locale->text('Asset'),
+ 'C' => $locale->text('Contra'),
+ 'L' => $locale->text('Liability'),
+ 'Q' => $locale->text('Equity'),
+ 'I' => $locale->text('Revenue'),
+ 'E' => $locale->text('Expense'),);
+
+ $form->{title} = $locale->text('General Ledger');
+
+ $ml = ($form->{ml} =~ /(A|E)/) ? -1 : 1;
+
+ unless ($form->{category} eq 'X') {
+ $form->{title} .= " : " . $locale->text($acctype{ $form->{category} });
+ }
+ if ($form->{accno}) {
+ $href .= "&accno=" . $form->escape($form->{accno});
+ $callback .= "&accno=" . $form->escape($form->{accno}, 1);
+ $option =
+ $locale->text('Account')
+ . " : $form->{accno} $form->{account_description}";
+ }
+ if ($form->{gifi_accno}) {
+ $href .= "&gifi_accno=" . $form->escape($form->{gifi_accno});
+ $callback .= "&gifi_accno=" . $form->escape($form->{gifi_accno}, 1);
+ $option .= "\n<br>" if $option;
+ $option .=
+ $locale->text('GIFI')
+ . " : $form->{gifi_accno} $form->{gifi_account_description}";
+ }
+ if ($form->{source}) {
+ $href .= "&source=" . $form->escape($form->{source});
+ $callback .= "&source=" . $form->escape($form->{source}, 1);
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Source') . " : $form->{source}";
+ }
+ if ($form->{reference}) {
+ $href .= "&reference=" . $form->escape($form->{reference});
+ $callback .= "&reference=" . $form->escape($form->{reference}, 1);
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Reference') . " : $form->{reference}";
+ }
+ if ($form->{department}) {
+ $href .= "&department=" . $form->escape($form->{department});
+ $callback .= "&department=" . $form->escape($form->{department}, 1);
+ ($department) = split /--/, $form->{department};
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Department') . " : $department";
+ }
+
+ if ($form->{description}) {
+ $href .= "&description=" . $form->escape($form->{description});
+ $callback .= "&description=" . $form->escape($form->{description}, 1);
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Description') . " : $form->{description}";
+ }
+ if ($form->{notes}) {
+ $href .= "¬es=" . $form->escape($form->{notes});
+ $callback .= "¬es=" . $form->escape($form->{notes}, 1);
+ $option .= "\n<br>" if $option;
+ $option .= $locale->text('Notes') . " : $form->{notes}";
+ }
+
+ if ($form->{datefrom}) {
+ $href .= "&datefrom=$form->{datefrom}";
+ $callback .= "&datefrom=$form->{datefrom}";
+ $option .= "\n<br>" if $option;
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{datefrom}, 1);
+ }
+ if ($form->{dateto}) {
+ $href .= "&dateto=$form->{dateto}";
+ $callback .= "&dateto=$form->{dateto}";
+ if ($form->{datefrom}) {
+ $option .= " ";
+ } else {
+ $option .= "\n<br>" if $option;
+ }
+ $option .=
+ $locale->text('Bis') . " "
+ . $locale->date(\%myconfig, $form->{dateto}, 1);
+ }
+
+ @columns =
+ $form->sort_columns(
+ qw(transdate id reference description notes source debit debit_accno credit credit_accno debit_tax debit_tax_accno credit_tax credit_tax_accno accno gifi_accno)
+ );
+
+ if ($form->{accno} || $form->{gifi_accno}) {
+ @columns = grep !/(accno|gifi_accno)/, @columns;
+ push @columns, "balance";
+ $form->{l_balance} = "Y";
+
+ }
+
+ $form->{l_credit_accno} = "Y";
+ $form->{l_debit_accno} = "Y";
+ $form->{l_credit_tax} = "Y";
+ $form->{l_debit_tax} = "Y";
+ $form->{l_credit_tax_accno} = "Y";
+ $form->{l_debit_tax_accno} = "Y";
+ $form->{l_accno} = "N";
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
+ }
+
+ $callback .= "&category=$form->{category}";
+ $href .= "&category=$form->{category}";
+
+ $column_header{id} =
+ "<th><a class=listheading href=$href&sort=id>"
+ . $locale->text('ID')
+ . "</a></th>";
+ $column_header{transdate} =
+ "<th><a class=listheading href=$href&sort=transdate>"
+ . $locale->text('Date')
+ . "</a></th>";
+ $column_header{reference} =
+ "<th><a class=listheading href=$href&sort=reference>"
+ . $locale->text('Reference')
+ . "</a></th>";
+ $column_header{source} =
+ "<th><a class=listheading href=$href&sort=source>"
+ . $locale->text('Source')
+ . "</a></th>";
+ $column_header{description} =
+ "<th><a class=listheading href=$href&sort=description>"
+ . $locale->text('Description')
+ . "</a></th>";
+ $column_header{notes} =
+ "<th class=listheading>" . $locale->text('Notes') . "</th>";
+ $column_header{debit} =
+ "<th class=listheading>" . $locale->text('Debit') . "</th>";
+ $column_header{debit_accno} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Debit Account')
+ . "</a></th>";
+ $column_header{credit} =
+ "<th class=listheading>" . $locale->text('Credit') . "</th>";
+ $column_header{credit_accno} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Credit Account')
+ . "</a></th>";
+ $column_header{debit_tax} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Debit Tax')
+ . "</a></th>";
+ $column_header{debit_tax_accno} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Debit Tax Account')
+ . "</a></th>";
+ $column_header{credit_tax} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Credit Tax')
+ . "</a></th>";
+ $column_header{credit_tax_accno} =
+ "<th><a class=listheading href=$href&sort=accno>"
+ . $locale->text('Credit Tax Account')
+ . "</a></th>";
+ $column_header{gifi_accno} =
+ "<th><a class=listheading href=$href&sort=gifi_accno>"
+ . $locale->text('GIFI')
+ . "</a></th>";
+ $column_header{balance} = "<th>" . $locale->text('Balance') . "</th>";
+
+ $form->{landscape} = 1;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <thead>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print "
+ </tr>
+ </thead>
+ </tfoot>
+ <tbody>
+";
+
+ # add sort to callback
+ $form->{callback} = "$callback&sort=$form->{sort}";
+ $callback = $form->escape($form->{callback});
+
+ # initial item for subtotals
+ if (@{ $form->{GL} }) {
+ $sameitem = $form->{GL}->[0]->{ $form->{sort} };
+ }
+
+ if (($form->{accno} || $form->{gifi_accno}) && $form->{balance}) {
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
+ . "</td>";
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ foreach $ref (@{ $form->{GL} }) {
+
+ # if item ne sort print subtotal
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $ref->{ $form->{sort} }) {
+ &gl_subtotal;
+ }
+ }
+ foreach $key (sort keys(%{ $ref->{amount} })) {
+ $form->{balance} += $ref->{amount}{$key};
+ }
+
+ $debit = "";
+ foreach $key (sort keys(%{ $ref->{debit} })) {
+ $subtotaldebit += $ref->{debit}{$key};
+ $totaldebit += $ref->{debit}{$key};
+ if ($key == 0) {
+ $debit = $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0);
+ } else {
+ $debit .=
+ "<br>" . $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0);
+ }
+ }
+
+ $credit = "";
+ foreach $key (sort keys(%{ $ref->{credit} })) {
+ $subtotalcredit += $ref->{credit}{$key};
+ $totalcredit += $ref->{credit}{$key};
+ if ($key == 0) {
+ $credit = $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
+ } else {
+ $credit .= "<br>"
+ . $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
+ }
+ }
+
+ $debittax = "";
+ foreach $key (sort keys(%{ $ref->{debit_tax} })) {
+ $subtotaldebittax += $ref->{debit_tax}{$key};
+ $totaldebittax += $ref->{debit_tax}{$key};
+ if ($key == 0) {
+ $debittax =
+ $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0);
+ } else {
+ $debittax .= "<br>"
+ . $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0);
+ }
+ }
+
+ $credittax = "";
+ foreach $key (sort keys(%{ $ref->{credit_tax} })) {
+ $subtotalcredittax += $ref->{credit_tax}{$key};
+ $totalcredittax += $ref->{credit_tax}{$key};
+ if ($key == 0) {
+ $credittax =
+ $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0);
+ } else {
+ $credittax .= "<br>"
+ . $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0);
+ }
+ }
+
+ $debitaccno = "";
+ $debittaxkey = "";
+ $taxaccno = "";
+ foreach $key (sort keys(%{ $ref->{debit_accno} })) {
+ if ($key == 0) {
+ $debitaccno =
+ "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
+ } else {
+ $debitaccno .=
+ "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
+ }
+ if ($ref->{debit_taxkey}{$key} eq $debittaxkey) {
+ $ref->{debit_tax_accno}{$key} = $taxaccno;
+ }
+ $taxaccno = $ref->{debit_tax_accno}{$key};
+ $debittaxkey = $ref->{debit_taxkey}{$key};
+ }
+
+ $creditaccno = "";
+ $credittaxkey = "";
+ $taxaccno = "";
+ foreach $key (sort keys(%{ $ref->{credit_accno} })) {
+ if ($key == 0) {
+ $creditaccno =
+ "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
+ } else {
+ $creditaccno .=
+ "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
+ }
+ if ($ref->{credit_taxkey}{$key} eq $credittaxkey) {
+ $ref->{credit_tax_accno}{$key} = $taxaccno;
+ }
+ $taxaccno = $ref->{credit_tax_accno}{$key};
+ $credittaxkey = $ref->{credit_taxkey}{$key};
+ }
+
+ $debittaxaccno = "";
+ foreach $key (sort keys(%{ $ref->{debit_tax_accno} })) {
+ if ($key == 0) {
+ $debittaxaccno =
+ "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
+ } else {
+ $debittaxaccno .=
+ "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
+ }
+ }
+
+ $credittaxaccno = "";
+ foreach $key (sort keys(%{ $ref->{credit_tax_accno} })) {
+ if ($key == 0) {
+ $credittaxaccno =
+ "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
+ } else {
+ $credittaxaccno .=
+ "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
+ }
+ }
+
+ # $ref->{debit} = $form->format_amount(\%myconfig, $ref->{debit}, 2, " ");
+ # $ref->{credit} = $form->format_amount(\%myconfig, $ref->{credit}, 2, " ");
+
+ $column_data{id} = "<td align=right> $ref->{id} </td>";
+ $column_data{transdate} =
+ "<td align=center> $ref->{transdate} </td>";
+ $column_data{reference} =
+ "<td align=center><a href=$ref->{module}.pl?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{reference}</td>";
+ $column_data{description} =
+ "<td align=center>$ref->{description} </td>";
+ $column_data{source} = "<td align=center>$ref->{source} </td>";
+ $column_data{notes} = "<td align=center>$ref->{notes} </td>";
+ $column_data{debit} = "<td align=right>$debit</td>";
+ $column_data{debit_accno} = "<td align=center>$debitaccno</td>";
+ $column_data{credit} = "<td align=right>$credit</td>";
+ $column_data{credit_accno} = "<td align=center>$creditaccno</td>";
+ $column_data{debit_tax} =
+ ($ref->{debit_tax_accno} ne "")
+ ? "<td align=right>$debittax</td>"
+ : "<td></td>";
+ $column_data{debit_tax_accno} = "<td align=center>$debittaxaccno</td>";
+ $column_data{gifi_accno} =
+ "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
+ $column_data{credit_tax} =
+ ($ref->{credit_tax_accno} ne "")
+ ? "<td align=right>$credittax</td>"
+ : "<td></td>";
+ $column_data{credit_tax_accno} = "<td align=center>$credittaxaccno</td>";
+ $column_data{gifi_accno} =
+ "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
+ . "</td>";
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i>";
+ map { print "$column_data{$_}\n" } @column_index;
+ print "</tr>";
+
+ }
+
+ &gl_subtotal if ($form->{l_subtotal} eq 'Y');
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{debit} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totaldebit, 2, " ") . "</th>";
+ $column_data{credit} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totalcredit, 2, " ") . "</th>";
+ $column_data{debit_tax} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totaldebittax, 2, " ") . "</th>";
+ $column_data{credit_tax} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $totalcredittax, 2, " ") . "</th>";
+ $column_data{balance} =
+ "<th align=right class=listtotal>"
+ . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0) . "</th>";
+
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('GL Transaction') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('AR Transaction') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('AP Transaction') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Sales Invoice') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Vendor Invoice') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub gl_subtotal {
+ $lxdebug->enter_sub();
+
+ $subtotaldebit =
+ $form->format_amount(\%myconfig, $subtotaldebit, 2, " ");
+ $subtotalcredit =
+ $form->format_amount(\%myconfig, $subtotalcredit, 2, " ");
+
+ map { $column_data{$_} = "<td> </td>" }
+ qw(transdate id reference source description accno);
+ $column_data{debit} = "<th align=right>$subtotaldebit</td>";
+ $column_data{credit} = "<th align=right>$subtotalcredit</td>";
+
+ print "<tr class=listsubtotal>";
+ map { print "$column_data{$_}\n" } @column_index;
+ print "</tr>";
+
+ $subtotaldebit = 0;
+ $subtotalcredit = 0;
+
+ $sameitem = $ref->{ $form->{sort} };
+
+ $lxdebug->leave_sub();
+
+ return $sameitem;
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ @a = ();
+ $count = 0;
+ @flds = (qw(accno debit credit projectnumber project_id oldprojectnumber));
+ $credit_save = $form->{credit};
+ $debit_save = $form->{debit};
+
+ if ($form->{chart} eq "") {
+ $form->{creditchart} =
+ "<option>" . $form->{creditchartselected} . "</option>";
+ $form->{debitchart} =
+ "<option>" . $form->{debitchartselected} . "</option>";
+ } else {
+ $form->{creditchart} = $form->{chart};
+ $form->{creditchart} =~
+ s/value=\"$form->{creditchartselected}\"/value=\"$form->{creditchartselected}\" selected/;
+
+ $form->{debitchart} = $form->{chart};
+ $form->{debitchart} =~
+ s/value=\"$form->{debitchartselected}\"/value=\"$form->{debitchartselected}\" selected/;
+ }
+ ($debitaccno, $debittaxkey) = split(/--/, $form->{debitchartselected});
+ ($creditaccno, $credittaxkey) = split(/--/, $form->{creditchartselected});
+ if ($debittaxkey > 0) {
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+ $form->{taxchart} =~ s/selected//ig;
+ $form->{taxchart} =~
+ s/\"$debittaxkey--([^\"]*)\"/\"$debittaxkey--$1\" selected/;
+
+ $rate = $1;
+
+ if ($form->{taxincluded}) {
+ $form->{debit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1);
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1) * $rate;
+ } else {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * ($rate + 1);
+ $form->{tax} = $form->parse_amount(\%myconfig, $form->{amount}) * $rate;
+ }
+ } else {
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+ $form->{taxchart} =~ s/selected//ig;
+ $form->{taxchart} =~
+ s/\"$credittaxkey--([^\"]*)\"/\"$credittaxkey--$1\" selected/;
+ $rate = $1;
+
+ if ($form->{taxincluded}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1);
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1) * $rate;
+ } else {
+ $form->{debit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * ($rate + 1);
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{tax} = $form->parse_amount(\%myconfig, $form->{amount}) * $rate;
+ }
+ }
+ if ($form->{credit_splited}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} = $credit_save;
+ $form->{tax} = 0;
+ } elsif ($form->{debit_splited}) {
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{debit} = $debit_save;
+ $form->{tax} = 0;
+ }
+ &check_project;
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ &form_header;
+
+ # for $i (1 .. $form->{rowcount}) {
+ # $form->{totaldebit} += $form->parse_amount(\%myconfig, $form->{"debit_$i"});
+ # $form->{totalcredit} += $form->parse_amount(\%myconfig, $form->{"credit_$i"});
+ #
+ # &form_row($i);
+ # }
+
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $title = $form->{title};
+ $form->{title} = $locale->text("$title General Ledger Transaction");
+ $readonly = ($form->{id}) ? "readonly" : "";
+
+ $form->{urldebit} =
+ "$form->{script}?action=split_debit&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ $form->{urlcredit} =
+ "$form->{script}?action=split_credit&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ # $locale->text('Add General Ledger Transaction')
+ # $locale->text('Edit General Ledger Transaction')
+ map { $form->{$_} =~ s/\"/"/g } qw(reference description chart);
+
+ $form->{selectdepartment} =~ s/ selected//;
+ $form->{taxchart} =~ s/ selected//;
+ $form->{selectdepartment} =~
+ s/option>\Q$form->{department}\E/option selected>$form->{department}/;
+
+ if (($rows = $form->numtextrows($form->{description}, 50)) > 1) {
+ $description =
+ qq|<textarea name=description rows=$rows cols=50 wrap=soft $readonly >$form->{description}</textarea>|;
+ } else {
+ $description =
+ qq|<input name=description size=50 value="$form->{description}" tabindex="3" $readonly>|;
+ }
+
+ $taxincluded = ($form->{taxincluded}) ? "checked" : "";
+
+ if (!$form->{id}) {
+ $taxincluded = "checked";
+ }
+
+ $amount =
+ qq|<input name=amount size=20 value="$form->{amount}" tabindex="4" $readonly>|;
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </tr>
+| if $form->{selectdepartment};
+
+ $form->{fokus} = "gl.reference";
+ $form->{remote} = 1;
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly></td>
+ <td><input type=button name=transdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "transdate", "BL", "trigger1", "",
+ "", "");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body onLoad="fokus()">
+
+<form method=post name="gl" action=$form->{script}>
+
+<input name=id type=hidden value=$form->{id}>
+
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=locked value=$form->{locked}>
+<input type=hidden name=title value="$title">
+<input type=hidden name=taxchart value=|
+ . $form->escape($form->{taxchart}) . qq|>
+<input type=hidden name=chart value="$form->{chart}">
+<input type=hidden name=creditrowcount value="$form->{creditrowcount}">
+<input type=hidden name=debitrowcount value="$form->{debitrowcount}">
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right>| . $locale->text('Reference') . qq|</th>
+ <td><input name=reference size=20 value="$form->{reference}" tabindex="1" $readonly></td>
+ <td align=left>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Date') . qq|</th>
+ $button1
+ </tr>
+ </table>
+ </td>
+ </tr>|;
+ if ($form->{id}) {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Belegnummer') . qq|</th>
+ <td><input name=id size=20 value="$form->{id}" $readonly></td>
+ <td align=left>
+ <table width=100%>
+ <tr>
+ <th align=right width=50%>| . $locale->text('Buchungsdatum') . qq|</th>
+ <td align=left><input name=gldate size=11 title="$myconfig{dateformat}" value=$form->{gldate} $readonly></td>
+ </tr>
+ </table>
+ </td>
+ </tr>|;
+ }
+ print qq|
+ $department|;
+ if ($form->{id}) {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td>$description</td>
+ <td align=left>
+ <table width=100%>
+ <tr>
+ <th align=right width=50%>| . $locale->text('Mitarbeiter') . qq|</th>
+ <td align=left><input name=employee size=11 value=$form->{employee} $readonly></td>
+ </tr>
+ </table>
+ </td>
+ </tr>|;
+ } else {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td colspan=3>$description</td>
+ </tr>|;
+ }
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Betrag') . qq|</th>
+ <td>$amount</td>
+ <td align=left colspan=2>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('MwSt. inkl.') . qq|</th>
+ <td><input type=checkbox name=taxincluded value=1 tabindex="8" $taxincluded></td>
+ </tr>
+ </table>
+ </td>
+ </tr>|;
+ if ($form->{debit_splited}) {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Debit') . qq|</th>
+ <td>Betrag gesplittet</td>
+ <td><input name=debit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{debit}, 2)
+ . qq|" readonly> EUR</td>
+ <td><input class=submit type=submit name=action value="|
+ . $locale->text('Split Debit')
+ . qq|"></td>
+ <input name=debit_splited type=hidden size=10 value=$form->{debit_splited}>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Credit') . qq|</th>
+ <td><select name=creditchartselected tabindex="6">$form->{creditchart}</select></td>
+ <td><input name=credit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{credit}, 2)
+ . qq|" readonly > EUR</td>
+ <input name=credit_splited type=hidden size=10 value=$form->{credit_splited}>
+ </tr>
+ |;
+ } elsif ($form->{credit_splited}) {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Debit') . qq|</th>
+ <td><select name=debitchartselected tabindex="6">$form->{debitchart}</select></td>
+ <td><input name=debit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{debit}, 2)
+ . qq|" readonly> EUR</td>
+ <input name=debit_splited type=hidden size=10 value=$form->{debit_splited}>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Credit') . qq|</th>
+ <td>Betrag gesplittet</td>
+ <td><input name=credit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{credit}, 2)
+ . qq|" readonly > EUR</td>
+ <td><input class=submit type=submit name=action value="|
+ . $locale->text('Split Credit')
+ . qq|"></td>
+ <input name=credit_splited type=hidden size=10 value=$form->{credit_splited}>
+ |;
+ } else {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Debit') . qq|</th>
+ <td><select name=debitchartselected tabindex="6">$form->{debitchart}</select></td>
+ <td><input name=debit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{debit}, 2)
+ . qq|" readonly> EUR</td>
+ <td><input class=submit type=submit name=action value="|
+ . $locale->text('Split Debit')
+ . qq|"></td>
+ <input name=debit_splited type=hidden size=10 value=$form->{debit_splited}>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Credit') . qq|</th>
+ <td><select name=creditchartselected tabindex="6">$form->{creditchart}</select></td>
+ <td><input name=credit size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{credit}, 2)
+ . qq|" readonly > EUR</td>
+ <td><input class=submit type=submit name=action value="|
+ . $locale->text('Split Credit')
+ . qq|"></td>
+ <input name=credit_splited type=hidden size=10 value=$form->{credit_splited}>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Tax') . qq|</th>
+ <td><select name=taxchartselected tabindex="7">$form->{taxchart}</select></td>
+ <td><input name=tax size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{tax}, 2)
+ . qq|" readonly > EUR</td>
+ <td></td>
+ </tr>|;
+ }
+ print qq|
+ </tr> </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+$jsscript
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+ ($dec) = ($form->{totaldebit} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+ $taxrowcount =
+ ($form->{creditrowcount} > $form->{debitrowcount})
+ ? $form->{creditrowcount}
+ : $form->{debitrowcount};
+ $radieren = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
+
+ map {
+ $form->{$_} =
+ $form->format_amount(\%myconfig, $form->{$_}, $decimalplaces, " ")
+ } qw(totaldebit totalcredit);
+
+ print qq|
+</table>
+|;
+ for $i (2 .. $form->{creditrowcount}) {
+ print qq|
+ <input type=hidden name=creditchartselected_$i value="$form->{"creditchartselected_$i"}">
+ <input type=hidden name=credit_$i value="$form->{"credit_$i"}">
+ |;
+ }
+ for $i (2 .. $form->{debitrowcount}) {
+ print qq|
+ <input type=hidden name=debitchartselected_$i value="$form->{"debitchartselected_$i"}">
+ <input type=hidden name=debit_$i value="$form->{"debit_$i"}">
+ |;
+ }
+ if ($taxrowcount > 1) {
+ for $i (2 .. $taxrowcount) {
+ print qq|
+ <input type=hidden name=taxchartselected_$i value="$form->{"taxchartselected_$i"}">
+ <input type=hidden name=tax_$i value="$form->{"tax_$i"}">
+ |;
+ }
+ }
+ print qq|
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input name=callback type=hidden value="$form->{callback}">
+<br>
+|;
+
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ if ($form->{id}) {
+
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Storno') . qq|">|;
+
+ # Löschen und ändern von Buchungen nicht mehr möglich (GoB) nur am selben Tag möglich
+
+ if (!$form->{locked} && $radieren) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post')
+ . qq|" accesskey="b">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+
+ # if ($transdate > $closedto) {
+ # print qq|
+ # <input class=submit type=submit name=action value="|.$locale->text('Post as new').qq|">|;
+ # }
+ } else {
+ if ($transdate > $closedto) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print "
+ </form>
+
+</body>
+</html>
+";
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ map { $form->{$_} =~ s/\"/"/g } qw(reference description chart);
+
+ delete $form->{header};
+
+ foreach $key (keys %$form) {
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
+
+<h4>|
+ . $locale->text('Are you sure you want to delete Transaction')
+ . qq| $form->{reference}</h4>
+
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Transaction deleted!'))
+ if (GL->delete_transaction(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot delete transaction!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ # check if there is something in reference and date
+ $form->isblank("reference", $locale->text('Reference missing!'));
+ $form->isblank("transdate", $locale->text('Transaction Date missing!'));
+ $form->isblank("description", $locale->text('Description missing!'));
+
+ $transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ ($debitaccno, $debittaxkey) = split(/--/, $form->{debitchartselected});
+ ($creditaccno, $credittaxkey) = split(/--/, $form->{creditchartselected});
+
+ $credit_save = $form->{credit};
+ $debit_save = $form->{debit};
+
+ # check project
+ &check_project;
+ ($taxkey, $taxrate) = split(/--/, $form->{taxchartselected});
+
+ if ($debittaxkey > 0) {
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+ $form->{taxchart} =~ s/\"$debittaxkey--([^\"]*)\"/\"$debittaxkey--$1\"/;
+
+ $rate = ($form->{taxchart} =~ /selected/) ? $taxrate : $1;
+ $form->{taxkey} =
+ ($form->{taxchart} =~ /selected/) ? $taxkey : $debittaxkey;
+
+ if ($form->{storno}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{debit});
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{credit});
+ $form->{tax} = $form->parse_amount(\%myconfig, $form->{tax});
+ } else {
+ if ($form->{taxincluded}) {
+ $form->{debit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1);
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1) *
+ $rate;
+ } else {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * ($rate + 1);
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * $rate;
+ }
+ }
+ $form->{debittaxkey} = 1;
+
+ } else {
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+ $form->{taxchart} =~ s/\"$credittaxkey--([^\"]*)\"/\"$credittaxkey--$1\"/;
+
+ $rate = ($form->{taxchart} =~ /selected/) ? $taxrate : $1;
+ $form->{taxkey} =
+ ($form->{taxchart} =~ /selected/) ? $taxkey : $credittaxkey;
+
+ if ($form->{storno}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{debit});
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{credit});
+ $form->{tax} = $form->parse_amount(\%myconfig, $form->{tax});
+ } else {
+ if ($form->{taxincluded}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1);
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) / ($rate + 1) *
+ $rate;
+ } else {
+ $form->{debit} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * ($rate + 1);
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{tax} =
+ $form->parse_amount(\%myconfig, $form->{amount}) * $rate;
+ }
+ }
+ $form->{debittaxkey} = 0;
+
+ }
+ if ($form->{credit_splited}) {
+ $form->{debit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{credit} = $credit_save;
+ $form->{tax} = 0;
+ } elsif ($form->{debit_splited}) {
+ $form->{credit} = $form->parse_amount(\%myconfig, $form->{amount}) * 1;
+ $form->{debit} = $debit_save;
+ $form->{tax} = 0;
+ }
+
+ # this is just for the wise guys
+ $form->error($locale->text('Cannot post transaction for a closed period!'))
+ if ($transdate <= $closedto);
+ $form->error($locale->text('Soll- und Habenkonto sind gleich!'))
+ if ($debitaccno eq $creditaccno);
+ $form->error($locale->text('Keine Steuerautomatik möglich!'))
+ if ($debittaxkey && $credittaxkey && !($taxkey == 0));
+
+ if (($errno = GL->post_transaction(\%myconfig, \%$form)) <= -1) {
+ $errno *= -1;
+ $err[1] = $locale->text('Cannot have a value in both Debit and Credit!');
+ $err[2] = $locale->text('Debit and credit out of balance!');
+ $err[3] = $locale->text('Cannot post a transaction without a value!');
+
+ $form->error($err[$errno]);
+ }
+ undef($form->{callback});
+ $form->redirect("Buchung gespeichert. Buchungsnummer = " . $form->{id});
+
+ $lxdebug->leave_sub();
+}
+
+sub post_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{id} = 0;
+ &add;
+
+ $lxdebug->leave_sub();
+}
+
+sub storno {
+ $lxdebug->enter_sub();
+
+ $form->{id} = 0;
+ $form->{storno} = 1;
+ &post;
+
+ $lxdebug->leave_sub();
+}
+
+sub split_debit {
+ $lxdebug->enter_sub();
+
+ # change callback
+ $form->{old_callback} = $form->escape($form->{callback}, 1);
+ $form->{callback} = $form->escape("$form->{script}?action=update", 1);
+
+ # delete action
+ delete $form->{action};
+
+ # save all other form variables in a previousform variable
+ foreach $key (keys %$form) {
+
+ # escape ampersands
+ $form->{$key} =~ s/&/%26/g;
+ $previousform .= qq|$key=$form->{$key}&|;
+ }
+ chop $previousform;
+ $previousform = $form->escape($previousform, 1);
+ if (!$form->{debitpost}) {
+ $form->{debitpost} = $form->{amount};
+ }
+ $form->{previousform} = $previousform;
+ &display_split_debit();
+
+ $lxdebug->leave_sub();
+}
+
+sub split_credit {
+ $lxdebug->enter_sub();
+
+ # change callback
+ $form->{old_callback} = $form->escape($form->{callback}, 1);
+ $form->{callback} = $form->escape("$form->{script}?action=update", 1);
+
+ # delete action
+ delete $form->{action};
+
+ # save all other form variables in a previousform variable
+ foreach $key (keys %$form) {
+
+ # escape ampersands
+ $form->{$key} =~ s/&/%26/g;
+ $previousform .= qq|$key=$form->{$key}&|;
+ }
+ chop $previousform;
+ $previousform = $form->escape($previousform, 1);
+ if (!$form->{creditpost}) {
+ $form->{creditpost} = $form->{amount};
+ }
+ $form->{previousform} = $previousform;
+ &display_split_credit();
+ $lxdebug->leave_sub();
+}
+
+sub display_split_credit {
+ $lxdebug->enter_sub();
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+
+ $form->header;
+
+ print qq|
+<body>
+<form method=post name=split_credit action=gl.pl>
+|
+ . $locale->text('Credit') . qq|: |
+ . $form->format_amount(\%myconfig, $form->{amount}, 2)
+ . qq| EUR<br>
+|
+ . $locale->text('Still to post')
+ . qq|:<input name=creditpost size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{creditpost}, 2)
+ . qq|"> EUR<br>
+<script type="text/javascript">
+ function update_stilltopost (betrag){
+ remaining = parseFloat(document.split_credit.creditpost.value) - parseFloat(betrag);
+ document.split_credit.creditpost.value= remaining;
+ }
+</script>
+
+<table>|;
+ for $i (2 .. $form->{creditrowcount}) {
+ $form->{"creditchart_$i"} = $form->{chart};
+ $form->{"creditchart_$i"} =~
+ s/value=\"$form->{"creditchartselected_$i"}\"/value=\"$form->{"creditchartselected_$i"}\" selected/;
+
+ $form->{"taxchart_$i"} = $form->{taxchart};
+ $form->{"taxchart_$i"} =~
+ s/value=\"$form->{"taxchartselected_$i"}\"/value=\"$form->{"taxchartselected_$i"}\" selected/;
+ $position = $i - 1;
+ print qq|
+ <tr><td></td></tr>
+ <tr>
+ <th>Position $position</th>
+ <td><select name=creditchartselected_$i>$form->{"creditchart_$i"}</select></td>
+ <th align=right>| . $locale->text('Amount') . qq| $1</th>
+ <td><input name=credit_$i size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{"credit_$i"}, 2)
+ . qq|" onBlur="update_stilltopost(this.value)"> EUR</td>
+ </tr>
+ <tr>
+ <th></th>
+ <td><select name=taxchartselected_$i>$form->{"taxchart_$i"}</select></td>
+ <th align=right>| . $locale->text('Tax') . qq|</th>
+ <td><input name=tax_$i size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{"tax_$i"}, 2)
+ . qq|"> EUR</td>
+ <td><input type=checkbox name=tax_manual_$i value=1> Steuerkorrektur</td>
+ </tr>
+ <td></td>
+ <tr>
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+
+|;
+ }
+ print qq|
+</table>
+<input type=hidden name=previousform value="$form->{previousform}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+<input type=hidden name=callback value=$form->{callback}>
+<input type=hidden name=old_callback value=$form->{old_callback}>
+<input type=hidden name=amount value=$form->{amount}>
+<input type=hidden name=credit_splited value=1>
+<input type=hidden name=creditrowcount value="$form->{creditrowcount}">
+<input type=hidden name=chart value=| . $form->escape($form->{chart}) . qq|>
+<input type=hidden name=taxchart value=|
+ . $form->escape($form->{taxchart}) . qq|>
+<p>
+<input class=submit type=submit name=action value="|
+ . $locale->text('New Account') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Close') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_split_debit {
+ $lxdebug->enter_sub();
+ $form->{taxchart} = $form->unescape($form->{taxchart});
+
+ $form->header;
+
+ print qq|
+<body>
+<form method=post name=split_debit action=gl.pl>
+|
+ . $locale->text('Debit') . qq|: |
+ . $form->format_amount(\%myconfig, $form->{amount}, 2)
+ . qq| EUR<br>
+|
+ . $locale->text('Still to post')
+ . qq|:<input name=debitpost size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{debitpost}, 2)
+ . qq|"> EUR<br>
+<script type="text/javascript">
+ function update_stilltopost (betrag){
+ remaining = parseFloat(document.split_debit.debitpost.value) - parseFloat(betrag);
+ document.split_debit.debitpost.value= remaining;
+ }
+</script>
+
+<table>|;
+ for $i (2 .. $form->{debitrowcount}) {
+ $form->{"debitchart_$i"} = $form->{chart};
+ $form->{"debitchart_$i"} =~
+ s/value=\"$form->{"debitchartselected_$i"}\"/value=\"$form->{"debitchartselected_$i"}\" selected/;
+
+ $form->{"taxchart_$i"} = $form->{taxchart};
+ $form->{"taxchart_$i"} =~
+ s/value=\"$form->{"taxchartselected_$i"}\"/value=\"$form->{"taxchartselected_$i"}\" selected/;
+ $position = $i - 1;
+ print qq|
+ <tr><td></td></tr>
+ <tr>
+ <th>Position $position</th>
+ <td><select name=debitchartselected_$i>$form->{"debitchart_$i"}</select></td>
+ <th align=right>| . $locale->text('Amount') . qq| $1</th>
+ <td><input name=debit_$i size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{"debit_$i"}, 2)
+ . qq|" onBlur="update_stilltopost(this.value)"> EUR</td>
+ </tr>
+ <tr>
+ <th></th>
+ <td><select name=taxchartselected_$i>$form->{"taxchart_$i"}</select></td>
+ <th align=right>| . $locale->text('Tax') . qq|</th>
+ <td><input name=tax_$i size=10 value="|
+ . $form->format_amount(\%myconfig, $form->{"tax_$i"}, 2)
+ . qq|"> EUR</td>
+ <td><input type=checkbox name=tax_manual_$i value=1> Steuerkorrektur</td>
+ </tr>
+ <td></td>
+ <tr>
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+
+|;
+ }
+ print qq|
+</table>
+<input type=hidden name=previousform value="$form->{previousform}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+<input type=hidden name=callback value=$form->{callback}>
+<input type=hidden name=old_callback value=$form->{old_callback}>
+<input type=hidden name=amount value=$form->{amount}>
+<input type=hidden name=debit_splited value=1>
+<input type=hidden name=debitrowcount value="$form->{debitrowcount}">
+<input type=hidden name=chart value=| . $form->escape($form->{chart}) . qq|>
+<input type=hidden name=taxchart value=|
+ . $form->escape($form->{taxchart}) . qq|>
+<p>
+<input class=submit type=submit name=action value="|
+ . $locale->text('New Account') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Close') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub new_account {
+ $lxdebug->enter_sub();
+
+ $form->{chart} = $form->unescape($form->{chart});
+
+ if ($form->{credit_splited}) {
+ $form->{creditpost} = $form->{amount};
+
+ for $i (2 .. $form->{creditrowcount}) {
+ $form->{"credit_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"credit_$i"});
+ $form->{creditpost} -= $form->{"credit_$i"};
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected_$i"});
+ if ($form->{"tax_manual_$i"}) {
+ $form->{"tax_$i"} = $form->parse_amount(\%myconfig, $form->{"tax_$i"});
+ } else {
+ $form->{"tax_$i"} = $form->{"credit_$i"} * $taxrate;
+ }
+ $form->{creditpost} -= $form->{"tax_$i"};
+
+ }
+ if ($form->{"credit_$form->{creditrowcount}"}) {
+ $form->{creditrowcount}++;
+ }
+
+ &display_split_credit;
+ }
+ if ($form->{debit_splited}) {
+ $form->{debitpost} = $form->{amount};
+
+ for $i (2 .. $form->{debitrowcount}) {
+ $form->{"debit_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"debit_$i"});
+ $form->{debitpost} -= $form->{"debit_$i"};
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected_$i"});
+ if ($form->{"tax_manual_$i"}) {
+ $form->{"tax_$i"} = $form->parse_amount(\%myconfig, $form->{"tax_$i"});
+ } else {
+ $form->{"tax_$i"} = $form->{"debit_$i"} * $taxrate;
+ }
+ $form->{debitpost} -= $form->{"tax_$i"};
+
+ }
+ if ($form->{"debit_$form->{debitrowcount}"}) {
+ $form->{debitrowcount}++;
+ }
+
+ &display_split_debit;
+ }
+ $lxdebug->leave_sub();
+}
+
+sub close {
+ $lxdebug->enter_sub();
+
+ # save the new form variables before splitting previousform
+ map { $newform{$_} = $form->{$_} } keys %$form;
+
+ $previousform = $form->unescape($form->{previousform});
+
+ # don't trample on previous variables
+ map { delete $form->{$_} } keys %newform;
+
+ # now take it apart and restore original values
+ foreach $item (split /&/, $previousform) {
+ ($key, $value) = split /=/, $item, 2;
+ $value =~ s/%26/&/g;
+ $form->{$key} = $value;
+ }
+ if ($newform{credit_splited}) {
+ $form->{credit} = 0;
+ $form->{credit_splited} = $newform{credit_splited};
+ $form->{creditrowcount} = $newform{creditrowcount};
+ for $i (2 .. $form->{creditrowcount}) {
+ $form->{"creditchartselected_$i"} = $newform{"creditchartselected_$i"};
+ $form->{"credit_$i"} = $newform{"credit_$i"};
+ $form->{"credit_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"credit_$i"});
+ $form->{"taxchartselected_$i"} = $newform{"taxchartselected_$i"};
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected_$i"});
+ if ($newform{"tax_manual_$i"}) {
+ $form->{"tax_$i"} =
+ $form->parse_amount(\%myconfig, $newform{"tax_$i"});
+ } else {
+ $form->{"tax_$i"} = $form->{"credit_$i"} * $taxrate;
+ }
+ $form->{credit} += $form->round_amount($form->{"credit_$i"}, 2);
+ $form->{credit} += $form->round_amount($form->{"tax_$i"}, 2);
+
+ }
+ } else {
+ $form->{debit} = 0;
+ $form->{debit_splited} = $newform{debit_splited};
+ $form->{debitrowcount} = $newform{debitrowcount};
+ for $i (2 .. $form->{debitrowcount}) {
+ $form->{"debitchartselected_$i"} = $newform{"debitchartselected_$i"};
+ $form->{"debit_$i"} = $newform{"debit_$i"};
+ $form->{"debit_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"debit_$i"});
+ $form->{"taxchartselected_$i"} = $newform{"taxchartselected_$i"};
+ ($taxkey, $taxrate) = split(/--/, $form->{"taxchartselected_$i"});
+ if ($newform{"tax_manual_$i"}) {
+ $form->{"tax_$i"} =
+ $form->parse_amount(\%myconfig, $newform{"tax_$i"});
+ } else {
+ $form->{"tax_$i"} = $form->{"debit_$i"} * $taxrate;
+ }
+ $form->{debit} += $form->round_amount($form->{"debit_$i"}, 2);
+ $form->{debit} += $form->round_amount($form->{"tax_$i"}, 2);
+ }
+ }
+ delete $form->{action};
+ $callback = $form->unescape($form->{callback});
+ $form->{callback} = $form->unescape($form->{old_callback});
+ delete $form->{old_callback};
+
+ # put callback together
+ foreach $key (keys %$form) {
+
+ # do single escape for Apache 2.0
+ $value = $form->escape($form->{$key}, 1);
+ $callback .= qq|&$key=$value|;
+ }
+ $form->{callback} = $callback;
+
+ # redirect
+ $form->redirect;
+ $lxdebug->leave_sub();
+}
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger, Accounting
+# Copyright (c) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory Control module
+#
+#======================================================================
+
+use SL::IC;
+
+require "$form->{path}/io.pl";
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add ' . ucfirst $form->{item});
+
+ $form->{callback} =
+ "$form->{script}?action=add&item=$form->{item}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ $form->{unit} =
+ ($form->{item} eq 'service') ? $locale->text('hr') : $locale->text('ea');
+
+ &link_part;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ $form->{title} = (ucfirst $form->{searchitems}) . "s";
+ $form->{title} = $locale->text($form->{title});
+
+ # switch for backward sorting
+ $form->{revers} = 0;
+
+ # memory for which table was sort at last time
+ $form->{lastsort} = "";
+
+ # counter for added entries to top100
+ $form->{ndxs_counter} = 0;
+
+ # $locale->text('Parts')
+ # $locale->text('Services')
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>
+ <td><input type=button name=transdatefrom id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>
+ <td><input type=button name=transdateto name=transdateto id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BL", "trigger1",
+ "transdateto", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ unless ($form->{searchitems} eq 'service') {
+
+ $onhand = qq|
+ <input name=itemstatus class=radio type=radio value=onhand> |
+ . $locale->text('On Hand') . qq|
+ <input name=itemstatus class=radio type=radio value=short> |
+ . $locale->text('Short') . qq|
+|;
+
+ $makemodel = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Make') . qq|</th>
+ <td><input name=make size=20></td>
+ <th align=right nowrap>| . $locale->text('Model') . qq|</th>
+ <td><input name=model size=20></td>
+ </tr>
+|;
+
+ $serialnumber = qq|
+ <th align=right nowrap>| . $locale->text('Serial Number') . qq|</th>
+ <td><input name=serialnumber size=20></td>
+|;
+
+ $l_serialnumber = qq|
+ <td><input name=l_serialnumber class=checkbox type=checkbox value=Y> |
+ . $locale->text('Serial Number')
+ . qq|</td>
+|;
+
+ }
+
+ if ($form->{searchitems} eq 'assembly') {
+
+ $form->{title} = $locale->text('Assemblies');
+
+ $toplevel = qq|
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <input name=null class=radio type=radio value=1 checked> |
+ . $locale->text('Top Level') . qq|
+ <input name=bom class=checkbox type=checkbox value=1> |
+ . $locale->text('Individual Items') . qq|
+ </td>
+ </tr>
+|;
+
+ $bought = qq|
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td><input name=sold class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Sold') . qq|</td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=1 noshade></td>
+ </tr>
+ <tr>
+ <td><input name=ordered class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Ordered') . qq|</td>
+ </tr>
+ <tr>
+ <td colspan=4><hr size=1 noshade></td>
+ </tr>
+ <tr>
+ <td><input name=quoted class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Quoted') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ <td width=5%> </td>
+ <th>| . $locale->text('From') . qq|</th>
+ $button1
+ <th>| . $locale->text('To') . qq|</th>
+ $button2
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ } else {
+
+ $bought = qq|
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td><input name=bought class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Bought') . qq|</td>
+ <td><input name=sold class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Sold') . qq|</td>
+ </tr>
+ <tr>
+ <td colspan=4><hr size=1 noshade></td>
+ </tr>
+ <tr>
+ <td><input name=onorder class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('On Order') . qq|</td>
+ <td><input name=ordered class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Ordered') . qq|</td>
+ </tr>
+ <tr>
+ <td colspan=4><hr size=1 noshade></td>
+ </tr>
+ <tr>
+ <td><input name=rfq class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('RFQ') . qq|</td>
+ <td><input name=quoted class=checkbox type=checkbox value=1></td>
+ <td nowrap>| . $locale->text('Quoted') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ <td width=5%> </td>
+ <td>
+ <table>
+ <tr>
+ <th>| . $locale->text('From') . qq|</th>
+ $button1
+ <th>| . $locale->text('To') . qq|</th>
+ $button2
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=searchitems value=$form->{searchitems}>
+<input type=hidden name=title value="$form->{title}">
+
+<input type=hidden name=revers value="$form->{revers}">
+<input type=hidden name=lastsort value="$form->{lastsort}">
+
+<table width="100%">
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Part Number') . qq|</th>
+ <td><input name=partnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Part Description')
+ . qq|</th>
+ <td colspan=3><input name=description size=40></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Group') . qq|</th>
+ <td><input name=partsgroup size=20></td>
+ $serialnumber
+ </tr>
+ $makemodel
+ <tr>
+ <th align=right nowrap>| . $locale->text('Drawing') . qq|</th>
+ <td><input name=drawing size=20></td>
+ <th align=right nowrap>| . $locale->text('Microfiche') . qq|</th>
+ <td><input name=microfiche size=20></td>
+ </tr>
+ $toplevel
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <input name=itemstatus class=radio type=radio value=active checked> |
+ . $locale->text('Active') . qq|
+ $onhand
+ <input name=itemstatus class=radio type=radio value=obsolete> |
+ . $locale->text('Obsolete') . qq|
+ <input name=itemstatus class=radio type=radio value=orphaned> |
+ . $locale->text('Orphaned') . qq|
+ </td>
+ </tr>
+ $bought
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <hr size=1 noshade>
+ </td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Include in Report')
+ . qq|</th>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td><input name=l_partnumber class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Part Number')
+ . qq|</td>
+ <td><input name=l_description class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Part Description')
+ . qq|</td>
+ $l_serialnumber
+ <td><input name=l_unit class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Unit of measure')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name=l_listprice class=checkbox type=checkbox value=Y> |
+ . $locale->text('List Price')
+ . qq|</td>
+ <td><input name=l_sellprice class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Sell Price')
+ . qq|</td>
+ <td><input name=l_lastcost class=checkbox type=checkbox value=Y> |
+ . $locale->text('Last Cost')
+ . qq|</td>
+ <td><input name=l_linetotal class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Line Total')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name=l_priceupdate class=checkbox type=checkbox value=Y> |
+ . $locale->text('Updated')
+ . qq|</td>
+ <td><input name=l_bin class=checkbox type=checkbox value=Y> |
+ . $locale->text('Bin')
+ . qq|</td>
+ <td><input name=l_rop class=checkbox type=checkbox value=Y> |
+ . $locale->text('ROP')
+ . qq|</td>
+ <td><input name=l_weight class=checkbox type=checkbox value=Y> |
+ . $locale->text('Weight')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name=l_image class=checkbox type=checkbox value=Y> |
+ . $locale->text('Image')
+ . qq|</td>
+ <td><input name=l_drawing class=checkbox type=checkbox value=Y> |
+ . $locale->text('Drawing')
+ . qq|</td>
+ <td><input name=l_microfiche class=checkbox type=checkbox value=Y> |
+ . $locale->text('Microfiche')
+ . qq|</td>
+ <td><input name=l_partsgroup class=checkbox type=checkbox value=Y> |
+ . $locale->text('Group')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name=l_subtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal')
+ . qq|</td>
+ <td><input name=l_soldtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('soldtotal')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td colspan=4><hr size=3 noshade></td></tr>
+</table>
+
+$jsscript
+
+<input type=hidden name=nextsub value=generate_report>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=revers value="$form->{revers}">
+<input type=hidden name=lastsort value="$form->{lastsort}">
+
+<input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('TOP100') . qq|">
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+} #end search()
+
+sub choice {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Top 100 hinzufuegen');
+
+ $form->header;
+
+ print qq|
+ <body>
+
+ <form method=post action=$form->{script}>
+
+ <input type=hidden name=searchitems value=$form->{searchitems}>
+ <input type=hidden name=title value="$form->{title}">
+
+ <input type=hidden name=revers value="$form->{revers}">
+ <input type=hidden name=lastsort value="$form->{lastsort}">|;
+
+ print qq|
+ <table>
+ <tr class=listheading>
+ <th class=listheading nowrap>|
+ . $locale->text('Part Number')
+ . qq|</th>
+ <th class=listheading nowrap>|
+ . $locale->text('Part Description')
+ . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td><input type=text name=partnumber size=20 value=></td>
+ <td><input type=text name=description size=30 value=></td>
+ </tr>
+ </table>
+ <br>|;
+
+ print qq|
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=itemstatus value="$form->{itemstatus}">
+<input type=hidden name=l_linetotal value="$form->{l_linetotal}">
+<input type=hidden name=l_partnumber value="$form->{l_partnumber}">
+<input type=hidden name=l_description value="$form->{l_description}">
+<input type=hidden name=l_onhand value="$form->{l_onhand}">
+<input type=hidden name=l_unit value="$form->{l_unit}">
+<input type=hidden name=l_sellprice value="$form->{l_sellprice}">
+<input type=hidden name=l_linetotalsellprice value="$form->{l_linetotalsellprice}">
+<input type=hidden name=sort value="$form->{sort}">
+<input type=hidden name=revers value="$form->{revers}">
+<input type=hidden name=lastsort value="$form->{lastsort}">
+
+<input type=hidden name=bom value="$form->{bom}">
+<input type=hidden name=titel value="$form->{titel}">
+<input type=hidden name=searchitems value="$form->{searchitems}">
+
+<input type=hidden name=row value=$j>
+
+<input type=hidden name=nextsub value=item_selected>
+
+<input type=hidden name=test value=item_selected>
+
+<input name=lastndx type=hidden value=$lastndx>
+
+<input name=ndxs_counter type=hidden value=$form->{ndxs_counter}>
+
+<input name=extras type=hidden value=$form->{extras}>|;
+
+ # if choice set data
+ if ($form->{ndx}) {
+ for ($i = 0; $i < $form->{ndxs_counter}; $i++) {
+
+ # prepeare data
+ $partnumber = $form->{"totop100_partnumber_$j"};
+ $description = $form->{"totop100_description_$j"};
+ $unit = $form->{"totop100_unit_$j"};
+ $sellprice = $form->{"totop100_sellprice_$j"};
+ $soldtotal = $form->{"totop100_soldtotal_$j"};
+
+ # insert data into top100
+ push @{ $form->{parts} },
+ { number => "",
+ partnumber => "$partnumber",
+ description => "$description",
+ unit => "$unit",
+ sellprice => "$sellprice",
+ soldtotal => "$soldtotal" };
+ } #rof
+ } #fi
+
+ $totop100 = "";
+
+ # set data for next page
+ if (($form->{ndxs_counter}) > 0) {
+ for ($i = 1; ($i < $form->{ndxs_counter} + 1); $i++) {
+ $partnumber = $form->{"totop100_partnumber_$i"};
+ $description = $form->{"totop100_description_$i"};
+ $unit = $form->{"totop100_unit_$i"};
+ $sellprice = $form->{"totop100_sellprice_$i"};
+ $soldtotal = $form->{"totop100_soldtotal_$i"};
+
+ $totop100 .= qq|
+<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}>
+<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}>
+<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}>
+<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}>
+<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}>
+ |;
+ } #rof
+ } #fi
+
+ print $totop100;
+
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('list') . qq|">
+ </form>
+
+ </body>
+ </html>|;
+ $lxdebug->leave_sub();
+} #end choice
+
+sub list {
+ $lxdebug->enter_sub();
+
+ # get parts for
+ if (($form->{partnumber} eq "") and ($form->{description} eq "")) {
+ IC->get_parts(\%myconfig, \%$form, "");
+ } else {
+ if ((!($form->{partnumber} eq "")) and ($form->{description} eq "")) {
+ IC->get_parts(\%myconfig, \%$form, "partnumber");
+ } else {
+ if (($form->{partnumber} eq "") and (!($form->{description} eq ""))) {
+ IC->get_parts(\%myconfig, \%$form, "description");
+ } else {
+ IC->get_parts(\%myconfig, \%$form, "all");
+ } #fi
+ } #fi
+ } #fi
+
+ $form->{title} = $locale->text('Top 100 hinzufuegen');
+
+ $form->header;
+
+ print qq|
+<body>
+ <form method=post action=ic.pl>
+ <table width=100%>
+ <tr>
+ <th class=listtop colspan=6>| . $locale->text('choice part') . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr class=listheading>
+ <th> </th>
+ <th class=listheading>| . $locale->text('Part Number') . qq|</th>
+ <th class=listheading>| . $locale->text('Part Description') . qq|</th>
+ <th class=listheading>| . $locale->text('Unit of measure') . qq|</th>
+ <th class=listheading>| . $locale->text('Sell Price') . qq|</th>
+ <th class=listheading>| . $locale->text('soldtotal') . qq|</th>
+ </tr>|;
+
+ my $j = 0;
+ my $i = $form->{rows};
+
+ for ($j = 1; $j <= $i; $j++) {
+
+ print qq|
+ <tr class=listrow1>|;
+ if ($j == 1) {
+ print qq|
+ <td><input name=ndx class=radio type=radio value=$j checked></td>|;
+ } else {
+ print qq|
+ <td><input name=ndx class=radio type=radio value=$j></td>|;
+ }
+ print qq|
+ <td><input name="new_partnumber_$j" type=hidden value="$form->{"partnumber_$j"}">$form->{"partnumber_$j"}</td>
+ <td><input name="new_description_$j" type=hidden value="$form->{"description_$j"}">$form->{"description_$j"}</td>
+ <td><input name="new_unit_$j" type=hidden value="$form->{"unit_$j"}">$form->{"unit_$j"}</td>
+ <td><input name="new_sellprice_$j" type=hidden value="$form->{"sellprice_$j"}">$form->{"sellprice_$j"}</td>
+ <td><input name="new_soldtotal_$j" type=hidden value="$form->{"soldtotal_$j"}">$form->{"soldtotal_$j"}</td>
+ </tr>
+
+ <input name="new_id_$j" type=hidden value="$form->{"id_$j"}">|;
+ }
+
+ print qq|
+
+</table>
+
+<br>
+
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=itemstatus value="$form->{itemstatus}">
+<input type=hidden name=l_linetotal value="$form->{l_linetotal}">
+<input type=hidden name=l_partnumber value="$form->{l_partnumber}">
+<input type=hidden name=l_description value="$form->{l_description}">
+<input type=hidden name=l_onhand value="$form->{l_onhand}">
+<input type=hidden name=l_unit value="$form->{l_unit}">
+<input type=hidden name=l_sellprice value="$form->{l_sellprice}">
+<input type=hidden name=l_linetotalsellprice value="$form->{l_linetotalsellprice}">
+<input type=hidden name=sort value="$form->{sort}">
+<input type=hidden name=revers value="$form->{revers}">
+<input type=hidden name=lastsort value="$form->{lastsort}">
+
+<input type=hidden name=bom value="$form->{bom}">
+<input type=hidden name=titel value="$form->{titel}">
+<input type=hidden name=searchitems value="$form->{searchitems}">
+
+<input type=hidden name=row value=$j>
+
+<input type=hidden name=nextsub value=item_selected>
+
+<input name=lastndx type=hidden value=$lastndx>
+
+<input name=ndxs_counter type=hidden value=$form->{ndxs_counter}>|;
+
+ $totop100 = "";
+
+ if (($form->{ndxs_counter}) > 0) {
+ for ($i = 1; ($i < $form->{ndxs_counter} + 1); $i++) {
+ $j1 = $form->{"totop100_partnumber_$i"};
+ $j2 = $form->{"totop100_description_$i"};
+ $j3 = $form->{"totop100_unit_$i"};
+ $j4 = $form->{"totop100_sellprice_$i"};
+ $j5 = $form->{"totop100_soldtotal_$i"};
+
+ $partnumber = $j1;
+ $description = $j2;
+ $unit = $j3;
+ $sellprice = $j4;
+ $soldtotal = $j5;
+
+ $totop100 .= qq|
+<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}>
+<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}>
+<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}>
+<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}>
+<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}>
+ |;
+ } #rof
+ } #fi
+
+ print $totop100;
+
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('TOP100') . qq|">
+
+</form>
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+} #end list()
+
+sub top100 {
+ $lxdebug->enter_sub();
+
+ if ($form->{ndx}) {
+ $form->{ndxs_counter}++;
+
+ if ($form->{ndxs_counter} > 0) {
+
+ $index = $form->{ndx};
+
+ $j1 = $form->{"new_partnumber_$index"};
+ $form->{"totop100_partnumber_$form->{ndxs_counter}"} = $j1;
+ $j2 = $form->{"new_description_$index"};
+ $form->{"totop100_description_$form->{ndxs_counter}"} = $j2;
+ $j3 = $form->{"new_unit_$index"};
+ $form->{"totop100_unit_$form->{ndxs_counter}"} = $j3;
+ $j4 = $form->{"new_sellprice_$index"};
+ $form->{"totop100_sellprice_$form->{ndxs_counter}"} = $j4;
+ $j5 = $form->{"new_soldtotal_$index"};
+ $form->{"totop100_soldtotal_$form->{ndxs_counter}"} = $j5;
+ } #fi
+ } #fi
+ &addtop100();
+ $lxdebug->leave_sub();
+} #end top100
+
+sub addtop100 {
+ $lxdebug->enter_sub();
+
+ $form->{top100} = "top100";
+ $form->{l_soldtotal} = "Y";
+ $form->{soldtotal} = "soldtotal";
+ $form->{sort} = "soldtotal";
+ $form->{l_qty} = "N";
+ $callback .= "&form->{top100}=$form->{top100}";
+ $form->{l_linetotal} = "";
+ $form->{revers} = 1;
+ $form->{number} = "position";
+ $form->{l_number} = "Y";
+
+ my $totop100 = "";
+
+ $form->{title} = $locale->text('Top 100');
+
+ $revers = $form->{revers};
+ $lastsort = $form->{lastsort};
+
+ if (($form->{lastsort} eq "") && ($form->{sort} eq undef)) {
+ $form->{revers} = 0;
+ $form->{lastsort} = "partnumber";
+ $form->{sort} = "partnumber";
+ } #fi
+
+ $callback =
+ "$form->{script}?action=top100&path=$form->{path}&login=$form->{login}&password=$form->{password}&searchitems=$form->{searchitems}&itemstatus=$form->{itemstatus}&bom=$form->{bom}&l_linetotal=$form->{l_linetotal}&title="
+ . $form->escape($form->{title}, 1);
+
+ # if we have a serialnumber limit search
+ if ($form->{serialnumber} || $form->{l_serialnumber}) {
+ $form->{l_serialnumber} = "Y";
+ unless ( $form->{bought}
+ || $form->{sold}
+ || $form->{rfq}
+ || $form->{quoted}) {
+ $form->{bought} = $form->{sold} = 1;
+ }
+ }
+ IC->all_parts(\%myconfig, \%$form);
+
+ if ($form->{itemstatus} eq 'active') {
+ $option .= $locale->text('Active') . " : ";
+ }
+ if ($form->{itemstatus} eq 'obsolete') {
+ $option .= $locale->text('Obsolete') . " : ";
+ }
+ if ($form->{itemstatus} eq 'orphaned') {
+ $option .= $locale->text('Orphaned') . " : ";
+ }
+ if ($form->{itemstatus} eq 'onhand') {
+ $option .= $locale->text('On Hand') . " : ";
+ $form->{l_onhand} = "Y";
+ }
+ if ($form->{itemstatus} eq 'short') {
+ $option .= $locale->text('Short') . " : ";
+ $form->{l_onhand} = "Y";
+ }
+ if ($form->{onorder}) {
+ $form->{l_ordnumber} = "Y";
+ $callback .= "&onorder=$form->{onorder}";
+ $option .= $locale->text('On Order') . " : ";
+ }
+ if ($form->{ordered}) {
+ $form->{l_ordnumber} = "Y";
+ $callback .= "&ordered=$form->{ordered}";
+ $option .= $locale->text('Ordered') . " : ";
+ }
+ if ($form->{rfq}) {
+ $form->{l_quonumber} = "Y";
+ $callback .= "&rfq=$form->{rfq}";
+ $option .= $locale->text('RFQ') . " : ";
+ }
+ if ($form->{quoted}) {
+ $form->{l_quonumber} = "Y";
+ $callback .= ""ed=$form->{quoted}";
+ $option .= $locale->text('Quoted') . " : ";
+ }
+ if ($form->{bought}) {
+ $form->{l_invnumber} = "Y";
+ $callback .= "&bought=$form->{bought}";
+ $option .= $locale->text('Bought') . " : ";
+ }
+ if ($form->{sold}) {
+ $form->{l_invnumber} = "Y";
+ $callback .= "&sold=$form->{sold}";
+ $option .= $locale->text('Sold') . " : ";
+ }
+ if ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+
+ $form->{l_lastcost} = "";
+ $form->{l_name} = "Y";
+ if ($form->{transdatefrom}) {
+ $callback .= "&transdatefrom=$form->{transdatefrom}";
+ $option .= "\n<br>"
+ . $locale->text('From')
+ . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $callback .= "&transdateto=$form->{transdateto}";
+ $option .= "\n<br>"
+ . $locale->text('To')
+ . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ }
+
+ $option .= "<br>";
+
+ if ($form->{partnumber}) {
+ $callback .= "&partnumber=$form->{partnumber}";
+ $option .= $locale->text('Part Number') . qq| : $form->{partnumber}<br>|;
+ }
+ if ($form->{partsgroup}) {
+ $callback .= "&partsgroup=$form->{partsgroup}";
+ $option .= $locale->text('Group') . qq| : $form->{partsgroup}<br>|;
+ }
+ if ($form->{serialnumber}) {
+ $callback .= "&serialnumber=$form->{serialnumber}";
+ $option .=
+ $locale->text('Serial Number') . qq| : $form->{serialnumber}<br>|;
+ }
+ if ($form->{description}) {
+ $callback .= "&description=$form->{description}";
+ $description = $form->{description};
+ $description =~ s/
+/<br>/g;
+ $option .=
+ $locale->text('Part Description') . qq| : $form->{description}<br>|;
+ }
+ if ($form->{make}) {
+ $callback .= "&make=$form->{make}";
+ $option .= $locale->text('Make') . qq| : $form->{make}<br>|;
+ }
+ if ($form->{model}) {
+ $callback .= "&model=$form->{model}";
+ $option .= $locale->text('Model') . qq| : $form->{model}<br>|;
+ }
+ if ($form->{drawing}) {
+ $callback .= "&drawing=$form->{drawing}";
+ $option .= $locale->text('Drawing') . qq| : $form->{drawing}<br>|;
+ }
+ if ($form->{microfiche}) {
+ $callback .= "µfiche=$form->{microfiche}";
+ $option .= $locale->text('Microfiche') . qq| : $form->{microfiche}<br>|;
+ }
+ if ($form->{l_soldtotal}) {
+ $callback .= "&soldtotal=$form->{soldtotal}";
+ $option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}<br>|;
+ }
+
+ @columns =
+ $form->sort_columns(
+ qw(number partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
+ );
+
+ if ($form->{l_linetotal}) {
+ $form->{l_onhand} = "Y";
+ $form->{l_linetotalsellprice} = "Y" if $form->{l_sellprice};
+ if ($form->{l_lastcost}) {
+ $form->{l_linetotallastcost} = "Y";
+ if (($form->{searchitems} eq 'assembly') && !$form->{bom}) {
+ $form->{l_linetotallastcost} = "";
+ }
+ }
+ $form->{l_linetotallistprice} = "Y" if $form->{l_listprice};
+ }
+
+ if ($form->{searchitems} eq 'service') {
+
+ # remove bin, weight and rop from list
+ map { $form->{"l_$_"} = "" } qw(bin weight rop);
+
+ $form->{l_onhand} = "";
+
+ # qty is irrelevant unless bought or sold
+ if ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+ $form->{l_onhand} = "Y";
+ } else {
+ $form->{l_linetotalsellprice} = "";
+ $form->{l_linetotallastcost} = "";
+ }
+ }
+
+ $form->{l_lastcost} = ""
+ if ($form->{searchitems} eq 'assembly' && !$form->{bom});
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to callback
+ $callback .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ }
+
+ $column_header{number} =
+ qq|<th class=listheading nowrap>| . $locale->text('number') . qq|</th>|;
+ $column_header{partnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=partnumber&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Part Number')
+ . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=description&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Part Description')
+ . qq|</a></th>|;
+ $column_header{partsgroup} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=partsgroup>|
+ . $locale->text('Group')
+ . qq|</a></th>|;
+ $column_header{bin} =
+ qq|<th><a class=listheading href=$callback&sort=bin>|
+ . $locale->text('Bin')
+ . qq|</a></th>|;
+ $column_header{priceupdate} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=priceupdate>|
+ . $locale->text('Updated')
+ . qq|</a></th>|;
+ $column_header{onhand} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=onhand&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Qty')
+ . qq|</th>|;
+ $column_header{unit} =
+ qq|<th class=listheading nowrap>| . $locale->text('Unit') . qq|</th>|;
+ $column_header{listprice} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('List Price')
+ . qq|</th>|;
+ $column_header{lastcost} =
+ qq|<th class=listheading nowrap>| . $locale->text('Last Cost') . qq|</th>|;
+ $column_header{rop} =
+ qq|<th class=listheading nowrap>| . $locale->text('ROP') . qq|</th>|;
+ $column_header{weight} =
+ qq|<th class=listheading nowrap>| . $locale->text('Weight') . qq|</th>|;
+
+ $column_header{invnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=invnumber>|
+ . $locale->text('Invoice Number')
+ . qq|</a></th>|;
+ $column_header{ordnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=ordnumber>|
+ . $locale->text('Order Number')
+ . qq|</a></th>|;
+ $column_header{quonumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=quonumber>|
+ . $locale->text('Quotation')
+ . qq|</a></th>|;
+
+ $column_header{name} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=name>|
+ . $locale->text('Name')
+ . qq|</a></th>|;
+
+ $column_header{sellprice} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Sell Price')
+ . qq|</th>|;
+ $column_header{linetotalsellprice} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+ $column_header{linetotallastcost} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+ $column_header{linetotallistprice} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+
+ $column_header{image} =
+ qq|<th class=listheading nowrap>| . $locale->text('Image') . qq|</a></th>|;
+ $column_header{drawing} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=drawing>|
+ . $locale->text('Drawing')
+ . qq|</a></th>|;
+ $column_header{microfiche} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=microfiche>|
+ . $locale->text('Microfiche')
+ . qq|</a></th>|;
+
+ $column_header{serialnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=serialnumber>|
+ . $locale->text('Serial Number')
+ . qq|</a></th>|;
+ $column_header{soldtotal} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=soldtotal&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('soldtotal')
+ . qq|</a></th>|;
+
+ $form->header;
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td colspan=$colspan>$option</td></tr>
+
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+ |;
+
+ # add order to callback
+ $form->{callback} = $callback .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ if (@{ $form->{parts} }) {
+ $sameitem = $form->{parts}->[0]->{ $form->{sort} };
+ }
+
+ # insert numbers for top100
+ my $j = 0;
+ foreach $ref (@{ $form->{parts} }) {
+ $j++;
+ $ref->{number} = $j;
+ }
+
+ # if avaible -> insert choice here
+ if (($form->{ndxs_counter}) > 0) {
+ for ($i = 1; ($i < $form->{ndxs_counter} + 1); $i++) {
+ $partnumber = $form->{"totop100_partnumber_$i"};
+ $description = $form->{"totop100_description_$i"};
+ $unit = $form->{"totop100_unit_$i"};
+ $sellprice = $form->{"totop100_sellprice_$i"};
+ $soldtotal = $form->{"totop100_soldtotal_$i"};
+
+ $totop100 .= qq|
+<input type=hidden name=totop100_partnumber_$i value=$form->{"totop100_partnumber_$i"}>
+<input type=hidden name=totop100_description_$i value=$form->{"totop100_description_$i"}>
+<input type=hidden name=totop100_unit_$i value=$form->{"totop100_unit_$i"}>
+<input type=hidden name=totop100_sellprice_$i value=$form->{"totop100_sellprice_$i"}>
+<input type=hidden name=totop100_soldtotal_$i value=$form->{"totop100_soldtotal_$i"}>
+ |;
+
+ # insert into list
+ push @{ $form->{parts} },
+ { number => "",
+ partnumber => "$partnumber",
+ description => "$description",
+ unit => "$unit",
+ sellprice => "$sellprice",
+ soldtotal => "$soldtotal" };
+ } #rof
+ } #fi
+ # build data for columns
+ foreach $ref (@{ $form->{parts} }) {
+
+ if ($form->{l_subtotal} eq 'Y' && !$ref->{assemblyitem}) {
+ if ($sameitem ne $ref->{ $form->{sort} }) {
+ &parts_subtotal;
+ $sameitem = $ref->{ $form->{sort} };
+ }
+ }
+
+ $ref->{exchangerate} = 1 unless $ref->{exchangerate};
+ $ref->{sellprice} *= $ref->{exchangerate};
+ $ref->{listprice} *= $ref->{exchangerate};
+ $ref->{lastcost} *= $ref->{exchangerate};
+
+ # use this for assemblies
+ $onhand = $ref->{onhand};
+
+ $align = "left";
+ if ($ref->{assemblyitem}) {
+ $align = "right";
+ $onhand = 0 if ($form->{sold});
+ }
+
+ $ref->{description} =~ s/
+/<br>/g;
+
+ $column_data{number} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{number}, '', " ")
+ . "</td>";
+ $column_data{partnumber} =
+ "<td align=$align>$ref->{partnumber} </a></td>";
+ $column_data{description} = "<td>$ref->{description} </td>";
+ $column_data{partsgroup} = "<td>$ref->{partsgroup} </td>";
+
+ $column_data{onhand} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
+ . "</td>";
+ $column_data{sellprice} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
+ . "</td>";
+ $column_data{listprice} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
+ . "</td>";
+ $column_data{lastcost} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
+ . "</td>";
+
+ $column_data{linetotalsellprice} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
+ 2, " ")
+ . "</td>";
+ $column_data{linetotallastcost} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
+ 2, " ")
+ . "</td>";
+ $column_data{linetotallistprice} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
+ 2, " ")
+ . "</td>";
+
+ if (!$ref->{assemblyitem}) {
+ $totalsellprice += $onhand * $ref->{sellprice};
+ $totallastcost += $onhand * $ref->{lastcost};
+ $totallistprice += $onhand * $ref->{listprice};
+
+ $subtotalonhand += $onhand;
+ $subtotalsellprice += $onhand * $ref->{sellprice};
+ $subtotallastcost += $onhand * $ref->{lastcost};
+ $subtotallistprice += $onhand * $ref->{listprice};
+ }
+
+ $column_data{rop} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{rop}, '', " ") . "</td>";
+ $column_data{weight} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{weight}, '', " ")
+ . "</td>";
+ $column_data{unit} = "<td>$ref->{unit} </td>";
+ $column_data{bin} = "<td>$ref->{bin} </td>";
+ $column_data{priceupdate} = "<td>$ref->{priceupdate} </td>";
+
+ $column_data{invnumber} =
+ ($ref->{module} ne 'oe')
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=invoice&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber}</a></td>"
+ : "<td>$ref->{invnumber}</td>";
+ $column_data{ordnumber} =
+ ($ref->{module} eq 'oe')
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber}</a></td>"
+ : "<td>$ref->{ordnumber}</td>";
+ $column_data{quonumber} =
+ ($ref->{module} eq 'oe' && !$ref->{ordnumber})
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber}</a></td>"
+ : "<td>$ref->{quonumber}</td>";
+
+ $column_data{name} = "<td>$ref->{name}</td>";
+
+ $column_data{image} =
+ ($ref->{image})
+ ? "<td><a href=$ref->{image}><img src=$ref->{image} height=32 border=0></a></td>"
+ : "<td> </td>";
+ $column_data{drawing} =
+ ($ref->{drawing})
+ ? "<td><a href=$ref->{drawing}>$ref->{drawing}</a></td>"
+ : "<td> </td>";
+ $column_data{microfiche} =
+ ($ref->{microfiche})
+ ? "<td><a href=$ref->{microfiche}>$ref->{microfiche}</a></td>"
+ : "<td> </td>";
+
+ $column_data{serialnumber} = "<td>$ref->{serialnumber}</td>";
+
+ $column_data{soldtotal} = "<td align=right>$ref->{soldtotal}</td>";
+
+ $i++;
+ $i %= 2;
+ print "<tr class=listrow$i>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &parts_subtotal;
+ } #fi
+
+ if ($form->{"l_linetotal"}) {
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+ $column_data{linetotalsellprice} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalsellprice, 2, " ")
+ . "</th>";
+ $column_data{linetotallastcost} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totallastcost, 2, " ")
+ . "</th>";
+ $column_data{linetotallistprice} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totallistprice, 2, " ")
+ . "</th>";
+
+ print "<tr class=listtotal>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|</tr>
+ |;
+ }
+
+ print qq|
+ <tr><td colspan=$colspan><hr size=3 noshade></td></tr>
+</table>
+
+|;
+
+ print qq|
+
+<br>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=itemstatus value="$form->{itemstatus}">
+<input type=hidden name=l_linetotal value="$form->{l_linetotal}">
+<input type=hidden name=l_partnumber value="$form->{l_partnumber}">
+<input type=hidden name=l_description value="$form->{l_description}">
+<input type=hidden name=l_onhand value="$form->{l_onhand}">
+<input type=hidden name=l_unit value="$form->{l_unit}">
+<input type=hidden name=l_sellprice value="$form->{l_sellprice}">
+<input type=hidden name=l_linetotalsellprice value="$form->{l_linetotalsellprice}">
+<input type=hidden name=sort value="$form->{sort}">
+<input type=hidden name=revers value="$form->{revers}">
+<input type=hidden name=lastsort value="$form->{lastsort}">
+<input type=hidden name=parts value="$form->{parts}">
+
+<input type=hidden name=bom value="$form->{bom}">
+<input type=hidden name=titel value="$form->{titel}">
+<input type=hidden name=searchitems value="$form->{searchitems}">|;
+
+ print $totop100;
+
+ print qq|
+ <input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
+
+ <input class=submit type=submit name=action value="|
+ . $locale->text('choice') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+} # end addtop100
+
+sub generate_report {
+ $lxdebug->enter_sub();
+
+ $revers = $form->{revers};
+ $lastsort = $form->{lastsort};
+
+ if (($form->{lastsort} eq "") && ($form->{sort} eq undef)) {
+ $form->{revers} = 0;
+ $form->{lastsort} = "partnumber";
+ $form->{sort} = "partnumber";
+ } else {
+
+ # switch between backward sorting of tables
+ if ($form->{lastsort} eq $form->{sort}) {
+ if ($form->{revers} == 0) {
+ $form->{revers} = 1;
+ } else {
+ $form->{revers} = 0;
+ } #fi
+ } else {
+ $form->{revers} == 0;
+ $form->{lastsort} = $form->{sort};
+ } #fi
+ } #fi
+
+ $callback =
+ "$form->{script}?action=generate_report&path=$form->{path}&login=$form->{login}&password=$form->{password}&searchitems=$form->{searchitems}&itemstatus=$form->{itemstatus}&bom=$form->{bom}&l_linetotal=$form->{l_linetotal}&title="
+ . $form->escape($form->{title}, 1);
+
+ # if we have a serialnumber limit search
+ if ($form->{serialnumber} || $form->{l_serialnumber}) {
+ $form->{l_serialnumber} = "Y";
+ unless ( $form->{bought}
+ || $form->{sold}
+ || $form->{rfq}
+ || $form->{quoted}) {
+ $form->{bought} = $form->{sold} = 1;
+ }
+ }
+
+ IC->all_parts(\%myconfig, \%$form);
+
+ if ($form->{itemstatus} eq 'active') {
+ $option .= $locale->text('Active') . " : ";
+ }
+ if ($form->{itemstatus} eq 'obsolete') {
+ $option .= $locale->text('Obsolete') . " : ";
+ }
+ if ($form->{itemstatus} eq 'orphaned') {
+ $option .= $locale->text('Orphaned') . " : ";
+ }
+ if ($form->{itemstatus} eq 'onhand') {
+ $option .= $locale->text('On Hand') . " : ";
+ $form->{l_onhand} = "Y";
+ }
+ if ($form->{itemstatus} eq 'short') {
+ $option .= $locale->text('Short') . " : ";
+ $form->{l_onhand} = "Y";
+ }
+ if ($form->{onorder}) {
+ $form->{l_ordnumber} = "Y";
+ $callback .= "&onorder=$form->{onorder}";
+ $option .= $locale->text('On Order') . " : ";
+ }
+ if ($form->{ordered}) {
+ $form->{l_ordnumber} = "Y";
+ $callback .= "&ordered=$form->{ordered}";
+ $option .= $locale->text('Ordered') . " : ";
+ }
+ if ($form->{rfq}) {
+ $form->{l_quonumber} = "Y";
+ $callback .= "&rfq=$form->{rfq}";
+ $option .= $locale->text('RFQ') . " : ";
+ }
+ if ($form->{quoted}) {
+ $form->{l_quonumber} = "Y";
+ $callback .= ""ed=$form->{quoted}";
+ $option .= $locale->text('Quoted') . " : ";
+ }
+ if ($form->{bought}) {
+ $form->{l_invnumber} = "Y";
+ $callback .= "&bought=$form->{bought}";
+ $option .= $locale->text('Bought') . " : ";
+ }
+ if ($form->{sold}) {
+ $form->{l_invnumber} = "Y";
+ $callback .= "&sold=$form->{sold}";
+ $option .= $locale->text('Sold') . " : ";
+ }
+ if ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+
+ $form->{l_lastcost} = "";
+ $form->{l_name} = "Y";
+ if ($form->{transdatefrom}) {
+ $callback .= "&transdatefrom=$form->{transdatefrom}";
+ $option .= "\n<br>"
+ . $locale->text('From')
+ . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $callback .= "&transdateto=$form->{transdateto}";
+ $option .= "\n<br>"
+ . $locale->text('To')
+ . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ }
+
+ $option .= "<br>";
+
+ if ($form->{partnumber}) {
+ $callback .= "&partnumber=$form->{partnumber}";
+ $option .= $locale->text('Part Number') . qq| : $form->{partnumber}<br>|;
+ }
+ if ($form->{partsgroup}) {
+ $callback .= "&partsgroup=$form->{partsgroup}";
+ $option .= $locale->text('Group') . qq| : $form->{partsgroup}<br>|;
+ }
+ if ($form->{serialnumber}) {
+ $callback .= "&serialnumber=$form->{serialnumber}";
+ $option .=
+ $locale->text('Serial Number') . qq| : $form->{serialnumber}<br>|;
+ }
+ if ($form->{description}) {
+ $callback .= "&description=$form->{description}";
+ $description = $form->{description};
+ $description =~ s/
+/<br>/g;
+ $option .=
+ $locale->text('Part Description') . qq| : $form->{description}<br>|;
+ }
+ if ($form->{make}) {
+ $callback .= "&make=$form->{make}";
+ $option .= $locale->text('Make') . qq| : $form->{make}<br>|;
+ }
+ if ($form->{model}) {
+ $callback .= "&model=$form->{model}";
+ $option .= $locale->text('Model') . qq| : $form->{model}<br>|;
+ }
+ if ($form->{drawing}) {
+ $callback .= "&drawing=$form->{drawing}";
+ $option .= $locale->text('Drawing') . qq| : $form->{drawing}<br>|;
+ }
+ if ($form->{microfiche}) {
+ $callback .= "µfiche=$form->{microfiche}";
+ $option .= $locale->text('Microfiche') . qq| : $form->{microfiche}<br>|;
+ }
+
+ # table soldtotal aktive
+ if ($form->{l_soldtotal}) {
+ $callback .= "&soldtotal=$form->{soldtotal}";
+ $option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}<br>|;
+ }
+
+ @columns =
+ $form->sort_columns(
+ qw(partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
+ );
+
+ if ($form->{l_linetotal}) {
+ $form->{l_onhand} = "Y";
+ $form->{l_linetotalsellprice} = "Y" if $form->{l_sellprice};
+ if ($form->{l_lastcost}) {
+ $form->{l_linetotallastcost} = "Y";
+ if (($form->{searchitems} eq 'assembly') && !$form->{bom}) {
+ $form->{l_linetotallastcost} = "";
+ }
+ }
+ $form->{l_linetotallistprice} = "Y" if $form->{l_listprice};
+ }
+
+ if ($form->{searchitems} eq 'service') {
+
+ # remove bin, weight and rop from list
+ map { $form->{"l_$_"} = "" } qw(bin weight rop);
+
+ $form->{l_onhand} = "";
+
+ # qty is irrelevant unless bought or sold
+ if ( $form->{bought}
+ || $form->{sold}
+ || $form->{onorder}
+ || $form->{ordered}
+ || $form->{rfq}
+ || $form->{quoted}) {
+ $form->{l_onhand} = "Y";
+ } else {
+ $form->{l_linetotalsellprice} = "";
+ $form->{l_linetotallastcost} = "";
+ }
+ }
+
+ $form->{l_lastcost} = ""
+ if ($form->{searchitems} eq 'assembly' && !$form->{bom});
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to callback
+ $callback .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ }
+ $column_header{partnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=partnumber&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Part Number')
+ . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=description&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Part Description')
+ . qq|</a></th>|;
+ $column_header{partsgroup} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=partsgroup>|
+ . $locale->text('Group')
+ . qq|</a></th>|;
+ $column_header{bin} =
+ qq|<th><a class=listheading href=$callback&sort=bin>|
+ . $locale->text('Bin')
+ . qq|</a></th>|;
+ $column_header{priceupdate} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=priceupdate>|
+ . $locale->text('Updated')
+ . qq|</a></th>|;
+ $column_header{onhand} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=onhand&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('Qty')
+ . qq|</th>|;
+ $column_header{unit} =
+ qq|<th class=listheading nowrap>| . $locale->text('Unit') . qq|</th>|;
+ $column_header{listprice} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('List Price')
+ . qq|</th>|;
+ $column_header{lastcost} =
+ qq|<th class=listheading nowrap>| . $locale->text('Last Cost') . qq|</th>|;
+ $column_header{rop} =
+ qq|<th class=listheading nowrap>| . $locale->text('ROP') . qq|</th>|;
+ $column_header{weight} =
+ qq|<th class=listheading nowrap>| . $locale->text('Weight') . qq|</th>|;
+
+ $column_header{invnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=invnumber>|
+ . $locale->text('Invoice Number')
+ . qq|</a></th>|;
+ $column_header{ordnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=ordnumber>|
+ . $locale->text('Order Number')
+ . qq|</a></th>|;
+ $column_header{quonumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=quonumber>|
+ . $locale->text('Quotation')
+ . qq|</a></th>|;
+
+ $column_header{name} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=name>|
+ . $locale->text('Name')
+ . qq|</a></th>|;
+
+ $column_header{sellprice} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Sell Price')
+ . qq|</th>|;
+ $column_header{linetotalsellprice} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+ $column_header{linetotallastcost} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+ $column_header{linetotallistprice} =
+ qq|<th class=listheading nowrap>| . $locale->text('Extended') . qq|</th>|;
+
+ $column_header{image} =
+ qq|<th class=listheading nowrap>| . $locale->text('Image') . qq|</a></th>|;
+ $column_header{drawing} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=drawing>|
+ . $locale->text('Drawing')
+ . qq|</a></th>|;
+ $column_header{microfiche} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=microfiche>|
+ . $locale->text('Microfiche')
+ . qq|</a></th>|;
+
+ $column_header{serialnumber} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=serialnumber>|
+ . $locale->text('Serial Number')
+ . qq|</a></th>|;
+ $column_header{soldtotal} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=soldtotal&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('soldtotal')
+ . qq|</a></th>|;
+
+ $form->header;
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td colspan=$colspan>$option</td></tr>
+
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+ |;
+
+ # add order to callback
+ $form->{callback} = $callback .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ if (@{ $form->{parts} }) {
+ $sameitem = $form->{parts}->[0]->{ $form->{sort} };
+ }
+
+ foreach $ref (@{ $form->{parts} }) {
+
+ if ($form->{l_subtotal} eq 'Y' && !$ref->{assemblyitem}) {
+ if ($sameitem ne $ref->{ $form->{sort} }) {
+ &parts_subtotal;
+ $sameitem = $ref->{ $form->{sort} };
+ }
+ }
+
+ $ref->{exchangerate} = 1 unless $ref->{exchangerate};
+ $ref->{sellprice} *= $ref->{exchangerate};
+ $ref->{listprice} *= $ref->{exchangerate};
+ $ref->{lastcost} *= $ref->{exchangerate};
+
+ # use this for assemblies
+ $onhand = $ref->{onhand};
+
+ $align = "left";
+ if ($ref->{assemblyitem}) {
+ $align = "right";
+ $onhand = 0 if ($form->{sold});
+ }
+
+ $ref->{description} =~ s/
+/<br>/g;
+
+ $column_data{partnumber} =
+ "<td align=$align><a href=$form->{script}?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{partnumber} </a></td>";
+ $column_data{description} = "<td>$ref->{description} </td>";
+ $column_data{partsgroup} = "<td>$ref->{partsgroup} </td>";
+
+ $column_data{onhand} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
+ . "</td>";
+ $column_data{sellprice} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
+ . "</td>";
+ $column_data{listprice} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{listprice}, 2, " ")
+ . "</td>";
+ $column_data{lastcost} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{lastcost}, 2, " ")
+ . "</td>";
+
+ $column_data{linetotalsellprice} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{sellprice},
+ 2, " ")
+ . "</td>";
+ $column_data{linetotallastcost} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{lastcost},
+ 2, " ")
+ . "</td>";
+ $column_data{linetotallistprice} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{onhand} * $ref->{listprice},
+ 2, " ")
+ . "</td>";
+
+ if (!$ref->{assemblyitem}) {
+ $totalsellprice += $onhand * $ref->{sellprice};
+ $totallastcost += $onhand * $ref->{lastcost};
+ $totallistprice += $onhand * $ref->{listprice};
+
+ $subtotalonhand += $onhand;
+ $subtotalsellprice += $onhand * $ref->{sellprice};
+ $subtotallastcost += $onhand * $ref->{lastcost};
+ $subtotallistprice += $onhand * $ref->{listprice};
+ }
+
+ $column_data{rop} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{rop}, '', " ") . "</td>";
+ $column_data{weight} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{weight}, '', " ")
+ . "</td>";
+ $column_data{unit} = "<td>$ref->{unit} </td>";
+ $column_data{bin} = "<td>$ref->{bin} </td>";
+ $column_data{priceupdate} = "<td>$ref->{priceupdate} </td>";
+
+ $column_data{invnumber} =
+ ($ref->{module} ne 'oe')
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=invoice&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber}</a></td>"
+ : "<td>$ref->{invnumber}</td>";
+ $column_data{ordnumber} =
+ ($ref->{module} eq 'oe')
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber}</a></td>"
+ : "<td>$ref->{ordnumber}</td>";
+ $column_data{quonumber} =
+ ($ref->{module} eq 'oe' && !$ref->{ordnumber})
+ ? "<td><a href=$ref->{module}.pl?action=edit&type=$ref->{type}&id=$ref->{trans_id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber}</a></td>"
+ : "<td>$ref->{quonumber}</td>";
+
+ $column_data{name} = "<td>$ref->{name}</td>";
+
+ $column_data{image} =
+ ($ref->{image})
+ ? "<td><a href=$ref->{image}><img src=$ref->{image} height=32 border=0></a></td>"
+ : "<td> </td>";
+ $column_data{drawing} =
+ ($ref->{drawing})
+ ? "<td><a href=$ref->{drawing}>$ref->{drawing}</a></td>"
+ : "<td> </td>";
+ $column_data{microfiche} =
+ ($ref->{microfiche})
+ ? "<td><a href=$ref->{microfiche}>$ref->{microfiche}</a></td>"
+ : "<td> </td>";
+
+ $column_data{serialnumber} = "<td>$ref->{serialnumber}</td>";
+
+ $column_data{soldtotal} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ")
+ . "</td>";
+
+ $i++;
+ $i %= 2;
+ print "<tr class=listrow$i>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &parts_subtotal;
+ }
+
+ if ($form->{"l_linetotal"}) {
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+ $column_data{linetotalsellprice} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalsellprice, 2, " ")
+ . "</th>";
+ $column_data{linetotallastcost} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totallastcost, 2, " ")
+ . "</th>";
+ $column_data{linetotallistprice} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totallistprice, 2, " ")
+ . "</th>";
+
+ print "<tr class=listtotal>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|</tr>
+ |;
+ }
+
+ print qq|
+ <tr><td colspan=$colspan><hr size=3 noshade></td></tr>
+</table>
+
+|;
+
+ print qq|
+
+<br>
+
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=item value=$form->{searchitems}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>|;
+
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+} #end generate_report
+
+sub parts_subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+ $subtotalonhand = 0 if ($form->{searchitems} eq 'assembly' && $form->{bom});
+
+ $column_data{onhand} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalonhand, '', " ")
+ . "</th>";
+
+ $column_data{linetotalsellprice} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalsellprice, 2, " ")
+ . "</th>";
+ $column_data{linetotallistprice} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotallistprice, 2, " ")
+ . "</th>";
+ $column_data{linetotallastcost} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotallastcost, 2, " ")
+ . "</th>";
+
+ $subtotalonhand = 0;
+ $subtotalsellprice = 0;
+ $subtotallistprice = 0;
+ $subtotallastcost = 0;
+
+ print "<tr class=listsubtotal>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ IC->get_part(\%myconfig, \%$form);
+
+ $form->{title} = $locale->text('Edit ' . ucfirst $form->{item});
+
+ &link_part;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub link_part {
+ $lxdebug->enter_sub();
+
+ IC->create_links("IC", \%myconfig, \%$form);
+
+ # currencies
+ map { $form->{selectcurrency} .= "<option>$_\n" } split /:/,
+ $form->{currencies};
+
+ # parts and assemblies have the same links
+ $item = $form->{item};
+ if ($form->{item} eq 'assembly') {
+ $item = 'part';
+ }
+
+ # build the popup menus
+ $form->{taxaccounts} = "";
+ foreach $key (keys %{ $form->{IC_links} }) {
+ foreach $ref (@{ $form->{IC_links}{$key} }) {
+
+ # if this is a tax field
+ if ($key =~ /IC_tax/) {
+ if ($key =~ /$item/) {
+ $form->{taxaccounts} .= "$ref->{accno} ";
+ $form->{"IC_tax_$ref->{accno}_description"} =
+ "$ref->{accno}--$ref->{description}";
+
+ if ($form->{id}) {
+ if ($form->{amount}{ $ref->{accno} }) {
+ $form->{"IC_tax_$ref->{accno}"} = "checked";
+ }
+ } else {
+ $form->{"IC_tax_$ref->{accno}"} = "checked";
+ }
+ }
+ } else {
+
+ $form->{"select$key"} .=
+ "<option $ref->{selected}>$ref->{accno}--$ref->{description}\n";
+ if ($form->{amount}{$key} eq $ref->{accno}) {
+ $form->{$key} = "$ref->{accno}--$ref->{description}";
+ }
+
+ }
+ }
+ }
+ chop $form->{taxaccounts};
+
+ if (($form->{item} eq "part") || ($form->{item} eq "assembly")) {
+ $form->{selectIC_income} = $form->{selectIC_sale};
+ $form->{selectIC_expense} = $form->{selectIC_cogs};
+ $form->{IC_income} = $form->{IC_sale};
+ $form->{IC_expense} = $form->{IC_cogs};
+ }
+
+ delete $form->{IC_links};
+ delete $form->{amount};
+
+ $form->get_partsgroup(\%myconfig, { all => 1 });
+ $form->{partsgroup} = "$form->{partsgroup}--$form->{partsgroup_id}";
+ if (@{ $form->{all_partsgroup} }) {
+ $form->{selectpartsgroup} = qq|<option>\n|;
+ map {
+ $form->{selectpartsgroup} .=
+ qq|<option value="$_->{partsgroup}--$_->{id}">$_->{partsgroup}\n|
+ } @{ $form->{all_partsgroup} };
+ }
+
+ if ($form->{item} eq 'assembly') {
+
+ foreach $i (1 .. $form->{assembly_rows}) {
+ if ($form->{"partsgroup_id_$i"}) {
+ $form->{"partsgroup_$i"} =
+ qq|$form->{"partsgroup_$i"}--$form->{"partsgroup_id_$i"}|;
+ }
+ }
+ $form->get_partsgroup(\%myconfig);
+
+ if (@{ $form->{all_partsgroup} }) {
+ $form->{selectassemblypartsgroup} = qq|<option>\n|;
+
+ map {
+ $form->{selectassemblypartsgroup} .=
+ qq|<option value="$_->{partsgroup}--$_->{id}">$_->{partsgroup}\n|
+ } @{ $form->{all_partsgroup} };
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ ($dec) = ($form->{sellprice} =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ map {
+ $form->{$_} =
+ $form->format_amount(\%myconfig, $form->{$_}, $decimalplaces)
+ } qw(listprice sellprice gv);
+
+ ($dec) = ($form->{lastcost} =~ /\.(\d+)/);
+ $dec = length $dec;
+ my $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $form->{lastcost} =
+ $form->format_amount(\%myconfig, $form->{lastcost}, $decimalplaces);
+
+ map { $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}) }
+ qw(weight rop stock);
+
+ foreach $item (qw(partnumber description unit notes)) {
+ $form->{$item} =~ s/\"/"/g;
+ }
+
+ if (($rows = $form->numtextrows($form->{notes}, 40)) < 2) {
+ $rows = 2;
+ }
+
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=40 wrap=soft>$form->{notes}</textarea>|;
+ if (($rows = $form->numtextrows($form->{description}, 40)) > 1) {
+ $description =
+ qq|<textarea name="description" rows=$rows cols=40 wrap=soft>$form->{description}</textarea>|;
+ } else {
+ $description =
+ qq|<input name=description size=40 value="$form->{description}">|;
+ }
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ $form->{"IC_tax_$item"} = ($form->{"IC_tax_$item"}) ? "checked" : "";
+ }
+
+ # set option
+ foreach $item (qw(IC IC_income IC_expense)) {
+ if ($form->{$item}) {
+ if ($form->{id} && $form->{orphaned}) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ } else {
+ $form->{"select$item"} = qq|<option selected>$form->{$item}|;
+ }
+ }
+ }
+ if ($form->{selectpartsgroup}) {
+ $form->{selectpartsgroup} = $form->unescape($form->{selectpartsgroup});
+ $partsgroup =
+ qq|<input type=hidden name=selectpartsgroup value="|
+ . $form->escape($form->{selectpartsgroup}, 1) . qq|">|;
+ $form->{selectpartsgroup} =~
+ s/(<option value="\Q$form->{partsgroup}\E")/$1 selected/;
+
+ $partsgroup .=
+ qq|<select name=partsgroup>$form->{selectpartsgroup}</select>|;
+ $group = $locale->text('Group');
+ }
+
+ # tax fields
+ foreach $item (split / /, $form->{taxaccounts}) {
+ $tax .= qq|
+ <input class=checkbox type=checkbox name="IC_tax_$item" value=1 $form->{"IC_tax_$item"}> <b>$form->{"IC_tax_${item}_description"}</b>
+ <br><input type=hidden name=IC_tax_${item}_description value="$form->{"IC_tax_${item}_description"}">
+|;
+ }
+
+ $form->{obsolete} = "checked" if $form->{obsolete};
+
+ $lastcost = qq|
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Last Cost')
+ . qq|</th>
+ <td><input name=lastcost size=11 value=$form->{lastcost}></td>
+ </tr>
+|;
+ if (!$eur) {
+ $linkaccounts = qq|
+ <tr>
+ <th align=right>| . $locale->text('Inventory') . qq|</th>
+ <td><select name=IC>$form->{selectIC}</select></td>
+ <input name=selectIC type=hidden value="$form->{selectIC}">
+ </tr>|;
+ }
+
+ if ($form->{item} eq "part") {
+
+ $linkaccounts .= qq|
+ <tr>
+ <th align=right>| . $locale->text('Revenue') . qq|</th>
+ <td><select name=IC_income>$form->{selectIC_income}</select></td>
+ <input name=selectIC_income type=hidden value="$form->{selectIC_income}">
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('COGS') . qq|</th>
+ <td><select name=IC_expense>$form->{selectIC_expense}</select></td>
+ <input name=selectIC_expense type=hidden value="$form->{selectIC_expense}">
+ </tr>
+|;
+
+ $weight = qq|
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Weight') . qq|</th>
+ <td>
+ <table>
+ <tr>
+ <td>
+ <input name=weight size=10 value=$form->{weight}>
+ </td>
+ <th>
+
+ $form->{weightunit}
+ <input type=hidden name=weightunit value=$form->{weightunit}>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{item} eq "assembly") {
+
+ $lastcost = "";
+
+ $linkaccounts = qq|
+ <tr>
+ <th align=right>| . $locale->text('Revenue') . qq|</th>
+ <td><select name=IC_income>$form->{selectIC_income}</select></td>
+ <input name=selectIC_income type=hidden value="$form->{selectIC_income}">
+ </tr>
+|;
+
+ $weight = qq|
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Weight') . qq|</th>
+ <td>
+ <table>
+ <tr>
+ <td>
+ $form->{weight}
+ <input type=hidden name=weight value=$form->{weight}>
+ </td>
+ <th>
+
+ $form->{weightunit}
+ <input type=hidden name=weightunit value=$form->{weightunit}>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{item} eq "service") {
+
+ $linkaccounts = qq|
+ <tr>
+ <th align=right>| . $locale->text('Revenue') . qq|</th>
+ <td><select name=IC_income>$form->{selectIC_income}</select></td>
+ <input name=selectIC_income type=hidden value="$form->{selectIC_income}">
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Expense') . qq|</th>
+ <td><select name=IC_expense>$form->{selectIC_expense}</select></td>
+ <input name=selectIC_expense type=hidden value="$form->{selectIC_expense}">
+ </tr>
+|;
+
+ }
+
+ if ($form->{item} ne 'service') {
+ $n = ($form->{onhand} > 0) ? "1" : "0";
+ $rop = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('On Hand') . qq|</th>
+ <th align=left nowrap class="plus$n"> |
+ . $form->format_amount(\%myconfig, $form->{onhand})
+ . qq|</th>
+ </tr>
+|;
+
+ if ($form->{item} eq 'assembly') {
+ $rop .= qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Stock') . qq|</th>
+ <td><input name=stock size=10 value=$form->{stock}></td>
+ </tr>
+|;
+ }
+
+ $rop .= qq|
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('ROP') . qq|</th>
+ <td><input name=rop size=10 value=$form->{rop}></td>
+ </tr>
+|;
+
+ $bin = qq|
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Bin') . qq|</th>
+ <td><input name=bin size=10 value=$form->{bin}></td>
+ </tr>
+|;
+ $vegv = qq|
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Verrechnungseinheit')
+ . qq|</th>
+ <td><input name=ve size=10 value=$form->{ve}></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Geschäftsvolumen')
+ . qq|</th>
+ <td><input name=gv size=10 value=$form->{gv}></td>
+ </tr>
+|;
+ $imagelinks = qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Image') . qq|</th>
+ <td><input name=image size=40 value="$form->{image}"></td>
+ <th align=right nowrap>| . $locale->text('Microfiche') . qq|</th>
+ <td><input name=microfiche size=20 value="$form->{microfiche}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Drawing') . qq|</th>
+ <td><input name=drawing size=40 value="$form->{drawing}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{id}) {
+ $obsolete = qq|
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Obsolete') . qq|</th>
+ <td><input name=obsolete type=checkbox class=checkbox value=1 $form->{obsolete}></td>
+ </tr>
+|;
+ }
+ $shopok = $form->{shop} == 1 ? "checked" : "";
+ $obsolete .= qq|
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Shopartikel')
+ . qq|</th>
+ <td><input class=checkbox type=checkbox name=shop value=1 $shopok></td>
+ </tr>
+|;
+
+ # type=submit $locale->text('Add Part')
+ # type=submit $locale->text('Add Service')
+ # type=submit $locale->text('Add Assembly')
+
+ # type=submit $locale->text('Edit Part')
+ # type=submit $locale->text('Edit Service')
+ # type=submit $locale->text('Edit Assembly')
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td width="13"><input name=priceupdate id=priceupdate size=11 title="$myconfig{dateformat}" value="$form->{priceupdate}"></td>
+ <td width="4" align="left"><input type=button name=priceupdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1", "",
+ "", "");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->{fokus} = "ic.partnumber";
+ $form->header;
+
+ print qq|
+ <body onLoad="fokus()">
+
+
+<form method=post name="ic" action=$form->{script}>
+
+<input name=id type=hidden value=$form->{id}>
+<input name=item type=hidden value=$form->{item}>
+<input name=title type=hidden value="$form->{title}">
+<input name=makemodel type=hidden value="$form->{makemodel}">
+<input name=alternate type=hidden value="$form->{alternate}">
+<input name=onhand type=hidden value=$form->{onhand}>
+<input name=orphaned type=hidden value=$form->{orphaned}>
+<input name=taxaccounts type=hidden value="$form->{taxaccounts}">
+<input name=rowcount type=hidden value=$form->{rowcount}>
+<input name=eur type=hidden value=$eur>
+
+<table width="100%">
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+ <th align=left>| . $locale->text('Part Number') . qq|</th>
+ <th align=left>| . $locale->text('Part Description') . qq|</th>
+ <th align=left>$group</th>
+ </tr>
+ <tr valign=top>
+ <td><input name=partnumber value="$form->{partnumber}" size=20></td>
+ <td>$description</td>
+ <td>$partsgroup</td>
+ <input type=hidden name=oldpartsgroup value="$form->{oldpartsgroup}">
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width="100%" height="100%">
+ <tr valign=top>
+ <td width=70%>
+ <table width="100%" height="100%">
+ <tr class="listheading">
+ <th class="listheading" align="center" colspan=2>|
+ . $locale->text('Link Accounts')
+ . qq|</th>
+ </tr>
+ $linkaccounts
+ <tr>
+ <th align="left">| . $locale->text('Notes') . qq|</th>
+ </tr>
+ <tr>
+ <td colspan=2>
+ $notes
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td width="30%">
+ <table width="100%">
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Updated')
+ . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('List Price') . qq|</th>
+ <td><input name=listprice size=11 value=$form->{listprice}></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Sell Price') . qq|</th>
+ <td><input name=sellprice size=11 value=$form->{sellprice}></td>
+ </tr>
+ $lastcost
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Unit') . qq|</th>
+ <td><input name=unit size=5 maxlength="10" value="$form->{unit}"></td>
+ </tr>
+ $weight
+ $rop
+ $bin
+ $vegv
+ $obsolete
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ $imagelinks
+
+$jsscript
+|;
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ if ($form->{item} eq "assembly") {
+
+ print qq|
+ <tr>
+ <td>
+ <table width="100%">
+ <tr>
+ <th colspan=2 align=right>|
+ . $locale->text('Total')
+ . qq| </th>
+ <th align=right>|
+ . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2)
+ . qq|</th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <input type=hidden name=assembly_rows value=$form->{assembly_rows}>
+|;
+ }
+
+ print qq|
+ <input type=hidden name=path value=$form->{path}>
+ <input type=hidden name=login value=$form->{login}>
+ <input type=hidden name=password value=$form->{password}>
+ <input type=hidden name=callback value="$form->{callback}">
+ <input type=hidden name=previousform value="$form->{previousform}">
+ <input type=hidden name=taxaccount2 value="$form->{taxaccount2}">
+ <input type=hidden name=vc value=$form->{vc}>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ |;
+
+ unless ($form->{item} eq "service") {
+ print qq|
+ <input type=hidden name=makemodel_rows value=$form->{makemodel_rows}>
+ |;
+ }
+
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Save') . qq|">|;
+
+ if ($form->{id}) {
+
+ if (!$form->{previousform}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Save as new') . qq|">|;
+ }
+
+ if ($form->{orphaned}) {
+ if (!$form->{previousform}) {
+ if ($form->{item} eq 'assembly') {
+ if (!$form->{onhand}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+ } else {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+ }
+ }
+ }
+
+ if (!$form->{previousform}) {
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+ }
+
+ print qq|
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub makemodel_row {
+ $lxdebug->enter_sub();
+ my ($numrows) = @_;
+
+ $form->{"make_$i"} =~ s/\"/"/g;
+ $form->{"model_$i"} =~ s/\"/"/g;
+
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th class="listheading">| . $locale->text('Make') . qq|</th>
+ <th class="listheading">| . $locale->text('Model') . qq|</th>
+ </tr>
+|;
+
+ for $i (1 .. $numrows) {
+ print qq|
+ <tr>
+ <td width=50%><input name="make_$i" size=30 value="$form->{"make_$i"}"></td>
+ <td width=50%><input name="model_$i" size=30 value="$form->{"model_$i"}"></td>
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub assembly_row {
+ $lxdebug->enter_sub();
+ my ($numrows) = @_;
+
+ @column_index =
+ qw(runningnumber qty unit bom partnumber description partsgroup total);
+
+ if ($form->{previousform}) {
+ $nochange = 1;
+ @column_index = qw(qty unit bom partnumber description partsgroup total);
+ } else {
+
+ # change callback
+ $form->{old_callback} = $form->{callback};
+ $callback = $form->{callback};
+ $form->{callback} = "$form->{script}?action=display_form";
+
+ # delete action
+ map { delete $form->{$_} } qw(action header);
+
+ $previousform = "";
+
+ # save form variables in a previousform variable
+ foreach $key (sort keys %$form) {
+
+ # escape ampersands
+ $form->{$key} =~ s/&/%26/g;
+ $previousform .= qq|$key=$form->{$key}&|;
+ }
+ chop $previousform;
+ $previousform = $form->escape($form->escape($previousform, 1));
+ $form->{callback} = $callback;
+
+ $form->{assemblytotal} = 0;
+ $form->{weight} = 0;
+
+ }
+ $column_header{runningnumber} =
+ qq|<th nowrap width=5%>| . $locale->text('No.') . qq|</th>|;
+ $column_header{qty} =
+ qq|<th align=left nowrap width=10%>| . $locale->text('Qty') . qq|</th>|;
+ $column_header{unit} =
+ qq|<th align=left nowrap width=5%>| . $locale->text('Unit') . qq|</th>|;
+ $column_header{partnumber} =
+ qq|<th align=left nowrap width=20%>|
+ . $locale->text('Part Number')
+ . qq|</th>|;
+ $column_header{description} =
+ qq|<th nowrap width=50%>| . $locale->text('Part Description') . qq|</th>|;
+ $column_header{total} =
+ qq|<th align=right nowrap>| . $locale->text('Extended') . qq|</th>|;
+ $column_header{bom} = qq|<th>| . $locale->text('BOM') . qq|</th>|;
+ $column_header{partsgroup} = qq|<th>| . $locale->text('Group') . qq|</th>|;
+
+ print qq|
+ <tr class=listheading>
+ <th class=listheading>| . $locale->text('Individual Items') . qq|</th>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ for $i (1 .. $numrows) {
+ $form->{"partnumber_$i"} =~ s/\"/"/g;
+
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"}, 2);
+ $form->{assemblytotal} += $linetotal;
+
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+ $linetotal = $form->format_amount(\%myconfig, $linetotal, 2);
+
+ if (($i >= 1) && ($i == $numrows)) {
+
+ if ($nochange) {
+ map { $column_data{$_} = qq|<td></td>| }
+ qw(qty unit partnumber description bom partsgroup);
+ } else {
+
+ map { $column_data{$_} = qq|<td></td>| } qw(runningnumber unit bom);
+
+ $column_data{qty} =
+ qq|<td><input name="qty_$i" size=5 value="$form->{"qty_$i"}"></td>|;
+ $column_data{partnumber} =
+ qq|<td><input name="partnumber_$i" size=15 value="$form->{"partnumber_$i"}"></td>|;
+ $column_data{description} =
+ qq|<td><input name="description_$i" size=40 value="$form->{"description_$i"}"></td>|;
+ $column_data{partsgroup} =
+ qq|<td><input name="partsgroup_$i" size=10 value="$form->{"partsgroup_$i"}"></td>|;
+
+ }
+
+ } else {
+
+ if ($form->{previousform}) {
+ $column_data{partnumber} =
+ qq|<td><input type=hidden name="partnumber_$i" value="$form->{"partnumber_$i"}">$form->{"partnumber_$i"}</td>|;
+ $column_data{qty} =
+ qq|<td align=right><input type=hidden name="qty_$i" value="$form->{"qty_$i"}">$form->{"qty_$i"}</td>|;
+
+ $column_data{bom} =
+ qq|<td align=center><input type=hidden name="bom_$i" value=$form->{"bom_$i"}>|;
+ $column_data{bom} .= ($form->{"bom_$i"}) ? "x" : " ";
+ $column_data{bom} .= qq|</td>|;
+
+ $column_data{partsgroup} =
+ qq|<td><input type=hidden name="partsgroup_$i" value="$form->{"partsgroup_$i"}">$form->{"partsgroup_$i"}</td>|;
+
+ } else {
+ $href =
+ qq|$form->{script}?action=edit&id=$form->{"id_$i"}&path=$form->{path}&login=$form->{login}&password=$form->{password}&rowcount=$i&previousform=$previousform|;
+ $column_data{partnumber} =
+ qq|<td><input type=hidden name="partnumber_$i" value="$form->{"partnumber_$i"}"><a href=$href>$form->{"partnumber_$i"}</a></td>|;
+ $column_data{runningnumber} =
+ qq|<td><input name="runningnumber_$i" size=3 value="$i"></td>|;
+ $column_data{qty} =
+ qq|<td><input name="qty_$i" size=5 value="$form->{"qty_$i"}"></td>|;
+
+ $form->{"bom_$i"} = ($form->{"bom_$i"}) ? "checked" : "";
+ $column_data{bom} =
+ qq|<td align=center><input name="bom_$i" type=checkbox class=checkbox value=1 $form->{"bom_$i"}></td>|;
+
+ $column_data{partsgroup} =
+ qq|<td><input type=hidden name="partsgroup_$i" value="$form->{"partsgroup_$i"}">$form->{"partsgroup_$i"}</td>|;
+ }
+
+ $column_data{unit} =
+ qq|<td><input type=hidden name="unit_$i" value="$form->{"unit_$i"}">$form->{"unit_$i"}</td>|;
+ $column_data{description} =
+ qq|<td><input type=hidden name="description_$i" value="$form->{"description_$i"}">$form->{"description_$i"}</td>|;
+ }
+
+ $column_data{total} = qq|<td align=right>$linetotal</td>|;
+
+ print qq|
+ <tr>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+ <input type=hidden name="id_$i" value=$form->{"id_$i"}>
+ <input type=hidden name="sellprice_$i" value=$form->{"sellprice_$i"}>
+ <input type=hidden name="weight_$i" value=$form->{"weight_$i"}>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ if ($form->{item} eq "assembly") {
+ $i = $form->{assembly_rows};
+
+ # if last row is empty check the form otherwise retrieve item
+ if ( ($form->{"partnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")
+ && ($form->{"partsgroup_$i"} eq "")) {
+
+ &check_form;
+
+ } else {
+
+ IC->assembly_item(\%myconfig, \%$form);
+
+ $rows = scalar @{ $form->{item_list} };
+
+ if ($rows) {
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ if ($rows > 1) {
+ $form->{makemodel_rows}--;
+ &select_item;
+ exit;
+ } else {
+ map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
+ qw(partnumber description unit partsgroup);
+ map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
+ keys %{ $form->{item_list}[0] };
+ $form->{"runningnumber_$i"} = $form->{assembly_rows};
+ $form->{assembly_rows}++;
+
+ &check_form;
+
+ }
+
+ } else {
+
+ $form->{rowcount} = $i;
+ $form->{assembly_rows}++;
+
+ &new_item;
+
+ }
+ }
+ }
+
+ if ($form->{item} eq "part") {
+ &check_form;
+ }
+
+ if ($form->{item} eq 'service') {
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(sellprice listprice);
+
+ &form_header;
+ &form_footer;
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ # check if there is a part number
+ # $form->isblank("partnumber", $locale->text(ucfirst $form->{item}." Part Number missing!"));
+
+ if ($form->{obsolete}) {
+ $form->error(
+ $locale->text(
+ "Inventory quantity must be zero before you can set this $form->{item} obsolete!"
+ ))
+ if ($form->{onhand});
+ }
+
+ # expand dynamic strings
+ # $locale->text('Inventory quantity must be zero before you can set this part obsolete!')
+ # $locale->text('Inventory quantity must be zero before you can set this assembly obsolete!')
+ # $locale->text('Part Number missing!')
+ # $locale->text('Service Number missing!')
+ # $locale->text('Assembly Number missing!')
+
+ # save part
+ $rc = IC->save(\%myconfig, \%$form);
+ if ($rc == 3) {
+ $form->error($locale->text('Partnumber not unique!'));
+ }
+ $parts_id = $form->{id};
+
+ # load previous variables
+ if ($form->{previousform}) {
+
+ # save the new form variables before splitting previousform
+ map { $newform{$_} = $form->{$_} } keys %$form;
+
+ $previousform = $form->unescape($form->{previousform});
+
+ # don't trample on previous variables
+ map { delete $form->{$_} } keys %newform;
+
+ # now take it apart and restore original values
+ foreach $item (split /&/, $previousform) {
+ ($key, $value) = split /=/, $item, 2;
+ $value =~ s/%26/&/g;
+ $form->{$key} = $value;
+ }
+ $form->{taxaccounts} = $newform{taxaccount2};
+
+ if ($form->{item} eq 'assembly') {
+
+ # undo number formatting
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(weight listprice sellprice rop);
+
+ $form->{assembly_rows}--;
+ $i = $newform{rowcount};
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"};
+ $form->{weight} -= $form->{"weight_$i"} * $form->{"qty_$i"};
+
+ # change/add values for assembly item
+ map { $form->{"${_}_$i"} = $newform{$_} }
+ qw(partnumber description bin unit weight listprice sellprice inventory_accno income_accno expense_accno);
+
+ $form->{sellprice} += $form->{"sellprice_$i"} * $form->{"qty_$i"};
+ $form->{weight} += $form->{"weight_$i"} * $form->{"qty_$i"};
+
+ } else {
+
+ # set values for last invoice/order item
+ $i = $form->{rowcount};
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ map { $form->{"${_}_$i"} = $newform{$_} }
+ qw(partnumber description bin unit listprice inventory_accno income_accno expense_accno sellprice);
+ $form->{"sellprice_$i"} = $newform{lastcost} if ($form->{vendor_id});
+
+ if ($form->{exchangerate} != 0) {
+ $form->{"sellprice_$i"} /= $form->{exchangerate};
+ }
+
+ map { $form->{"taxaccounts_$i"} .= "$_ " } split / /,
+ $newform{taxaccount};
+ chop $form->{"taxaccounts_$i"};
+ foreach $item (qw(description rate taxnumber)) {
+ $index = $form->{"taxaccounts_$i"} . "_$item";
+ $form->{$index} = $newform{$index};
+ }
+
+ # credit remaining calculation
+ $amount =
+ $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) *
+ $form->{"qty_$i"};
+ map { $form->{"${_}_base"} += $amount }
+ (split / /, $form->{"taxaccounts_$i"});
+ map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
+ split / /, $form->{"taxaccounts_$i"}
+ if !$form->{taxincluded};
+
+ $form->{creditremaining} -= $amount;
+
+ }
+
+ $form->{"id_$i"} = $parts_id;
+ delete $form->{action};
+
+ # restore original callback
+ $callback = $form->unescape($form->{callback});
+ $form->{callback} = $form->unescape($form->{old_callback});
+ delete $form->{old_callback};
+
+ $form->{makemodel_rows}--;
+
+ # put callback together
+ foreach $key (keys %$form) {
+
+ # do single escape for Apache 2.0
+ $value = $form->escape($form->{$key}, 1);
+ $callback .= qq|&$key=$value|;
+ }
+ $form->{callback} = $callback;
+ }
+
+ # redirect
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{id} = 0;
+ &save;
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $rc = IC->delete(\%myconfig, \%$form);
+
+ # redirect
+ $form->redirect($locale->text('Item deleted!')) if ($rc > 0);
+ $form->error($locale->text('Cannot delete item!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub stock_assembly {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Stock Assembly');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width="100%">
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Part Number')
+ . qq|</th>
+ <td><input name=partnumber size=20></td>
+ <td> </td>
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">|
+ . $locale->text('Part Description')
+ . qq|</th>
+ <td><input name=description size=40></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td><hr size=3 noshade></td></tr>
+</table>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=nextsub value=list_assemblies>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_assemblies {
+ $lxdebug->enter_sub();
+
+ IC->retrieve_assemblies(\%myconfig, \%$form);
+
+ $column_header{partnumber} =
+ qq|<th class=listheading>| . $locale->text('Part Number') . qq|</th>|;
+ $column_header{description} =
+ qq|<th class=listheading>| . $locale->text('Part Description') . qq|</th>|;
+ $column_header{bin} =
+ qq|<th class=listheading>| . $locale->text('Bin') . qq|</th>|;
+ $column_header{onhand} =
+ qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
+ $column_header{rop} =
+ qq|<th class=listheading>| . $locale->text('ROP') . qq|</th>|;
+ $column_header{stock} =
+ qq|<th class=listheading>| . $locale->text('Add') . qq|</th>|;
+
+ @column_index = (qw(partnumber description bin onhand rop stock));
+
+ $form->{title} = $locale->text('Stock Assembly');
+
+ $form->{callback} =
+ "$form->{script}?action=stock_assembly&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $form->header;
+
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr size=5></tr>
+ <tr class=listheading>|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $i = 1;
+ foreach $ref (@{ $form->{assembly_items} }) {
+
+ map { $ref->{$_} =~ s/\"/"/g } qw(partnumber description);
+
+ $column_data{partnumber} = qq|<td width=20%>$ref->{partnumber}</td>|;
+ $column_data{description} =
+ qq|<td width=50%>$ref->{description} </td>|;
+ $column_data{bin} = qq|<td>$ref->{bin} </td>|;
+ $column_data{onhand} =
+ qq|<td align=right>|
+ . $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
+ . qq|</td>|;
+ $column_data{rop} =
+ qq|<td align=right>|
+ . $form->format_amount(\%myconfig, $ref->{rop}, '', " ")
+ . qq|</td>|;
+ $column_data{stock} = qq|<td width=10%><input name="qty_$i" size=10></td>|;
+
+ $j++;
+ $j %= 2;
+ print
+ qq|<tr class=listrow$j><input name="id_$i" type=hidden value=$ref->{id}>\n|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $i++;
+
+ }
+
+ $i--;
+ print qq|
+ <tr>
+ <td colspan=6><hr size=3 noshade>
+ </tr>
+</table>
+<input name=rowcount type=hidden value="$i">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=nextsub value=restock_assemblies>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub restock_assemblies {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Assemblies restocked!'))
+ if (IC->restock_assemblies(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot stock assemblies!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#############################################################################
+# Veraendert 2005-01-05 - Marco Welter <mawe@linux-studio.de> - Neue Optik #
+#############################################################################
+# SQL-Ledger, Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#######################################################################
+#
+# common routines used in is, ir, oe
+#
+#######################################################################
+
+# any custom scripts for this one
+if (-f "$form->{path}/custom_io.pl") {
+ eval { require "$form->{path}/custom_io.pl"; };
+}
+if (-f "$form->{path}/$form->{login}_io.pl") {
+ eval { require "$form->{path}/$form->{login}_io.pl"; };
+}
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+use Data::Dumper;
+########################################
+# Eintrag fuer Version 2.2.0 geaendert #
+# neue Optik im Rechnungsformular #
+########################################
+sub display_row {
+ $lxdebug->enter_sub();
+ my $numrows = shift;
+
+ if ($lizenzen && $form->{vc} eq "customer") {
+ if ($form->{type} =~ /sales_order/) {
+ @column_index = (runningnumber, partnumber, description, ship, qty);
+ } elsif ($form->{type} =~ /sales_quotation/) {
+ @column_index = (runningnumber, partnumber, description, qty);
+ } else {
+ @column_index = (runningnumber, partnumber, description, qty);
+ }
+ } else {
+ if ( ($form->{type} =~ /purchase_order/)
+ || ($form->{type} =~ /sales_order/)) {
+ @column_index = (runningnumber, partnumber, description, ship, qty);
+ } else {
+ @column_index = (runningnumber, partnumber, description, qty);
+ }
+ }
+############## ENDE Neueintrag ##################
+
+ push @column_index, qw(unit sellprice);
+
+ if ($form->{vc} eq 'customer') {
+ push @column_index, qw(discount);
+ }
+
+ push @column_index, "linetotal";
+
+ my $colspan = $#column_index + 1;
+
+ $form->{invsubtotal} = 0;
+ map { $form->{"${_}_base"} = 0 } (split / /, $form->{taxaccounts});
+
+########################################
+ # Eintrag fuer Version 2.2.0 geaendert #
+ # neue Optik im Rechnungsformular #
+########################################
+ $column_data{runningnumber} =
+ qq|<th align=left nowrap width=5 class=listheading>|
+ . $locale->text('No.')
+ . qq|</th>|;
+ $column_data{partnumber} =
+ qq|<th align=left nowrap width=12 class=listheading>|
+ . $locale->text('Number')
+ . qq|</th>|;
+ $column_data{description} =
+ qq|<th align=left nowrap width=30 class=listheading>|
+ . $locale->text('Part Description')
+ . qq|</th>|;
+ $column_data{ship} =
+ qq|<th align=left nowrap width=5 class=listheading>|
+ . $locale->text('Ship')
+ . qq|</th>|;
+ $column_data{qty} =
+ qq|<th align=left nowrap width=5 class=listheading>|
+ . $locale->text('Qty')
+ . qq|</th>|;
+ $column_data{unit} =
+ qq|<th align=left nowrap width=5 class=listheading>|
+ . $locale->text('Unit')
+ . qq|</th>|;
+ $column_data{license} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('License')
+ . qq|</th>|;
+ $column_data{serialnr} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('Serial No.')
+ . qq|</th>|;
+ $column_data{projectnr} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('Project')
+ . qq|</th>|;
+ $column_data{sellprice} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('Price')
+ . qq|</th>|;
+ $column_data{discount} =
+ qq|<th align=left class=listheading>|
+ . $locale->text('Discount')
+ . qq|</th>|;
+ $column_data{linetotal} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('Extended')
+ . qq|</th>|;
+ $column_data{bin} =
+ qq|<th align=left nowrap width=10 class=listheading>|
+ . $locale->text('Bin')
+ . qq|</th>|;
+############## ENDE Neueintrag ##################
+
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $runningnumber = $locale->text('No.');
+ $deliverydate = $locale->text('Delivery Date');
+ $serialnumber = $locale->text('Serial No.');
+ $projectnumber = $locale->text('Project');
+ $partsgroup = $locale->text('Group');
+
+ $delvar = 'deliverydate';
+
+ if ($form->{type} =~ /_order$/ || $form->{type} =~ /_quotation$/) {
+ $deliverydate = $locale->text('Required by');
+ $delvar = 'reqdate';
+ }
+
+ for $i (1 .. $numrows) {
+
+ # undo formatting
+ map {
+ $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(qty ship discount sellprice);
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $discount =
+ $form->round_amount(
+ $form->{"sellprice_$i"} * $form->{"discount_$i"} / 100,
+ $decimalplaces);
+ $linetotal =
+ $form->round_amount($form->{"sellprice_$i"} - $discount, $decimalplaces);
+ $linetotal = $form->round_amount($linetotal * $form->{"qty_$i"}, 2);
+
+ # convert " to "
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit);
+
+########################################
+ # Eintrag fuer Version 2.2.0 geaendert #
+ # neue Optik im Rechnungsformular #
+########################################
+ $column_data{runningnumber} =
+ qq|<td><input name="runningnumber_$i" size=5 value=$i></td>|; # HuT
+############## ENDE Neueintrag ##################
+
+ $column_data{partnumber} =
+ qq|<td><input name="partnumber_$i" size=12 value="$form->{"partnumber_$i"}"></td>|;
+
+ if (($rows = $form->numtextrows($form->{"description_$i"}, 30, 6)) > 1) {
+ $column_data{description} =
+ qq|<td><textarea name="description_$i" rows=$rows cols=30 wrap=soft>$form->{"description_$i"}</textarea></td>|;
+ } else {
+ $column_data{description} =
+ qq|<td><input name="description_$i" size=30 value="$form->{"description_$i"}"></td>|;
+ }
+
+ $column_data{qty} =
+ qq|<td align=right><input name="qty_$i" size=5 value=|
+ . $form->format_amount(\%myconfig, $form->{"qty_$i"})
+ . qq|></td>|;
+ $column_data{ship} =
+ qq|<td align=right><input name="ship_$i" size=5 value=|
+ . $form->format_amount(\%myconfig, $form->{"ship_$i"})
+ . qq|></td>|;
+ $column_data{unit} =
+ qq|<td><input name="unit_$i" size=5 value="$form->{"unit_$i"}"></td>|;
+ $column_data{sellprice} =
+ qq|<td align=right><input name="sellprice_$i" size=9 value=|
+ . $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces)
+ . qq|></td>|;
+ $column_data{discount} =
+ qq|<td align=right><input name="discount_$i" size=3 value=|
+ . $form->format_amount(\%myconfig, $form->{"discount_$i"})
+ . qq|></td>|;
+ $column_data{linetotal} =
+ qq|<td align=right>|
+ . $form->format_amount(\%myconfig, $linetotal, 2)
+ . qq|</td>|;
+ $column_data{bin} = qq|<td>$form->{"bin_$i"}</td>|;
+
+########################################
+ # Eintrag fuer Version 2.2.0 geaendert #
+ # neue Optik im Rechnungsformular #
+########################################
+ # if ($lizenzen && $form->{type} eq "invoice" && $form->{vc} eq "customer") {
+ # $column_data{license} = qq|<td><select name="licensenumber_$i">$form->{"lizenzen_$i"}></select></td>|;
+ # }
+ #
+ # if ($form->{type} !~ /_quotation/) {
+ # $column_data{serialnr} = qq|<td><input name="serialnumber_$i" size=10 value="$form->{"serialnumber_$i"}"></td>|;
+ # }
+ #
+ # $column_data{projectnr} = qq|<td><input name="projectnumber_$i" size=10 value="$form->{"projectnumber_$i"}"></td>|;
+############## ENDE Neueintrag ##################
+
+ print qq|
+ <tr valign=top>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+<input type=hidden name="orderitems_id_$i" value=$form->{"orderitems_id_$i"}>
+<input type=hidden name="bo_$i" value=$form->{"bo_$i"}>
+
+<input type=hidden name="id_$i" value=$form->{"id_$i"}>
+<input type=hidden name="inventory_accno_$i" value=$form->{"inventory_accno_$i"}>
+<input type=hidden name="bin_$i" value="$form->{"bin_$i"}">
+<input type=hidden name="partsgroup_$i" value="$form->{"partsgroup_$i"}">
+<input type=hidden name="partnotes_$i" value="$form->{"partnotes_$i"}">
+<input type=hidden name="income_accno_$i" value=$form->{"income_accno_$i"}>
+<input type=hidden name="expense_accno_$i" value=$form->{"expense_accno_$i"}>
+<input type=hidden name="listprice_$i" value="$form->{"listprice_$i"}">
+<input type=hidden name="assembly_$i" value="$form->{"assembly_$i"}">
+<input type=hidden name="taxaccounts_$i" value="$form->{"taxaccounts_$i"}">
+
+|;
+
+########################################
+ # Eintrag fuer Version 2.2.0 geaendert #
+ # neue Optik im Rechnungsformular #
+########################################
+ # print second row
+ print qq|
+ <tr>
+ <td colspan=$colspan>
+|;
+ if ($lizenzen && $form->{type} eq "invoice" && $form->{vc} eq "customer") {
+ my $selected = $form->{"licensenumber_$i"};
+ my $lizenzen_quoted;
+ $form->{"lizenzen_$i"} =~ s/ selected//g;
+ $form->{"lizenzen_$i"} =~
+ s/value="${selected}"\>/value="${selected}" selected\>/;
+ $lizenzen_quoted = $form->{"lizenzen_$i"};
+ $lizenzen_quoted =~ s/\"/"/g;
+ print qq|
+ <b>Lizenz\#</b> <select name="licensenumber_$i" size=1>
+ $form->{"lizenzen_$i"}
+ </select>
+ <input type=hidden name="lizenzen_$i" value="${lizenzen_quoted}">
+|;
+ }
+ if ($form->{type} !~ /_quotation/) {
+ print qq|
+ <b>$serialnumber</b> <input name="serialnumber_$i" size=15 value="$form->{"serialnumber_$i"}">|;
+ }
+
+ print qq|
+ <b>$projectnumber</b> <input name="projectnumber_$i" size=10 value="$form->{"projectnumber_$i"}">
+ <input type=hidden name="oldprojectnumber_$i" value="$form->{"oldprojectnumber_$i"}">
+ <input type=hidden name="project_id_$i" value="$form->{"project_id_$i"}">
+ </td>
+ </tr>
+
+|;
+
+############## ENDE Neueintrag ##################
+
+ map { $form->{"${_}_base"} += $linetotal }
+ (split / /, $form->{"taxaccounts_$i"});
+
+ $form->{invsubtotal} += $linetotal;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub select_item {
+ $lxdebug->enter_sub();
+
+ @column_index = qw(ndx partnumber description onhand sellprice);
+
+ $column_data{ndx} = qq|<th> </th>|;
+ $column_data{partnumber} =
+ qq|<th class=listheading>| . $locale->text('Number') . qq|</th>|;
+ $column_data{description} =
+ qq|<th class=listheading>| . $locale->text('Part Description') . qq|</th>|;
+ $column_data{sellprice} =
+ qq|<th class=listheading>| . $locale->text('Price') . qq|</th>|;
+ $column_data{onhand} =
+ qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
+
+ # list items with radio button on a form
+ $form->header;
+
+ $title = $locale->text('Select from one of the items below');
+ $colspan = $#column_index + 1;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$title</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|</tr>|;
+
+ my $i = 0;
+ foreach $ref (@{ $form->{item_list} }) {
+ $checked = ($i++) ? "" : "checked";
+
+ if ($lizenzen) {
+ if ($ref->{inventory_accno} > 0) {
+ $ref->{"lizenzen"} = qq|<option></option>|;
+ foreach $item (@{ $form->{LIZENZEN}{ $ref->{"id"} } }) {
+ $ref->{"lizenzen"} .=
+ qq|<option value=\"$item->{"id"}\">$item->{"licensenumber"}</option>|;
+ }
+ $ref->{"lizenzen"} .= qq|<option value=-1>Neue Lizenz</option>|;
+ $ref->{"lizenzen"} =~ s/\"/"/g;
+ }
+ }
+
+ map { $ref->{$_} =~ s/\"/"/g } qw(partnumber description unit);
+
+ $ref->{sellprice} =
+ $form->round_amount($ref->{sellprice} * (1 - $form->{tradediscount}), 2);
+
+ $column_data{ndx} =
+ qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
+ $column_data{partnumber} =
+ qq|<td><input name="new_partnumber_$i" type=hidden value="$ref->{partnumber}">$ref->{partnumber}</td>|;
+ $column_data{description} =
+ qq|<td><input name="new_description_$i" type=hidden value="$ref->{description}">$ref->{description}</td>|;
+ $column_data{sellprice} =
+ qq|<td align=right><input name="new_sellprice_$i" type=hidden value=$ref->{sellprice}>|
+ . $form->format_amount(\%myconfig, $ref->{sellprice}, 2, " ")
+ . qq|</td>|;
+ $column_data{onhand} =
+ qq|<td align=right><input name="new_onhand_$i" type=hidden value=$ref->{onhand}>|
+ . $form->format_amount(\%myconfig, $ref->{onhand}, '', " ")
+ . qq|</td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+<tr class=listrow$j>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+</tr>
+
+<input name="new_bin_$i" type=hidden value="$ref->{bin}">
+<input name="new_listprice_$i" type=hidden value=$ref->{listprice}>
+<input name="new_inventory_accno_$i" type=hidden value=$ref->{inventory_accno}>
+<input name="new_income_accno_$i" type=hidden value=$ref->{income_accno}>
+<input name="new_expense_accno_$i" type=hidden value=$ref->{expense_accno}>
+<input name="new_unit_$i" type=hidden value="$ref->{unit}">
+<input name="new_weight_$i" type=hidden value="$ref->{weight}">
+<input name="new_assembly_$i" type=hidden value="$ref->{assembly}">
+<input name="new_taxaccounts_$i" type=hidden value="$ref->{taxaccounts}">
+<input name="new_partsgroup_$i" type=hidden value="$ref->{partsgroup}">
+
+<input name="new_id_$i" type=hidden value=$ref->{id}>
+
+|;
+ if ($lizenzen) {
+ print qq|
+<input name="new_lizenzen_$i" type=hidden value="$ref->{lizenzen}">
+|;
+ }
+
+ }
+
+ print qq|
+<tr><td colspan=8><hr size=3 noshade></td></tr>
+</table>
+
+<input name=lastndx type=hidden value=$i>
+
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action item_list header);
+
+ # save all other form variables
+ foreach $key (keys %${form}) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<input type=hidden name=nextsub value=item_selected>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub item_selected {
+ $lxdebug->enter_sub();
+
+ # replace the last row with the checked row
+ $i = $form->{rowcount};
+ $i = $form->{assembly_rows} if ($form->{item} eq 'assembly');
+
+ # index for new item
+ $j = $form->{ndx};
+
+ # if there was a price entered, override it
+ $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
+
+ map { $form->{"${_}_$i"} = $form->{"new_${_}_$j"} }
+ qw(id partnumber description sellprice listprice inventory_accno income_accno expense_accno bin unit weight assembly taxaccounts partsgroup);
+
+ if ($lizenzen) {
+ map { $form->{"${_}_$i"} = $form->{"new_${_}_$j"} } qw(lizenzen);
+ }
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ if ($sellprice) {
+ $form->{"sellprice_$i"} = $sellprice;
+ } else {
+
+ # if there is an exchange rate adjust sellprice
+ if (($form->{exchangerate} * 1) != 0) {
+ $form->{"sellprice_$i"} /= $form->{exchangerate};
+ $form->{"sellprice_$i"} =
+ $form->round_amount($form->{"sellprice_$i"}, $decimalplaces);
+ }
+ }
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(sellprice listprice weight);
+
+ $form->{sellprice} += ($form->{"sellprice_$i"} * $form->{"qty_$i"});
+ $form->{weight} += ($form->{"weight_$i"} * $form->{"qty_$i"});
+
+ $amount =
+ $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) *
+ $form->{"qty_$i"};
+ map { $form->{"${_}_base"} += $amount }
+ (split / /, $form->{"taxaccounts_$i"});
+ map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) } split / /,
+ $form->{"taxaccounts_$i"}
+ if !$form->{taxincluded};
+
+ $form->{creditremaining} -= $amount;
+
+ $form->{"runningnumber_$i"} = $i;
+
+ # delete all the new_ variables
+ for $i (1 .. $form->{lastndx}) {
+ map { delete $form->{"new_${_}_$i"} }
+ qw(partnumber description sellprice bin listprice inventory_accno income_accno expense_accno unit assembly taxaccounts id);
+ }
+
+ map { delete $form->{$_} } qw(ndx lastndx nextsub);
+
+ # format amounts
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"}, $decimalplaces)
+ } qw(sellprice listprice) if $form->{item} ne 'assembly';
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub new_item {
+ $lxdebug->enter_sub();
+
+ # change callback
+ $form->{old_callback} = $form->escape($form->{callback}, 1);
+ $form->{callback} = $form->escape("$form->{script}?action=display_form", 1);
+
+ # delete action
+ delete $form->{action};
+
+ # save all other form variables in a previousform variable
+ foreach $key (keys %$form) {
+
+ # escape ampersands
+ $form->{$key} =~ s/&/%26/g;
+ $previousform .= qq|$key=$form->{$key}&|;
+ }
+ chop $previousform;
+ $previousform = $form->escape($previousform, 1);
+
+ $i = $form->{rowcount};
+ map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description);
+
+ $form->header;
+
+ print qq|
+<body>
+
+<h4 class=error>| . $locale->text('Item not on file!') . qq|
+
+<p>
+| . $locale->text('What type of item is this?') . qq|</h4>
+
+<form method=post action=ic.pl>
+
+<p>
+
+ <input class=radio type=radio name=item value=part checked> |
+ . $locale->text('Part') . qq|<br>
+ <input class=radio type=radio name=item value=service> |
+ . $locale->text('Service')
+
+ . qq|
+<input type=hidden name=previousform value="$previousform">
+<input type=hidden name=partnumber value="$form->{"partnumber_$i"}">
+<input type=hidden name=description value="$form->{"description_$i"}">
+<input type=hidden name=rowcount value=$form->{rowcount}>
+<input type=hidden name=taxaccount2 value=$form->{taxaccounts}>
+<input type=hidden name=vc value=$form->{vc}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=nextsub value=add>
+
+<p>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ # if we have a display_form
+ if ($form->{display_form}) {
+ &{"$form->{display_form}"};
+ exit;
+ }
+
+ &form_header;
+
+ $numrows = ++$form->{rowcount};
+ $subroutine = "display_row";
+
+ if ($form->{item} eq 'part') {
+ $numrows = ++$form->{makemodel_rows};
+ $subroutine = "makemodel_row";
+ }
+ if ($form->{item} eq 'assembly') {
+ $numrows = ++$form->{makemodel_rows};
+ $subroutine = "makemodel_row";
+
+ # create makemodel rows
+ &{$subroutine}($numrows);
+
+ $numrows = ++$form->{assembly_rows};
+ $subroutine = "assembly_row";
+ }
+ if ($form->{item} eq 'service') {
+ $numrows = 0;
+ }
+
+ # create rows
+ &{$subroutine}($numrows) if $numrows;
+
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub check_form {
+ $lxdebug->enter_sub();
+
+ my @a = ();
+ my $count = 0;
+ my @flds = (
+ qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup)
+ );
+
+ # remove any makes or model rows
+ if ($form->{item} eq 'part') {
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(listprice sellprice lastcost weight rop);
+
+ @flds = (make, model);
+ for my $i (1 .. ($form->{makemodel_rows})) {
+ if (($form->{"make_$i"} ne "") || ($form->{"model_$i"} ne "")) {
+ push @a, {};
+ my $j = $#a;
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{makemodel_rows});
+ $form->{makemodel_rows} = $count;
+
+ } elsif ($form->{item} eq 'assembly') {
+
+ $form->{sellprice} = 0;
+ $form->{weight} = 0;
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(listprice rop stock);
+
+ @flds =
+ qw(id qty unit bom partnumber description sellprice weight runningnumber partsgroup);
+
+ for my $i (1 .. ($form->{assembly_rows} - 1)) {
+ if ($form->{"qty_$i"}) {
+ push @a, {};
+ my $j = $#a;
+
+ $form->{"qty_$i"} = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+
+ $form->{sellprice} += ($form->{"qty_$i"} * $form->{"sellprice_$i"});
+ $form->{weight} += ($form->{"qty_$i"} * $form->{"weight_$i"});
+ $count++;
+ }
+ }
+
+ $form->{sellprice} = $form->round_amount($form->{sellprice}, 2);
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{assembly_rows});
+ $form->{assembly_rows} = $count;
+
+ $count = 0;
+ @flds = qw(make model);
+ @a = ();
+
+ for my $i (1 .. ($form->{makemodel_rows})) {
+ if (($form->{"make_$i"} ne "") || ($form->{"model_$i"} ne "")) {
+ push @a, {};
+ my $j = $#a;
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{makemodel_rows});
+ $form->{makemodel_rows} = $count;
+
+ } else {
+
+ # this section applies to invoices and orders
+ # remove any empty numbers
+ if ($form->{rowcount}) {
+ for my $i (1 .. $form->{rowcount} - 1) {
+ if ($form->{"partnumber_$i"}) {
+ push @a, {};
+ my $j = $#a;
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ if ($lizenzen) {
+ if ($form->{"licensenumber_$i"} == -1) {
+ &new_license($i);
+ exit;
+ }
+ }
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{rowcount});
+ $form->{rowcount} = $count;
+
+ $form->{creditremaining} -= &invoicetotal;
+
+ }
+ }
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub invoicetotal {
+ $lxdebug->enter_sub();
+
+ $form->{oldinvtotal} = 0;
+
+ # add all parts and deduct paid
+ map { $form->{"${_}_base"} = 0 } split / /, $form->{taxaccounts};
+
+ my ($amount, $sellprice, $discount, $qty);
+
+ for my $i (1 .. $form->{rowcount}) {
+ $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
+ $discount = $form->parse_amount(\%myconfig, $form->{"discount_$i"});
+ $qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"});
+
+ $amount = $sellprice * (1 - $discount / 100) * $qty;
+ map { $form->{"${_}_base"} += $amount }
+ (split / /, $form->{"taxaccounts_$i"});
+ $form->{oldinvtotal} += $amount;
+ }
+
+ map { $form->{oldinvtotal} += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
+ split / /, $form->{taxaccounts}
+ if !$form->{taxincluded};
+
+ $form->{oldtotalpaid} = 0;
+ for $i (1 .. $form->{paidaccounts}) {
+ $form->{oldtotalpaid} += $form->{"paid_$i"};
+ }
+
+ $lxdebug->leave_sub();
+
+ # return total
+ return ($form->{oldinvtotal} - $form->{oldtotalpaid});
+}
+
+sub validate_items {
+ $lxdebug->enter_sub();
+
+ # check if items are valid
+ if ($form->{rowcount} == 1) {
+ &update;
+ exit;
+ }
+
+ for $i (1 .. $form->{rowcount} - 1) {
+ $form->isblank("partnumber_$i",
+ $locale->text('Number missing in Row') . " $i");
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub order {
+ $lxdebug->enter_sub();
+
+ $form->{ordnumber} = $form->{invnumber};
+
+ map { delete $form->{$_} } qw(id printed emailed queued);
+
+ if ($form->{script} eq 'ir.pl' || $form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Add Purchase Order');
+ $form->{vc} = 'vendor';
+ $form->{type} = 'purchase_order';
+ $buysell = 'sell';
+ }
+ if ($form->{script} eq 'is.pl' || $form->{type} eq 'sales_quotation') {
+ $form->{title} = $locale->text('Add Sales Order');
+ $form->{vc} = 'customer';
+ $form->{type} = 'sales_order';
+ $buysell = 'buy';
+ }
+ $form->{script} = 'oe.pl';
+
+ $form->{shipto} = 1;
+
+ $form->{rowcount}--;
+
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
+
+ require "$form->{path}/$form->{script}";
+
+ map { $form->{"select$_"} = "" } ($form->{vc}, currency);
+
+ $currency = $form->{currency};
+
+ &order_links;
+
+ $form->{currency} = $currency;
+ $form->{exchangerate} = "";
+ $form->{forex} = "";
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{transdate}, $buysell
+ )));
+
+ &prepare_order;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub quotation {
+ $lxdebug->enter_sub();
+
+ map { delete $form->{$_} } qw(id printed emailed queued);
+
+ if ($form->{script} eq 'ir.pl' || $form->{type} eq 'purchase_order') {
+ $form->{title} = $locale->text('Add Request for Quotation');
+ $form->{vc} = 'vendor';
+ $form->{type} = 'request_quotation';
+ $buysell = 'sell';
+ }
+ if ($form->{script} eq 'is.pl' || $form->{type} eq 'sales_order') {
+ $form->{title} = $locale->text('Add Quotation');
+ $form->{vc} = 'customer';
+ $form->{type} = 'sales_quotation';
+ $buysell = 'buy';
+ }
+
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
+
+ $form->{script} = 'oe.pl';
+
+ $form->{shipto} = 1;
+
+ $form->{rowcount}--;
+
+ require "$form->{path}/$form->{script}";
+
+ map { $form->{"select$_"} = "" } ($form->{vc}, currency);
+
+ $currency = $form->{currency};
+
+ &order_links;
+
+ $form->{currency} = $currency;
+ $form->{exchangerate} = "";
+ $form->{forex} = "";
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{transdate}, $buysell
+ )));
+
+ &prepare_order;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub e_mail {
+ $lxdebug->enter_sub();
+
+ if ($myconfig{role} eq 'admin') {
+ $bcc = qq|
+ <th align=right nowrap=true>| . $locale->text('Bcc') . qq|</th>
+ <td><input name=bcc size=30 value="$form->{bcc}"></td>
+|;
+ }
+
+ if ($form->{formname} =~ /(pick|packing|bin)_list/) {
+ $form->{email} = $form->{shiptoemail} if $form->{shiptoemail};
+ }
+
+ $name = $form->{ $form->{vc} };
+ $name =~ s/--.*//g;
+ $title = $locale->text('E-mail') . " $name";
+
+ $form->{oldmedia} = $form->{media};
+ $form->{media} = "email";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$title</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('To') . qq|</th>
+ <td><input name=email size=30 value="$form->{email}"></td>
+ <th align=right nowrap>| . $locale->text('Cc') . qq|</th>
+ <td><input name=cc size=30 value="$form->{cc}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Subject') . qq|</th>
+ <td><input name=subject size=30 value="$form->{subject}"></td>
+ $bcc
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Message') . qq|</th>
+ </tr>
+ <tr>
+ <td><textarea name=message rows=15 cols=60 wrap=soft>$form->{message}</textarea></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+|;
+
+ &print_options;
+
+ map { delete $form->{$_} }
+ qw(action email cc bcc subject message formname sendmode format header override);
+
+ # save all other variables
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=send_email>
+
+<br>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub send_email {
+ $lxdebug->enter_sub();
+
+ $old_form = new Form;
+
+ map { $old_form->{$_} = $form->{$_} } keys %$form;
+ $old_form->{media} = $form->{oldmedia};
+
+ &print_form($old_form);
+
+ $lxdebug->leave_sub();
+}
+
+sub print_options {
+ $lxdebug->enter_sub();
+
+ $form->{sendmode} = "attachment";
+ $form->{copies} = 3 unless $form->{copies};
+
+ $form->{PD}{ $form->{formname} } = "selected";
+ $form->{DF}{ $form->{format} } = "";
+ $form->{OP}{ $form->{media} } = "selected";
+ $form->{SM}{ $form->{sendmode} } = "selected";
+
+ if ($form->{type} eq 'purchase_order') {
+ $type = qq|<select name=formname>
+ <option value=purchase_order $form->{PD}{purchase_order}>|
+ . $locale->text('Purchase Order') . qq|
+ <option value=bin_list $form->{PD}{bin_list}>|
+ . $locale->text('Bin List');
+ }
+
+ if ($form->{type} eq 'sales_order') {
+ $type = qq|<select name=formname>
+ <option value=sales_order $form->{PD}{sales_order}>|
+ . $locale->text('Confirmation') . qq|
+ <option value=pick_list $form->{PD}{pick_list}>|
+ . $locale->text('Pick List') . qq|
+ <option value=packing_list $form->{PD}{packing_list}>|
+ . $locale->text('Packing List');
+ }
+
+ if ($form->{type} =~ /_quotation$/) {
+ $type = qq|<select name=formname>
+ <option value="$`_quotation" $form->{PD}{"$`_quotation"}>|
+ . $locale->text('Quotation') . qq|
+|;
+ }
+
+ if ($form->{type} eq 'invoice') {
+ $type = qq|<select name=formname>
+ <option value=invoice $form->{PD}{invoice}>| . $locale->text('Invoice');
+ }
+
+ if ($form->{type} eq 'ship_order') {
+ $type = qq|<select name=formname>
+ <option value=pick_list $form->{PD}{pick_list}>|
+ . $locale->text('Pick List') . qq|
+ <option value=packing_list $form->{PD}{packing_list}>|
+ . $locale->text('Packing List');
+ }
+
+ if ($form->{type} eq 'receive_order') {
+ $type = qq|<select name=formname>
+ <option value=bin_list $form->{PD}{bin_list}>|
+ . $locale->text('Bin List');
+ }
+
+ if ($form->{media} eq 'email') {
+ $media = qq|<select name=sendmode>
+ <option value=attachment $form->{SM}{attachment}>|
+ . $locale->text('Attachment') . qq|
+ <option value=inline $form->{SM}{inline}>| . $locale->text('In-line');
+ } else {
+ $media = qq|<select name=media>
+ <option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
+ if ($myconfig{printer} && $latex) {
+ $media .= qq|
+ <option value=printer $form->{OP}{printer}>|
+ . $locale->text('Printer');
+ }
+ if ($latex) {
+ $media .= qq|
+ <option value=queue $form->{OP}{queue}>| . $locale->text('Queue');
+ }
+ }
+
+ $format = qq|<select name=format>
+ <option value=html $form->{DF}{html}>html|;
+
+ if ($latex) {
+ $format = qq|<select name=format>
+ <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF') . qq|
+ <option value=html $form->{DF}{html}>html
+ <option value=postscript $form->{DF}{postscript}>|
+ . $locale->text('Postscript');
+ }
+
+ $language = qq|<select name=language>
+ <option value=""></option>|;
+ %lang = (de => "deutsch", en => "englisch", fr => "französisch");
+ foreach $item (keys %lang) {
+ if ($form->{language} eq $item) {
+ $language .= qq|<option value="$item" selected>$lang{$item}</option>|;
+ } else {
+ $language .= qq|<option value="$item">$lang{$item}</option>|;
+ }
+ }
+
+ print qq|
+<table width=100% cellspacing=0 cellpadding=0>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td>$type</select></td>
+ <td>$language</select</td>
+ <td>$format</select></td>
+ <td>$media</select></td>
+|;
+
+ if ($myconfig{printer} && $latex && $form->{media} ne 'email') {
+ print qq|
+ <td>| . $locale->text('Copies') . qq|
+ <input name=copies size=2 value=$form->{copies}></td>
+|;
+ }
+
+ $form->{groupitems} = "checked" if $form->{groupitems};
+
+ print qq|
+ <td>| . $locale->text('Group Items') . qq|</td>
+ <td><input name=groupitems type=checkbox class=checkbox $form->{groupitems}></td>
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+|;
+
+ if ($form->{printed} =~ /$form->{formname}/) {
+ print qq|
+ <th>\|| . $locale->text('Printed') . qq|\|</th>
+|;
+ }
+
+ if ($form->{emailed} =~ /$form->{formname}/) {
+ print qq|
+ <th>\|| . $locale->text('E-mailed') . qq|\|</th>
+|;
+ }
+
+ if ($form->{queued} =~ /$form->{formname}/) {
+ print qq|
+ <th>\|| . $locale->text('Queued') . qq|\|</th>
+|;
+ }
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub print {
+ $lxdebug->enter_sub();
+
+ # if this goes to the printer pass through
+ if ($form->{media} eq 'printer' || $form->{media} eq 'queue') {
+ $form->error($locale->text('Select postscript or PDF!'))
+ if ($form->{format} !~ /(postscript|pdf)/);
+
+ $old_form = new Form;
+ map { $old_form->{$_} = $form->{$_} } keys %$form;
+ }
+
+ &print_form($old_form);
+
+ $lxdebug->leave_sub();
+}
+
+sub print_form {
+ $lxdebug->enter_sub();
+ my ($old_form) = @_;
+
+ $inv = "inv";
+ $due = "due";
+
+ $numberfld = "invnumber";
+
+ $display_form =
+ ($form->{display_form}) ? $form->{display_form} : "display_form";
+
+ # $form->{"notes"} will be overridden by the customer's/vendor's "notes" field. So save it here.
+ $form->{ $form->{"formname"} . "notes" } = $form->{"notes"};
+
+ if ($form->{formname} eq "invoice") {
+ $form->{label} = $locale->text('Invoice');
+ }
+ if ($form->{formname} eq "packing_list") {
+
+ # this is from an invoice
+ $form->{label} = $locale->text('Packing List');
+ }
+ if ($form->{formname} eq 'sales_order') {
+ $inv = "ord";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Sales Order');
+ $numberfld = "sonumber";
+ $order = 1;
+ }
+ if ($form->{formname} eq 'packing_list' && $form->{type} ne 'invoice') {
+
+ # we use the same packing list as from an invoice
+ $inv = "ord";
+ $due = "req";
+ $form->{invdate} = $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Packing List');
+ $order = 1;
+ }
+ if ($form->{formname} eq 'pick_list') {
+ $inv = "ord";
+ $due = "req";
+ $form->{"${inv}date"} =
+ ($form->{transdate}) ? $form->{transdate} : $form->{invdate};
+ $form->{label} = $locale->text('Pick List');
+ $order = 1 unless $form->{type} eq 'invoice';
+ }
+ if ($form->{formname} eq 'purchase_order') {
+ $inv = "ord";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Purchase Order');
+ $numberfld = "ponumber";
+ $order = 1;
+ }
+ if ($form->{formname} eq 'bin_list') {
+ $inv = "ord";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Bin List');
+ $order = 1;
+ }
+ if ($form->{formname} eq 'sales_quotation') {
+ $inv = "quo";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Quotation');
+ $numberfld = "sqnumber";
+ $order = 1;
+ }
+ if ($form->{formname} eq 'request_quotation') {
+ $inv = "quo";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{label} = $locale->text('Quotation');
+ $numberfld = "rfqnumber";
+ $order = 1;
+ }
+
+ $form->isblank("email", $locale->text('E-mail address missing!'))
+ if ($form->{media} eq 'email');
+ $form->isblank("${inv}date",
+ $locale->text($form->{label} . ' Date missing!'));
+
+ # $locale->text('Invoice Number missing!')
+ # $locale->text('Invoice Date missing!')
+ # $locale->text('Packing List Number missing!')
+ # $locale->text('Packing List Date missing!')
+ # $locale->text('Order Number missing!')
+ # $locale->text('Order Date missing!')
+ # $locale->text('Quotation Number missing!')
+ # $locale->text('Quotation Date missing!')
+
+ # assign number
+ if (!$form->{"${inv}number"}) {
+ $form->{"${inv}number"} = $form->update_defaults(\%myconfig, $numberfld);
+ if ($form->{media} ne 'email') {
+ $form->{rowcount}--;
+ &{"$display_form"};
+ exit;
+ }
+ }
+
+ &validate_items;
+
+ # Save the email address given in the form because it should override the setting saved for the customer/vendor.
+ my ($saved_email, $saved_cc, $saved_bcc) =
+ ($form->{"email"}, $form->{"cc"}, $form->{"bcc"});
+
+ $language = $form->{language};
+ &{"$form->{vc}_details"};
+ $form->{language} = $language;
+
+ $form->{"email"} = $saved_email if ($saved_email);
+ $form->{"cc"} = $saved_cc if ($saved_cc);
+ $form->{"bcc"} = $saved_bcc if ($saved_bcc);
+
+ @a = ();
+ foreach $i (1 .. $form->{rowcount}) {
+ push @a,
+ ("partnumber_$i", "description_$i",
+ "partsgroup_$i", "serialnumber_$i",
+ "bin_$i", "unit_$i");
+ }
+ map { push @a, "${_}_description" } split / /, $form->{taxaccounts};
+
+ $ARAP = ($form->{vc} eq 'customer') ? "AR" : "AP";
+ push @a, $ARAP;
+
+ # format payment dates
+ for $i (1 .. $form->{paidaccounts} - 1) {
+ $form->{"datepaid_$i"} = $locale->date(\%myconfig, $form->{"datepaid_$i"});
+ push @a, "${ARAP}_paid_$i", "source_$i", "memo_$i";
+ }
+
+ $form->format_string(@a);
+
+ ($form->{employee}) = split /--/, $form->{employee};
+ ($form->{warehouse}, $form->{warehouse_id}) = split /--/, $form->{warehouse};
+
+ # create the form variables
+ if ($order) {
+ OE->order_details(\%myconfig, \%$form);
+ } else {
+ IS->invoice_details(\%myconfig, \%$form, $locale);
+ }
+
+ map { $form->{$_} = $locale->date(\%myconfig, $form->{$_}, 1) }
+ ("${inv}date", "${due}date", "shippingdate");
+
+ @a = qw(name street zipcode city country);
+
+ $shipto = 1;
+
+ # if there is no shipto fill it in from billto
+ foreach $item (@a) {
+ if ($form->{"shipto$item"}) {
+ $shipto = 0;
+ last;
+ }
+ }
+
+ if ($shipto) {
+ if ( $form->{formname} eq 'purchase_order'
+ || $form->{formname} eq 'request_quotation') {
+ $form->{shiptoname} = $myconfig{company};
+ $form->{shiptostreet} = $myconfig{address};
+ } else {
+ map { $form->{"shipto$_"} = $form->{$_} } @a;
+ }
+ }
+
+ $form->{notes} =~ s/^\s+//g;
+
+ # some of the stuff could have umlauts so we translate them
+ push @a,
+ qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptoemail shippingpoint shipvia company address signature employee contact);
+
+ push @a, ("${inv}date", "${due}date", email, cc, bcc);
+
+ $form->format_string(@a);
+
+ $form->{templates} = "$myconfig{templates}";
+ if ($form->{language} ne "") {
+ $form->{language} = "_" . $form->{language};
+ }
+
+ $form->{IN} = "$form->{formname}$form->{language}.html";
+ if ($form->{format} eq 'postscript') {
+ $form->{postscript} = 1;
+ $form->{IN} =~ s/html$/tex/;
+ }
+ if ($form->{format} eq 'pdf') {
+ $form->{pdf} = 1;
+ $form->{IN} =~ s/html$/tex/;
+ }
+
+ if ($form->{media} eq 'printer') {
+ $form->{OUT} = "| $myconfig{printer}";
+ $form->{printed} .= " $form->{formname}";
+ $form->{printed} =~ s/^ //;
+ }
+ $printed = $form->{printed};
+
+ if ($form->{media} eq 'email') {
+ $form->{subject} = qq|$form->{label} $form->{"${inv}number"}|
+ unless $form->{subject};
+
+ $form->{OUT} = "$sendmail";
+
+ $form->{emailed} .= " $form->{formname}";
+ $form->{emailed} =~ s/^ //;
+ }
+ $emailed = $form->{emailed};
+
+ if ($form->{media} eq 'queue') {
+ %queued = split / /, $form->{queued};
+
+ if ($filename = $queued{ $form->{formname} }) {
+ $form->{queued} =~ s/$form->{formname} $filename//;
+ unlink "$spool/$filename";
+ $filename =~ s/\..*$//g;
+ } else {
+ $filename = time;
+ $filename .= $$;
+ }
+
+ $filename .= ($form->{postscript}) ? '.ps' : '.pdf';
+ $form->{OUT} = ">$spool/$filename";
+
+ # add type
+ $form->{queued} .= " $form->{formname} $filename";
+
+ $form->{queued} =~ s/^ //;
+ }
+ $queued = $form->{queued};
+
+ $form->parse_template(\%myconfig, $userspath);
+
+ $form->{callback} = "";
+
+ if ($form->{media} eq 'email') {
+ $form->{message} = $locale->text('sent') unless $form->{message};
+ }
+ $message = $form->{message};
+
+ # if we got back here restore the previous form
+ if ($form->{media} =~ /(printer|email|queue)/) {
+
+ $form->update_status(\%myconfig)
+ if ($form->{media} eq 'queue' && $form->{id});
+
+ if ($old_form) {
+
+ $old_form->{"${inv}number"} = $form->{"${inv}number"};
+
+ # restore and display form
+ map { $form->{$_} = $old_form->{$_} } keys %$old_form;
+
+ $form->{queued} = $queued;
+ $form->{printed} = $printed;
+ $form->{emailed} = $emailed;
+ $form->{message} = $message;
+
+ $form->{rowcount}--;
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ for $i (1 .. $form->{paidaccounts}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(paid exchangerate);
+ }
+
+ &{"$display_form"};
+ exit;
+ }
+
+ $msg =
+ ($form->{media} eq 'printer')
+ ? $locale->text('sent to printer')
+ : $locale->text('emailed to') . " $form->{email}";
+ $form->redirect(qq|$form->{label} $form->{"${inv}number"} $msg|);
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub customer_details {
+ $lxdebug->enter_sub();
+
+ IS->customer_details(\%myconfig, \%$form);
+ $lxdebug->leave_sub();
+}
+
+sub vendor_details {
+ $lxdebug->enter_sub();
+
+ IR->vendor_details(\%myconfig, \%$form);
+
+ $lxdebug->leave_sub();
+}
+
+sub post_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{postasnew} = 1;
+ map { delete $form->{$_} } qw(printed emailed queued);
+
+ &post;
+
+ $lxdebug->leave_sub();
+}
+
+sub ship_to {
+ $lxdebug->enter_sub();
+
+ $title = $form->{title};
+ $form->{title} = $locale->text('Ship to');
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ # get details for name
+ &{"$form->{vc}_details"};
+
+ $number =
+ ($form->{vc} eq 'customer')
+ ? $locale->text('Customer Number')
+ : $locale->text('Vendor Number');
+
+ $nextsub = ($form->{display_form}) ? $form->{display_form} : "display_form";
+
+ $form->{rowcount}--;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <td>
+ <table>
+ <tr class=listheading>
+ <th class=listheading colspan=2 width=50%>|
+ . $locale->text('Billing Address')
+ . qq|</th>
+ <th class=listheading width=50%>|
+ . $locale->text('Shipping Address')
+ . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right nowrap>$number</th>
+ <td>$form->{"$form->{vc}number"}</td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
+ <td>$form->{name}</td>
+ <td><input name=shiptoname size=35 value="$form->{shiptoname}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Street') . qq|</th>
+ <td>$form->{street}</td>
+ <td><input name=shiptostreet size=35 value="$form->{shiptostreet}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Zipcode') . qq|</th>
+ <td>$form->{zipcode}</td>
+ <td><input name=shiptozipcode size=35 value="$form->{shiptozipcode}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('City') . qq|</th>
+ <td>$form->{city}</td>
+ <td><input name=shiptocity size=35 value="$form->{shiptocity}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Country') . qq|</th>
+ <td>$form->{country}</td>
+ <td><input name=shiptocountry size=35 value="$form->{shiptocountry}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
+ <td>$form->{contact}</td>
+ <td><input name=shiptocontact size=35 value="$form->{shiptocontact}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Phone') . qq|</th>
+ <td>$form->{"$form->{vc}phone"}</td>
+ <td><input name=shiptophone size=20 value="$form->{shiptophone}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Fax') . qq|</th>
+ <td>$form->{"$form->{vc}fax"}</td>
+ <td><input name=shiptofax size=20 value="$form->{shiptofax}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td>$form->{email}</td>
+ <td><input name=shiptoemail size=35 value="$form->{shiptoemail}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=$nextsub>
+|;
+
+ # delete shipto
+ map { delete $form->{$_} }
+ qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail header);
+ $form->{title} = $title;
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+
+<hr size=3 noshade>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub new_license {
+ $lxdebug->enter_sub();
+
+ my $row = shift;
+
+ # change callback
+ $form->{old_callback} = $form->escape($form->{callback}, 1);
+ $form->{callback} = $form->escape("$form->{script}?action=display_form", 1);
+ $form->{old_callback} = $form->escape($form->{old_callback}, 1);
+
+ # delete action
+ delete $form->{action};
+ $customer = $form->{customer};
+ map { $form->{"old_$_"} = $form->{"${_}_$row"} } qw(partnumber description);
+
+ # save all other form variables in a previousform variable
+ $form->{row} = $row;
+ foreach $key (keys %$form) {
+
+ # escape ampersands
+ $form->{$key} =~ s/&/%26/g;
+ $previousform .= qq|$key=$form->{$key}&|;
+ }
+ chop $previousform;
+ $previousform = $form->escape($previousform, 1);
+
+ $form->{script} = "licenses.pl";
+
+ map { $form->{$_} = $form->{"old_$_"} } qw(partnumber description);
+ map { $form->{$_} = $form->escape($form->{$_}, 1) }
+ qw(partnumber description);
+ $form->{callback} =
+ qq|$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&customer=$customer&partnumber=$form->{partnumber}&description=$form->{description}&previousform="$previousform"&initial=1|;
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger, Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory received module
+#
+#======================================================================
+
+use SL::IR;
+use SL::PE;
+
+require "$form->{path}/io.pl";
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add Vendor Invoice');
+
+ &invoice_links;
+ &prepare_invoice;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Edit Vendor Invoice');
+
+ &invoice_links;
+ &prepare_invoice;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub invoice_links {
+ $lxdebug->enter_sub();
+
+ # create links
+ $form->{webdav} = $webdav;
+
+ # set jscalendar
+ $form->{jscalendar} = $jscalendar;
+
+ $form->create_links("AP", \%myconfig, "vendor");
+
+ if ($form->{all_vendor}) {
+ unless ($form->{vendor_id}) {
+ $form->{vendor_id} = $form->{all_vendor}->[0]->{id};
+ }
+ }
+
+ $cp_id = $form->{cp_id};
+ IR->get_vendor(\%myconfig, \%$form);
+ IR->retrieve_invoice(\%myconfig, \%$form);
+ $form->{cp_id} = $cp_id;
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $curr[0];
+
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ $form->{oldvendor} = "$form->{vendor}--$form->{vendor_id}";
+
+ # vendors
+ if ($form->{all_vendor}) {
+ $form->{vendor} = "$form->{vendor}--$form->{vendor_id}";
+ map { $form->{selectvendor} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_vendor} });
+ }
+
+ # departments
+ if ($form->{all_departments}) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ # forex
+ $form->{forex} = $form->{exchangerate};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ foreach $key (keys %{ $form->{AP_links} }) {
+
+ foreach $ref (@{ $form->{AP_links}{$key} }) {
+ $form->{"select$key"} .= "<option>$ref->{accno}--$ref->{description}\n";
+ }
+
+ if ($key eq "AP_paid") {
+ for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
+ $form->{"AP_paid_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+
+ # reverse paid
+ $form->{"paid_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{amount};
+ $form->{"datepaid_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{transdate};
+ $form->{"forex_$i"} = $form->{"exchangerate_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{exchangerate};
+ $form->{"source_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{source};
+ $form->{"memo_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{memo};
+
+ $form->{paidaccounts} = $i;
+ }
+ } else {
+ $form->{$key} =
+ "$form->{acc_trans}{$key}->[0]->{accno}--$form->{acc_trans}{$key}->[0]->{description}";
+ }
+
+ }
+
+ $form->{paidaccounts} = 1 unless (exists $form->{paidaccounts});
+
+ $form->{AP} = $form->{AP_1} unless $form->{id};
+
+ $form->{locked} =
+ ($form->datetonum($form->{invdate}, \%myconfig) <=
+ $form->datetonum($form->{closedto}, \%myconfig));
+
+ $lxdebug->leave_sub();
+}
+
+sub prepare_invoice {
+ $lxdebug->enter_sub();
+
+ if ($form->{id}) {
+
+ map { $form->{$_} =~ s/\"/"/g } qw(invnumber ordnumber quonumber);
+
+ foreach $ref (@{ $form->{invoice_details} }) {
+ $i++;
+ map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, ($form->{"qty_$i"} * -1));
+
+ $form->{rowcount} = $i;
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ # set option selected
+ foreach $item (qw(AP vendor currency department contact)) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} =
+ $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+
+ #build contacts
+ if ($form->{all_contacts}) {
+
+ $form->{selectcontact} = "";
+ foreach $item (@{ $form->{all_contacts} }) {
+ if ($form->{cp_id} == $item->{cp_id}) {
+ $form->{selectcontact} .=
+ "<option selected>$item->{cp_name}--$item->{cp_id}";
+ } else {
+ $form->{selectcontact} .= "<option>$item->{cp_name}--$item->{cp_id}";
+ }
+ }
+ }
+
+ $exchangerate = "";
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{forex}) {
+ $exchangerate .= qq|
+ <th align=right nowrap>|
+ . $locale->text('Exchangerate')
+ . qq|</th>
+ <td>$form->{exchangerate}<input type=hidden name=exchangerate value=$form->{exchangerate}></td>
+|;
+ } else {
+ $exchangerate .= qq|
+ <th align=right nowrap>|
+ . $locale->text('Exchangerate')
+ . qq|</th>
+ <td><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+|;
+ }
+ }
+ $exchangerate .= qq|
+<input type=hidden name=forex value=$form->{forex}>
+|;
+
+ $vendor =
+ ($form->{selectvendor})
+ ? qq|<select name=vendor>$form->{selectvendor}</select>\n<input type=hidden name="selectvendor" value="$form->{selectvendor}">|
+ : qq|<input name=vendor value="$form->{vendor}" size=35>|;
+
+ $contact =
+ ($form->{selectcontact})
+ ? qq|<select name=contact>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
+ : qq|<input name=contact value="$form->{contact}" size=35>|;
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $form->{jscalendar};
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=invdate id=invdate size=11 title="$myconfig{dateformat}" value=$form->{invdate}></td>
+ <td><input type=button name=invdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>
+ <td width="4"><input type=button name=duedate id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
+ "duedate", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=invdate size=11 title="$myconfig{dateformat}" value=$form->{invdate}></td>|;
+ $button2 =
+ qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=title value="$form->{title}">
+<input type=hidden name=vc value="vendor">
+<input type=hidden name=type value=$form->{type}>
+
+<input type=hidden name=creditlimit value=$form->{creditlimit}>
+<input type=hidden name=creditremaining value=$form->{creditremaining}>
+
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=locked value=$form->{locked}>
+
+<input type=hidden name=shipped value=$form->{shipped}>
+
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Vendor') . qq|</th>
+ <td colspan=3>$vendor</td>
+
+ <th align=richt nowrap>|
+ . $locale->text('Contact Person')
+ . qq|</th>
+ <td colspan=3>$contact</td>
+
+ <input type=hidden name=vendor_id value=$form->{vendor_id}>
+ <input type=hidden name=oldvendor value="$form->{oldvendor}">
+
+ </tr>
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table>
+ <tr>
+ <th nowrap>| . $locale->text('Credit Limit') . qq|</th>
+ <td>$form->{creditlimit}</td>
+ <td width=20%></td>
+ <th nowrap>| . $locale->text('Remaining') . qq|</th>
+ <td class="plus$n">$form->{creditremaining}</td>
+ </tr>
+ </table>
+ </td>
+ <tr>
+ <th align=right>| . $locale->text('Record in') . qq|</th>
+ <td colspan=3><select name=AP>$form->{selectAP}</select></td>
+ <input type=hidden name=selectAP value="$form->{selectAP}">
+ </tr>
+ $department
+ <tr>
+ <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ $exchangerate
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Due Date') . qq|</th>
+ $button2
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
+<input type=hidden name=quonumber value="$form->{quonumber}">
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+$jsscript
+
+<input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+<input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+<input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
+<input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
+<input type=hidden name=webdav value=$webdav>
+
+<input type=hidden name=taxpart value="$form->{taxpart}">
+<input type=hidden name=taxservice value="$form->{taxservice}">
+
+<input type=hidden name=taxaccounts value="$form->{taxaccounts}">
+|;
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ print qq|
+<input type=hidden name="${item}_rate" value=$form->{"${item}_rate"}>
+<input type=hidden name="${item}_description" value="$form->{"${item}_description"}">
+|;
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ $form->{invtotal} = $form->{invsubtotal};
+
+ if (($rows = $form->numtextrows($form->{notes}, 25, 8)) < 2) {
+ $rows = 2;
+ }
+ if (($introws = $form->numtextrows($form->{intnotes}, 35, 8)) < 2) {
+ $introws = 2;
+ }
+ $rows = ($rows > $introws) ? $rows : $introws;
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=25 wrap=soft>$form->{notes}</textarea>|;
+ $intnotes =
+ qq|<textarea name=intnotes rows=$rows cols=35 wrap=soft>$form->{intnotes}</textarea>|;
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+
+ $taxincluded = "";
+ if ($form->{taxaccounts}) {
+ $taxincluded = qq|
+ <input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}> <b>|
+ . $locale->text('Tax Included') . qq|</b>
+|;
+ }
+
+ if (!$form->{taxincluded}) {
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{invtotal} += $form->{"${item}_total"} =
+ $form->round_amount(
+ $form->{"${item}_base"} * $form->{"${item}_rate"},
+ 2);
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>$form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+|;
+ }
+ }
+
+ $form->{invsubtotal} =
+ $form->format_amount(\%myconfig, $form->{invsubtotal}, 2, 0);
+
+ $subtotal = qq|
+ <tr>
+ <th align=right>| . $locale->text('Subtotal') . qq|</th>
+ <td align=right>$form->{invsubtotal}</td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{taxincluded}) {
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{"${item}_total"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} * $form->{"${item}_rate"} /
+ (1 + $form->{"${item}_rate"})
+ ),
+ 2);
+ $form->{"${item}_base"} =
+ $form->round_amount($form->{"${item}_base"}, 2);
+ $form->{"${item}_netto"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} - $form->{"${item}_total"}),
+ 2);
+ $form->{"${item}_netto"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_netto"}, 2);
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>Enthaltene $form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+ <tr>
+ <th align=right>Nettobetrag</th>
+ <td align=right>$form->{"${item}_netto"}</td>
+ </tr>
+|;
+ }
+ }
+
+ }
+
+ $form->{oldinvtotal} = $form->{invtotal};
+ $form->{invtotal} =
+ $form->format_amount(\%myconfig, $form->{invtotal}, 2, 0);
+
+ print qq|
+ <tr>
+ <td colspan=$colspan>
+ <table cellspacing="0">
+ <tr valign=bottom>
+ <td>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('Notes') . qq|</th>
+ <th align=left>| . $locale->text('Internal Notes') . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td>$notes</td>
+ <td>$intnotes</td>
+ </tr>
+ </table>
+ </td>
+ <td colspan=2 align=right width=100%>
+ $taxincluded
+ <br>
+ <table width=100%>
+ $subtotal
+ $tax
+ <tr>0
+ <th align=right>| . $locale->text('Total') . qq|</th>
+ <td align=right>$form->{invtotal}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ if ($webdav) {
+ $webdav_list = qq|
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th class=listtop align=left>Dokumente im Webdav-Repository</th>
+ </tr>
+ <table width=100%>
+ <td align=left width=30%><b>Dateiname</b></td>
+ <td align=left width=70%><b>Webdavlink</b></td>
+|;
+ foreach $file (keys %{ $form->{WEBDAV} }) {
+ $webdav_list .= qq|
+ <tr>
+ <td align=left>$file</td>
+ <td align=left><a href="$form->{WEBDAV}{$file}">$form->{WEBDAV}{$file}</a></td>
+ </tr>
+|;
+ }
+ $webdav_list .= qq|
+ </table>
+ </tr>
+|;
+
+ print $webdav_list;
+ }
+ print qq|
+<input type=hidden name=jscalendar value=$form->{jscalendar}>
+|;
+ print qq|
+ <tr>
+ <td colspan=$colspan>
+ <table width=100%>
+ <tr>
+ <th colspan=6 class=listheading>| . $locale->text('Payments') . qq|</th>
+ </tr>
+|;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ @column_index = qw(datepaid source memo paid AP_paid);
+ } else {
+ @column_index = qw(datepaid source memo paid exchangerate AP_paid);
+ }
+
+ $column_data{datepaid} = "<th>" . $locale->text('Date') . "</th>";
+ $column_data{paid} = "<th>" . $locale->text('Amount') . "</th>";
+ $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>";
+ $column_data{AP_paid} = "<th>" . $locale->text('Account') . "</th>";
+ $column_data{source} = "<th>" . $locale->text('Source') . "</th>";
+ $column_data{memo} = "<th>" . $locale->text('Memo') . "</th>";
+
+ print qq|
+ <tr>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+ print qq|
+ </tr>
+|;
+
+ $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
+ for $i (1 .. $form->{paidaccounts}) {
+
+ print qq|
+ <tr>
+|;
+
+ $form->{"selectAP_paid_$i"} = $form->{selectAP_paid};
+ $form->{"selectAP_paid_$i"} =~
+ s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/;
+
+ # format amounts
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ $form->{"exchangerate_$i"} =
+ $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
+
+ $exchangerate = qq| |;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{"forex_$i"}) {
+ $exchangerate =
+ qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
+ } else {
+ $exchangerate =
+ qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
+ }
+ }
+ $exchangerate .= qq|
+<input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
+|;
+
+ $column_data{"paid_$i"} =
+ qq|<td align=center><input name="paid_$i" size=11 value=$form->{"paid_$i"}></td>|;
+ $column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|;
+ $column_data{"AP_paid_$i"} =
+ qq|<td align=center><select name="AP_paid_$i">$form->{"selectAP_paid_$i"}</select></td>|;
+ $column_data{"datepaid_$i"} =
+ qq|<td align=center><input name="datepaid_$i" size=11 title="$myconfig{dateformat}" value=$form->{"datepaid_$i"}></td>|;
+ $column_data{"source_$i"} =
+ qq|<td align=center><input name="source_$i" size=11 value=$form->{"source_$i"}></td>|;
+ $column_data{"memo_$i"} =
+ qq|<td align=center><input name="memo_$i" size=11 value=$form->{"memo_$i"}></td>|;
+
+ map { print qq|$column_data{"${_}_$i"}\n| } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ print qq|
+ <input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
+ <input type=hidden name=paidaccounts value=$form->{paidaccounts}>
+ <input type=hidden name=selectAP_paid value="$form->{selectAP_paid}">
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+<br>
+|;
+
+ $invdate = $form->datetonum($form->{invdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ if ($form->{id}) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+|;
+
+ if (!$form->{revtrans}) {
+ if (!$form->{locked}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">
+|;
+ }
+ }
+
+ if ($invdate > $closedto) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post as new') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Order') . qq|">
+|;
+ }
+
+ } else {
+ if ($invdate > $closedto) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+<input type=hidden name=rowcount value=$form->{rowcount}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ &check_name(vendor);
+
+ &check_project;
+
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{invdate}, 'sell'
+ )));
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(paid exchangerate);
+
+ $form->{"exchangerate_$i"} = $exchangerate
+ if (
+ $form->{"forex_$i"} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'sell'
+ )));
+ }
+ }
+
+ $i = $form->{rowcount};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ if ( ($form->{"partnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")
+ && ($form->{"partsgroup_$i"} eq "")) {
+ $form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
+ &check_form;
+
+ } else {
+
+ IR->retrieve_item(\%myconfig, \%$form);
+
+ my $rows = scalar @{ $form->{item_list} };
+
+ if ($rows) {
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ if ($rows > 1) {
+
+ &select_item;
+ exit;
+
+ } else {
+
+ # override sellprice if there is one entered
+ $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
+
+ map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
+ qw(partnumber description unit);
+
+ map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
+ keys %{ $form->{item_list}[0] };
+
+ $s = ($sellprice) ? $sellprice : $form->{"sellprice_$i"};
+
+ ($dec) = ($s =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ if ($sellprice) {
+ $form->{"sellprice_$i"} = $sellprice;
+ } else {
+
+ # if there is an exchange rate adjust sellprice
+ $form->{"sellprice_$i"} /= $exchangerate;
+ }
+
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} *
+ (1 - $form->{"discount_$i"} / 100);
+ $form->{creditremaining} -= $amount;
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"});
+ }
+
+ &display_form;
+
+ } else {
+
+ # ok, so this is a new part
+ # ask if it is a part or service item
+
+ if ( $form->{"partsgroup_$i"}
+ && ($form->{"partsnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")) {
+ $form->{rowcount}--;
+ $form->{"discount_$i"} = "";
+ &display_form;
+ } else {
+
+ $form->{"id_$i"} = 0;
+ $form->{"unit_$i"} = $locale->text('ea');
+
+ &new_item;
+
+ }
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ $form->isblank("invdate", $locale->text('Invoice Date missing!'));
+ $form->isblank("vendor", $locale->text('Vendor missing!'));
+
+ # if the vendor changed get new values
+ if (&check_name(vendor)) {
+ &update;
+ exit;
+ }
+
+ &validate_items;
+
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ $invdate = $form->datetonum($form->{invdate}, \%myconfig);
+
+ $form->error($locale->text('Cannot post invoice for a closed period!'))
+ if ($invdate <= $closedto);
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
+
+ $form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
+
+ $form->error($locale->text('Cannot post payment for a closed period!'))
+ if ($datepaid <= $closedto);
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = $form->{exchangerate}
+ if ($invdate == $datepaid);
+ $form->isblank("exchangerate_$i",
+ $locale->text('Exchangerate for payment missing!'));
+ }
+ }
+ }
+
+ ($form->{AP}) = split /--/, $form->{AP};
+ ($form->{AP_paid}) = split /--/, $form->{AP_paid};
+
+ $form->{id} = 0 if $form->{postasnew};
+
+ $form->redirect( $locale->text('Invoice')
+ . " $form->{invnumber} "
+ . $locale->text('posted!'))
+ if (IR->post_invoice(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post invoice!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action header);
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
+
+<h4>|
+ . $locale->text('Are you sure you want to delete Invoice Number')
+ . qq| $form->{invnumber}</h4>
+<p>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Invoice deleted!'))
+ if (IR->delete_invoice(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot delete invoice!'));
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Inventory invoicing module
+#
+#======================================================================
+
+use SL::IS;
+use SL::PE;
+
+require "$form->{path}/io.pl";
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add Sales Invoice');
+
+ $form->{callback} =
+ "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&password=$form->{password}"
+ unless $form->{callback};
+
+ $form{jsscript} = "date";
+
+ if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR")
+ {
+ $form->error("Access Denied");
+ }
+
+ &invoice_links;
+ &prepare_invoice;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Edit Sales Invoice');
+
+ if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR")
+ {
+ $form->error("Access Denied");
+ }
+
+ &invoice_links;
+ &prepare_invoice;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub invoice_links {
+ $lxdebug->enter_sub();
+
+ $form->{vc} = 'customer';
+
+ # create links
+ $form->{webdav} = $webdav;
+ $form->{lizenzen} = $lizenzen;
+
+ $form->create_links("AR", \%myconfig, "customer");
+
+ if ($form->{all_customer}) {
+ unless ($form->{customer_id}) {
+ $form->{customer_id} = $form->{all_customer}->[0]->{id};
+ }
+ }
+ $cp_id = $form->{cp_id};
+ IS->get_customer(\%myconfig, \%$form);
+
+ IS->retrieve_invoice(\%myconfig, \%$form);
+ $form->{cp_id} = $cp_id;
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $curr[0];
+
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ $form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
+
+ if ($form->{all_customer}) {
+ $form->{customer} = "$form->{customer}--$form->{customer_id}";
+ map { $form->{selectcustomer} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_customer} });
+ }
+
+ # departments
+ if ($form->{all_departments}) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $form->{employee} = "$form->{employee}--$form->{employee_id}";
+
+ # sales staff
+ if ($form->{all_employees}) {
+ $form->{selectemployee} = "";
+ map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_employees} });
+ }
+
+ # forex
+ $form->{forex} = $form->{exchangerate};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ foreach $key (keys %{ $form->{AR_links} }) {
+ foreach $ref (@{ $form->{AR_links}{$key} }) {
+ $form->{"select$key"} .= "<option>$ref->{accno}--$ref->{description}\n";
+ }
+
+ if ($key eq "AR_paid") {
+ for $i (1 .. scalar @{ $form->{acc_trans}{$key} }) {
+ $form->{"AR_paid_$i"} =
+ "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
+
+ # reverse paid
+ $form->{"paid_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{amount} * -1;
+ $form->{"datepaid_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{transdate};
+ $form->{"forex_$i"} = $form->{"exchangerate_$i"} =
+ $form->{acc_trans}{$key}->[$i - 1]->{exchangerate};
+ $form->{"source_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{source};
+ $form->{"memo_$i"} = $form->{acc_trans}{$key}->[$i - 1]->{memo};
+
+ $form->{paidaccounts} = $i;
+ }
+ } else {
+ $form->{$key} =
+ "$form->{acc_trans}{$key}->[0]->{accno}--$form->{acc_trans}{$key}->[0]->{description}";
+ }
+
+ }
+
+ $form->{paidaccounts} = 1 unless (exists $form->{paidaccounts});
+
+ $form->{AR} = $form->{AR_1} unless $form->{id};
+
+ $form->{locked} =
+ ($form->datetonum($form->{invdate}, \%myconfig) <=
+ $form->datetonum($form->{closedto}, \%myconfig));
+
+ $lxdebug->leave_sub();
+}
+
+sub prepare_invoice {
+ $lxdebug->enter_sub();
+
+ $form->{type} = "invoice";
+ $form->{formname} = "invoice";
+ $form->{format} = "html";
+ $form->{media} = "screen";
+
+ if ($form->{id}) {
+
+ map { $form->{$_} =~ s/\"/"/g }
+ qw(invnumber ordnumber quonumber shippingpoint shipvia notes intnotes);
+
+ foreach $ref (@{ $form->{invoice_details} }) {
+ $i++;
+ map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit partnotes);
+ $form->{rowcount} = $i;
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ # set option selected
+ foreach $item (qw(AR customer currency department employee contact)) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ #build contacts
+ if ($form->{all_contacts}) {
+
+ $form->{selectcontact} = "";
+ foreach $item (@{ $form->{all_contacts} }) {
+ if ($form->{cp_id} == $item->{cp_id}) {
+ $form->{selectcontact} .=
+ "<option selected>$item->{cp_name}--$item->{cp_id}";
+ } else {
+ $form->{selectcontact} .= "<option>$item->{cp_name}--$item->{cp_id}";
+ }
+ }
+ }
+
+ #else {$form->{all_contacts} = 0;}
+
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} =
+ $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+
+ $exchangerate = "";
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{forex}) {
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchangerate')
+ . qq|</th><td>$form->{exchangerate}<input type=hidden name=exchangerate value=$form->{exchangerate}></td>|;
+ } else {
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchangerate')
+ . qq|</th><td><input name=exchangerate size=10 value=$form->{exchangerate}></td>|;
+ }
+ }
+ $exchangerate .= qq|
+<input type=hidden name=forex value=$form->{forex}>
+|;
+
+ $customer =
+ ($form->{selectcustomer})
+ ? qq|<select name=customer>$form->{selectcustomer}</select>\n<input type=hidden name="selectcustomer" value="$form->{selectcustomer}">|
+ : qq|<input name=customer value="$form->{customer}" size=35>|;
+
+ #sk
+ $contact =
+ ($form->{selectcontact})
+ ? qq|<select name=contact>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
+ : qq|<input name=contact value="$form->{contact}" size=35>|;
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
+
+ if ($form->{business}) {
+ $business = qq|
+ <tr>
+ <th align=right>| . $locale->text('Business') . qq|</th>
+ <td>$form->{business}</td>
+ <th align=right>| . $locale->text('Trade Discount') . qq|</th>
+ <td>|
+ . $form->format_amount(\%myconfig, $form->{tradediscount} * 100)
+ . qq| %</td>
+ </tr>
+|;
+ }
+
+ $form->{fokus} = "invoice.customer";
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=invdate id=invdate size=11 title="$myconfig{dateformat}" value=$form->{invdate}></td>
+ <td><input type=button name=invdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>
+ <td width="4"><input type=button name=duedate id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
+ "duedate", "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=invdate size=11 title="$myconfig{dateformat}" value=$form->{invdate}></td>|;
+ $button2 =
+ qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body onLoad="fokus()">
+
+<form method=post name="invoice" action=$form->{script}>
+
+
+<input type=hidden name=id value=$form->{id}>
+
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=media value=$form->{media}>
+<input type=hidden name=format value=$form->{format}>
+
+<input type=hidden name=queued value="$form->{queued}">
+<input type=hidden name=printed value="$form->{printed}">
+<input type=hidden name=emailed value="$form->{emailed}">
+
+<input type=hidden name=title value="$form->{title}">
+<input type=hidden name=vc value=$form->{vc}>
+
+<input type=hidden name=discount value=$form->{discount}>
+<input type=hidden name=creditlimit value=$form->{creditlimit}>
+<input type=hidden name=creditremaining value=$form->{creditremaining}>
+
+<input type=hidden name=tradediscount value=$form->{tradediscount}>
+<input type=hidden name=business value=$form->{business}>
+
+<input type=hidden name=closedto value=$form->{closedto}>
+<input type=hidden name=locked value=$form->{locked}>
+
+<input type=hidden name=shipped value=$form->{shipped}>
+<input type=hidden name=lizenzen value=$lizenzen>
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Customer') . qq|</th>
+ <td colspan=3>$customer</td>
+ <input type=hidden name=customer_id value=$form->{customer_id}>
+ <input type=hidden name=oldcustomer value="$form->{oldcustomer}">
+ <th align=richt nowrap>|
+ . $locale->text('Contact Person')
+ . qq|</th>
+ <td colspan=3>$contact</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table>
+ <tr>
+ <th nowrap>| . $locale->text('Credit Limit') . qq|</th>
+ <td>$form->{creditlimit}</td>
+ <td width=20%></td>
+ <th nowrap>| . $locale->text('Remaining') . qq|</th>
+ <td class="plus$n">$form->{creditremaining}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ $business
+ <tr>
+ <th align=right nowrap>| . $locale->text('Record in') . qq|</th>
+ <td colspan=3><select name=AR>$form->{selectAR}</select></td>
+ <input type=hidden name=selectAR value="$form->{selectAR}">
+ </tr>
+ $department
+ <tr>
+ <th align=right nowrap>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+ <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+ <input type=hidden name=fxgain_accno value=$form->{fxgain_accno}>
+ <input type=hidden name=fxloss_accno value=$form->{fxloss_accno}>
+ $exchangerate
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Shipping Point') . qq|</th>
+ <td colspan=3><input name=shippingpoint size=35 value="$form->{shippingpoint}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Ship via') . qq|</th>
+ <td colspan=3><input name=shipvia size=35 value="$form->{shipvia}"></td>
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Salesperson') . qq|</th>
+ <td colspan=2><select name=employee>$form->{selectemployee}</select></td>
+ <input type=hidden name=selectemployee value="$form->{selectemployee}">
+ <td></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Invoice Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Due Date') . qq|</th>
+ $button2
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Quotation Number') . qq|</th>
+ <td><input name=quonumber size=11 value="$form->{quonumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Customer Order Number') . qq|</th>
+ <td><input name=cusordnumber size=11 value="$form->{cusordnumber}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+$jsscript
+
+<!-- shipto are in hidden variables -->
+
+<input type=hidden name=shiptoname value="$form->{shiptoname}">
+<input type=hidden name=shiptostreet value="$form->{shiptostreet}">
+<input type=hidden name=shiptozipcode value="$form->{shiptozipcode}">
+<input type=hidden name=shiptocity value="$form->{shiptocity}">
+<input type=hidden name=shiptocountry value="$form->{shiptocountry}">
+<input type=hidden name=shiptocontact value="$form->{shiptocontact}">
+<input type=hidden name=shiptophone value="$form->{shiptophone}">
+<input type=hidden name=shiptofax value="$form->{shiptofax}">
+<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
+
+<!-- email variables -->
+<input type=hidden name=message value="$form->{message}">
+<input type=hidden name=email value="$form->{email}">
+<input type=hidden name=subject value="$form->{subject}">
+<input type=hidden name=cc value="$form->{cc}">
+<input type=hidden name=bcc value="$form->{bcc}">
+<input type=hidden name=webdav value=$webdav>
+<input type=hidden name=taxaccounts value="$form->{taxaccounts}">
+|;
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ print qq|
+<input type=hidden name="${item}_rate" value="$form->{"${item}_rate"}">
+<input type=hidden name="${item}_description" value="$form->{"${item}_description"}">
+<input type=hidden name="${item}_taxnumber" value="$form->{"${item}_taxnumber"}">
+|;
+ }
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ $form->{invtotal} = $form->{invsubtotal};
+
+ if (($rows = $form->numtextrows($form->{notes}, 26, 8)) < 2) {
+ $rows = 2;
+ }
+ if (($introws = $form->numtextrows($form->{intnotes}, 35, 8)) < 2) {
+ $introws = 2;
+ }
+ $rows = ($rows > $introws) ? $rows : $introws;
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=26 wrap=soft>$form->{notes}</textarea>|;
+ $intnotes =
+ qq|<textarea name=intnotes rows=$rows cols=35 wrap=soft>$form->{intnotes}</textarea>|;
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+
+ $taxincluded = "";
+ if ($form->{taxaccounts}) {
+ $taxincluded = qq|
+ <input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}> <b>|
+ . $locale->text('Tax Included')
+ . qq|</b><br><br>|;
+ }
+
+ if (!$form->{taxincluded}) {
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{"${item}_total"} =
+ $form->round_amount(
+ $form->{"${item}_base"} * $form->{"${item}_rate"},
+ 2);
+ $form->{invtotal} += $form->{"${item}_total"};
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>$form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+|;
+ }
+ }
+
+ $form->{invsubtotal} =
+ $form->format_amount(\%myconfig, $form->{invsubtotal}, 2, 0);
+
+ $subtotal = qq|
+ <tr>
+ <th align=right>| . $locale->text('Subtotal') . qq|</th>
+ <td align=right>$form->{invsubtotal}</td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{taxincluded}) {
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{"${item}_total"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} * $form->{"${item}_rate"} /
+ (1 + $form->{"${item}_rate"})
+ ),
+ 2);
+ $form->{"${item}_netto"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} - $form->{"${item}_total"}),
+ 2);
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+ $form->{"${item}_netto"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_netto"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>Enthaltene $form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+ <tr>
+ <th align=right>Nettobetrag</th>
+ <td align=right>$form->{"${item}_netto"}</td>
+ </tr>
+|;
+ }
+ }
+
+ }
+
+ $form->{oldinvtotal} = $form->{invtotal};
+ $form->{invtotal} =
+ $form->format_amount(\%myconfig, $form->{invtotal}, 2, 0);
+
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('Notes') . qq|</th>
+ <th align=left>| . $locale->text('Internal Notes') . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td>$notes</td>
+ <td>$intnotes</td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=100%>
+ $taxincluded
+ <table width=100%>
+ $subtotal
+ $tax
+ <tr>
+ <th align=right>| . $locale->text('Total') . qq|</th>
+ <td align=right>$form->{invtotal}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ if ($webdav) {
+ $webdav_list = qq|
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th class=listtop align=left>Dokumente im Webdav-Repository</th>
+ </tr>
+ <table width=100%>
+ <td align=left width=30%><b>Dateiname</b></td>
+ <td align=left width=70%><b>Webdavlink</b></td>
+|;
+ foreach $file (keys %{ $form->{WEBDAV} }) {
+ $webdav_list .= qq|
+ <tr>
+ <td align=left>$file</td>
+ <td align=left><a href="$form->{WEBDAV}{$file}">$form->{WEBDAV}{$file}</a></td>
+ </tr>
+|;
+ }
+ $webdav_list .= qq|
+ </table>
+ </tr>
+|;
+
+ print $webdav_list;
+ }
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th colspan=6 class=listheading>|
+ . $locale->text('Incoming Payments')
+ . qq|</th>
+ </tr>
+|;
+
+ if ($form->{currency} eq $form->{defaultcurrency}) {
+ @column_index = qw(datepaid source memo paid AR_paid);
+ } else {
+ @column_index = qw(datepaid source memo paid exchangerate AR_paid);
+ }
+
+ $column_data{datepaid} = "<th>" . $locale->text('Date') . "</th>";
+ $column_data{paid} = "<th>" . $locale->text('Amount') . "</th>";
+ $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>";
+ $column_data{AR_paid} = "<th>" . $locale->text('Account') . "</th>";
+ $column_data{source} = "<th>" . $locale->text('Source') . "</th>";
+ $column_data{memo} = "<th>" . $locale->text('Memo') . "</th>";
+
+ print "
+ <tr>
+";
+ map { print "$column_data{$_}\n" } @column_index;
+ print "
+ </tr>
+";
+
+ $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
+ for $i (1 .. $form->{paidaccounts}) {
+
+ print "
+ <tr>\n";
+
+ $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
+ $form->{"selectAR_paid_$i"} =~
+ s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
+
+ # format amounts
+ $totalpaid += $form->{"paid_$i"};
+ $form->{"paid_$i"} =
+ $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ $form->{"exchangerate_$i"} =
+ $form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
+
+ $exchangerate = qq| |;
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{"forex_$i"}) {
+ $exchangerate =
+ qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
+ } else {
+ $exchangerate =
+ qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
+ }
+ }
+
+ $exchangerate .= qq|
+<input type=hidden name="forex_$i" value=$form->{"forex_$i"}>
+|;
+
+ $column_data{"paid_$i"} =
+ qq|<td align=center><input name="paid_$i" size=11 value=$form->{"paid_$i"}></td>|;
+ $column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|;
+ $column_data{"AR_paid_$i"} =
+ qq|<td align=center><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
+ $column_data{"datepaid_$i"} =
+ qq|<td align=center><input name="datepaid_$i" size=11 title="$myconfig{dateformat}" value=$form->{"datepaid_$i"}></td>|;
+ $column_data{"source_$i"} =
+ qq|<td align=center><input name="source_$i" size=11 value="$form->{"source_$i"}"></td>|;
+ $column_data{"memo_$i"} =
+ qq|<td align=center><input name="memo_$i" size=11 value="$form->{"memo_$i"}"></td>|;
+
+ map { print qq|$column_data{"${_}_$i"}\n| } @column_index;
+ print "
+ </tr>\n";
+ }
+
+ print qq|
+<input type=hidden name=paidaccounts value=$form->{paidaccounts}>
+<input type=hidden name=selectAR_paid value="$form->{selectAR_paid}">
+<input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
+<input type=hidden name=oldtotalpaid value=$totalpaid>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <td>
+|;
+
+ &print_options;
+
+ print qq|
+ </td>
+ </tr>
+</table>
+|;
+
+ $invdate = $form->datetonum($form->{invdate}, \%myconfig);
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+
+ if ($form->{id}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Ship to') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+|;
+
+ if (!$form->{revtrans}) {
+ if (!$form->{locked}) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">
+|;
+ }
+ }
+
+ if ($invdate > $closedto) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post as new') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Order') . qq|">
+|;
+ }
+
+ } else {
+ if ($invdate > $closedto) {
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Ship to') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Post') . qq|">|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+<input type=hidden name=rowcount value=$form->{rowcount}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+</form>
+
+</body>
+
+ </html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ &check_name(customer);
+
+ &check_project;
+
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{invdate}, 'buy'
+ )));
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(paid exchangerate);
+
+ $form->{"exchangerate_$i"} = $exchangerate
+ if (
+ $form->{"forex_$i"} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy'
+ )));
+ }
+ }
+
+ $i = $form->{rowcount};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ # if last row empty, check the form otherwise retrieve new item
+ if ( ($form->{"partnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")
+ && ($form->{"partsgroup_$i"} eq "")) {
+
+ $form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
+ &check_form;
+
+ } else {
+
+ IS->retrieve_item(\%myconfig, \%$form);
+
+ $rows = scalar @{ $form->{item_list} };
+
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{discount} * 100);
+
+ if ($rows) {
+ $form->{"qty_$i"} = ($form->{"qty_$i"} * 1) ? $form->{"qty_$i"} : 1;
+
+ if ($rows > 1) {
+
+ &select_item;
+ exit;
+
+ } else {
+
+ $sellprice = $form->format_amount(\%myconfig, $form->{"sellprice_$i"});
+
+ map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
+ qw(partnumber description unit);
+ map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
+ keys %{ $form->{item_list}[0] };
+
+ $form->{"discount_$i"} = $form->{discount} * 100;
+
+ $s = ($sellprice) ? $sellprice : $form->{"sellprice_$i"};
+ ($dec) = ($s =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ if ($sellprice) {
+ $form->{"sellprice_$i"} = $sellprice;
+ } else {
+
+ # if there is an exchange rate adjust sellprice
+ $form->{"sellprice_$i"} *= (1 - $form->{tradediscount});
+ $form->{"sellprice_$i"} /= $exchangerate;
+ }
+
+ $form->{"listprice_$i"} /= $exchangerate;
+
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} *
+ (1 - $form->{"discount_$i"} / 100);
+ map { $form->{"${_}_base"} = 0 } (split / /, $form->{taxaccounts});
+ map { $form->{"${_}_base"} += $amount }
+ (split / /, $form->{"taxaccounts_$i"});
+ map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
+ split / /, $form->{"taxaccounts_$i"}
+ if !$form->{taxincluded};
+
+ $form->{creditremaining} -= $amount;
+
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"},
+ $decimalplaces)
+ } qw(sellprice listprice);
+
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+ if ($lizenzen) {
+ if ($form->{"inventory_accno_$i"} ne "") {
+ $form->{"lizenzen_$i"} = qq|<option></option>|;
+ foreach $item (@{ $form->{LIZENZEN}{ $form->{"id_$i"} } }) {
+ $form->{"lizenzen_$i"} .=
+ qq|<option value="$item->{"id"}">$item->{"licensenumber"}</option>|;
+ }
+ $form->{"lizenzen_$i"} .=
+ qq|<option value=-1>Neue Lizenz</option>|;
+ }
+ }
+
+ }
+
+ &display_form;
+
+ } else {
+
+ # ok, so this is a new part
+ # ask if it is a part or service item
+
+ if ( $form->{"partsgroup_$i"}
+ && ($form->{"partsnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")) {
+ $form->{rowcount}--;
+ $form->{"discount_$i"} = "";
+ &display_form;
+ } else {
+
+ $form->{"id_$i"} = 0;
+ $form->{"unit_$i"} = $locale->text('ea');
+
+ &new_item;
+
+ }
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub post {
+ $lxdebug->enter_sub();
+
+ $form->isblank("invdate", $locale->text('Invoice Date missing!'));
+ $form->isblank("customer", $locale->text('Customer missing!'));
+
+ # if oldcustomer ne customer redo form
+ if (&check_name(customer)) {
+ &update;
+ exit;
+ }
+
+ &validate_items;
+
+ $closedto = $form->datetonum($form->{closedto}, \%myconfig);
+ $invdate = $form->datetonum($form->{invdate}, \%myconfig);
+
+ $form->error($locale->text('Cannot post invoice for a closed period!'))
+ if ($invdate <= $closedto);
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
+ for $i (1 .. $form->{paidaccounts}) {
+ if ($form->{"paid_$i"}) {
+ $datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
+
+ $form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
+
+ $form->error($locale->text('Cannot post payment for a closed period!'))
+ if ($datepaid <= $closedto);
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ $form->{"exchangerate_$i"} = $form->{exchangerate}
+ if ($invdate == $datepaid);
+ $form->isblank("exchangerate_$i",
+ $locale->text('Exchangerate for payment missing!'));
+ }
+ }
+ }
+
+ ($form->{AR}) = split /--/, $form->{AR};
+ ($form->{AR_paid}) = split /--/, $form->{AR_paid};
+
+ $form->{label} = $locale->text('Invoice');
+
+ $form->{id} = 0 if $form->{postasnew};
+
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber")
+ unless $form->{invnumber};
+
+ $form->redirect(
+ $form->{label} . " $form->{invnumber} " . $locale->text('posted!'))
+ if (IS->post_invoice(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post invoice!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action header);
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
+
+<h4>|
+ . $locale->text('Are you sure you want to delete Invoice Number')
+ . qq| $form->{invnumber}
+</h4>
+
+<p>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Invoice deleted!'))
+ if (IS->delete_invoice(\%myconfig, \%$form, $spool));
+ $form->error($locale->text('Cannot delete invoice!'));
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#!/usr/bin/perl
+#
+
+$| = 1;
+
+use CGI::Carp qw(fatalsToBrowser);
+
+$form->header;
+$paramstring = $ENV{"QUERY_STRING"};
+@felder = split "&", $paramstring;
+foreach (@felder) {
+ ($name, $wert) = split "=", $_;
+ $wert =~ tr/+/ /;
+ $$name = $wert;
+}
+$login =
+ "[" . $login
+ . " - <a href=\"login.pl?path="
+ . $form->{"path"}
+ . "&password="
+ . $form->{"password"}
+ . "&action=logout\" target=\"_top\">"
+ . $locale->text('Logout')
+ . "</a>] ";
+my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
+ $Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
+ = localtime(time);
+my $CTIME_String = localtime(time);
+$Monat += 1;
+$Jahrestag += 1;
+$Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat;
+$Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
+$Jahr += 1900;
+my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch",
+ "Donnerstag", "Freitag", "Samstag");
+my @Monatsnamen = ("", "Januar", "Februar", "März",
+ "April", "Mai", "Juni", "Juli",
+ "August", "September", "Oktober", "November",
+ "Dezember");
+$datum =
+ $Wochentage[$Wochentag] . ", der "
+ . $Monatstag . "."
+ . $Monat . "."
+ . $Jahr . " - ";
+
+#$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
+$zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
+
+print qq|
+<script type="text/javascript">
+<!--
+var clockid=new Array()
+var clockidoutside=new Array()
+var i_clock=-1
+var thistime= new Date()
+var hours= | . $Stunden . qq|;
+var minutes= | . $Minuten . qq|;
+var seconds= | . $Sekunden . qq|;
+if (eval(hours) <10) {hours="0"+hours}
+if (eval(minutes) < 10) {minutes="0"+minutes}
+if (seconds < 10) {seconds="0"+seconds}
+//var thistime = hours+":"+minutes+":"+seconds
+var thistime = hours+":"+minutes
+
+function writeclock() {
+ i_clock++
+ if (document.all \|\| document.getElementById \|\| document.layers) {
+ clockid[i_clock]="clock"+i_clock
+ document.write("<font family=arial size=2><span id='"+clockid[i_clock]+"' style='position:relative'>"+thistime+"</span></font>")
+ }
+}
+
+function clockon() {
+ thistime= new Date()
+ hours=thistime.getHours()
+ minutes=thistime.getMinutes()
+ seconds=thistime.getSeconds()
+ if (eval(hours) <10) {hours="0"+hours}
+ if (eval(minutes) < 10) {minutes="0"+minutes}
+ if (seconds < 10) {seconds="0"+seconds}
+ //thistime = hours+":"+minutes+":"+seconds
+ thistime = hours+":"+minutes
+
+ if (document.all) {
+ for (i=0;i<=clockid.length-1;i++) {
+ var thisclock=eval(clockid[i])
+ thisclock.innerHTML=thistime
+ }
+ }
+
+ if (document.getElementById) {
+ for (i=0;i<=clockid.length-1;i++) {
+ document.getElementById(clockid[i]).innerHTML=thistime
+ }
+ }
+ var timer=setTimeout("clockon()",60000)
+}
+window.onload=clockon
+//-->
+</script>
+|;
+
+#
+print qq|
+<body bgcolor="#ffffff" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
+ . $login
+ . $datum
+ . qq| <script>writeclock()</script>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
+|;
+
+#
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Moritz Bunkus
+# Email: m.bunkus@linet-services.de
+# Web: http://www.linet-services.de/
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Software license module
+#
+#======================================================================
+
+use SL::IC;
+use SL::IS;
+use SL::LICENSES;
+
+sub quot {
+ $lxdebug->enter_sub();
+ $_[0] =~ s/\"/\"/g;
+ $lxdebug->leave_sub();
+ return $_[0];
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+ $form->header();
+
+ print(
+ qq|<body>
+
+<form method=post action=$form->{script}>|);
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+ my @items = ("path", "login", "password", "old_callback", "previousform");
+ push(@items, @{ $form->{"hidden"} });
+ map({
+ print("<input type=hidden name=$_ value=\"" . quot($form->{$_}) . "\">\n"
+ );
+ } @items);
+
+ print(
+ qq|</form>
+</body>
+</html>
+|);
+ $lxdebug->leave_sub();
+}
+
+sub set_std_hidden {
+ $lxdebug->enter_sub();
+ $form->{"hidden"} = ["comment", "validuntil", "quantity", @_];
+ $lxdebug->leave_sub();
+}
+
+sub print_part_selection {
+ $lxdebug->enter_sub();
+ form_header();
+ set_std_hidden("business");
+
+ print(
+ qq|
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=5>|
+ . $locale->text('Select from one of the items below')
+ . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr class=listheading>
+ <th> </th>
+ <th class=listheading>| . $locale->text('Part Number') . qq|</th>
+ <th class=listheading>| . $locale->text('Description') . qq|</th>
+ </tr>
+ |);
+
+ $j = 1;
+ for ($i = 1; $i <= scalar(@{ $form->{"parts"} }); $i++) {
+ %p = %{ $form->{"parts"}->[$i - 1] };
+ if ($i == 1) {
+ $checked = "checked";
+ } else {
+ $checked = "";
+ }
+
+ print(
+ qq|<tr class=listrow$j>
+ <td><input name=ndx class=radio type=radio value=$i $checked></td>
+ <td><input name=\"new_partnumber_$i\" type=hidden value=\"|
+ . $p{"partnumber"} . qq|\">|
+ . $p{"partnumber"}
+ . qq|</td>
+ <td><input name=\"new_description_$i\" type=hidden value=\"|
+ . $p{"description"} . qq|\">|
+ . $p{"description"}
+ . qq|</td>
+ <input name=\"new_parts_id_$i\" type=hidden value=\"| . $p{"id"} . qq|\">
+ </tr>|);
+
+ $j = ($j + 1) % 2;
+ }
+
+ print(
+ qq|<tr><td colspan=3><hr size=3 noshade></td></tr>
+</table>
+
+<input type=hidden name=nextsub value=\"do_add\">
+<input type=submit name=action value=| . $locale->text('Continue') . qq|>|);
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+sub print_customer_selection {
+ $lxdebug->enter_sub();
+ form_header();
+ set_std_hidden("parts_id", "partnumber", "description");
+
+ print(
+ qq|
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=5>|
+ . $locale->text('Select from one of the names below')
+ . qq|</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr class=listheading>
+ <th> </th>
+ <th class=listheading>| . $locale->text('Customer Number') . qq|</th>
+ <th class=listheading>| . $locale->text('Company Name') . qq|</th>
+ <th class=listheading>| . $locale->text('Street') . qq|</th>
+ <th class=listheading>| . $locale->text('Zipcode') . qq|</th>
+ <th class=listheading>| . $locale->text('City') . qq|</th>
+ </tr>
+ |);
+
+ print(qq|<tr><td colspan=6><hr size=3 noshade></td></tr>|);
+
+ $j = 1;
+ for ($i = 1; $i <= scalar(@{ $form->{"all_customers"} }); $i++) {
+ %c = %{ $form->{"all_customers"}->[$i - 1] };
+ if ($i == 1) {
+ $checked = "checked";
+ } else {
+ $checked = "";
+ }
+
+ print(
+ qq|<tr class=listrow$j>
+ <td><input name=ndx class=radio type=radio value=$i $checked></td>
+ <td><input name=\"new_customer_id_$i\" type=hidden value=\"|
+ . $c{"id"}
+ . qq|\">$c{"customernumber"}</td>
+ <td><input name=\"new_customer_name_$i\" type=hidden value=\"|
+ . $c{"name"}
+ . qq|\">$c{"name"}</td>
+ <td>$c{"street"}</td>
+ <td>$c{"zipcode"}</td>
+ <td>$c{"city"}</td>
+ </tr>|);
+
+ $j = ($j + 1) % 2;
+ }
+
+ print(
+ qq|
+</table>
+
+<input type=hidden name=nextsub value=\"do_add\">
+<input type=submit name=action value=| . $locale->text('Continue') . qq|>|);
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+sub print_license_form {
+ $lxdebug->enter_sub();
+ print(
+ qq|
+<table width=100%>
+ <tr>
+ <th class=listtop>| . $locale->text("Add License") . qq|</th>
+ </tr>
+ <tr>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Part Number') . qq|</th>
+ <td><input name=partnumber value=\"|
+ . quot($form->{"partnumber"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description value=\"|
+ . quot($form->{"description"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Company Name') . qq|</th>|);
+ if ($form->{"all_customer"}) {
+ print(qq|<td><select name=\"customer\">|);
+ foreach (@{ $form->{"all_customer"} }) {
+ if (!defined($form->{"customer_id"})) {
+ $form->{"customer_id"} = $_->{"id"};
+ }
+ $selected = ($_->{"id"} * 1) == $form->{"customer_id"} ? "selected" : "";
+ print(qq|<option $selected> $_->{"name"}--$_->{"id"}</option>|);
+ }
+ print(qq|</select></td>|);
+ } else {
+ print( qq|<td><input name=customer_name value=\"|
+ . quot($form->{"customer_name"})
+ . qq|\"></td>|);
+ }
+ print(
+ qq|</tr>
+ <tr>
+ <th align=right>| . $locale->text('Comment') . qq|</th>
+ <td><input name=comment value=\"|
+ . quot($form->{"comment"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Valid until') . qq|</th>
+ <td><input name=validuntil value=\"|
+ . quot($form->{"validuntil"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Quantity') . qq|</th>
+ <td><input name=quantity value=\"|
+ . quot($form->{"quantity"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('License key') . qq|</th>
+ <td><input name=licensenumber value=\"|
+ . quot($form->{"licensenumber"})
+ . qq|\"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Own Product') . qq|</th>
+ <td><input type=checkbox name=own_product value=1 checked></td>
+ </tr>
+ </table>
+
+ <input type=submit name=action value=\"| . $locale->text('Update') . qq|\">
+ |);
+
+ if ($_[0]) {
+ print(
+ qq|
+ <input type=submit name=action value=\"|
+ . $locale->text('Save')
+ . qq|\">\n|);
+ }
+ print(
+ qq|
+ </tr>
+
+</table>|);
+ $lxdebug->leave_sub();
+}
+
+sub add {
+ $lxdebug->enter_sub();
+ if (!$lizenzen) {
+ $form->error(
+ $locale->text(
+ 'The licensing module has been deactivated in lx-erp.conf.')
+ );
+ }
+
+ $form->{"initial"} = 1;
+
+ do_add();
+ $lxdebug->leave_sub();
+}
+
+sub do_add {
+ $lxdebug->enter_sub();
+ $form->{"hidden"} = ["parts_id"];
+ form_header();
+
+ if ($form->{"ndx"}) {
+ $ndx = $form->{"ndx"};
+ foreach (keys(%{$form})) {
+ next unless (/^new_.*_${ndx}$/);
+ s/^new_//;
+ s/_${ndx}$//;
+ $form->{$_} = $form->{"new_${_}_${ndx}"};
+ }
+ }
+
+ if ($form->{"customer"}) {
+ $form->{"customer_id"} = (split(/--/, $form->{"customer"}))[1];
+ }
+
+ if ($form->{"customer_name"}) {
+ LICENSES->get_customers(\%myconfig, $form);
+ if (scalar(@{ $form->{"all_customers"} }) == 1) {
+ %c = %{ $form->{"all_customers"}->[0] };
+ $form->{"customer_id"} = $c{"id"};
+ $form->{"customer_name"} = $c{"name"};
+ } elsif (scalar(@{ $form->{"all_customers"} }) == 0) {
+ $form->{"customer_name"} = "";
+ delete($form->{"customer_id"});
+ } else {
+ print_customer_selection();
+ return;
+ }
+ } elsif (defined($form->{"customer_name"})) {
+ delete($form->{"customer_id"});
+ }
+
+ if ($form->{"partnumber"} || $form->{"description"}) {
+ $form->{"sort"} = "p.partnumber";
+ $form->{searchitems} = "part";
+ IC->all_parts(\%myconfig, $form);
+ if (scalar(@{ $form->{"parts"} }) == 1) {
+ map({ $form->{$_} = $form->{"parts"}->[0]->{$_}; }
+ ("partnumber", "description"));
+ $form->{"parts_id"} = $form->{"parts"}->[0]->{"id"};
+
+ } elsif (scalar(@{ $form->{"parts"} }) == 0) {
+ map({ $form->{$_} = ""; }("partnumber", "description", "parts_id"));
+
+ } else {
+ print_part_selection();
+ return;
+ }
+ } else {
+ delete($form->{"parts_id"});
+ }
+
+ $form->all_vc(\%myconfig, "customer", "");
+
+ print_license_form($form->{"parts_id"} && $form->{"customer_id"});
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+ do_add();
+ $lxdebug->leave_sub();
+}
+
+sub continue {
+ $lxdebug->enter_sub();
+ &{ $form->{nextsub} };
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ ($form->{customername}, $form->{customer_id}) = split /--/,
+ $form->{customer};
+
+ $form->isblank("customer", $locale->text('Customer missing!'));
+
+ if ( $form->{quantity} eq ""
+ || $form->{quantity} !~ /^[0-9]*$/
+ || $form->{quantity} < 1) {
+ $form->error($locale->text('Please enter a number of licenses.'));
+ }
+
+ if (!$form->{licensenumber} || $form->{licensenumber} eq "") {
+ $form->error($locale->text('Please enter a license key.'));
+ }
+
+ $rc = LICENSES->save_license(\%myconfig, \%$form);
+
+ # load previous variables
+ if ($form->{previousform}) {
+
+ # save the new form variables before splitting previousform
+ map { $newform{$_} = $form->{$_} } keys %$form;
+
+ $previousform = $form->unescape($form->{previousform});
+
+ # don't trample on previous variables
+ map { delete $form->{$_} } keys %newform;
+
+ # now take it apart and restore original values
+ foreach $item (split /&/, $previousform) {
+ ($key, $value) = split /=/, $item, 2;
+ $value =~ s/%26/&/g;
+ $form->{$key} = $value;
+ }
+
+ $form->{"lizenzen_$form->{row}"} =
+ "<option value=$rc>$newform{licensenumber}</option>";
+ $form->{rowcount}--;
+
+ delete $form->{action};
+
+ # restore original callback
+ $callback = $form->unescape($form->{callback});
+ $form->{callback} = $form->unescape($form->{old_callback});
+ delete $form->{old_callback};
+
+ # put callback together
+ foreach $key (keys %$form) {
+
+ # do single escape for Apache 2.0
+ $value = $form->escape($form->{$key}, 1);
+ $callback .= qq|&$key=$value|;
+ }
+ $form->{callback} = $callback;
+
+ # redirect
+ $form->redirect;
+
+ } else {
+ form_header();
+
+ print("Die Lizenz wurde gespeichert.\n");
+ form_footer();
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+ if (!$lizenzen) {
+ $form->error(
+ $locale->text(
+ 'The licensing module has been deactivated in lx-erp.conf.')
+ );
+ }
+
+ form_header();
+
+ print(
+ qq|
+<table width=100%>
+ <tr>
+ <th class=listtop>| . $locale->text("Licenses") . qq|</th>
+ </tr>
+ <tr>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Part Number') . qq|</th>
+ <td><input name=partnumber></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Company Name') . qq|</th>
+ <td><input name=customer_name></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td><input type=radio name=all value=1 checked>|
+ . $locale->text('All')
+ . qq| <input type=radio name=all value=0>|
+ . $locale->text('Expiring in x month(s)')
+ . qq| <input size=4 name=expiring_in value="1"><br>
+ <input type=checkbox name=show_expired value=1>|
+ . $locale->text('Expired licenses')
+ . qq|</td>
+ </tr>
+ </table>
+ </tr>
+ <tr><td colspan=4><hr size=3 noshade></td></tr>
+</table>
+
+<input type=hidden name=nextsub value=\"do_search\">
+<input type=submit name=action value=\"| . $locale->text('Continue') . qq|\">
+
+ |);
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+sub do_search {
+ $lxdebug->enter_sub();
+ LICENSES->search(\%myconfig, $form);
+
+ $callback = "";
+ foreach (
+ ("db", "path", "login", "password",
+ "partnumber", "description", "customer_name", "all",
+ "expiring_in", "show_expired")
+ ) {
+ $callback .= "\&${_}=" . $form->escape($form->{$_}, 1);
+ }
+ $details = $form->{"script"} . "?action=details" . $callback . "\&id=";
+ $invdetails = "is.pl?action=edit" . $callback . "\&id=";
+ $callback = $form->{"script"} . "?action=do_search" . $callback;
+
+ $form->{"sortby"} = "validuntil" unless ($form->{"sortby"});
+ $form->{"sortasc"} *= 1;
+ foreach (("partnumber", "description", "name", "validuntil", "invnumber")) {
+ $columns{$_} = $callback . "\&sortby=${_}\&sortasc=";
+ if ($form->{"sortby"} eq $_) {
+ $columns{$_} .= (1 - $form->{"sortasc"});
+ } else {
+ $columns{$_} .= "1";
+ }
+ }
+
+ form_header();
+
+ print(
+ qq|
+<table width=100%>
+ <tr>
+ <th class=listtop>| . $locale->text("Licenses") . qq|</th>
+ </tr>
+ |);
+ if (scalar(@{ $form->{"licenses"} }) == 0) {
+ print(qq|</table>|
+ . $locale->text(
+ "No licenses were found that match the search criteria.")
+ . qq|</body></html>|);
+ exit(0);
+ }
+
+ print(
+ qq|
+ <tr>
+ <table>
+ <tr>
+ <th class=listtop><a class=listheading href=\"|
+ . $columns{"partnumber"} . "\">"
+ . $locale->text('Part Number')
+ . qq|</a></th>
+ <th class=listtop><a class=listheading href=\"|
+ . $columns{"description"} . "\">"
+ . $locale->text('Description')
+ . qq|</a></th>
+ <th class=listtop><a class=listheading href=\"|
+ . $columns{"name"} . "\">"
+ . $locale->text('Company Name')
+ . qq|</a></th>
+ <th class=listtop><a class=listheading href=\"|
+ . $columns{"validuntil"} . "\">"
+ . $locale->text('Valid until')
+ . qq|</a></th>
+ <th class=listtop><a class=listheading href=\"|
+ . $columns{"invnumber"} . "\">"
+ . $locale->text('Invoice Number')
+ . qq|</a></th>
+ </tr>
+ |);
+
+ $j = 1;
+ for ($i = 0; $i < scalar(@{ $form->{"licenses"} }); $i++) {
+ $ref = $form->{"licenses"}->[$i];
+ print(
+ qq|
+ <tr class=listrow$j>
+ <td><input type=hidden name=id_$i value=| . $ref->{"id"} . qq|
+ <a href=\"${details}$ref->{"id"}\">$ref->{"partnumber"}</a></td>
+ <td><a href=\"${details}$ref->{"id"}\">$ref->{"description"}</a></td>
+ <td><a href=\"${details}$ref->{"id"}\">$ref->{"name"}</a></td>
+ <td><a href=\"${details}$ref->{"id"}\">$ref->{"validuntil"}</a></td>
+ <td align=right>|
+ . (
+ $ref->{"invnumber"}
+ ? qq|<a href=\"${invdetails}$ref->{"invnumber"}\">$ref->{"invnumber"}</a>|
+ : qq| |
+ )
+ . qq|</td>
+ </tr>|);
+ $j = ($j + 1) % 2;
+ }
+
+ $form->{"num_licenses"} = scalar(@{ $form->{"licenses"} });
+ push(@{ $form->{"hidden"} }, "num_licenses");
+
+ print(
+ qq|
+ </table>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<p>
+
+<input type=submit name=action value=\"| . $locale->text("Add") . qq|\">
+ |);
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+sub details {
+ $lxdebug->enter_sub();
+ LICENSES->get_license(\%myconfig, $form);
+ map(
+ { $form->{$_} = $form->{"license"}->{$_}; } keys(%{ $form->{"license"} }));
+
+ form_header();
+
+ print(
+ qq|
+<table width=100%>
+ <tr>
+ <th class=listtop>| . $locale->text("View License") . qq|</th>
+ </tr>
+ <tr>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Part Number') . qq|</th>
+ <td>$form->{"partnumber"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td>$form->{"description"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Company Name') . qq|</th>
+ <td>$form->{"name"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Comment') . qq|</th>
+ <td>$form->{"comment"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Valid until') . qq|</th>
+ <td>$form->{"validuntil"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Quantity') . qq|</th>
+ <td>$form->{"quantity"}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('License key') . qq|</th>
+ <td>$form->{"licensenumber"}</td>
+ </tr>
+ </table>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=submit name=action value=\"| . $locale->text("Add") . qq|\">
+ |);
+
+ form_footer();
+ $lxdebug->leave_sub();
+}
+
+1;
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#######################################################################
+
+use DBI;
+use SL::User;
+use SL::Form;
+
+$form = new Form;
+
+$locale = new Locale $language, "login";
+
+# customization
+if (-f "$form->{path}/custom_$form->{script}") {
+ eval { require "$form->{path}/custom_$form->{script}"; };
+ $form->error($@) if ($@);
+}
+
+# per login customization
+if (-f "$form->{path}/$form->{login}_$form->{script}") {
+ eval { require "$form->{path}/$form->{login}_$form->{script}"; };
+ $form->error($@) if ($@);
+}
+
+# window title bar, user info
+$form->{titlebar} =
+ "Lx-Office " . $locale->text('Version') . " $form->{version}";
+
+if ($form->{action}) {
+ $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
+ &{ $locale->findsub($form->{action}) };
+} else {
+ &login_screen;
+}
+
+1;
+
+sub login_screen {
+ $lxdebug->enter_sub();
+
+ if (-f "css/lx-office-erp.css") {
+ $form->{stylesheet} = "lx-office-erp.css";
+ }
+
+ $form->{fokus} = "loginscreen.login";
+ $form->header;
+
+ print qq|
+
+
+<body class=login onLoad="fokus()">
+
+<pre>
+
+</pre>
+
+<center>
+<table class=login border=3 cellpadding=20>
+ <tr>
+ <td class=login align=center><a href="http://www.lx-office.org" target=_top><img src="image/lx-office-erp.png" border=0></a>
+<h1 class=login align=center>|
+ . $locale->text('Version')
+ . qq| $form->{version}
+</h1>
+
+<p>
+
+<form method=post name=loginscreen action=$form->{script}>
+
+ <table width=100%>
+ <tr>
+ <td align=center>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Login Name') . qq|</th>
+ <td><input class=login name=login size=30 tabindex="1"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Password') . qq|</th>
+ <td><input class=login type=password name=password size=30 tabindex="2"></td>
+ </tr>
+ <input type=hidden name=path value=$form->{path}>
+ </table>
+
+ <br>
+ <input type=submit name=action value="| . $locale->text('Login') . qq|">
+
+ </td>
+ </tr>
+ </table>
+
+</form>
+
+ </td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub login {
+ $lxdebug->enter_sub();
+
+ $form->error($locale->text('You did not enter a name!'))
+ unless ($form->{login});
+
+ $user = new User $memberfile, $form->{login};
+
+ # if we get an error back, bale out
+ if (($errno = $user->login(\%$form, $userspath)) <= -1) {
+ $errno *= -1;
+ $err[1] = $err[3] = $locale->text('Incorrect username or password!');
+
+ if ($errno == 2) {
+
+ # upgraded dataset, login again
+ $form->redirect(
+ "<a href=menu.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display>Continue</a>"
+ );
+ exit;
+ }
+
+ $form->error($err[$errno]);
+ }
+
+ # made it this far, execute the menu
+ $form->{callback} =
+ "menu.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}&action=display";
+
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
+sub logout {
+ $lxdebug->enter_sub();
+
+ unlink "$userspath/$form->{login}.conf";
+
+ # remove the callback to display the message
+ $form->{callback} = "login.pl?path=$form->{path}&action=&login=";
+ $form->redirect($locale->text('You are logged out!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub company_logo {
+ $lxdebug->enter_sub();
+
+ require "$userspath/$form->{login}.conf";
+ $locale = new Locale $myconfig{countrycode}, "login"
+ unless ($language eq $myconfig{countrycode});
+
+ $myconfig{address} =~ s/\\n/<br>/g;
+ $myconfig{dbhost} = $locale->text('localhost') unless $myconfig{dbhost};
+
+ map { $form->{$_} = $myconfig{$_} } qw(charset stylesheet);
+
+ $form->{title} = $locale->text('About');
+
+ # create the logo screen
+ $form->header unless $form->{noheader};
+
+ print qq|
+<body>
+<center>
+<a href="http://www.lx-office.org" target=_top><img src="image/lx-office-erp.png" border=0></a>
+<h2 class=login>| . $locale->text('Version') . qq| $form->{version}</h2>
+
+| . $locale->text('Licensed to') . qq|
+<p>
+<b>
+$myconfig{company}
+<br>$myconfig{address}
+</b>
+
+
+<br>
+<table border=0>
+ <tr>
+ <th align=left>| . $locale->text('User') . qq|</th>
+ <td>$myconfig{name}</td>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text('Dataset') . qq|</th>
+ <td>$myconfig{dbname}</td>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text('Database Host') . qq|</th>
+ <td>$myconfig{dbhost}</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <th colspan="2" align="center"><a href="http://lx-office.org" target="blank">http://lx-office.org</a></th>
+ </tr>
+ <tr>
+ <th colspan="2" align="center"><a href="mailto:info@lx-office.org" target="blank">info@lx-office.org</a></th>
+ </tr>
+</table>
+
+</center>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Christopher Browne
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#######################################################################
+#
+# thre frame layout with refractured menu
+#
+# CHANGE LOG:
+# DS. 2002-03-25 Created
+# 2004-12-14 - New Optik - Marco Welter <mawe@linux-studio.de>
+#######################################################################
+
+$menufile = "menu.ini";
+use SL::Menu;
+
+1;
+
+# end of main
+
+$framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "190";
+
+sub display {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ print qq|
+<frameset rows="20px,*" cols="*" framespacing="0" frameborder="0">
+ <frame src="kopf.pl?login=$form->{login}&password=$form->{password}&path=$form->{path}" name="kopf" scrolling="NO">
+ <frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
+ <frame src="$form->{script}?login=$form->{login}&password=$form->{password}&action=acc_menu&path=$form->{path}" name="acc_menu" scrolling="auto" noresize marginwidth="0">
+ <frame src="login.pl?login=$form->{login}&password=$form->{password}&action=company_logo&path=$form->{path}" name="main_window" scrolling="auto">
+ </frameset>
+ <noframes>
+ You need a browser that can read frames to see this page.
+ </noframes>
+</frameset>
+</HTML>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub acc_menu {
+ $lxdebug->enter_sub();
+ $mainlevel = $form->{level};
+ $mainlevel =~ s/$mainlevel--//g;
+ my $menu = new Menu "$menufile";
+ $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
+ $menu = new Menu "$form->{login}_$menufile"
+ if (-f "$form->{login}_$menufile");
+
+ $form->{title} = $locale->text('Accounting Menu');
+
+ $form->header;
+
+ print qq|
+<body class="menu">
+
+|;
+ print qq|<div align="left">\n<table width="|
+ . $framesize
+ . qq|" border=0>\n|;
+
+ §ion_menu($menu);
+
+ print qq|</table></div>|;
+ print qq|
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub section_menu {
+ $lxdebug->enter_sub();
+ my ($menu, $level) = @_;
+
+ # build tiered menus
+ my @menuorder = $menu->access_control(\%myconfig, $level);
+ while (@menuorder) {
+ $item = shift @menuorder;
+ $label = $item;
+ $ml = $item;
+ $label =~ s/$level--//g;
+ $ml =~ s/--.*//;
+ if ($ml eq $mainlevel) { $zeige = 1; }
+ else { $zeige = 0; }
+ my $spacer = " " x (($item =~ s/--/--/g) * 1);
+ $label =~ s/.*--//g;
+ $label_icon = $label . ".gif";
+ $mlab = $label;
+ $label = $locale->text($label);
+ $label =~ s/ / /g;
+ $menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
+
+ if ($menu->{$item}{submenu}) {
+ $menu->{$item}{$item} = !$form->{$item};
+ if ($form->{level} && $item =~ /^$form->{level}/) {
+
+ # expand menu
+ if ($zeige) {
+ print
+ qq|<tr><td valign=bottom><b>$spacer<img src="image/unterpunkt.png">$label</b></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ §ion_menu($menu, $item);
+ } else {
+ if ($zeige) {
+ print qq|<tr><td>|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label ...</a></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ }
+ } else {
+ if ($menu->{$item}{module}) {
+ if ($form->{$item} && $form->{level} eq $item) {
+ $menu->{$item}{$item} = !$form->{$item};
+ if ($zeige) {
+ print
+ qq|<tr><td valign=bottom>$spacer<img src="image/unterpunkt.png">|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label</a></td></tr>\n|;
+ }
+
+ # remove same level items
+ map { shift @menuorder } grep /^$item/, @menuorder;
+ §ion_menu($menu, $item);
+ } else {
+ if ($zeige) {
+ print
+ qq|<tr><td class="hover" height="13" >$spacer<img src="image/unterpunkt.png" style="vertical-align:text-top">|
+ . $menu->menuitem(\%myconfig, \%$form, $item, $level)
+ . qq|$label</a></td></tr>\n|;
+ }
+ }
+ } else {
+ my $ml_ = $form->escape($ml);
+ print
+ qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle"> <a href="menu.pl?path=bin/mozilla&action=acc_menu&level=$ml_&login=$form->{login}&password=$form->{password}" class="nohover">$label</a> </td></tr>\n|;
+ §ion_menu($menu, $item);
+
+ #print qq|<br>\n|;
+ }
+ }
+ }
+ $lxdebug->leave_sub();
+}
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger, Accounting
+# Copyright (c) 1998-2003
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Order entry module
+# Quotation module
+#======================================================================
+
+use SL::OE;
+use SL::IR;
+use SL::IS;
+use SL::PE;
+
+require "$form->{path}/io.pl";
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'purchase_order') {
+ $form->{title} = $locale->text('Add Purchase Order');
+ $form->{vc} = 'vendor';
+ }
+ if ($form->{type} eq 'sales_order') {
+ $form->{title} = $locale->text('Add Sales Order');
+ $form->{vc} = 'customer';
+ }
+ if ($form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Add Request for Quotation');
+ $form->{vc} = 'vendor';
+ }
+ if ($form->{type} eq 'sales_quotation') {
+ $form->{title} = $locale->text('Add Quotation');
+ $form->{vc} = 'customer';
+ }
+
+ $form->{callback} =
+ "$form->{script}?action=add&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&path=$form->{path}&password=$form->{password}"
+ unless $form->{callback};
+
+ &order_links;
+ &prepare_order;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'purchase_order') {
+ $form->{title} = $locale->text('Edit Purchase Order');
+ $form->{heading} = $locale->text('Purchase Order');
+ $form->{vc} = 'vendor';
+ }
+ if ($form->{type} eq 'sales_order') {
+ $form->{title} = $locale->text('Edit Sales Order');
+ $form->{heading} = $locale->text('Sales Order');
+ $form->{vc} = 'customer';
+ }
+ if ($form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Edit Request for Quotation');
+ $form->{heading} = $locale->text('Request for Quotation');
+ $form->{vc} = 'vendor';
+ }
+ if ($form->{type} eq 'sales_quotation') {
+ $form->{title} = $locale->text('Edit Quotation');
+ $form->{heading} = $locale->text('Quotation');
+ $form->{vc} = 'customer';
+ }
+
+ &order_links;
+ &prepare_order;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub order_links {
+ $lxdebug->enter_sub();
+
+ # get customer/vendor
+ $form->all_vc(\%myconfig, $form->{vc},
+ ($form->{vc} eq 'customer') ? "AR" : "AP");
+
+ # retrieve order/quotation
+ $form->{webdav} = $webdav;
+
+ # set jscalendar
+ $form->{jscalendar} = $jscalendar;
+
+ OE->retrieve(\%myconfig, \%$form);
+
+ $taxincluded = $form->{taxincluded};
+ $form->{shipto} = 1 if $form->{id};
+
+ if ($form->{"all_$form->{vc}"}) {
+ unless ($form->{"$form->{vc}_id"}) {
+ $form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id};
+ }
+ }
+
+ $cp_id = $form->{cp_id};
+ $intnotes = $form->{intnotes};
+
+ # get customer / vendor
+ if ($form->{type} =~ /(purchase_order|request_quotation|receive_order)/) {
+ IR->get_vendor(\%myconfig, \%$form);
+ }
+ if ($form->{type} =~ /(sales|ship)_(order|quotation)/) {
+ IS->get_customer(\%myconfig, \%$form);
+ }
+ $form->{cp_id} = $cp_id;
+
+ $form->{intnotes} = $intnotes;
+ ($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} };
+ $form->{"old$form->{vc}"} =
+ qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
+
+ # build the popup menus
+ if (@{ $form->{"all_$form->{vc}"} }) {
+ $form->{ $form->{vc} } =
+ qq|$form->{$form->{vc}}--$form->{"$form->{vc}_id"}|;
+ map { $form->{"select$form->{vc}"} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{"all_$form->{vc}"} });
+ }
+
+ # currencies
+ @curr = split /:/, $form->{currencies};
+ chomp $curr[0];
+ $form->{defaultcurrency} = $curr[0];
+ $form->{currency} = $form->{defaultcurrency} unless $form->{currency};
+
+ map { $form->{selectcurrency} .= "<option>$_\n" } @curr;
+
+ $form->{taxincluded} = $taxincluded if ($form->{id});
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+ $form->{department} = "$form->{department}--$form->{department_id}";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $form->{employee} = "$form->{employee}--$form->{employee_id}";
+
+ # sales staff
+ if (@{ $form->{all_employees} }) {
+ $form->{selectemployee} = "";
+ map { $form->{selectemployee} .= "<option>$_->{name}--$_->{id}\n" }
+ (@{ $form->{all_employees} });
+ }
+
+ # forex
+ $form->{forex} = $form->{exchangerate};
+
+ $lxdebug->leave_sub();
+}
+
+sub prepare_order {
+ $lxdebug->enter_sub();
+ $form->{format} = "html";
+ $form->{media} = "screen";
+ $form->{formname} = $form->{type};
+
+ if ($form->{id}) {
+
+ map { $form->{$_} =~ s/\"/"/g }
+ qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact);
+
+ foreach $ref (@{ $form->{form_details} }) {
+ $i++;
+ map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit);
+ $form->{rowcount} = $i;
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $checkedopen = ($form->{closed}) ? "" : "checked";
+ $checkedclosed = ($form->{closed}) ? "checked" : "";
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $form->{jscalendar};
+ $jsscript = "";
+
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}></td>
+ <td><input type=button name=transdate id="trigger1" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value=$form->{reqdate}></td>
+ <td width="4"><input type=button name=reqdate name=reqdate id="trigger2" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1",
+ "reqdate", "BL", "trigger2");
+
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate}></td>|;
+ $button2 = qq|
+ <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value=$form->{reqdate}></td>|;
+ }
+
+ if ($form->{id}) {
+ $openclosed = qq|
+ <tr>
+ <td colspan=2 align=center>
+ <table>
+ <tr>
+ <th nowrap><input name=closed type=radio class=radio value=0 $checkedopen> |
+ . $locale->text('Open')
+ . qq|</th>
+ <th nowrap><input name=closed type=radio class=radio value=1 $checkedclosed> |
+ . $locale->text('Closed')
+ . qq|</th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ }
+
+ # set option selected
+ foreach $item ($form->{vc}, currency, department, employee, contact) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ #build contacts
+ if ($form->{all_contacts}) {
+
+ $form->{selectcontact} = "";
+ foreach $item (@{ $form->{all_contacts} }) {
+ if ($form->{cp_id} == $item->{cp_id}) {
+ $form->{selectcontact} .=
+ "<option selected>$item->{cp_name}--$item->{cp_id}";
+ } else {
+ $form->{selectcontact} .= "<option>$item->{cp_name}--$item->{cp_id}";
+ }
+ }
+ }
+
+ $form->{exchangerate} =
+ $form->format_amount(\%myconfig, $form->{exchangerate});
+
+ $form->{creditlimit} =
+ $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
+ $form->{creditremaining} =
+ $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
+
+ $contact =
+ ($form->{selectcontact})
+ ? qq|<select name=contact>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
+ : qq|<input name=contact value="$form->{contact}" size=35>|;
+
+ $exchangerate = qq|
+<input type=hidden name=forex value=$form->{forex}>
+|;
+
+ if ($form->{currency} ne $form->{defaultcurrency}) {
+ if ($form->{forex}) {
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchangerate')
+ . qq|</th><td>$form->{exchangerate}</td>
+ <input type=hidden name=exchangerate value=$form->{exchangerate}>
+|;
+ } else {
+ $exchangerate .=
+ qq|<th align=right>|
+ . $locale->text('Exchangerate')
+ . qq|</th><td><input name=exchangerate size=10 value=$form->{exchangerate}></td>|;
+ }
+ }
+
+ $vclabel = ucfirst $form->{vc};
+ $vclabel = $locale->text($vclabel);
+
+ $terms = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Terms: Net') . qq|</th>
+ <td nowrap><input name=terms size="3" maxlength="3" value=$form->{terms}> |
+ . $locale->text('days')
+ . qq|</td>
+ </tr>
+|;
+
+ if ($form->{business}) {
+ $business = qq|
+ <tr>
+ <th align=right>| . $locale->text('Business') . qq|</th>
+ <td>$form->{business}</td>
+ <th align=right>| . $locale->text('Trade Discount') . qq|</th>
+ <td>|
+ . $form->format_amount(\%myconfig, $form->{tradediscount} * 100)
+ . qq| %</td>
+ </tr>
+|;
+ }
+
+ if ($form->{type} !~ /_quotation$/) {
+ $ordnumber = qq|
+ <tr>
+ <th width=70% align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
+ </tr>
+ <tr>
+ <th width=70% align=right nowrap>|
+ . $locale->text('Quotation Number')
+ . qq|</th>
+ <td><input name=quonumber size=11 value="$form->{quonumber}"></td>
+ </tr>
+ <tr>
+ <th width=70% align=right nowrap>|
+ . $locale->text('Customer Order Number')
+ . qq|</th>
+ <td><input name=cusordnumber size=11 value="$form->{cusordnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Date') . qq|</th>
+ $button1
+
+ </tr>
+ <tr>
+ <th align=right nowrap=true>| . $locale->text('Required by') . qq|</th>
+ $button2
+ </tr>
+|;
+
+ $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
+
+ $creditremaining = qq|
+ <tr>
+ <td></td>
+ <td colspan=3>
+ <table>
+ <tr>
+ <th nowrap>| . $locale->text('Credit Limit') . qq|</th>
+ <td>$form->{creditlimit}</td>
+ <td width=20%></td>
+ <th nowrap>| . $locale->text('Remaining') . qq|</th>
+ <td class="plus$n">$form->{creditremaining}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ } else {
+ $reqlabel =
+ ($form->{type} eq 'sales_quotation')
+ ? $locale->text('Valid until')
+ : $locale->text('Required by');
+ if ($form->{type} eq 'sales_quotation') {
+ $ordnumber = qq|
+ <tr>
+ <th width=70% align=right nowrap>|
+ . $locale->text('Quotation Number')
+ . qq|</th>
+ <td><input name=quonumber size=11 value="$form->{quonumber}"></td>
+ <input type=hidden name=ordnumber value="$form->{ordnumber}">
+ </tr>
+|;
+ } else {
+ $ordnumber = qq|
+ <tr>
+ <th width=70% align=right nowrap>| . $locale->text('RFQ Number') . qq|</th>
+ <td><input name=quonumber size=11 value="$form->{quonumber}"></td>
+ <input type=hidden name=ordnumber value="$form->{ordnumber}">
+ </tr>
+|;
+
+ $terms = "";
+ }
+
+ $ordnumber .= qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Quotation Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap=true>$reqlabel</th>
+ $button2
+ </tr>
+|;
+
+ }
+
+ $vc =
+ ($form->{"select$form->{vc}"})
+ ? qq|<select name=$form->{vc}>$form->{"select$form->{vc}"}</select>\n<input type=hidden name="select$form->{vc}" value="$form->{"select$form->{vc}"}">|
+ : qq|<input name=$form->{vc} value="$form->{$form->{vc}}" size=35>|;
+
+ $department = qq|
+ <tr>
+ <th align="right" nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select>
+ <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
+ </td>
+ </tr>
+| if $form->{selectdepartment};
+
+ $employee = qq|
+ <input type=hidden name=employee value="$form->{employee}">
+|;
+
+ if ($form->{type} eq 'sales_order') {
+ if ($form->{selectemployee}) {
+ $employee = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Salesperson') . qq|</th>
+ <td colspan=2><select name=employee>$form->{selectemployee}</select></td>
+ <input type=hidden name=selectemployee value="$form->{selectemployee}">
+ <td></td>
+ </tr>
+|;
+ }
+ } else {
+ $employee = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Employee') . qq|</th>
+ <td colspan=2><select name=employee>$form->{selectemployee}</select></td>
+ <input type=hidden name=selectemployee value="$form->{selectemployee}">
+ <td></td>
+ </tr>
+|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=formname value=$form->{formname}>
+<input type=hidden name=media value=$form->{media}>
+<input type=hidden name=format value=$form->{format}>
+
+<input type=hidden name=queued value="$form->{queued}">
+<input type=hidden name=printed value="$form->{printed}">
+<input type=hidden name=emailed value="$form->{emailed}">
+
+<input type=hidden name=vc value=$form->{vc}>
+
+<input type=hidden name=title value="$form->{title}">
+
+<input type=hidden name=discount value=$form->{discount}>
+<input type=hidden name=creditlimit value=$form->{creditlimit}>
+<input type=hidden name=creditremaining value=$form->{creditremaining}>
+
+<input type=hidden name=tradediscount value=$form->{tradediscount}>
+<input type=hidden name=business value=$form->{business}>
+<input type=hidden name=webdav value=$webdav>
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right>$vclabel</th>
+ <td colspan=3>$vc</td>
+ <input type=hidden name=$form->{vc}_id value=$form->{"$form->{vc}_id"}>
+ <input type=hidden name="old$form->{vc}" value="$form->{"old$form->{vc}"}">
+ <th align=richt nowrap>|
+ . $locale->text('Contact Person')
+ . qq|</th>
+ <td colspan=3>$contact</td>
+ </tr>
+ $creditremaining
+ $business
+ $department
+ <tr>
+ <th align=right>| . $locale->text('Currency') . qq|</th>
+ <td><select name=currency>$form->{selectcurrency}</select></td>
+ <input type=hidden name=selectcurrency value="$form->{selectcurrency}">
+ <input type=hidden name=defaultcurrency value=$form->{defaultcurrency}>
+ $exchangerate
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Shipping Point') . qq|</th>
+ <td colspan=3><input name=shippingpoint size=35 value="$form->{shippingpoint}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Ship via') . qq|</th>
+ <td colspan=3><input name=shipvia size=35 value="$form->{shipvia}"></td>
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ $openclosed
+ $employee
+ $ordnumber
+ $terms
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+$jsscript
+
+<!-- shipto are in hidden variables -->
+
+<input type=hidden name=shiptoname value="$form->{shiptoname}">
+<input type=hidden name=shiptostreet value="$form->{shiptostreet}">
+<input type=hidden name=shiptozipcode value="$form->{shiptozipcode}">
+<input type=hidden name=shiptocity value="$form->{shiptocity}">
+<input type=hidden name=shiptocountry value="$form->{shiptocountry}">
+<input type=hidden name=shiptocontact value="$form->{shiptocontact}">
+<input type=hidden name=shiptophone value="$form->{shiptophone}">
+<input type=hidden name=shiptofax value="$form->{shiptofax}">
+<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
+
+<!-- email variables -->
+<input type=hidden name=message value="$form->{message}">
+<input type=hidden name=email value="$form->{email}">
+<input type=hidden name=subject value="$form->{subject}">
+<input type=hidden name=cc value="$form->{cc}">
+<input type=hidden name=bcc value="$form->{bcc}">
+
+<input type=hidden name=taxpart value="$form->{taxpart}">
+<input type=hidden name=taxservice value="$form->{taxservice}">
+
+<input type=hidden name=taxaccounts value="$form->{taxaccounts}">
+|;
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ print qq|
+<input type=hidden name="${item}_rate" value=$form->{"${item}_rate"}>
+<input type=hidden name="${item}_description" value="$form->{"${item}_description"}">
+|;
+ }
+ $lxdebug->leave_sub();
+}
+
+sub form_footer {
+ $lxdebug->enter_sub();
+
+ $form->{invtotal} = $form->{invsubtotal};
+
+ if (($rows = $form->numtextrows($form->{notes}, 25, 8)) < 2) {
+ $rows = 2;
+ }
+ if (($introws = $form->numtextrows($form->{intnotes}, 35, 8)) < 2) {
+ $introws = 2;
+ }
+ $rows = ($rows > $introws) ? $rows : $introws;
+ $notes =
+ qq|<textarea name=notes rows=$rows cols=25 wrap=soft>$form->{notes}</textarea>|;
+ $intnotes =
+ qq|<textarea name=intnotes rows=$rows cols=35 wrap=soft>$form->{intnotes}</textarea>|;
+
+ $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
+
+ $taxincluded = "";
+ if ($form->{taxaccounts}) {
+ $taxincluded = qq|
+ <input name=taxincluded class=checkbox type=checkbox value=1 $form->{taxincluded}> <b>|
+ . $locale->text('Tax Included')
+ . qq|</b><br><br>
+|;
+ }
+
+ if (!$form->{taxincluded}) {
+
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{invtotal} += $form->{"${item}_total"} =
+ $form->round_amount(
+ $form->{"${item}_base"} * $form->{"${item}_rate"},
+ 2);
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>$form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+|;
+ }
+ }
+
+ $form->{invsubtotal} =
+ $form->format_amount(\%myconfig, $form->{invsubtotal}, 2, 0);
+
+ $subtotal = qq|
+ <tr>
+ <th align=right>| . $locale->text('Subtotal') . qq|</th>
+ <td align=right>$form->{invsubtotal}</td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{taxincluded}) {
+ foreach $item (split / /, $form->{taxaccounts}) {
+ if ($form->{"${item}_base"}) {
+ $form->{"${item}_total"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} * $form->{"${item}_rate"} /
+ (1 + $form->{"${item}_rate"})
+ ),
+ 2);
+ $form->{"${item}_netto"} =
+ $form->round_amount(
+ ($form->{"${item}_base"} - $form->{"${item}_total"}),
+ 2);
+ $form->{"${item}_total"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_total"}, 2);
+ $form->{"${item}_netto"} =
+ $form->format_amount(\%myconfig, $form->{"${item}_netto"}, 2);
+
+ $tax .= qq|
+ <tr>
+ <th align=right>Enthaltene $form->{"${item}_description"}</th>
+ <td align=right>$form->{"${item}_total"}</td>
+ </tr>
+ <tr>
+ <th align=right>Nettobetrag</th>
+ <td align=right>$form->{"${item}_netto"}</td>
+ </tr>
+|;
+ }
+ }
+
+ }
+
+ $form->{oldinvtotal} = $form->{invtotal};
+ $form->{invtotal} =
+ $form->format_amount(\%myconfig, $form->{invtotal}, 2, 0);
+
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=bottom>
+ <td>
+ <table>
+ <tr>
+ <th align=left>| . $locale->text('Notes') . qq|</th>
+ <th align=left>| . $locale->text('Internal Notes') . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td>$notes</td>
+ <td>$intnotes</td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=100%>
+ $taxincluded
+ <table width=100%>
+ $subtotal
+ $tax
+ <tr>
+ <th align=right>| . $locale->text('Total') . qq|</th>
+ <td align=right>$form->{invtotal}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+<input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
+<input type=hidden name=oldtotalpaid value=$totalpaid>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+|;
+
+ if ($webdav) {
+ $webdav_list = qq|
+
+ <tr>
+ <th class=listtop align=left>Dokumente im Webdav-Repository</th>
+ </tr>
+ <table width=100%>
+ <td align=left width=30%><b>Dateiname</b></td>
+ <td align=left width=70%><b>Webdavlink</b></td>
+|;
+ foreach $file (keys %{ $form->{WEBDAV} }) {
+ $webdav_list .= qq|
+ <tr>
+ <td align=left>$file</td>
+ <td align=left><a href="$form->{WEBDAV}{$file}">$form->{WEBDAV}{$file}</a></td>
+ </tr>
+|;
+ }
+ $webdav_list .= qq|
+ </table>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+|;
+
+ print $webdav_list;
+ }
+ print qq|
+<input type=hidden name=jscalendar value=$form->{jscalendar}>
+|;
+ print qq|
+ <tr>
+ <td>
+|;
+ &print_options;
+
+ print qq|
+ </td>
+ </tr>
+</table>
+
+Bearbeiten des $form->{heading}<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Ship to') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Save') . qq|">
+|;
+
+ if ($form->{id}) {
+ print qq|
+<br>Workflow $form->{heading}<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Save as new') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ if ($form->{type} =~ /quotation$/) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Order') . qq|">|;
+ }
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Invoice') . qq|">
+|;
+
+ if ($form->{type} =~ /sales_order$/) {
+ print qq|
+<br>$form->{heading} als neue Vorlage verwenden für<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Purchase Order') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Quotation') . qq|">
+|;
+
+ } elsif ($form->{type} =~ /purchase_order$/) {
+ print qq|
+<br>$form->{heading} als neue Vorlage verwenden für<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Sales Order') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Quotation') . qq|">
+|;
+
+ } else {
+ print qq|
+<br>$form->{heading} als neue Vorlage verwenden für<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Order') . qq|">
+|;
+ }
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+<input type=hidden name=rowcount value=$form->{rowcount}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(exchangerate creditlimit creditremaining);
+
+ &check_name($form->{vc});
+
+ &check_project;
+
+ $buysell = 'buy';
+ $buysell = 'sell' if ($form->{vc} eq 'vendor');
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{transdate}, $buysell
+ )));
+
+ my $i = $form->{rowcount};
+ $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1;
+
+ if ( ($form->{"partnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")
+ && ($form->{"partsgroup_$i"} eq "")) {
+
+ $form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
+ &check_form;
+
+ } else {
+
+ if ( $form->{type} eq 'purchase_order'
+ || $form->{type} eq 'request_quotation') {
+ IR->retrieve_item(\%myconfig, \%$form);
+ }
+ if ($form->{type} eq 'sales_order' || $form->{type} eq 'sales_quotation') {
+ IS->retrieve_item(\%myconfig, \%$form);
+ }
+
+ my $rows = scalar @{ $form->{item_list} };
+
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{discount} * 100);
+
+ if ($rows) {
+ $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
+
+ if ($rows > 1) {
+
+ &select_item;
+ exit;
+
+ } else {
+
+ $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
+
+ map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
+ qw(partnumber description unit);
+ map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
+ keys %{ $form->{item_list}[0] };
+
+ $s = ($sellprice) ? $sellprice : $form->{"sellprice_$i"};
+
+ ($dec) = ($s =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ if ($sellprice) {
+ $form->{"sellprice_$i"} = $sellprice;
+ } else {
+
+ # if there is an exchange rate adjust sellprice
+ $form->{"sellprice_$i"} /= $exchangerate;
+ }
+
+ $amount =
+ $form->{"sellprice_$i"} * $form->{"qty_$i"} *
+ (1 - $form->{"discount_$i"} / 100);
+ map { $form->{"${_}_base"} = 0 } (split / /, $form->{taxaccounts});
+ map { $form->{"${_}_base"} += $amount }
+ (split / /, $form->{"taxaccounts_$i"});
+ map { $amount += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
+ split / /, $form->{taxaccounts}
+ if !$form->{taxincluded};
+
+ $form->{creditremaining} -= $amount;
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"});
+ }
+
+ &display_form;
+
+ } else {
+
+ # ok, so this is a new part
+ # ask if it is a part or service item
+
+ if ( $form->{"partsgroup_$i"}
+ && ($form->{"partsnumber_$i"} eq "")
+ && ($form->{"description_$i"} eq "")) {
+ $form->{rowcount}--;
+ $form->{"discount_$i"} = "";
+ &display_form;
+ } else {
+
+ $form->{"id_$i"} = 0;
+ $form->{"unit_$i"} = $locale->text('ea');
+
+ &new_item;
+
+ }
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'purchase_order') {
+ $form->{title} = $locale->text('Purchase Orders');
+ $form->{vc} = 'vendor';
+ $ordlabel = $locale->text('Order Number');
+ $ordnumber = 'ordnumber';
+ $employee = $locale->text('Employee');
+ }
+ if ($form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Request for Quotations');
+ $form->{vc} = 'vendor';
+ $ordlabel = $locale->text('RFQ Number');
+ $ordnumber = 'quonumber';
+ $employee = $locale->text('Employee');
+ }
+ if ($form->{type} eq 'receive_order') {
+ $form->{title} = $locale->text('Receive Merchandise');
+ $form->{vc} = 'vendor';
+ $ordlabel = $locale->text('Order Number');
+ $ordnumber = 'ordnumber';
+ $employee = $locale->text('Employee');
+ }
+ if ($form->{type} eq 'sales_order') {
+ $form->{title} = $locale->text('Sales Orders');
+ $form->{vc} = 'customer';
+ $ordlabel = $locale->text('Order Number');
+ $ordnumber = 'ordnumber';
+ $employee = $locale->text('Salesperson');
+ }
+ if ($form->{type} eq 'ship_order') {
+ $form->{title} = $locale->text('Ship Merchandise');
+ $form->{vc} = 'customer';
+ $ordlabel = $locale->text('Order Number');
+ $ordnumber = 'ordnumber';
+ $employee = $locale->text('Salesperson');
+
+ }
+
+ if ($form->{type} eq 'sales_quotation') {
+ $form->{title} = $locale->text('Quotations');
+ $form->{vc} = 'customer';
+ $ordlabel = $locale->text('Quotation Number');
+ $ordnumber = 'quonumber';
+ $employee = $locale->text('Employee');
+ }
+
+ if ($form->{type} =~ /(ship|receive)_order/) {
+ OE->get_warehouses(\%myconfig, \%$form);
+
+ # warehouse
+ if (@{ $form->{all_warehouses} }) {
+ $form->{selectwarehouse} = "<option>\n";
+ $form->{warehouse} = qq|$form->{warehouse}--$form->{warehouse_id}|;
+
+ map {
+ $form->{selectwarehouse} .= "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_warehouses} });
+
+ $warehouse = qq|
+ <tr>
+ <th align=right>| . $locale->text('Warehouse') . qq|</th>
+ <td colspan=3><select name=warehouse>$form->{selectwarehouse}</select></td>
+ <input type=hidden name=selectwarehouse value="$form->{selectwarehouse}">
+ </tr>
+|;
+
+ }
+ }
+
+ # setup vendor / customer selection
+ $form->all_vc(\%myconfig, $form->{vc},
+ ($form->{vc} eq 'customer') ? "AR" : "AP");
+
+ map { $vc .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{"all_$form->{vc}"} };
+
+ $vclabel = ucfirst $form->{vc};
+ $vclabel = $locale->text($vclabel);
+
+ # $locale->text('Vendor')
+ # $locale->text('Customer')
+
+ $vc =
+ ($vc)
+ ? qq|<select name=$form->{vc}><option>\n$vc</select>|
+ : qq|<input name=$form->{vc} size=35>|;
+
+ # departments
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ if ($form->{type} !~ /(ship_order|receive_order)/) {
+ $openclosed = qq|
+ <tr>
+ <td><input name="open" class=checkbox type=checkbox value=1 checked> |
+ . $locale->text('Open')
+ . qq|</td>
+ <td><input name="closed" class=checkbox type=checkbox value=1 $form->{closed}> |
+ . $locale->text('Closed')
+ . qq|</td>
+ </tr>
+|;
+ } else {
+
+ $openclosed = qq|
+ <input type=hidden name="open" value=1>
+|;
+ }
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdatefrom id="trigger3" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
+ <input type=button name=transdateto name=transdateto id="trigger4" value=|
+ . $locale->text('button')
+ . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3",
+ "transdateto", "BL", "trigger4");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 = qq|
+ <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button2 = qq|
+ <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}"></td>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>$vclabel</th>
+ <td colspan=3>$vc</td>
+ </tr>
+ $warehouse
+ $department
+ <tr>
+ <th align=right>$ordlabel</th>
+ <td colspan=3><input name="$ordnumber" size=20></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ $button1
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ $button2
+ </tr>
+ <input type=hidden name=sort value=transdate>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td colspan=5>
+ <table>
+ $openclosed
+ <tr>
+ <td><input name="l_id" class=checkbox type=checkbox value=Y>
+ | . $locale->text('ID') . qq|</td>
+ <td><input name="l_$ordnumber" class=checkbox type=checkbox value=Y checked> $ordlabel</td>
+ <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Date')
+ . qq|</td>
+ <td><input name="l_reqdate" class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Required by')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_name" class=checkbox type=checkbox value=Y checked> $vclabel</td>
+ <td><input name="l_employee" class=checkbox type=checkbox value=Y checked> $employee</td>
+ <td><input name="l_shipvia" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Ship via')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_netamount" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Amount')
+ . qq|</td>
+ <td><input name="l_tax" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Tax')
+ . qq|</td>
+ <td><input name="l_amount" class=checkbox type=checkbox value=Y checked> |
+ . $locale->text('Total')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_subtotal" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td colspan=4><hr size=3 noshade></td></tr>
+</table>
+
+$jsscript
+
+<br>
+<input type=hidden name=nextsub value=orders>
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+<input type=hidden name=vc value=$form->{vc}>
+<input type=hidden name=type value=$form->{type}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub orders {
+ $lxdebug->enter_sub();
+
+ # split vendor / customer
+ ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) =
+ split(/--/, $form->{ $form->{vc} });
+
+ OE->transactions(\%myconfig, \%$form);
+
+ $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber";
+
+ $number = $form->escape($form->{$ordnumber});
+ $name = $form->escape($form->{ $form->{vc} });
+ $department = $form->escape($form->{department});
+ $warehouse = $form->escape($form->{warehouse});
+
+ # construct href
+ $href =
+ "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
+
+ # construct callback
+ $number = $form->escape($form->{$ordnumber}, 1);
+ $name = $form->escape($form->{ $form->{vc} }, 1);
+ $department = $form->escape($form->{department}, 1);
+ $warehouse = $form->escape($form->{warehouse}, 1);
+
+ $callback =
+ "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
+
+ @columns =
+ $form->sort_columns("transdate", "reqdate", "id", "$ordnumber",
+ "name", "netamount", "tax", "amount",
+ "curr", "employee", "shipvia", "open",
+ "closed");
+
+ $form->{l_open} = $form->{l_closed} = "Y"
+ if ($form->{open} && $form->{closed});
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
+ }
+
+ if ($form->{vc} eq 'vendor') {
+ if ($form->{type} eq 'receive_order') {
+ $form->{title} = $locale->text('Receive Merchandise');
+ } elsif ($form->{type} eq 'purchase_order') {
+ $form->{title} = $locale->text('Purchase Orders');
+ } else {
+ $form->{title} = $locale->text('Request for Quotations');
+ }
+ $name = $locale->text('Vendor');
+ $employee = $locale->text('Employee');
+ }
+ if ($form->{vc} eq 'customer') {
+ if ($form->{type} eq 'sales_order') {
+ $form->{title} = $locale->text('Sales Orders');
+ $employee = $locale->text('Salesperson');
+ } elsif ($form->{type} eq 'ship_order') {
+ $form->{title} = $locale->text('Ship Merchandise');
+ $employee = $locale->text('Salesperson');
+ } else {
+ $form->{title} = $locale->text('Quotations');
+ $employee = $locale->text('Employee');
+ }
+ $name = $locale->text('Customer');
+ }
+
+ $column_header{id} =
+ qq|<th><a class=listheading href=$href&sort=id>|
+ . $locale->text('ID')
+ . qq|</a></th>|;
+ $column_header{transdate} =
+ qq|<th><a class=listheading href=$href&sort=transdate>|
+ . $locale->text('Date')
+ . qq|</a></th>|;
+ $column_header{reqdate} =
+ qq|<th><a class=listheading href=$href&sort=reqdate>|
+ . $locale->text('Required by')
+ . qq|</a></th>|;
+ $column_header{ordnumber} =
+ qq|<th><a class=listheading href=$href&sort=ordnumber>|
+ . $locale->text('Order')
+ . qq|</a></th>|;
+ $column_header{quonumber} =
+ qq|<th><a class=listheading href=$href&sort=quonumber>|
+ . $locale->text('Quotation')
+ . qq|</a></th>|;
+ $column_header{name} =
+ qq|<th><a class=listheading href=$href&sort=name>$name</a></th>|;
+ $column_header{netamount} =
+ qq|<th class=listheading>| . $locale->text('Amount') . qq|</th>|;
+ $column_header{tax} =
+ qq|<th class=listheading>| . $locale->text('Tax') . qq|</th>|;
+ $column_header{amount} =
+ qq|<th class=listheading>| . $locale->text('Total') . qq|</th>|;
+ $column_header{curr} =
+ qq|<th class=listheading>| . $locale->text('Curr') . qq|</th>|;
+ $column_header{shipvia} =
+ qq|<th><a class=listheading href=$href&sort=shipvia>|
+ . $locale->text('Ship via')
+ . qq|</a></th>|;
+ $column_header{open} =
+ qq|<th class=listheading>| . $locale->text('O') . qq|</th>|;
+ $column_header{closed} =
+ qq|<th class=listheading>| . $locale->text('C') . qq|</th>|;
+
+ $column_header{employee} =
+ qq|<th><a class=listheading href=$href&sort=employee>$employee</a></th>|;
+
+ if ($form->{ $form->{vc} }) {
+ $option = $locale->text(ucfirst $form->{vc});
+ $option .= " : $form->{$form->{vc}}";
+ }
+ if ($form->{warehouse}) {
+ ($warehouse) = split /--/, $form->{warehouse};
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Warehouse');
+ $option .= " : $warehouse";
+ }
+ if ($form->{department}) {
+ $option .= "\n<br>" if ($option);
+ ($department) = split /--/, $form->{department};
+ $option .= $locale->text('Department') . " : $department";
+ }
+ if ($form->{transdatefrom}) {
+ $option .= "\n<br>"
+ . $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ }
+ if ($form->{transdateto}) {
+ $option .= "\n<br>"
+ . $locale->text('Bis') . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
+ }
+ if ($form->{open}) {
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Open');
+ }
+ if ($form->{closed}) {
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Closed');
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort and escape callback
+ $callback = $form->escape($callback . "&sort=$form->{sort}");
+
+ if (@{ $form->{OE} }) {
+ $sameitem = $form->{OE}->[0]->{ $form->{sort} };
+ }
+
+ $action = "edit";
+ $action = "ship_receive" if ($form->{type} =~ /(ship|receive)_order/);
+
+ $warehouse = $form->escape($form->{warehouse});
+
+ foreach $oe (@{ $form->{OE} }) {
+
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $oe->{ $form->{sort} }) {
+ &subtotal;
+ $sameitem = $oe->{ $form->{sort} };
+ }
+ }
+
+ map { $oe->{$_} *= $oe->{exchangerate} } (qw(netamount amount));
+
+ $column_data{netamount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $oe->{netamount}, 2, " ")
+ . "</td>";
+ $column_data{tax} = "<td align=right>"
+ . $form->format_amount(\%myconfig, $oe->{amount} - $oe->{netamount},
+ 2, " ")
+ . "</td>";
+ $column_data{amount} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $oe->{amount}, 2, " ") . "</td>";
+
+ $totalnetamount += $oe->{netamount};
+ $totalamount += $oe->{amount};
+
+ $subtotalnetamount += $oe->{netamount};
+ $subtotalamount += $oe->{amount};
+
+ $column_data{id} = "<td>$oe->{id}</td>";
+ $column_data{transdate} = "<td>$oe->{transdate} </td>";
+ $column_data{reqdate} = "<td>$oe->{reqdate} </td>";
+
+ $column_data{$ordnumber} =
+ "<td><a href=oe.pl?path=$form->{path}&action=$action&type=$form->{type}&id=$oe->{id}&warehouse=$warehouse&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&callback=$callback>$oe->{$ordnumber}</a></td>";
+ $column_data{name} = "<td>$oe->{name}</td>";
+
+ $column_data{employee} = "<td>$oe->{employee} </td>";
+ $column_data{shipvia} = "<td>$oe->{shipvia} </td>";
+
+ if ($oe->{closed}) {
+ $column_data{closed} = "<td align=center>X</td>";
+ $column_data{open} = "<td> </td>";
+ } else {
+ $column_data{closed} = "<td> </td>";
+ $column_data{open} = "<td align=center>X</td>";
+ }
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &subtotal;
+ }
+
+ # print totals
+ print qq|
+ <tr class=listtotal>|;
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{netamount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalnetamount, 2, " ") . "</th>";
+ $column_data{tax} = "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount - $totalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalamount, 2, " ") . "</th>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+ </td>
+ </table>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=vc value=$form->{vc}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+|;
+
+ if ($form->{type} !~ /(ship|receive)_order/) {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{netamount} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ")
+ . "</th>";
+ $column_data{tax} = "<td class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount,
+ 2, " ")
+ . "</th>";
+ $column_data{amount} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalamount, 2, " ") . "</th>";
+
+ $subtotalnetamount = 0;
+ $subtotalamount = 0;
+
+ print "
+ <tr class=listsubtotal>
+";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} =~ /_order$/) {
+ $form->isblank("transdate", $locale->text('Order Date missing!'));
+ } else {
+ $form->isblank("transdate", $locale->text('Quotation Date missing!'));
+ }
+
+ $msg = ucfirst $form->{vc};
+ $form->isblank($form->{vc}, $locale->text($msg . " missing!"));
+
+ # $locale->text('Customer missing!');
+ # $locale->text('Vendor missing!');
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
+ &validate_items;
+
+ # if the name changed get new values
+ if (&check_name($form->{vc})) {
+ &update;
+ exit;
+ }
+
+ $form->{id} = 0 if $form->{saveasnew};
+
+ # this is for the internal notes section for the [email] Subject
+ if ($form->{type} =~ /_order$/) {
+ if ($form->{type} eq 'sales_order') {
+ $form->{label} = $locale->text('Sales Order');
+
+ $numberfld = "sonumber";
+ $ordnumber = "ordnumber";
+ } else {
+ $form->{label} = $locale->text('Purchase Order');
+
+ $numberfld = "ponumber";
+ $ordnumber = "ordnumber";
+ }
+
+ $err = $locale->text('Cannot save order!');
+
+ } else {
+ if ($form->{type} eq 'sales_quotation') {
+ $form->{label} = $locale->text('Quotation');
+
+ $numberfld = "sqnumber";
+ $ordnumber = "quonumber";
+ } else {
+ $form->{label} = $locale->text('Request for Quotation');
+
+ $numberfld = "rfqnumber";
+ $ordnumber = "quonumber";
+ }
+
+ $err = $locale->text('Cannot save quotation!');
+
+ }
+
+ $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
+ unless $form->{$ordnumber};
+
+ $form->redirect(
+ $form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))
+ if (OE->save(\%myconfig, \%$form));
+ $form->error($err);
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ if ($form->{type} =~ /_order$/) {
+ $msg = $locale->text('Are you sure you want to delete Order Number');
+ $ordnumber = 'ordnumber';
+ } else {
+ $msg = $locale->text('Are you sure you want to delete Quotation Number');
+ $ordnumber = 'quonumber';
+ }
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action header);
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+<h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
+
+<h4>$msg $form->{$ordnumber}</h4>
+<p>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Yes') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub yes {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} =~ /_order$/) {
+ $msg = $locale->text('Order deleted!');
+ $err = $locale->text('Cannot delete order!');
+ } else {
+ $msg = $locale->text('Quotation deleted!');
+ $err = $locale->text('Cannot delete quotation!');
+ }
+
+ $form->redirect($msg) if (OE->delete(\%myconfig, \%$form, $spool));
+ $form->error($err);
+
+ $lxdebug->leave_sub();
+}
+
+sub invoice {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} =~ /_order$/) {
+ $form->isblank("ordnumber", $locale->text('Order Number missing!'));
+ $form->isblank("transdate", $locale->text('Order Date missing!'));
+
+ } else {
+ $form->isblank("quonumber", $locale->text('Quotation Number missing!'));
+ $form->isblank("transdate", $locale->text('Quotation Date missing!'));
+ $form->{ordnumber} = "";
+ }
+
+ # if the name changed get new values
+ if (&check_name($form->{vc})) {
+ &update;
+ exit;
+ }
+
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
+
+ if ( $form->{type} =~ /_order/
+ && $form->{currency} ne $form->{defaultcurrency}) {
+
+ # check if we need a new exchangerate
+ $buysell = ($form->{type} eq 'sales_order') ? "buy" : "sell";
+
+ $orddate = $form->current_date(\%myconfig);
+ $exchangerate =
+ $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate,
+ $buysell);
+
+ if (!$exchangerate) {
+ &backorder_exchangerate($orddate, $buysell);
+ exit;
+ }
+ }
+
+ # close orders/quotations
+ $form->{closed} = 1;
+ OE->save(\%myconfig, \%$form);
+
+ $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
+ $form->{duedate} =
+ $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
+
+ $form->{id} = '';
+ $form->{closed} = 0;
+ $form->{rowcount}--;
+ $form->{shipto} = 1;
+
+ if ($form->{type} =~ /_order$/) {
+ $form->{exchangerate} = $exchangerate;
+ &create_backorder;
+ }
+
+ if ( $form->{type} eq 'purchase_order'
+ || $form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Add Vendor Invoice');
+ $form->{script} = 'ir.pl';
+ $script = "ir";
+ $buysell = 'sell';
+ }
+ if ($form->{type} eq 'sales_order' || $form->{type} eq 'sales_quotation') {
+ $form->{title} = $locale->text('Add Sales Invoice');
+ $form->{script} = 'is.pl';
+ $script = "is";
+ $buysell = 'buy';
+ }
+
+ # bo creates the id, reset it
+ map { delete $form->{$_} }
+ qw(id subject message cc bcc printed emailed queued);
+ $form->{ $form->{vc} } =~ s/--.*//g;
+ $form->{type} = "invoice";
+
+ # locale messages
+ $locale = new Locale "$myconfig{countrycode}", "$script";
+
+ require "$form->{path}/$form->{script}";
+
+ map { $form->{"select$_"} = "" } ($form->{vc}, currency);
+
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(creditlimit creditremaining);
+
+ $currency = $form->{currency};
+ &invoice_links;
+
+ $form->{currency} = $currency;
+ $form->{exchangerate} = "";
+ $form->{forex} = "";
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{invdate}, $buysell
+ )));
+
+ $form->{creditremaining} -= ($form->{oldinvtotal} - $form->{ordtotal});
+
+ &prepare_invoice;
+
+ # format amounts
+ for $i (1 .. $form->{rowcount}) {
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"discount_$i"});
+
+ ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+ $dec = length $dec;
+ $decimalplaces = ($dec > 2) ? $dec : 2;
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+ $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit);
+
+ }
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub backorder_exchangerate {
+ $lxdebug->enter_sub();
+ my ($orddate, $buysell) = @_;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+|;
+
+ # delete action variable
+ map { delete $form->{$_} } qw(action header exchangerate);
+
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ $form->{title} = $locale->text('Add Exchangerate');
+
+ print qq|
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=hidden name=exchangeratedate value=$orddate>
+<input type=hidden name=buysell value=$buysell>
+
+<table width=100%>
+ <tr><th class=listtop>$form->{title}</th></tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Currency') . qq|</th>
+ <td>$form->{currency}</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Date') . qq|</th>
+ <td>$orddate</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Exchangerate') . qq|</th>
+ <td><input name=exchangerate size=11></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+<hr size=3 noshade>
+
+<br>
+<input type=hidden name=nextsub value=save_exchangerate>
+
+<input name=action class=submit type=submit value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_exchangerate {
+ $lxdebug->enter_sub();
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'));
+ $form->{exchangerate} =
+ $form->parse_amount(\%myconfig, $form->{exchangerate});
+ $form->save_exchangerate(\%myconfig, $form->{currency},
+ $form->{exchangeratedate},
+ $form->{exchangerate}, $form->{buysell});
+
+ &invoice;
+
+ $lxdebug->leave_sub();
+}
+
+sub create_backorder {
+ $lxdebug->enter_sub();
+
+ $form->{shipped} = 1;
+
+ # figure out if we need to create a backorder
+ # items aren't saved if qty != 0
+
+ for $i (1 .. $form->{rowcount}) {
+ $totalqty += $qty = $form->{"qty_$i"};
+ $totalship += $ship = $form->{"ship_$i"};
+
+ $form->{"qty_$i"} = $qty - $ship;
+ }
+
+ if ($totalship == 0) {
+ map { $form->{"ship_$_"} = $form->{"qty_$_"} } (1 .. $form->{rowcount});
+ $form->{ordtotal} = 0;
+ $form->{shipped} = 0;
+ return;
+ }
+
+ if ($totalqty == $totalship) {
+ map { $form->{"qty_$_"} = $form->{"ship_$_"} } (1 .. $form->{rowcount});
+ $form->{ordtotal} = 0;
+ return;
+ }
+
+ @flds = (
+ qw(partnumber description qty ship unit sellprice discount id inventory_accno bin income_accno expense_accno listprice assembly taxaccounts partsgroup)
+ );
+
+ for $i (1 .. $form->{rowcount}) {
+ map {
+ $form->{"${_}_$i"} =
+ $form->format_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(sellprice discount);
+ }
+
+ OE->save(\%myconfig, \%$form);
+
+ # rebuild rows for invoice
+ @a = ();
+ $count = 0;
+
+ for $i (1 .. $form->{rowcount}) {
+ $form->{"qty_$i"} = $form->{"ship_$i"};
+
+ if ($form->{"qty_$i"}) {
+ push @a, {};
+ $j = $#a;
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{rowcount});
+ $form->{rowcount} = $count;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_as_new {
+ $lxdebug->enter_sub();
+
+ $form->{saveasnew} = 1;
+ $form->{closed} = 0;
+ map { delete $form->{$_} } qw(printed emailed queued);
+
+ &save;
+
+ $lxdebug->leave_sub();
+}
+
+sub purchase_order {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add Purchase Order');
+ $form->{vc} = "vendor";
+ $form->{type} = "purchase_order";
+
+ &poso;
+
+ $lxdebug->leave_sub();
+}
+
+sub sales_order {
+ $lxdebug->enter_sub();
+
+ if ( $form->{type} eq 'sales_quotation'
+ || $form->{type} eq 'request_quotation') {
+ $form->{closed} = 1;
+ OE->save(\%myconfig, \%$form);
+ }
+
+ ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
+
+ $form->{title} = $locale->text('Add Sales Order');
+ $form->{vc} = "customer";
+ $form->{type} = "sales_order";
+
+ &poso;
+
+ $lxdebug->leave_sub();
+}
+
+sub poso {
+ $lxdebug->enter_sub();
+
+ $form->{transdate} = $form->current_date(\%myconfig);
+ delete $form->{duedate};
+
+ $form->{closed} = 0;
+
+ # reset
+ map { delete $form->{$_} }
+ qw(id subject message cc bcc printed emailed queued customer vendor creditlimit creditremaining discount tradediscount oldinvtotal);
+
+ &order_links;
+
+ &prepare_order;
+
+ # format amounts
+ for $i (1 .. $form->{rowcount} - 1) {
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit);
+ }
+
+ map { $form->{$_} = $form->format_amount(\%myconfig, $form->{$_}, 0, "0") }
+ qw(creditlimit creditremaining);
+
+ &update;
+
+ $lxdebug->leave_sub();
+}
+
+sub ship_receive {
+ $lxdebug->enter_sub();
+
+ &order_links;
+
+ &prepare_order;
+
+ OE->get_warehouses(\%myconfig, \%$form);
+
+ # warehouse
+ if (@{ $form->{all_warehouses} }) {
+ $form->{selectwarehouse} = "<option>\n";
+
+ map { $form->{selectwarehouse} .= "<option>$_->{description}--$_->{id}\n" }
+ (@{ $form->{all_warehouses} });
+
+ if ($form->{warehouse}) {
+ $form->{selectwarehouse} = "<option>$form->{warehouse}";
+ }
+ }
+
+ $form->{shippingdate} = $form->current_date(\%myconfig);
+ $form->{"$form->{vc}"} =~ s/--.*//;
+
+ @flds = ();
+ @a = ();
+ $count = 0;
+ foreach $key (keys %$form) {
+ if ($key =~ /_1$/) {
+ $key =~ s/_1//;
+ push @flds, $key;
+ }
+ }
+
+ for $i (1 .. $form->{rowcount}) {
+
+ # undo formatting from prepare_order
+ map {
+ $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+ } qw(qty ship);
+ $n = ($form->{"qty_$i"} -= $form->{"ship_$i"});
+ if (abs($n) > 0
+ && ($form->{"inventory_accno_$i"} || $form->{"assembly_$i"})) {
+ $form->{"ship_$i"} = "";
+ $form->{"serialnumber_$i"} = "";
+
+ push @a, {};
+ $j = $#a;
+
+ map { $a[$j]->{$_} = $form->{"${_}_$i"} } @flds;
+ $count++;
+ }
+ }
+
+ $form->redo_rows(\@flds, \@a, $count, $form->{rowcount});
+ $form->{rowcount} = $count;
+
+ &display_ship_receive;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_ship_receive {
+ $lxdebug->enter_sub();
+
+ $vclabel = ucfirst $form->{vc};
+ $vclabel = $locale->text($vclabel);
+
+ $form->{rowcount}++;
+
+ if ($form->{vc} eq 'customer') {
+ $form->{title} = $locale->text('Ship Merchandise');
+ $shipped = $locale->text('Shipping Date');
+ } else {
+ $form->{title} = $locale->text('Receive Merchandise');
+ $shipped = $locale->text('Date Received');
+ }
+
+ # set option selected
+ foreach $item (warehouse, employee) {
+ $form->{"select$item"} =~ s/ selected//;
+ $form->{"select$item"} =~
+ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
+ }
+
+ $warehouse = qq|
+ <tr>
+ <th align=right>| . $locale->text('Warehouse') . qq|</th>
+ <td><select name=warehouse>$form->{selectwarehouse}</select></td>
+ <input type=hidden name=selectwarehouse value="$form->{selectwarehouse}">
+ </tr>
+| if $form->{selectwarehouse};
+
+ $employee = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
+ <td><select name=employee>$form->{selectemployee}</select></td>
+ <input type=hidden name=selectemployee value="$form->{selectemployee}">
+ </tr>
+|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+
+<input type=hidden name=display_form value=display_ship_receive>
+
+<input type=hidden name=type value=$form->{type}>
+<input type=hidden name=media value=$form->{media}>
+<input type=hidden name=format value=$form->{format}>
+
+<input type=hidden name=queued value="$form->{queued}">
+<input type=hidden name=printed value="$form->{printed}">
+<input type=hidden name=emailed value="$form->{emailed}">
+
+<input type=hidden name=vc value=$form->{vc}>
+
+<table width=100%>
+ <tr class=listtop>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right>$vclabel</th>
+ <td colspan=3>$form->{$form->{vc}}</td>
+ <input type=hidden name=$form->{vc} value="$form->{$form->{vc}}">
+ <input type=hidden name="$form->{vc}_id" value=$form->{"$form->{vc}_id"}>
+ </tr>
+ $department
+ <tr>
+ <th align=right>| . $locale->text('Shipping Point') . qq|</th>
+ <td colspan=3>
+ <input name=shippingpoint size=35 value="$form->{shippingpoint}">
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Ship via') . qq|</th>
+ <td colspan=3>
+ <input name=shipvia size=35 value="$form->{shipvia}">
+ </tr>
+ $warehouse
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ $employee
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
+ <td>$form->{ordnumber}</td>
+ <input type=hidden name=ordnumber value="$form->{ordnumber}">
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Order Date') . qq|</th>
+ <td>$form->{transdate}</td>
+ <input type=hidden name=transdate value=$form->{transdate}>
+ </tr>
+ <tr>
+ <th align=right nowrap>$shipped</th>
+ <td><input name=shippingdate size=11 value=$form->{shippingdate}></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+<!-- shipto are in hidden variables -->
+
+<input type=hidden name=shiptoname value="$form->{shiptoname}">
+<input type=hidden name=shiptostreet value="$form->{shiptostreet}">
+<input type=hidden name=shiptozipcode value="$form->{shiptozipcode}">
+<input type=hidden name=shiptocity value="$form->{shiptocity}">
+<input type=hidden name=shiptocountry value="$form->{shiptocountry}">
+<input type=hidden name=shiptocontact value="$form->{shiptocontact}">
+<input type=hidden name=shiptophone value="$form->{shiptophone}">
+<input type=hidden name=shiptofax value="$form->{shiptofax}">
+<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
+
+<!-- email variables -->
+<input type=hidden name=message value="$form->{message}">
+<input type=hidden name=email value="$form->{email}">
+<input type=hidden name=subject value="$form->{subject}">
+<input type=hidden name=cc value="$form->{cc}">
+<input type=hidden name=bcc value="$form->{bcc}">
+
+|;
+
+ @column_index =
+ (partnumber, description, qty, ship, unit, bin, serialnumber);
+
+ if ($form->{type} eq "ship_order") {
+ $column_data{ship} =
+ qq|<th class=listheading align=center width="auto">|
+ . $locale->text('Ship')
+ . qq|</th>|;
+ }
+ if ($form->{type} eq "receive_order") {
+ $column_data{ship} =
+ qq|<th class=listheading align=center width="auto">|
+ . $locale->text('Recd')
+ . qq|</th>|;
+ }
+
+ my $colspan = $#column_index + 1;
+
+ $column_data{partnumber} =
+ qq|<th class=listheading nowrap>| . $locale->text('Number') . qq|</th>|;
+ $column_data{description} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_data{qty} =
+ qq|<th class=listheading nowrap>| . $locale->text('Qty') . qq|</th>|;
+ $column_data{unit} =
+ qq|<th class=listheading nowrap>| . $locale->text('Unit') . qq|</th>|;
+ $column_data{bin} =
+ qq|<th class=listheading nowrap>| . $locale->text('Bin') . qq|</th>|;
+ $column_data{serialnumber} =
+ qq|<th class=listheading nowrap>|
+ . $locale->text('Serial No.')
+ . qq|</th>|;
+
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ for $i (1 .. $form->{rowcount} - 1) {
+
+ # undo formatting
+ $form->{"ship_$i"} = $form->parse_amount(\%myconfig, $form->{"ship_$i"});
+
+ # convert " to "
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit bin serialnumber);
+
+ $description = $form->{"description_$i"};
+ $description =~ s/\n/<br>/g;
+
+ $column_data{partnumber} =
+ qq|<td>$form->{"partnumber_$i"}<input type=hidden name="partnumber_$i" value="$form->{"partnumber_$i"}"></td>|;
+ $column_data{description} =
+ qq|<td>$description<input type=hidden name="description_$i" value="$form->{"description_$i"}"></td>|;
+ $column_data{qty} =
+ qq|<td align=right>|
+ . $form->format_amount(\%myconfig, $form->{"qty_$i"})
+ . qq|<input type=hidden name="qty_$i" value="$form->{"qty_$i"}"></td>|;
+ $column_data{ship} =
+ qq|<td align=right><input name="ship_$i" size=5 value=|
+ . $form->format_amount(\%myconfig, $form->{"ship_$i"})
+ . qq|></td>|;
+ $column_data{unit} =
+ qq|<td>$form->{"unit_$i"}<input type=hidden name="unit_$i" value="$form->{"unit_$i"}"></td>|;
+ $column_data{bin} =
+ qq|<td>$form->{"bin_$i"}<input type=hidden name="bin_$i" value="$form->{"bin_$i"}"></td>|;
+
+ $column_data{serialnumber} =
+ qq|<td><input name="serialnumber_$i" size=15 value="$form->{"serialnumber_$i"}"></td>|;
+
+ print qq|
+ <tr valign=top>|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+<input type=hidden name="orderitems_id_$i" value=$form->{"orderitems_id_$i"}>
+<input type=hidden name="id_$i" value=$form->{"id_$i"}>
+<input type=hidden name="assembly_$i" value="$form->{"assembly_$i"}">
+<input type=hidden name="partsgroup_$i" value="$form->{"partsgroup_$i"}">
+
+|;
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <td>
+|;
+
+ $form->{copies} = 1;
+
+ &print_options;
+
+ print qq|
+ </td>
+ </tr>
+</table>
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Update') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+|;
+
+ if ($form->{type} eq 'ship_order') {
+ print qq|
+<input class=submit type=submit name=action value="|
+ . $locale->text('Ship to') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+|;
+ }
+
+ print qq|
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Done') . qq|">
+|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+<input type=hidden name=rowcount value=$form->{rowcount}>
+
+<input name=callback type=hidden value="$callback">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub done {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'ship_order') {
+ $form->isblank("shippingdate", $locale->text('Shipping Date missing!'));
+ } else {
+ $form->isblank("shippingdate", $locale->text('Date received missing!'));
+ }
+
+ $total = 0;
+ map {
+ $total += $form->{"ship_$_"} =
+ $form->parse_amount(\%myconfig, $form->{"ship_$_"})
+ } (1 .. $form->{rowcount} - 1);
+
+ $form->error($locale->text('Nothing entered!')) unless $total;
+
+ $form->redirect($locale->text('Inventory saved!'))
+ if OE->save_inventory(\%myconfig, \%$form);
+ $form->error($locale->text('Could not save!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub search_transfer {
+ $lxdebug->enter_sub();
+
+ OE->get_warehouses(\%myconfig, \%$form);
+
+ # warehouse
+ if (@{ $form->{all_warehouses} }) {
+ $form->{selectwarehouse} = "<option>\n";
+ $form->{warehouse} = qq|$form->{warehouse}--$form->{warehouse_id}|;
+
+ map { $form->{selectwarehouse} .= "<option>$_->{description}--$_->{id}\n" }
+ (@{ $form->{all_warehouses} });
+ } else {
+ $form->error($locale->text('Nothing to transfer!'));
+ }
+
+ $form->{title} = $locale->text('Transfer Inventory');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Transfer to') . qq|</th>
+ <td><select name=warehouse>$form->{selectwarehouse}</select></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Part Number') . qq|</th>
+ <td><input name=partnumber size=20></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap="true">| . $locale->text('Description') . qq|</th>
+ <td><input name=description size=40></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Group') . qq|</th>
+ <td><input name=partsgroup size=20></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<input type=hidden name=sort value=partnumber>
+<input type=hidden name=nextsub value=list_transfer>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_transfer {
+ $lxdebug->enter_sub();
+
+ OE->get_inventory(\%myconfig, \%$form);
+
+ $partnumber = $form->escape($form->{partnumber});
+ $warehouse = $form->escape($form->{warehouse});
+ $description = $form->escape($form->{description});
+ $partsgroup = $form->escape($form->{partsgroup});
+
+ # construct href
+ $href =
+ "$form->{script}?path=$form->{path}&action=list_transfer&partnumber=$partnumber&warehouse=$warehouse&description=$description&partsgroup=$partsgroup&login=$form->{login}&password=$form->{password}";
+
+ # construct callback
+ $partnumber = $form->escape($form->{partnumber}, 1);
+ $warehouse = $form->escape($form->{warehouse}, 1);
+ $description = $form->escape($form->{description}, 1);
+ $partsgroup = $form->escape($form->{partsgroup}, 1);
+
+ $callback =
+ "$form->{script}?path=$form->{path}&action=list_transfer&partnumber=$partnumber&warehouse=$warehouse&description=$description&partsgroup=$partsgroup&login=$form->{login}&password=$form->{password}";
+
+ @column_index =
+ $form->sort_columns(
+ qw(partnumber description partsgroup make model warehouse qty transfer));
+
+ $column_header{partnumber} =
+ qq|<th><a class=listheading href=$href&sort=partnumber>|
+ . $locale->text('Part Number')
+ . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th><a class=listheading href=$href&sort=description>|
+ . $locale->text('Description')
+ . qq|</a></th>|;
+ $column_header{partsgroup} =
+ qq|<th><a class=listheading href=$href&sort=partsgroup>|
+ . $locale->text('Group')
+ . qq|</a></th>|;
+ $column_header{warehouse} =
+ qq|<th><a class=listheading href=$href&sort=warehouse>|
+ . $locale->text('From')
+ . qq|</a></th>|;
+ $column_header{qty} =
+ qq|<th><a class=listheading>| . $locale->text('Qty') . qq|</a></th>|;
+ $column_header{transfer} =
+ qq|<th><a class=listheading>| . $locale->text('Transfer') . qq|</a></th>|;
+
+ $option = $locale->text('Transfer to');
+
+ ($warehouse, $warehouse_id) = split /--/, $form->{warehouse};
+
+ if ($form->{warehouse}) {
+ $option .= " : $warehouse";
+ }
+ if ($form->{partnumber}) {
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Part Number') . " : $form->{partnumber}";
+ }
+ if ($form->{description}) {
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Description') . " : $form->{description}";
+ }
+ if ($form->{partsgroup}) {
+ $option .= "\n<br>" if ($option);
+ $option .= $locale->text('Group') . " : $form->{partsgroup}";
+ }
+
+ $form->{title} = $locale->text('Transfer Inventory');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=warehouse_id value=$warehouse_id>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ if (@{ $form->{all_inventory} }) {
+ $sameitem = $form->{all_inventory}->[0]->{ $form->{sort} };
+ }
+
+ $i = 0;
+ foreach $ref (@{ $form->{all_inventory} }) {
+
+ $i++;
+
+ $column_data{partnumber} =
+ qq|<td><input type=hidden name="id_$i" value=$ref->{id}>$ref->{partnumber}</td>|;
+ $column_data{description} = "<td>$ref->{description} </td>";
+ $column_data{partsgroup} = "<td>$ref->{partsgroup} </td>";
+ $column_data{warehouse} =
+ qq|<td><input type=hidden name="warehouse_id_$i" value=$ref->{warehouse_id}>$ref->{warehouse} </td>|;
+ $column_data{qty} =
+ qq|<td><input type=hidden name="qty_$i" value=$ref->{qty}>|
+ . $form->format_amount(\%myconfig, $ref->{qty})
+ . qq|</td>|;
+ $column_data{transfer} = qq|<td><input name="transfer_$i" size=4></td>|;
+
+ $j++;
+ $j %= 2;
+ print "
+ <tr class=listrow$j>";
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+
+<input name=callback type=hidden value="$callback">
+
+<input type=hidden name=rowcount value=$i>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Transfer') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub transfer {
+ $lxdebug->enter_sub();
+
+ $form->redirect($locale->text('Inventory transferred!'))
+ if OE->transfer(\%myconfig, \%$form);
+ $form->error($locale->text('Could not transfer Inventory!'));
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# project administration
+# partsgroup administration
+#
+#======================================================================
+
+use SL::PE;
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ # construct callback
+ $form->{callback} =
+ "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &{"form_$form->{type}_header"};
+ &{"form_$form->{type}_footer"};
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ if ($form->{type} eq 'project') {
+ PE->get_project(\%myconfig, \%$form);
+ }
+ if ($form->{type} eq 'partsgroup') {
+ PE->get_partsgroup(\%myconfig, \%$form);
+ }
+
+ &{"form_$form->{type}_header"};
+ &{"form_$form->{type}_footer"};
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'project') {
+ $report = "project_report";
+ $sort = 'projectnumber';
+ $form->{title} = $locale->text('Projects');
+
+ $number = qq|
+ <tr>
+ <th align=right width=1%>| . $locale->text('Number') . qq|</th>
+ <td><input name=projectnumber size=20></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td><input name=description size=60></td>
+ </tr>
+|;
+
+ }
+ if ($form->{type} eq 'partsgroup') {
+ $report = "partsgroup_report";
+ $sort = 'partsgroup';
+ $form->{title} = $locale->text('Groups');
+
+ $number = qq|
+ <tr>
+ <th align=right width=1%>| . $locale->text('Group') . qq|</th>
+ <td><input name=partsgroup size=20></td>
+ </tr>
+|;
+
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=sort value=$sort>
+<input type=hidden name=type value=$form->{type}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ $number
+ <tr>
+ <td></td>
+ <td><input name=status class=radio type=radio value=all checked> |
+ . $locale->text('All') . qq|
+ <input name=status class=radio type=radio value=orphaned> |
+ . $locale->text('Orphaned')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=$report>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub project_report {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->unescape($form->{$_}) }
+ (projectnumber, description);
+ PE->projects(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=project_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
+ $href = $callback;
+
+ if ($form->{status} eq 'all') {
+ $option = $locale->text('All');
+ }
+ if ($form->{status} eq 'orphaned') {
+ $option .= $locale->text('Orphaned');
+ }
+ if ($form->{projectnumber}) {
+ $href .= "&projectnumber=" . $form->escape($form->{projectnumber});
+ $callback .= "&projectnumber=$form->{projectnumber}";
+ $option .=
+ "\n<br>" . $locale->text('Project') . " : $form->{projectnumber}";
+ }
+ if ($form->{description}) {
+ $href .= "&description=" . $form->escape($form->{description});
+ $callback .= "&description=$form->{description}";
+ $option .=
+ "\n<br>" . $locale->text('Description') . " : $form->{description}";
+ }
+
+ @column_index = $form->sort_columns(qw(projectnumber description));
+
+ $column_header{projectnumber} =
+ qq|<th><a class=listheading href=$href&sort=projectnumber>|
+ . $locale->text('Number')
+ . qq|</a></th>|;
+ $column_header{description} =
+ qq|<th><a class=listheading href=$href&sort=description>|
+ . $locale->text('Description')
+ . qq|</a></th>|;
+
+ $form->{title} = $locale->text('Projects');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # escape callback
+ $form->{callback} = $callback .= "&sort=$form->{sort}";
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ foreach $ref (@{ $form->{project_list} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $column_data{projectnumber} =
+ qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{projectnumber}</td>|;
+ $column_data{description} = qq|<td>$ref->{description} </td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print "
+ </tr>
+";
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=$form->{type}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_project_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Project");
+
+ # $locale->text('Add Project')
+ # $locale->text('Edit Project')
+
+ $form->{description} =~ s/\"/"/g;
+
+ if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
+ $description =
+ qq|<textarea name="description" rows=$rows cols=60 style="width: 100%" wrap=soft>$form->{description}</textarea>|;
+ } else {
+ $description =
+ qq|<input name=description size=60 value="$form->{description}">|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=project>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Number') . qq|</th>
+ <td><input name=projectnumber size=20 value="$form->{projectnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Description') . qq|</th>
+ <td>$description</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_project_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br><input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">
+|;
+
+ if ($form->{id} && $form->{orphaned}) {
+ print qq|
+<input type=submit class=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} eq 'project') {
+ $form->isblank("projectnumber", $locale->text('Project Number missing!'));
+ PE->save_project(\%myconfig, \%$form);
+ $form->redirect($locale->text('Project saved!'));
+ }
+ if ($form->{type} eq 'partsgroup') {
+ $form->isblank("partsgroup", $locale->text('Group missing!'));
+ PE->save_partsgroup(\%myconfig, \%$form);
+ $form->redirect($locale->text('Group saved!'));
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+
+ PE->delete_tuple(\%myconfig, \%$form);
+
+ if ($form->{type} eq 'project') {
+ $form->redirect($locale->text('Project deleted!'));
+ }
+ if ($form->{type} eq 'partsgroup') {
+ $form->redirect($locale->text('Group deleted!'));
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
+sub partsgroup_report {
+ $lxdebug->enter_sub();
+
+ map { $form->{$_} = $form->unescape($form->{$_}) } (partsgroup);
+ PE->partsgroups(\%myconfig, \%$form);
+
+ $callback =
+ "$form->{script}?action=partsgroup_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
+
+ if ($form->{status} eq 'all') {
+ $option = $locale->text('All');
+ }
+ if ($form->{status} eq 'orphaned') {
+ $option .= $locale->text('Orphaned');
+ }
+ if ($form->{partsgroup}) {
+ $callback .= "&partsgroup=$form->{partsgroup}";
+ $option .= "\n<br>" . $locale->text('Group') . " : $form->{partsgroup}";
+ }
+
+ @column_index = $form->sort_columns(qw(partsgroup));
+
+ $column_header{partsgroup} =
+ qq|<th class=listheading width=90%>| . $locale->text('Group') . qq|</th>|;
+
+ $form->{title} = $locale->text('Groups');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # escape callback
+ $form->{callback} = $callback;
+
+ # escape callback for href
+ $callback = $form->escape($callback);
+
+ foreach $ref (@{ $form->{item_list} }) {
+
+ $i++;
+ $i %= 2;
+
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
+
+ $column_data{partsgroup} =
+ qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{partsgroup}</td>|;
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print "
+ </tr>
+";
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=$form->{type}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+ </form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_partsgroup_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Group");
+
+ # $locale->text('Add Group')
+ # $locale->text('Edit Group')
+
+ $form->{partsgroup} =~ s/\"/"/g;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=$form->{type}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right>| . $locale->text('Group') . qq|</th>
+
+ <td><input name=partsgroup size=30 value="$form->{partsgroup}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub form_partsgroup_footer {
+ $lxdebug->enter_sub();
+
+ print qq|
+
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br><input type=submit class=submit name=action value="|
+ . $locale->text('Save') . qq|">
+|;
+
+ if ($form->{id} && $form->{orphaned}) {
+ print qq|
+<input type=submit class=submit name=action value="|
+ . $locale->text('Delete') . qq|">|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# Account reconciliation module
+#
+#======================================================================
+
+use SL::RC;
+
+1;
+
+# end of main
+
+sub reconciliation {
+ $lxdebug->enter_sub();
+
+ RC->paymentaccounts(\%myconfig, \%$form);
+
+ $selection = "";
+ map { $selection .= "<option>$_->{accno}--$_->{description}\n" }
+ @{ $form->{PR} };
+
+ $form->{title} = $locale->text('Reconciliation');
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Account') . qq|</th>
+ <td colspan=3><select name=accno>$selection</select>
+ </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}"></td>
+ <th align=right>| . $locale->text('To') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<input type=hidden name=nextsub value=get_payments>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
+sub get_payments {
+ $lxdebug->enter_sub();
+
+ ($form->{accno}, $form->{account}) = split /--/, $form->{accno};
+
+ RC->payment_transactions(\%myconfig, \%$form);
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub display_form {
+ $lxdebug->enter_sub();
+
+ @column_index = qw(cleared transdate source name credit debit balance);
+
+ $column_header{cleared} = "<th> </th>";
+ $column_header{source} =
+ "<th class=listheading>" . $locale->text('Source') . "</a></th>";
+ $column_header{name} =
+ "<th class=listheading>" . $locale->text('Description') . "</a></th>";
+ $column_header{transdate} =
+ "<th class=listheading>" . $locale->text('Date') . "</a></th>";
+
+ if ($form->{category} eq 'A') {
+ $column_header{debit} =
+ "<th class=listheading>" . $locale->text('Deposit') . "</a></th>";
+ $column_header{credit} =
+ "<th class=listheading>" . $locale->text('Payment') . "</a></th>";
+ } else {
+ $column_header{debit} =
+ "<th class=listheading>" . $locale->text('Decrease') . "</a></th>";
+ $column_header{credit} =
+ "<th class=listheading>" . $locale->text('Increase') . "</a></th>";
+ }
+
+ $column_header{balance} =
+ "<th class=listheading>" . $locale->text('Balance') . "</a></th>";
+
+ if ($form->{fromdate}) {
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{fromdate}, 1);
+ }
+ if ($form->{todate}) {
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('To') . " "
+ . $locale->date(\%myconfig, $form->{todate}, 1);
+ }
+
+ $form->{title} = "$form->{accno}--$form->{account}";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $ml = ($form->{category} eq 'A') ? -1 : 1;
+ $form->{beginningbalance} *= $ml;
+ $clearedbalance = $balance = $form->{beginningbalance};
+ $i = 0;
+ $id = 0;
+
+ map { $column_data{$_} = "<td> </td>" }
+ qw(cleared transdate source name debit credit);
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $balance, 2, 0) . "</td>";
+ $j = 0;
+ print qq|
+ <tr class=listrow$j>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (@{ $form->{PR} }) {
+
+ $balance += $ref->{amount} * $ml;
+ $cleared += $ref->{amount} * $ml if $ref->{cleared};
+
+ $column_data{name} = "<td>$ref->{name} </td>";
+ $column_data{source} = qq|<td>$ref->{source} </a>
+ </td>|;
+ $column_data{transdate} = "<td>$ref->{transdate} </td>";
+
+ $column_data{debit} = "<td> </td>";
+ $column_data{credit} = "<td> </td>";
+
+ if ($ref->{amount} < 0) {
+ $totaldebits += $ref->{amount} * -1;
+ $column_data{debit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{amount} * -1, 2, " ")
+ . "</td>";
+ } else {
+ $totalcredits += $ref->{amount};
+ $column_data{credit} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $ref->{amount}, 2, " ")
+ . "</td>";
+ }
+
+ $column_data{balance} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $balance, 2, 0) . "</td>";
+
+ if ($ref->{fx_transaction}) {
+ $i++ unless $id == $ref->{id};
+ $fx_transaction = 1;
+ $fx += $ref->{amount} * $ml;
+ $column_data{cleared} = qq|<td align=center>
+ <input type=hidden name="fxoid_$i" value=$ref->{oid}>
+ </td>|;
+ } else {
+ $i++ unless ($fx_transaction && $id == $ref->{id});
+ $fx_transaction = 0;
+ $column_data{cleared} = qq|<td>
+ <input name="cleared_$i" type=checkbox class=checkbox value=1 $ref->{cleared}>
+ <input type=hidden name="oid_$i" value=$ref->{oid}>
+ </td>|;
+ }
+ $id = $ref->{id};
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ # print totals
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{debit} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totaldebits, 2, " ") . "</th>";
+ $column_data{credit} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalcredits, 2, " ") . "</th>";
+
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ $form->{statementbalance} =
+ $form->parse_amount(\%myconfig, $form->{statementbalance});
+ $difference =
+ $form->format_amount(\%myconfig,
+ $form->{statementbalance} - $clearedbalance - $cleared,
+ 2, 0);
+
+ $form->{statementbalance} =
+ $form->format_amount(\%myconfig, $form->{statementbalance}, 2, 0);
+
+ $clearedbalance = $form->format_amount(\%myconfig, $clearedbalance, 2, 0);
+
+ if ($fx) {
+ $fx = $form->format_amount(\%myconfig, $fx, 2, 0);
+ $exchdiff = qq|
+ <th align=right nowrap>|
+ . $locale->text('Exchangerate Difference')
+ . qq|</th>
+ <td width=10%></td>
+ <td align=right>$fx</td>
+|;
+ }
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Cleared Balance') . qq|</th>
+ <td width=10%></td>
+ <td align=right>$clearedbalance</td>
+ </tr>
+ <tr>
+ $exchdiff
+ </tr>
+ </table>
+ </td>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Statement Balance') . qq|</th>
+ <td width=10%></td>
+ <td align=right><input name=statementbalance size=11 value=$form->{statementbalance}></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Difference') . qq|</th>
+ <td width=10%></td>
+ <td align=right><input name=null size=11 value=$difference></td>
+ <input type=hidden name=difference value=$difference>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=rowcount value=$i>
+<input type=hidden name=accno value=$form->{accno}>
+<input type=hidden name=account value="$form->{account}">
+
+<input type=hidden name=fromdate value=$form->{fromdate}>
+<input type=hidden name=todate value=$form->{todate}>
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input type=submit class=submit name=action value="|
+ . $locale->text('Update') . qq|">
+<input type=submit class=submit name=action value="|
+ . $locale->text('Select all') . qq|">
+<input type=submit class=submit name=action value="|
+ . $locale->text('Done') . qq|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update {
+ $lxdebug->enter_sub();
+
+ RC->payment_transactions(\%myconfig, \%$form);
+
+ foreach $ref (@{ $form->{PR} }) {
+ if (!$ref->{fx_transaction}) {
+ $i++;
+ $ref->{cleared} = ($form->{"cleared_$i"}) ? "checked" : "";
+ }
+ }
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub select_all {
+ $lxdebug->enter_sub();
+
+ RC->payment_transactions(\%myconfig, \%$form);
+
+ map { $_->{cleared} = "checked" unless $_->{fx_transaction} }
+ @{ $form->{PR} };
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub done {
+ $lxdebug->enter_sub();
+
+ $form->{callback} =
+ "$form->{script}?path=$form->{path}&action=reconciliation&login=$form->{login}&password=$form->{password}";
+
+ $form->error($locale->text('Out of balance!')) if ($form->{difference} *= 1);
+
+ RC->reconcile(\%myconfig, \%$form);
+ $form->redirect;
+
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (c) 1998-2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Antonio Gallardo <agssa@ibw.com.ni>
+# Benjamin Lee <benjaminlee@consultant.com>
+# Philip Reetz <p.reetz@linet-services.de>
+# Udo Spallek
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# module for preparing Income Statement and Balance Sheet
+#
+#======================================================================
+
+require "$form->{path}/arap.pl";
+
+use SL::PE;
+use SL::RP;
+
+1;
+
+# end of main
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+
+# $locale->text('Balance Sheet')
+# $locale->text('Income Statement')
+# $locale->text('Trial Balance')
+# $locale->text('AR Aging')
+# $locale->text('AP Aging')
+# $locale->text('Tax collected')
+# $locale->text('Tax paid')
+# $locale->text('Receipts')
+# $locale->text('Payments')
+# $locale->text('Project Transactions')
+# $locale->text('Non-taxable Sales')
+# $locale->text('Non-taxable Purchases')
+
+sub report {
+ $lxdebug->enter_sub();
+
+ %title = ('balance_sheet' => 'Balance Sheet',
+ 'income_statement' => 'Income Statement',
+ 'trial_balance' => 'Trial Balance',
+ 'ar_aging' => 'AR Aging',
+ 'ap_aging' => 'Offene Verbindlichkeiten',
+ 'tax_collected' => 'Tax collected',
+ 'tax_paid' => 'Tax paid',
+ 'nontaxable_sales' => 'Non-taxable Sales',
+ 'nontaxable_purchases' => 'Non-taxable Purchases',
+ 'receipts' => 'Receipts',
+ 'payments' => 'Payments',
+ 'projects' => 'Project Transactions',
+ 'bwa' => 'Betriebswirtschaftliche Auswertung',
+ 'ustva' => 'Umsatzsteuervoranmeldung',);
+
+ $form->{title} = $locale->text($title{ $form->{report} });
+
+ $accrual = ($eur) ? "" : "checked";
+ $cash = ($eur) ? "checked" : "";
+
+ ($null, $null, $null, $null, $null, $year, $null, $null, $null) =
+ localtime();
+ $year += 1900;
+
+ # get departments
+ $form->all_departments(\%myconfig);
+ if (@{ $form->{all_departments} }) {
+ $form->{selectdepartment} = "<option>\n";
+
+ map {
+ $form->{selectdepartment} .=
+ "<option>$_->{description}--$_->{id}\n"
+ } (@{ $form->{all_departments} });
+ }
+
+ $department = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Department') . qq|</th>
+ <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
+ </tr>
+| if $form->{selectdepartment};
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{report} eq "ustva") {
+ $department = "";
+ } else {
+ if ($form->{report} eq "balance_sheet") {
+ $name_1 = "compareasofdate";
+ $id_1 = "compareasofdate";
+ $value_1 = "";
+ $trigger_1 = "trigger1";
+ $name_2 = "asofdate";
+ $id_2 = "asofdate";
+ $value_2 = "$form->{asofdate}";
+ $trigger_2 = "trigger2";
+ } elsif ($form->{report} =~ /(receipts|payments)$/) {
+ $name_1 = "fromdate";
+ $id_1 = "fromdate";
+ $value_1 = "$form->{fromdate}";
+ $trigger_1 = "trigger1";
+ $name_2 = "todate";
+ $id_2 = "todate";
+ $value_2 = "";
+ $trigger_2 = "trigger2";
+ } else {
+ if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
+ $name_1 = "";
+ $id_1 = "";
+ $value_1 = "";
+ $trigger_1 = "";
+ $name_2 = "todate";
+ $id_2 = "todate";
+ $value_2 = "";
+ $trigger_2 = "trigger2";
+
+ } else {
+ $name_1 = "fromdate";
+ $id_1 = "fromdate";
+ $value_1 = "$form->{fromdate}";
+ $trigger_1 = "trigger1";
+ $name_2 = "todate";
+ $id_2 = "todate";
+ $value_2 = "";
+ $trigger_2 = "trigger2";
+ }
+ }
+ }
+
+ # with JavaScript Calendar
+ if ($form->{jsscript}) {
+ if ($name_1 eq "") {
+
+ $button1 = qq|
+ <input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}">|;
+ $button1_2 = qq|
+ <input type=button name=$name_2 id="$trigger_2" value=|
+ . $locale->text('button') . qq|>|;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "$name_2", "BR", "$trigger_2", "",
+ "", "");
+ } else {
+ $button1 = qq|
+ <input name=$name_1 id=$id_1 size=11 title="$myconfig{dateformat}" value=$value_1>|;
+ $button1_2 = qq|
+ <input type=button name=$name_1 id="$trigger_1" value=|
+ . $locale->text('button') . qq|>|;
+ $button2 = qq|
+ <input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}">|;
+ $button2_2 = qq|
+ <input type=button name=$name_2 id="$trigger_2" value=|
+ . $locale->text('button') . qq|>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2", "$name_1", "BR", "$trigger_1",
+ "$name_2", "BL", "$trigger_2");
+ }
+ } else {
+
+ # without JavaScript Calendar
+ if ($name_1 eq "") {
+ $button1 =
+ qq|<input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}">|;
+ } else {
+ $button1 =
+ qq|<input name=$name_1 id=$id_1 size=11 title="$myconfig{dateformat}" value=$value_1>|;
+ $button2 =
+ qq|<input name=$name_2 id=$id_2 size=11 title="$myconfig{dateformat}">|;
+ }
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=title value="$form->{title}">
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ $department
+|;
+
+ if ($form->{report} eq "projects") {
+ print qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Project') . qq|</th>
+ <td colspan=5><input name=projectnumber size=25</td>
+ </tr>
+ <input type=hidden name=nextsub value=generate_projects>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td>$button1</td>
+ <td>$button1_2</td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td>$button2</td>
+ <td>$button2_2</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td><input name=l_heading class=checkbox type=checkbox value=Y> |
+ . $locale->text('Heading') . qq|
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal')
+ . qq|</td>
+ </tr>
+
+$jsscript
+|;
+ }
+
+ if ($form->{report} eq "income_statement") {
+ print qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Project') . qq|</th>
+ <td colspan=3><input name=projectnumber size=25</td>
+ </tr>
+ <input type=hidden name=nextsub value=generate_income_statement>
+</table>
+<table>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
+ . $locale->text('Customized Report')
+ . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="|
+ . $locale->text('YYYY')
+ . qq|" value="$year"></td>
+ </tr>
+|;
+
+ print qq|
+ <tr>
+ <td align=right>
+<b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13"
+"checked"></td>
+ <td><input name=duetyp class=radio type=radio value="A" $checked > 1. |
+ . $locale->text('Quarter')
+ . qq|</td>
+|;
+ $checked = "";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="1" $checked > |
+ . $locale->text('January')
+ . qq|</td>
+|;
+ $checked = "";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="5" $checked > |
+ . $locale->text('May')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > |
+ . $locale->text('September')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > |
+ . $locale->text('February')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > |
+ . $locale->text('June')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > |
+ . $locale->text('October')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > |
+ . $locale->text('March')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > |
+ . $locale->text('July')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > |
+ . $locale->text('November')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. |
+ . $locale->text('Quarter')
+ . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > |
+ . $locale->text('April')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > |
+ . $locale->text('August')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > |
+ . $locale->text('December')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
+ . $locale->text('Free report period')
+ . qq|</th>
+ <td align=left colspan=4>| . $locale->text('From') . qq|
+ $button1
+ $button1_2
+ | . $locale->text('Bis') . qq|
+ $button2
+ $button2_2
+ </td>
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=leftt>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+
+$jsscript
+|;
+ }
+
+ if ($form->{report} eq "bwa") {
+ print qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Project') . qq|</th>
+ <td colspan=3><input name=projectnumber size=25</td>
+ </tr>
+ <input type=hidden name=nextsub value=generate_bwa>
+</table>
+<table>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
+ . $locale->text('Customized Report')
+ . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="|
+ . $locale->text('YYYY')
+ . qq|" value="$year"></td>
+ </tr>
+|;
+
+ print qq|
+ <tr>
+ <td align=right>
+<b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13"
+$checked></td>
+ <td><input name=duetyp class=radio type=radio value="A" $checked > 1. |
+ . $locale->text('Quarter')
+ . qq|</td>
+|;
+ $checked = "checked";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="1" $checked > |
+ . $locale->text('January')
+ . qq|</td>
+|;
+ $checked = "";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="5" $checked > |
+ . $locale->text('May')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > |
+ . $locale->text('September')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > |
+ . $locale->text('February')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > |
+ . $locale->text('June')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > |
+ . $locale->text('October')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > |
+ . $locale->text('March')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > |
+ . $locale->text('July')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > |
+ . $locale->text('November')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. |
+ . $locale->text('Quarter')
+ . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > |
+ . $locale->text('April')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > |
+ . $locale->text('August')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > |
+ . $locale->text('December')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
+ . $locale->text('Free report period')
+ . qq|</th>
+ <td align=left colspan=4>| . $locale->text('From') . qq|
+ $button1
+ $button1_2
+ | . $locale->text('Bis') . qq|
+ $button2
+ $button2_2
+ </td>
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=leftt>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+
+$jsscript
+|;
+ }
+
+ if ($form->{report} eq "ustva") {
+
+ print qq|
+
+ <br>
+ <input type=hidden name=nextsub value=generate_ustva>
+</table>
+<table>
+ <tr>
+ <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
+ . $locale->text('Zeitraum')
+ . qq|</th>
+ </tr>
+ <tr>
+ <th colspan=1>| . $locale->text('Year') . qq|</th>
+ <td><input name=year size=11 title="|
+ . $locale->text('YYYY')
+ . qq|" value="$year"></td>
+ </tr>
+|;
+
+ print qq|
+ <tr>
+ <td align=right>
+<b> | . $locale->text('Yearly') . qq|</b> </td>
+ <th align=left>| . $locale->text('Quarterly') . qq|</th>
+ <th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
+ </tr>
+ <tr>
+ <td align=right> <input name=duetyp class=radio type=radio value="13"
+$checked></td>
+ <td><input name=duetyp class=radio type=radio value="A" $checked > 1. |
+ . $locale->text('Quarter')
+ . qq|</td>
+|;
+ $checked = "checked";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="1" $checked > |
+ . $locale->text('January')
+ . qq|</td>
+|;
+ $checked = "";
+ print qq|
+ <td><input name=duetyp class=radio type=radio value="5" $checked > |
+ . $locale->text('May')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="9" $checked > |
+ . $locale->text('September')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td align= right> </td>
+ <td><input name=duetyp class=radio type=radio value="B" $checked> 2. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="2" $checked > |
+ . $locale->text('February')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="6" $checked > |
+ . $locale->text('June')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="10" $checked > |
+ . $locale->text('October')
+ . qq|</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="C" $checked> 3. |
+ . $locale->text('Quarter')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="3" $checked > |
+ . $locale->text('March')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="7" $checked > |
+ . $locale->text('July')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="11" $checked > |
+ . $locale->text('November')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name=duetyp class=radio type=radio value="D" $checked> 4. |
+ . $locale->text('Quarter')
+ . qq| </td>
+ <td><input name=duetyp class=radio type=radio value="4" $checked > |
+ . $locale->text('April')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="8" $checked > |
+ . $locale->text('August')
+ . qq|</td>
+ <td><input name=duetyp class=radio type=radio value="12" $checked > |
+ . $locale->text('December')
+ . qq|</td>
+
+ </tr>
+ <tr>
+ <td colspan=5><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th align=left>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+ <tr>
+ <th colspan=4>|;
+##########
+
+ &print_options();
+ print qq|
+ </th>
+ </tr>
+|;
+ }
+
+ if ($form->{report} eq "balance_sheet") {
+ print qq|
+ <input type=hidden name=nextsub value=generate_balance_sheet>
+ <tr>
+ <th align=right>| . $locale->text('as at') . qq|</th>
+ <td>
+ $button1
+ $button1_2
+ </td>
+ <th align=right nowrap>| . $locale->text('Compare to') . qq|</th>
+ <td>
+ $button2
+ $button2_2
+ </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Decimalplaces') . qq|</th>
+ <td><input name=decimalplaces size=3></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td><input name=l_heading class=checkbox type=checkbox value=Y> |
+ . $locale->text('Heading') . qq|
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal') . qq|
+ <input name=l_accno class=checkbox type=checkbox value=Y> |
+ . $locale->text('Account Number')
+ . qq|</td>
+ </tr>
+
+$jsscript
+|;
+ }
+
+ if ($form->{report} eq "trial_balance") {
+ print qq|
+ <input type=hidden name=nextsub value=generate_trial_balance>
+ <input type=hidden name=eur value=$eur>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td>
+ $button1
+ $button1_2
+ </td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td>
+ $button2
+ $button2_2
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Include in Report') . qq|</th>
+ <td><input name=l_heading class=checkbox type=checkbox value=Y> |
+ . $locale->text('Heading') . qq|
+ <input name=l_subtotal class=checkbox type=checkbox value=Y> |
+ . $locale->text('Subtotal') . qq|
+ <input name=all_accounts class=checkbox type=checkbox value=Y> |
+ . $locale->text('All Accounts')
+ . qq|</td>
+ </tr>
+
+$jsscript
+|;
+ }
+
+ if ($form->{report} =~ /^tax_/) {
+ $gifi = "";
+
+ $form->{db} = ($form->{report} =~ /_collected/) ? "ar" : "ap";
+
+ RP->get_taxaccounts(\%myconfig, \%$form);
+
+ print qq|
+ <input type=hidden name=nextsub value=generate_tax_report>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Report for') . qq|</th>
+ <td colspan=3>
+|;
+
+ $checked = "checked";
+ foreach $ref (@{ $form->{taxaccounts} }) {
+
+ print
+ qq|<input name=accno class=radio type=radio value=$ref->{accno} $checked> $ref->{description}
+
+ <input name="$ref->{accno}_description" type=hidden value="$ref->{description}">
+ <input name="$ref->{accno}_rate" type=hidden value="$ref->{rate}">|;
+
+ $checked = "";
+
+ }
+
+ print qq|
+ <input type=hidden name=db value=$form->{db}>
+ <input type=hidden name=sort value=transdate>
+
+ </td>
+ </tr>
+|;
+
+ if (@{ $form->{gifi_taxaccounts} }) {
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('GIFI') . qq|</th>
+ <td colspan=3>
+|;
+
+ foreach $ref (@{ $form->{gifi_taxaccounts} }) {
+
+ print
+ qq|<input name=accno class=radio type=radio value="gifi_$ref->{accno}"> $ref->{description}
+
+ <input name="gifi_$ref->{accno}_description" type=hidden value="$ref->{description}">
+ <input name="gifi_$ref->{accno}_rate" type=hidden value="$ref->{rate}">|;
+
+ }
+
+ print qq|
+ </td>
+ </tr>
+|;
+ }
+
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td>
+ <table>
+ <tr>
+ <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('ID') . qq|</td>
+ <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Invoice') . qq|</td>
+ <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Date') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td>|;
+
+ if ($form->{db} eq 'ar') {
+ print $locale->text('Customer');
+ }
+ if ($form->{db} eq 'ap') {
+ print $locale->text('Vendor');
+ }
+
+ print qq|</td>
+ <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Amount') . qq|</td>
+ <td><input name="l_tax" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Tax') . qq|</td>
+ <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ }
+
+ if ($form->{report} =~ /^nontaxable_/) {
+ $gifi = "";
+
+ $form->{db} = ($form->{report} =~ /_sales/) ? "ar" : "ap";
+
+ print qq|
+ <input type=hidden name=nextsub value=generate_tax_report>
+
+ <input type=hidden name=db value=$form->{db}>
+ <input type=hidden name=sort value=transdate>
+ <input type=hidden name=report value=$form->{report}>
+
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td><input name=fromdate size=11 title="$myconfig{dateformat}" value=$form->{fromdate}></td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td><input name=todate size=11 title="$myconfig{dateformat}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Method') . qq|</th>
+ <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
+ . $locale->text('Accrual') . qq|
+ <input name=method class=radio type=radio value=cash $cash>|
+ . $locale->text('EUR')
+ . qq|</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Include in Report') . qq|</th>
+ <td colspan=3>
+ <table>
+ <tr>
+ <td><input name="l_id" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('ID') . qq|</td>
+ <td><input name="l_invnumber" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Invoice') . qq|</td>
+ <td><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Date') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_name" class=checkbox type=checkbox value=Y checked></td>
+ <td>|;
+
+ if ($form->{db} eq 'ar') {
+ print $locale->text('Customer');
+ }
+ if ($form->{db} eq 'ap') {
+ print $locale->text('Vendor');
+ }
+
+ print qq|</td>
+ <td><input name="l_netamount" class=checkbox type=checkbox value=Y checked></td>
+ <td>| . $locale->text('Amount') . qq|</td>
+ <td><input name="l_amount" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
+ <td><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
+ <td>| . $locale->text('Subtotal') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+
+ }
+
+ if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
+ $gifi = "";
+
+ if ($form->{report} eq 'ar_aging') {
+ $label = $locale->text('Customer');
+ $form->{vc} = 'customer';
+ } else {
+ $label = $locale->text('Vendor');
+ $form->{vc} = 'vendor';
+ }
+
+ $nextsub = "generate_$form->{report}";
+
+ # setup vc selection
+ $form->all_vc(\%myconfig, $form->{vc},
+ ($form->{vc} eq 'customer') ? "AR" : "AP");
+
+ map { $vc .= "<option>$_->{name}--$_->{id}\n" }
+ @{ $form->{"all_$form->{vc}"} };
+
+ $vc =
+ ($vc)
+ ? qq|<select name=$form->{vc}><option>\n$vc</select>|
+ : qq|<input name=$form->{vc} size=35>|;
+
+ print qq|
+ <tr>
+ <th align=right>| . $locale->text($label) . qq|</th>
+ <td>$vc</td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td>
+ $button1
+ $button1_2
+ </td>
+ </tr>
+ <input type=hidden name=type value=statement>
+ <input type=hidden name=format value=html>
+ <input type=hidden name=media value=screen>
+
+ <input type=hidden name=nextsub value=$nextsub>
+ <input type=hidden name=action value=$nextsub>
+
+$jsscript
+|;
+ }
+
+ # above action can be removed if there is more than one input field
+
+ if ($form->{report} =~ /(receipts|payments)$/) {
+ $gifi = "";
+
+ $form->{db} = ($form->{report} =~ /payments$/) ? "ap" : "ar";
+
+ RP->paymentaccounts(\%myconfig, \%$form);
+
+ $selection = "<option>\n";
+ foreach $ref (@{ $form->{PR} }) {
+ $paymentaccounts .= "$ref->{accno} ";
+ $selection .= "<option>$ref->{accno}--$ref->{description}\n";
+ }
+
+ chop $paymentaccounts;
+
+ print qq|
+ <input type=hidden name=nextsub value=list_payments>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Account') . qq|</th>
+ <td colspan=3><select name=account>$selection</select>
+ <input type=hidden name=paymentaccounts value="$paymentaccounts">
+ </td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Reference') . qq|</th>
+ <td colspan=3><input name=reference></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Source') . qq|</th>
+ <td colspan=3><input name=source></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Memo') . qq|</th>
+ <td colspan=3><input name=memo size=30></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('From') . qq|</th>
+ <td>
+ $button1
+ $button1_2
+ </td>
+ <th align=right>| . $locale->text('Bis') . qq|</th>
+ <td>
+ $button2
+ $button2_2
+ </td>
+ </tr>
+ <tr>
+ <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
+ <th align=left colspan=3>|
+ . $locale->text('Include Exchangerate Difference')
+ . qq|</td>
+ </tr>
+
+$jsscript
+
+ <input type=hidden name=db value=$form->{db}>
+ <input type=hidden name=sort value=transdate>
+|;
+
+ }
+
+ print qq|
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<br>
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<input type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+|;
+
+ # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
+ # Einlesen der Finanzamtdaten
+ get_config($userspath, 'finanzamt.ini');
+
+ $disabled = qq|disabled="disabled"|;
+ $disabled = '' if ($form->{elster} eq '1');
+ if ($form->{report} eq 'ustva') {
+ print qq|
+ <input type=submit class=submit name=action value="|
+ . $locale->text('debug') . qq|">
+ <input type=submit class=submit name=action $disabled
+ value="| . $locale->text('winston_export') . qq|">
+ |;
+ print qq|
+ <input type=submit class=submit name=action value="|
+ . $locale->text('config') . qq|">
+ |;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub continue { &{ $form->{nextsub} } }
+
+sub get_project {
+ $lxdebug->enter_sub();
+ my $nextsub = shift;
+
+ $form->{project_id} = $form->{project_id_1};
+ if ($form->{projectnumber} && !$form->{project_id}) {
+ $form->{rowcount} = 1;
+
+ # call this instead of update
+ $form->{update} = $nextsub;
+ $form->{projectnumber_1} = $form->{projectnumber};
+
+ delete $form->{sort};
+ &check_project;
+
+ # if there is one only, assign id
+ $form->{project_id} = $form->{project_id_1};
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_income_statement {
+ $lxdebug->enter_sub();
+
+ $form->{padding} = " ";
+ $form->{bold} = "<b>";
+ $form->{endbold} = "</b>";
+ $form->{br} = "<br>";
+
+ &get_project(generate_income_statement);
+
+ $form->{projectnumber} = $form->{projectnumber_1};
+
+ if ($form->{reporttype} eq "custom") {
+
+ #forgotten the year --> thisyear
+ if ($form->{year} !~ m/^\d\d\d\d$/) {
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0) =~
+ /(\d\d\d\d)/;
+ $form->{year} = $1;
+ }
+
+ #yearly report
+ if ($form->{duetyp} eq "13") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ }
+
+ #Quater reports
+ if ($form->{duetyp} eq "A") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ }
+ if ($form->{duetyp} eq "B") {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ }
+ if ($form->{duetyp} eq "C") {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ }
+ if ($form->{duetyp} eq "D") {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ }
+
+ #Monthly reports
+ SWITCH: {
+ $form->{duetyp} eq "1" && do {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.1.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "2" && do {
+ $form->{fromdate} = "1.2.$form->{year}";
+
+ #this works from 1901 to 2099, 1900 and 2100 fail.
+ $leap = ($form->{year} % 4 == 0) ? "29" : "28";
+ $form->{todate} = "$leap.2.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "3" && do {
+ $form->{fromdate} = "1.3.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "4" && do {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.4.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "5" && do {
+ $form->{fromdate} = "1.5.$form->{year}";
+ $form->{todate} = "31.5.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "6" && do {
+ $form->{fromdate} = "1.6.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "7" && do {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "31.7.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "8" && do {
+ $form->{fromdate} = "1.8.$form->{year}";
+ $form->{todate} = "31.8.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "9" && do {
+ $form->{fromdate} = "1.9.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "10" && do {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.10.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "11" && do {
+ $form->{fromdate} = "1.11.$form->{year}";
+ $form->{todate} = "30.11.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "12" && do {
+ $form->{fromdate} = "1.12.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ last SWITCH;
+ };
+ }
+ }
+
+ RP->income_statement(\%myconfig, \%$form);
+
+ ($form->{department}) = split /--/, $form->{department};
+
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ $form->{todate} = $form->current_date(\%myconfig) unless $form->{todate};
+
+ # if there are any dates construct a where
+ if ($form->{fromdate} || $form->{todate}) {
+
+ unless ($form->{todate}) {
+ $form->{todate} = $form->current_date(\%myconfig);
+ }
+
+ $longtodate = $locale->date(\%myconfig, $form->{todate}, 1);
+ $shorttodate = $locale->date(\%myconfig, $form->{todate}, 0);
+
+ $longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ $shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
+
+ $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{period} =
+ $locale->text('for Period')
+ . qq|<br>\n$longfromdate |
+ . $locale->text('Bis')
+ . qq| $longtodate|;
+ }
+
+ if ($form->{comparefromdate} || $form->{comparetodate}) {
+ $longcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 1);
+ $shortcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 0);
+
+ $longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
+ $shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
+
+ $form->{last_period} = "$shortcomparefromdate<br>\n$shortcomparetodate";
+ $form->{period} .=
+ "<br>\n$longcomparefromdate "
+ . $locale->text('Bis')
+ . qq| $longcomparetodate|;
+ }
+
+ # setup variables for the form
+ @a = qw(company address businessnumber);
+ map { $form->{$_} = $myconfig{$_} } @a;
+ $form->{address} =~ s/\\n/<br>/g;
+
+ $form->{templates} = $myconfig{templates};
+
+ $form->{IN} = "income_statement.html";
+
+ $form->parse_template;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_balance_sheet {
+ $lxdebug->enter_sub();
+
+ $form->{padding} = " ";
+ $form->{bold} = "<b>";
+ $form->{endbold} = "</b>";
+ $form->{br} = "<br>";
+
+ RP->balance_sheet(\%myconfig, \%$form);
+
+ $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate};
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+
+ ($form->{department}) = split /--/, $form->{department};
+
+ # define Current Earnings account
+ $padding = ($form->{l_heading}) ? $form->{padding} : "";
+ push(@{ $form->{equity_account} },
+ $padding . $locale->text('Current Earnings'));
+
+ $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0);
+ $form->{last_period} =
+ $locale->date(\%myconfig, $form->{compareasofdate}, 0);
+
+ $form->{IN} = "balance_sheet.html";
+
+ # setup company variables for the form
+ map { $form->{$_} = $myconfig{$_} }
+ (qw(company address businessnumber nativecurr));
+ $form->{address} =~ s/\\n/<br>/g;
+
+ $form->{templates} = $myconfig{templates};
+
+ $form->parse_template;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_projects {
+ $lxdebug->enter_sub();
+
+ &get_project(generate_projects);
+ $form->{projectnumber} = $form->{projectnumber_1};
+
+ $form->{nextsub} = "generate_projects";
+ $form->{title} = $locale->text('Project Transactions');
+ RP->trial_balance(\%myconfig, \%$form);
+
+ &list_accounts;
+
+ $lxdebug->leave_sub();
+}
+
+# Antonio Gallardo
+#
+# D.S. Feb 16, 2001
+# included links to display transactions for period entered
+# added headers and subtotals
+#
+sub generate_trial_balance {
+ $lxdebug->enter_sub();
+
+ # get for each account initial balance, debits and credits
+ RP->trial_balance(\%myconfig, \%$form);
+
+ $form->{nextsub} = "generate_trial_balance";
+ $form->{title} = $locale->text('Trial Balance');
+ &list_accounts;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_accounts {
+ $lxdebug->enter_sub();
+
+ $title = $form->escape($form->{title});
+
+ if ($form->{department}) {
+ ($department) = split /--/, $form->{department};
+ $options = $locale->text('Department') . " : $department<br>";
+ $department = $form->escape($form->{department});
+ }
+ if ($form->{projectnumber}) {
+ $options .=
+ $locale->text('Project Number') . " : $form->{projectnumber}<br>";
+ $projectnumber = $form->escape($form->{projectnumber});
+ }
+
+ # if there are any dates
+ if ($form->{fromdate} || $form->{todate}) {
+ if ($form->{fromdate}) {
+ $fromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ }
+ if ($form->{todate}) {
+ $todate = $locale->date(\%myconfig, $form->{todate}, 1);
+ }
+
+ $form->{period} = "$fromdate - $todate";
+ } else {
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+
+ }
+ $options .= $form->{period};
+
+ @column_index = qw(accno description begbalance debit credit endbalance);
+
+ $column_header{accno} =
+ qq|<th class=listheading>| . $locale->text('Account') . qq|</th>|;
+ $column_header{description} =
+ qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
+ $column_header{debit} =
+ qq|<th class=listheading>| . $locale->text('Debit') . qq|</th>|;
+ $column_header{credit} =
+ qq|<th class=listheading>| . $locale->text('Credit') . qq|</th>|;
+ $column_header{begbalance} =
+ qq|<th class=listheading>| . $locale->text('Balance') . qq|</th>|;
+ $column_header{endbalance} =
+ qq|<th class=listheading>| . $locale->text('Balance') . qq|</th>|;
+
+ if ($form->{accounttype} eq 'gifi') {
+ $column_header{accno} =
+ qq|<th class=listheading>| . $locale->text('GIFI') . qq|</th>|;
+ }
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$options</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # sort the whole thing by account numbers and display
+ foreach $ref (sort { $a->{accno} cmp $b->{accno} } @{ $form->{TB} }) {
+
+ $description = $form->escape($ref->{description});
+
+ $href =
+ qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}|;
+
+ if ($form->{accounttype} eq 'gifi') {
+ $href .= "&gifi_accno=$ref->{accno}&gifi_description=$description";
+ $na = $locale->text('N/A');
+ map { $ref->{$_} = $na } qw(accno description) unless $ref->{accno};
+ } else {
+ $href .= "&accno=$ref->{accno}&description=$description";
+ }
+
+ $ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
+
+ $debit = $form->format_amount(\%myconfig, $ref->{debit}, 2, " ");
+ $credit = $form->format_amount(\%myconfig, $ref->{credit}, 2, " ");
+ $begbalance =
+ $form->format_amount(\%myconfig, $ref->{balance} * $ml, 2, " ");
+ $endbalance =
+ $form->format_amount(\%myconfig,
+ ($ref->{balance} + $ref->{amount}) * $ml,
+ 2, " ");
+
+ # next if ($ref->{debit} == 0 && $ref->{credit} == 0);
+
+ if ($ref->{charttype} eq "H" && $subtotal && $form->{l_subtotal}) {
+ map { $column_data{$_} = "<th> </th>" }
+ qw(accno begbalance endbalance);
+
+ $subtotalbegbalance =
+ $form->format_amount(\%myconfig, $subtotalbegbalance, 2, " ");
+ $subtotalendbalance =
+ $form->format_amount(\%myconfig, $subtotalendbalance, 2, " ");
+ $subtotaldebit =
+ $form->format_amount(\%myconfig, $subtotaldebit, 2, " ");
+ $subtotalcredit =
+ $form->format_amount(\%myconfig, $subtotalcredit, 2, " ");
+
+ $column_data{description} = "<th>$subtotaldescription</th>";
+ $column_data{begbalance} = "<th align=right>$subtotalbegbalance</th>";
+ $column_data{endbalance} = "<th align=right>$subtotalendbalance</th>";
+ $column_data{debit} = "<th align=right>$subtotaldebit</th>";
+ $column_data{credit} = "<th align=right>$subtotalcredit</th>";
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ if ($ref->{charttype} eq "H") {
+ $subtotal = 1;
+ $subtotaldescription = $ref->{description};
+ $subtotaldebit = $ref->{debit};
+ $subtotalcredit = $ref->{credit};
+ $subtotalbegbalance = 0;
+ $subtotalendbalance = 0;
+
+ next unless $form->{l_heading};
+
+ map { $column_data{$_} = "<th> </th>" }
+ qw(accno debit credit begbalance endbalance);
+ $column_data{description} =
+ "<th class=listheading>$ref->{description}</th>";
+ }
+
+ if ($ref->{charttype} eq "A") {
+ $column_data{accno} = "<td><a href=$href>$ref->{accno}</a></td>";
+ $column_data{description} = "<td>$ref->{description}</td>";
+ $column_data{debit} = "<td align=right>$debit</td>";
+ $column_data{credit} = "<td align=right>$credit</td>";
+ $column_data{begbalance} = "<td align=right>$begbalance</td>";
+ $column_data{endbalance} = "<td align=right>$endbalance</td>";
+
+ $totaldebit += $ref->{debit};
+ $totalcredit += $ref->{credit};
+
+ $subtotalbegbalance += $ref->{balance} * $ml;
+ $subtotalendbalance += ($ref->{balance} + $ref->{amount}) * $ml;
+
+ }
+
+ if ($ref->{charttype} eq "H") {
+ print qq|
+ <tr class=listheading>
+|;
+ }
+ if ($ref->{charttype} eq "A") {
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+ }
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ # print last subtotal
+ if ($subtotal && $form->{l_subtotal}) {
+ map { $column_data{$_} = "<th> </th>" }
+ qw(accno begbalance endbalance);
+ $subtotalbegbalance =
+ $form->format_amount(\%myconfig, $subtotalbegbalance, 2, " ");
+ $subtotalendbalance =
+ $form->format_amount(\%myconfig, $subtotalendbalance, 2, " ");
+ $subtotaldebit =
+ $form->format_amount(\%myconfig, $subtotaldebit, 2, " ");
+ $subtotalcredit =
+ $form->format_amount(\%myconfig, $subtotalcredit, 2, " ");
+ $column_data{description} = "<th>$subdescription</th>";
+ $column_data{begbalance} = "<th align=right>$subtotalbegbalance</th>";
+ $column_data{endbalance} = "<th align=right>$subtotalendbalance</th>";
+ $column_data{debit} = "<th align=right>$subtotaldebit</th>";
+ $column_data{credit} = "<th align=right>$subtotalcredit</th>";
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ $totaldebit = $form->format_amount(\%myconfig, $totaldebit, 2, " ");
+ $totalcredit = $form->format_amount(\%myconfig, $totalcredit, 2, " ");
+
+ map { $column_data{$_} = "<th> </th>" }
+ qw(accno description begbalance endbalance);
+
+ $column_data{debit} = qq|<th align=right class=listtotal>$totaldebit</th>|;
+ $column_data{credit} = qq|<th align=right class=listtotal>$totalcredit</th>|;
+
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_ar_aging {
+ $lxdebug->enter_sub();
+
+ # split customer
+ ($form->{customer}) = split(/--/, $form->{customer});
+ $customer = $form->escape($form->{customer}, 1);
+ $title = $form->escape($form->{title}, 1);
+
+ $form->{ct} = "customer";
+ $form->{arap} = "ar";
+
+ $form->{callback} =
+ qq|$form->{script}?path=$form->{path}&action=generate_ar_aging&login=$form->{login}&password=$form->{password}&todate=$form->{todate}&customer=$customer&title=$title|;
+
+ RP->aging(\%myconfig, \%$form);
+ &aging;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_ap_aging {
+ $lxdebug->enter_sub();
+
+ # split vendor
+ ($form->{vendor}) = split(/--/, $form->{vendor});
+ $vendor = $form->escape($form->{vendor}, 1);
+ $title = $form->escape($form->{title}, 1);
+
+ $form->{ct} = "vendor";
+ $form->{arap} = "ap";
+
+ $form->{callback} =
+ qq|$form->{script}?path=$form->{path}&action=generate_ap_aging&login=$form->{login}&password=$form->{password}&todate=$form->{todate}&vendor=$vendor&title=$title|;
+
+ RP->aging(\%myconfig, \%$form);
+ &aging;
+
+ $lxdebug->leave_sub();
+}
+
+sub aging {
+ $lxdebug->enter_sub();
+
+ $form->header;
+
+ $column_header{statement} = qq|<th> </th>|;
+ $column_header{ct} =
+ qq|<th class=listheading>|
+ . $locale->text(ucfirst $form->{ct})
+ . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th class=listheading>| . $locale->text('Invoice') . qq|</th>|;
+ $column_header{transdate} =
+ qq|<th class=listheading>| . $locale->text('Date') . qq|</th>|;
+ $column_header{duedate} =
+ qq|<th class=listheading>| . $locale->text('Due') . qq|</th>|;
+ $column_header{c0} =
+ qq|<th class=listheading>| . $locale->text('Current') . qq|</th>|;
+ $column_header{c30} = qq|<th class=listheading>30</th>|;
+ $column_header{c60} = qq|<th class=listheading>60</th>|;
+ $column_header{c90} = qq|<th class=listheading>90</th>|;
+
+ @column_index =
+ (qw(statement ct invnumber transdate duedate c0 c30 c60 c90));
+
+ if ($form->{department}) {
+ $option .= "\n<br>" if $option;
+ ($department) = split /--/, $form->{department};
+ $option .= $locale->text('Department') . " : $department";
+ $department = $form->escape($form->{department}, 1);
+ $form->{callback} .= "&department=$department";
+ }
+
+ if ($form->{arap} eq 'ar') {
+ if ($form->{customer}) {
+ $option .= "\n<br>" if $option;
+ $option .= $form->{customer};
+ }
+ }
+ if ($form->{arap} eq 'ap') {
+ shift @column_index;
+ if ($form->{vendor}) {
+ $option .= "\n<br>" if $option;
+ $option .= $form->{vendor};
+ }
+ }
+
+ $todate = $locale->date(\%myconfig, $form->{todate}, 1);
+ $option .= "\n<br>" if $option;
+ $option .=
+ $locale->text('for Period') . " " . $locale->text('Bis') . " $todate";
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $ctid = 0;
+ $subtotal = 0;
+ $i = 0;
+
+ foreach $ref (@{ $form->{AG} }) {
+
+ if ($ctid != $ref->{ctid}) {
+
+ $i++;
+
+ if ($subtotal) {
+ $c0subtotal =
+ $form->format_amount(\%myconfig, $c0subtotal, 2, " ");
+ $c30subtotal =
+ $form->format_amount(\%myconfig, $c30subtotal, 2, " ");
+ $c60subtotal =
+ $form->format_amount(\%myconfig, $c60subtotal, 2, " ");
+ $c90subtotal =
+ $form->format_amount(\%myconfig, $c90subtotal, 2, " ");
+ }
+
+ $column_data{ct} = qq|<th> </th>|;
+ $column_data{invnumber} = qq|<th> </th>|;
+ $column_data{transdate} = qq|<th> </th>|;
+ $column_data{duedate} = qq|<th> </th>|;
+ $column_data{c0} =
+ qq|<th align=right class=listsubtotal>$c0subtotal</th>|;
+ $column_data{c30} =
+ qq|<th align=right class=listsubtotal>$c30subtotal</th>|;
+ $column_data{c60} =
+ qq|<th align=right class=listsubtotal>$c60subtotal</th>|;
+ $column_data{c90} =
+ qq|<th align=right class=listsubtotal>$c90subtotal</th>|;
+
+ if ($subtotal) {
+
+ # print subtotals
+ print qq|
+ <tr class=listsubtotal>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ $column_data{statement} = qq|<td> </td>|;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ $subtotal = 1;
+
+ $c0subtotal = 0;
+ $c30subtotal = 0;
+ $c60subtotal = 0;
+ $c90subtotal = 0;
+
+ $column_data{ct} = qq|<td>$ref->{name}</td>|;
+ $column_data{statement} =
+ qq|<td><input name="statement_$i" type=checkbox class=checkbox value=1 $ref->{checked}>
+ <input type=hidden name="$form->{ct}_id_$i" value=$ref->{ctid}>
+ </td>|;
+ }
+
+ $c0subtotal += $ref->{c0};
+ $c30subtotal += $ref->{c30};
+ $c60subtotal += $ref->{c60};
+ $c90subtotal += $ref->{c90};
+
+ $c0total += $ref->{c0};
+ $c30total += $ref->{c30};
+ $c60total += $ref->{c60};
+ $c90total += $ref->{c90};
+
+ $ref->{c0} = $form->format_amount(\%myconfig, $ref->{c0}, 2, " ");
+ $ref->{c30} = $form->format_amount(\%myconfig, $ref->{c30}, 2, " ");
+ $ref->{c60} = $form->format_amount(\%myconfig, $ref->{c60}, 2, " ");
+ $ref->{c90} = $form->format_amount(\%myconfig, $ref->{c90}, 2, " ");
+
+ $href =
+ qq|$ref->{module}.pl?path=$form->{path}&action=edit&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=|
+ . $form->escape($form->{callback});
+
+ $column_data{invnumber} = qq|<td><a href=$href>$ref->{invnumber}</a></td>|;
+ $column_data{transdate} = qq|<td>$ref->{transdate}</td>|;
+ $column_data{duedate} = qq|<td>$ref->{duedate} </td>|;
+ $column_data{c0} = qq|<td align=right>$ref->{c0}</td>|;
+ $column_data{c30} = qq|<td align=right>$ref->{c30}</td>|;
+ $column_data{c60} = qq|<td align=right>$ref->{c60}</td>|;
+ $column_data{c90} = qq|<td align=right>$ref->{c90}</td>|;
+
+ $j++;
+ $j %= 2;
+ print qq|
+ <tr class=listrow$j>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $column_data{ct} = qq|<td> </td>|;
+ $column_data{statement} = qq|<td> </td>|;
+
+ $ctid = $ref->{ctid};
+
+ }
+
+ # print subtotals
+ $c0subtotal = $form->format_amount(\%myconfig, $c0subtotal, 2, " ");
+ $c30subtotal = $form->format_amount(\%myconfig, $c30subtotal, 2, " ");
+ $c60subtotal = $form->format_amount(\%myconfig, $c60subtotal, 2, " ");
+ $c90subtotal = $form->format_amount(\%myconfig, $c90subtotal, 2, " ");
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+
+ map { $column_data{$_} = qq|<th> </th>| } @column_index;
+
+ $column_data{c0} = qq|<th align=right class=listsubtotal>$c0subtotal</th>|;
+ $column_data{c30} = qq|<th align=right class=listsubtotal>$c30subtotal</th>|;
+ $column_data{c60} = qq|<th align=right class=listsubtotal>$c60subtotal</th>|;
+ $column_data{c90} = qq|<th align=right class=listsubtotal>$c90subtotal</th>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+ <tr class=listtotal>
+|;
+
+ $c0total = $form->format_amount(\%myconfig, $c0total, 2, " ");
+ $c30total = $form->format_amount(\%myconfig, $c30total, 2, " ");
+ $c60total = $form->format_amount(\%myconfig, $c60total, 2, " ");
+ $c90total = $form->format_amount(\%myconfig, $c90total, 2, " ");
+
+ $column_data{c0} = qq|<th align=right class=listtotal>$c0total</th>|;
+ $column_data{c30} = qq|<th align=right class=listtotal>$c30total</th>|;
+ $column_data{c60} = qq|<th align=right class=listtotal>$c60total</th>|;
+ $column_data{c90} = qq|<th align=right class=listtotal>$c90total</th>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ <input type=hidden name=rowcount value=$i>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+|;
+
+ &print_options if ($form->{arap} eq 'ar');
+
+ print qq|
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ if ($form->{arap} eq 'ar') {
+ print qq|
+<input type=hidden name=todate value=$form->{todate}>
+
+<input type=hidden name=title value="$form->{title}">
+
+<input type=hidden name=arap value=$form->{arap}>
+<input type=hidden name=ct value=$form->{ct}>
+<input type=hidden name=$form->{ct} value="$form->{$form->{ct}}">
+
+<input type=hidden name=department value="$form->{department}">
+
+<input type=hidden name=path value=$form->{path}>
+<input type=hidden name=login value=$form->{login}>
+<input type=hidden name=password value=$form->{password}>
+
+<br>
+<input class=submit type=submit name=action value="|
+ . $locale->text('Select all') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Print') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+|;
+ }
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub select_all {
+ $lxdebug->enter_sub();
+
+ RP->aging(\%myconfig, \%$form);
+
+ map { $_->{checked} = "checked" } @{ $form->{AG} };
+
+ &aging;
+
+ $lxdebug->leave_sub();
+}
+
+sub print_options {
+ $lxdebug->enter_sub();
+
+ $form->{sendmode} = "attachment";
+ $form->{copies} = 2 unless $form->{copies};
+
+ $form->{PD}{ $form->{type} } = "selected";
+ $form->{DF}{ $form->{format} } = "selected";
+ $form->{OP}{ $form->{media} } = "selected";
+ $form->{SM}{ $form->{sendmode} } = "selected";
+
+ $type = qq|
+ <option value=statement $form->{PD}{statement}>|
+ . $locale->text('Statement');
+
+ if ($form->{media} eq 'email') {
+ $media = qq|
+ <option value=attachment $form->{SM}{attachment}>|
+ . $locale->text('Attachment') . qq|
+ <option value=inline $form->{SM}{inline}>| . $locale->text('In-line');
+ } else {
+ $media = qq|
+ <option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
+ if ($myconfig{printer} && $latex) {
+ $media .= qq|
+ <option value=printer $form->{OP}{printer}>|
+ . $locale->text('Printer');
+ }
+ }
+
+ if ($latex) {
+ $format .= qq|
+ <option value=postscript $form->{DF}{postscript}>|
+ . $locale->text('Postscript') . qq|
+ <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
+ }
+
+ print qq|
+<table>
+ <tr>
+ <td><select name=type>$type</select></td>
+ <td><select name=format>$format</select></td>
+ <td><select name=media>$media</select></td>
+|;
+
+ if ($myconfig{printer} && $latex && $form->{media} ne 'email') {
+ print qq|
+ <td>| . $locale->text('Copies') . qq|
+ <input name=copies size=2 value=$form->{copies}></td>
+|;
+ }
+
+ print qq|
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub e_mail {
+ $lxdebug->enter_sub();
+
+ # get name and email addresses
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"statement_$i"}) {
+ $form->{"$form->{ct}_id"} = $form->{"$form->{ct}_id_$i"};
+ RP->get_customer(\%myconfig, \%$form);
+ $selected = 1;
+ last;
+ }
+ }
+
+ $form->error($locale->text('Nothing selected!')) unless $selected;
+
+ if ($myconfig{role} eq 'admin') {
+ $bcc = qq|
+ <th align=right nowrap=true>| . $locale->text('Bcc') . qq|</th>
+ <td><input name=bcc size=30 value="$form->{bcc}"></td>
+|;
+ }
+
+ $title = $locale->text('E-mail Statement to') . " $form->{$form->{ct}}";
+
+ $form->{media} = "email";
+
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<table width=100%>
+ <tr class=listtop>
+ <th>$title</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input name=email size=30 value="$form->{email}"></td>
+ <th align=right nowrap>| . $locale->text('Cc') . qq|</th>
+ <td><input name=cc size=30 value="$form->{cc}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Subject') . qq|</th>
+ <td><input name=subject size=30 value="$form->{subject}"></td>
+ $bcc
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Message') . qq|</th>
+ </tr>
+ <tr>
+ <td><textarea name=message rows=15 cols=60 wrap=soft>$form->{message}</textarea></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+|;
+
+ &print_options;
+
+ map { delete $form->{$_} }
+ qw(action email cc bcc subject message type sendmode format header);
+
+ # save all other variables
+ foreach $key (keys %$form) {
+ $form->{$key} =~ s/\"/"/g;
+ print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
+ }
+
+ print qq|
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+<input type=hidden name=nextsub value=send_email>
+
+<br>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub send_email {
+ $lxdebug->enter_sub();
+
+ $form->{OUT} = "$sendmail";
+
+ $form->{subject} = $locale->text('Statement') . qq| - $form->{todate}|
+ unless $form->{subject};
+
+ RP->aging(\%myconfig, \%$form);
+
+ $form->{"statement_1"} = 1;
+
+ &print_form;
+
+ $form->redirect(
+ $locale->text('Statement sent to') . " $form->{$form->{ct}}");
+
+ $lxdebug->leave_sub();
+}
+
+sub print {
+ $lxdebug->enter_sub();
+
+ if ($form->{media} eq 'printer') {
+ $form->error($locale->text('Select postscript or PDF!'))
+ if ($form->{format} !~ /(postscript|pdf)/);
+ }
+
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->{"statement_$i"}) {
+ $form->{"$form->{ct}_id"} = $form->{"$form->{ct}_id_$i"};
+ $selected = 1;
+ last;
+ }
+ }
+
+ $form->error($locale->text('Nothing selected!')) unless $selected;
+
+ if ($form->{media} eq 'printer') {
+ $form->{OUT} = "| $myconfig{printer}";
+ $form->{"$form->{ct}_id"} = "";
+ } else {
+ $form->{"statement_1"} = 1;
+ }
+
+ RP->aging(\%myconfig, \%$form);
+
+ &print_form;
+
+ $form->redirect($locale->text('Statements sent to printer!'))
+ if ($form->{media} eq 'printer');
+
+ $lxdebug->leave_sub();
+}
+
+sub print_form {
+ $lxdebug->enter_sub();
+
+ $form->{statementdate} = $locale->date(\%myconfig, $form->{todate}, 1);
+
+ $form->{templates} = "$myconfig{templates}";
+
+ # setup variables for the form
+ @a = qw(company address businessnumber tel fax);
+ map { $form->{$_} = $myconfig{$_} } @a;
+ $form->format_string(@a);
+
+ $form->{IN} = "$form->{type}.html";
+
+ if ($form->{format} eq 'postscript') {
+ $form->{postscript} = 1;
+ $form->{IN} =~ s/html$/tex/;
+ }
+ if ($form->{format} eq 'pdf') {
+ $form->{pdf} = 1;
+ $form->{IN} =~ s/html$/tex/;
+ }
+
+ $i = 0;
+ while (@{ $form->{AG} }) {
+
+ $ref = shift @{ $form->{AG} };
+
+ if ($ctid != $ref->{ctid}) {
+
+ $ctid = $ref->{ctid};
+ $i++;
+
+ if ($form->{"statement_$i"}) {
+
+ @a =
+ (name, street, zipcode, city, country, contact, email,
+ "$form->{ct}phone", "$form->{ct}fax");
+ map { $form->{$_} = $ref->{$_} } @a;
+ $form->format_string(@a);
+
+ $form->{ $form->{ct} } = $form->{name};
+ $form->{"$form->{ct}_id"} = $ref->{ctid};
+
+ map { $form->{$_} = () } qw(invnumber invdate duedate);
+ $form->{total} = 0;
+ foreach $item (qw(c0 c30 c60 c90)) {
+ $form->{$item} = ();
+ $form->{"${item}total"} = 0;
+ }
+
+ &statement_details($ref);
+
+ while ($ref) {
+
+ if (scalar(@{ $form->{AG} }) > 0) {
+
+ # one or more left to go
+ if ($ctid == $form->{AG}->[0]->{ctid}) {
+ $ref = shift @{ $form->{AG} };
+ &statement_details($ref);
+
+ # any more?
+ $ref = scalar(@{ $form->{AG} });
+ } else {
+ $ref = 0;
+ }
+ } else {
+
+ # set initial ref to 0
+ $ref = 0;
+ }
+
+ }
+
+ map {
+ $form->{"${_}total"} =
+ $form->format_amount(\%myconfig, $form->{"${_}total"}, 2)
+ } (c0, c30, c60, c90, "");
+
+ $form->parse_template(\%myconfig, $userspath);
+
+ }
+ }
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub statement_details {
+ $lxdebug->enter_sub();
+ my ($ref) = @_;
+
+ push @{ $form->{invnumber} }, $ref->{invnumber};
+ push @{ $form->{invdate} }, $ref->{transdate};
+ push @{ $form->{duedate} }, $ref->{duedate};
+
+ foreach $item (qw(c0 c30 c60 c90)) {
+ eval {
+ $ref->{$item} =
+ $form->round_amount($ref->{$item} / $ref->{exchangerate}, 2);
+ };
+ $form->{"${item}total"} += $ref->{$item};
+ $form->{total} += $ref->{$item};
+ push @{ $form->{$item} },
+ $form->format_amount(\%myconfig, $ref->{$item}, 2);
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_tax_report {
+ $lxdebug->enter_sub();
+
+ RP->tax_report(\%myconfig, \%$form);
+
+ $descvar = "$form->{accno}_description";
+ $description = $form->escape($form->{$descvar});
+ $ratevar = "$form->{accno}_rate";
+
+ if ($form->{accno} =~ /^gifi_/) {
+ $descvar = "gifi_$form->{accno}_description";
+ $description = $form->escape($form->{$descvar});
+ $ratevar = "gifi_$form->{accno}_rate";
+ }
+
+ $department = $form->escape($form->{department});
+
+ # construct href
+ $href =
+ "$form->{script}?path=$form->{path}&action=generate_tax_report&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}";
+
+ # construct callback
+ $description = $form->escape($form->{$descvar}, 1);
+ $department = $form->escape($form->{department}, 1);
+ $callback =
+ "$form->{script}?path=$form->{path}&action=generate_tax_report&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}";
+
+ $form->{title} = $locale->text('GIFI') . " - "
+ if ($form->{accno} =~ /^gifi_/);
+
+ $title = $form->escape($form->{title});
+ $href .= "&title=$title";
+ $title = $form->escape($form->{title}, 1);
+ $callback .= "&title=$title";
+
+ $form->{title} = qq|$form->{title} $form->{"$form->{accno}_description"} |;
+
+ @columns =
+ $form->sort_columns(qw(id transdate invnumber name netamount tax amount));
+
+ foreach $item (@columns) {
+ if ($form->{"l_$item"} eq "Y") {
+ push @column_index, $item;
+
+ # add column to href and callback
+ $callback .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
+ }
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ $callback .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
+ }
+
+ if ($form->{department}) {
+ ($department) = split /--/, $form->{department};
+ $option = $locale->text('Department') . " : $department";
+ }
+
+ # if there are any dates
+ if ($form->{fromdate} || $form->{todate}) {
+ if ($form->{fromdate}) {
+ $fromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ }
+ if ($form->{todate}) {
+ $todate = $locale->date(\%myconfig, $form->{todate}, 1);
+ }
+
+ $form->{period} = "$fromdate - $todate";
+ } else {
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ }
+
+ if ($form->{db} eq 'ar') {
+ $name = $locale->text('Customer');
+ $invoice = 'is.pl';
+ $arap = 'ar.pl';
+ }
+ if ($form->{db} eq 'ap') {
+ $name = $locale->text('Vendor');
+ $invoice = 'ir.pl';
+ $arap = 'ap.pl';
+ }
+
+ $option .= "<br>" if $option;
+ $option .= "$form->{period}";
+
+ $column_header{id} =
+ qq|<th><a class=listheading href=$href&sort=id>|
+ . $locale->text('ID')
+ . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th><a class=listheading href=$href&sort=invnumber>|
+ . $locale->text('Invoice')
+ . qq|</th>|;
+ $column_header{transdate} =
+ qq|<th><a class=listheading href=$href&sort=transdate>|
+ . $locale->text('Date')
+ . qq|</th>|;
+ $column_header{netamount} =
+ qq|<th class=listheading>| . $locale->text('Amount') . qq|</th>|;
+ $column_header{tax} =
+ qq|<th class=listheading>| . $locale->text('Tax') . qq|</th>|;
+ $column_header{amount} =
+ qq|<th class=listheading>| . $locale->text('Total') . qq|</th>|;
+
+ $column_header{name} =
+ qq|<th><a class=listheading href=$href&sort=name>$name</th>|;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=$colspan>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ # add sort and escape callback
+ $callback = $form->escape($callback . "&sort=$form->{sort}");
+
+ if (@{ $form->{TR} }) {
+ $sameitem = $form->{TR}->[0]->{ $form->{sort} };
+ }
+
+ foreach $ref (@{ $form->{TR} }) {
+
+ $module = ($ref->{invoice}) ? $invoice : $arap;
+
+ if ($form->{l_subtotal} eq 'Y') {
+ if ($sameitem ne $ref->{ $form->{sort} }) {
+ &tax_subtotal;
+ $sameitem = $ref->{ $form->{sort} };
+ }
+ }
+
+ $totalnetamount += $ref->{netamount};
+ $totaltax += $ref->{tax};
+ $ref->{amount} = $ref->{netamount} + $ref->{tax};
+
+ $subtotalnetamount += $ref->{netamount};
+ $subtotaltax += $ref->{tax};
+
+ map {
+ $ref->{$_} = $form->format_amount(\%myconfig, $ref->{$_}, 2, " ");
+ } qw(netamount tax amount);
+
+ $column_data{id} = qq|<td>$ref->{id}</td>|;
+ $column_data{invnumber} =
+ qq|<td><a href=$module?path=$form->{path}&action=edit&id=$ref->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber}</a></td>|;
+ $column_data{transdate} = qq|<td>$ref->{transdate}</td>|;
+ $column_data{name} = qq|<td>$ref->{name} </td>|;
+
+ map { $column_data{$_} = qq|<td align=right>$ref->{$_}</td>| }
+ qw(netamount tax amount);
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ if ($form->{l_subtotal} eq 'Y') {
+ &tax_subtotal;
+ }
+
+ map { $column_data{$_} = qq|<th> </th>| } @column_index;
+
+ print qq|
+ </tr>
+ <tr class=listtotal>
+|;
+
+ $total =
+ $form->format_amount(\%myconfig, $totalnetamount + $totaltax, 2, " ");
+ $totalnetamount =
+ $form->format_amount(\%myconfig, $totalnetamount, 2, " ");
+ $totaltax = $form->format_amount(\%myconfig, $totaltax, 2, " ");
+
+ $column_data{netamount} =
+ qq|<th class=listtotal align=right>$totalnetamount</th>|;
+ $column_data{tax} = qq|<th class=listtotal align=right>$totaltax</th>|;
+ $column_data{amount} = qq|<th class=listtotal align=right>$total</th>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub tax_subtotal {
+ $lxdebug->enter_sub();
+
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $subtotalnetamount =
+ $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ");
+ $subtotaltax = $form->format_amount(\%myconfig, $subtotaltax, 2, " ");
+ $subtotal =
+ $form->format_amount(\%myconfig, $subtotalnetamount + $subtotaltax,
+ 2, " ");
+
+ $column_data{netamount} =
+ "<th class=listsubtotal align=right>$subtotalnetamount</th>";
+ $column_data{tax} = "<th class=listsubtotal align=right>$subtotaltax</th>";
+ $column_data{amount} = "<th class=listsubtotal align=right>$subtotal</th>";
+
+ $subtotalnetamount = 0;
+ $subtotaltax = 0;
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_payments {
+ $lxdebug->enter_sub();
+
+ if ($form->{account}) {
+ ($form->{paymentaccounts}) = split /--/, $form->{account};
+ }
+ if ($form->{department}) {
+ ($department, $form->{department_id}) = split /--/, $form->{department};
+ $option = $locale->text('Department') . " : $department";
+ }
+
+ RP->payments(\%myconfig, \%$form);
+
+ @columns =
+ $form->sort_columns(qw(transdate reference name paid source memo));
+
+ # construct href
+ $account = $form->escape($form->{account});
+ $title = $form->escape($form->{title});
+ $department = $form->escape($form->{department});
+ $form->{paymentaccounts} =~ s/ /%20/g;
+ $reference = $form->escape($form->{reference});
+ $source = $form->escape($form->{source});
+ $memo = $form->escape($form->{memo});
+
+ $href =
+ "$form->{script}?path=$form->{path}&action=list_payments&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&fx_transaction=$form->{fx_transaction}&db=$form->{db}&prepayment=$form->{prepayment}&title=$title&account=$account&department=$department&paymentaccounts=$form->{paymentaccounts}&reference=$reference&source=$source&memo=$memo";
+
+ # construct callback
+ $account = $form->escape($form->{account}, 1);
+ $title = $form->escape($form->{title}, 1);
+ $department = $form->escape($form->{department}, 1);
+ $reference = $form->escape($form->{reference}, 1);
+ $source = $form->escape($form->{source}, 1);
+ $memo = $form->escape($form->{memo}, 1);
+
+ $form->{callback} =
+ "$form->{script}?path=$form->{path}&action=list_payments&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&fx_transaction=$form->{fx_transaction}&db=$form->{db}&prepayment=$form->{prepayment}&title=$title&account=$account&department=$department&paymentaccounts=$form->{paymentaccounts}&reference=$reference&source=$source&memo=$memo&sort=$form->{sort}";
+ $callback = $form->escape($form->{callback});
+
+ $column_header{name} =
+ "<th><a class=listheading href=$href&sort=name>"
+ . $locale->text('Description')
+ . "</a></th>";
+ $column_header{reference} =
+ "<th><a class=listheading href=$href&sort=invnumber>"
+ . $locale->text('Reference')
+ . "</a></th>";
+ $column_header{transdate} =
+ "<th><a class=listheading href=$href&sort=transdate>"
+ . $locale->text('Date')
+ . "</a></th>";
+ $column_header{paid} =
+ "<th class=listheading>" . $locale->text('Amount') . "</a></th>";
+ $column_header{source} =
+ "<th><a class=listheading href=$href&sort=source>"
+ . $locale->text('Source')
+ . "</a></th>";
+ $column_header{memo} =
+ "<th><a class=listheading href=$href&sort=memo>"
+ . $locale->text('Memo')
+ . "</a></th>";
+
+ if ($form->{fromdate}) {
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{fromdate}, 1);
+ }
+ if ($form->{todate}) {
+ $option .= "\n<br>" if ($option);
+ $option .=
+ $locale->text('bis') . " "
+ . $locale->date(\%myconfig, $form->{todate}, 1);
+ }
+
+ @column_index = @columns;
+ $colspan = $#column_index + 1;
+
+ $form->header;
+
+ print qq|
+<body>
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>$option</td>
+ </tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "\n$column_header{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ foreach $ref (sort { $a->{accno} cmp $b->{accno} } @{ $form->{PR} }) {
+
+ next unless @{ $form->{ $ref->{id} } };
+
+ print qq|
+ <tr>
+ <th colspan=$colspan align=left>$ref->{accno}--$ref->{description}</th>
+ </tr>
+|;
+
+ foreach $payment (@{ $form->{ $ref->{id} } }) {
+
+ $module = $payment->{module};
+ $module = 'is' if ($payment->{invoice} && $payment->{module} eq 'ar');
+ $module = 'ir' if ($payment->{invoice} && $payment->{module} eq 'ap');
+
+ $href =
+ qq|${module}.pl?path=$form->{path}&action=edit&id=$payment->{id}&login=$form->{login}&password=$form->{password}&callback=$callback|;
+
+ $column_data{name} = "<td>$payment->{name} </td>";
+ $column_data{reference} =
+ qq|<td><a href=$href>$payment->{invnumber}</a></td>|;
+ $column_data{transdate} = "<td>$payment->{transdate} </td>";
+ $column_data{paid} =
+ "<td align=right>"
+ . $form->format_amount(\%myconfig, $payment->{paid}, 2, " ")
+ . "</td>";
+ $column_data{source} = "<td>$payment->{source} </td>";
+ $column_data{memo} = "<td>$payment->{memo} </td>";
+
+ $subtotalpaid += $payment->{paid};
+ $totalpaid += $payment->{paid};
+
+ $i++;
+ $i %= 2;
+ print qq|
+ <tr class=listrow$i>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ }
+
+ # print subtotals
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{paid} =
+ "<th class=listsubtotal align=right>"
+ . $form->format_amount(\%myconfig, $subtotalpaid, 2, " ") . "</th>";
+
+ print qq|
+ <tr class=listsubtotal>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+ $subtotalpaid = 0;
+
+ }
+
+ # print total
+ map { $column_data{$_} = "<td> </td>" } @column_index;
+
+ $column_data{paid} =
+ "<th class=listtotal align=right>"
+ . $form->format_amount(\%myconfig, $totalpaid, 2, " ") . "</th>";
+
+ print qq|
+ <tr class=listtotal>
+|;
+
+ map { print "\n$column_data{$_}" } @column_index;
+
+ print qq|
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+
+</body>
+</html>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub config {
+ $lxdebug->enter_sub();
+ edit();
+
+ #$form->header;
+ #print qq|Hallo|;
+ $lxdebug->leave_sub();
+}
+
+sub debug {
+
+ $form->debug();
+
+}
+
+sub winston_export {
+ $lxdebug->enter_sub();
+ print(STDERR "Winston Export1\n");
+
+ #create_winston();
+ $form->{winston} = 1;
+ &generate_ustva();
+ $lxdebug->leave_sub();
+}
+
+sub print_options {
+ $lxdebug->enter_sub();
+
+ $form->{sendmode} = "attachment";
+ $form->{copies} = 2 unless $form->{copies};
+
+ $form->{PD}{ $form->{type} } = "selected";
+ $form->{DF}{ $form->{format} } = "selected";
+ $form->{OP}{ $form->{media} } = "selected";
+ $form->{SM}{ $form->{sendmode} } = "selected";
+
+ if ($form->{report} eq 'ustva') {
+ $type = qq|
+ <option value=ustva $form->{PD}{ustva}>| . $locale->text('ustva');
+ } else {
+ $type = qq|
+ <option value=statement $form->{PD}{statement}>|
+ . $locale->text('Statement');
+ }
+
+ if ($form->{media} eq 'email') {
+ $media = qq|
+ <option value=attachment $form->{SM}{attachment}>|
+ . $locale->text('Attachment') . qq|
+ <option value=inline $form->{SM}{inline}>| . $locale->text('In-line');
+ } else {
+ $media = qq|
+ <option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
+ if ($myconfig{printer} && $latex) {
+ $media .= qq|
+ <option value=printer $form->{OP}{printer}>|
+ . $locale->text('Printer');
+ }
+ }
+
+ if ($latex) {
+ $format .= qq|
+ <option value=html $form->{DF}{html}>|
+ . $locale->text('HTML') . qq|
+ <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
+ if ($form->{report} ne 'ustva') {
+ $format . qq|
+ <option value=postscript $form->{DF}{postscript}>|
+ . $locale->text('Postscript');
+ }
+ }
+
+ print qq|
+<table>
+ <tr>
+ <td><select name=type>$type</select></td>
+ <td><select name=format>$format</select></td>
+ <td><select name=media>$media</select></td>
+|;
+
+ if ($myconfig{printer} && $latex && $form->{media} ne 'email') {
+ print qq|
+ <td>| . $locale->text('Copies') . qq|
+ <input name=copies size=2 value=$form->{copies}></td>
+|;
+ }
+
+ print qq|
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_bwa {
+ $lxdebug->enter_sub();
+ $form->{padding} = " ";
+ $form->{bold} = "<b>";
+ $form->{endbold} = "</b>";
+ $form->{br} = "<br>";
+
+ # &get_project(generate_bwa);
+
+ if ($form->{reporttype} eq "custom") {
+
+ #forgotten the year --> thisyear
+ if ($form->{year} !~ m/^\d\d\d\d$/) {
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0) =~
+ /(\d\d\d\d)/;
+ $form->{year} = $1;
+ }
+
+ #yearly report
+ if ($form->{duetyp} eq "13") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.12.$form->{year}";
+ }
+
+ #Quater reports
+ if ($form->{duetyp} eq "A") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.03.$form->{year}";
+ }
+ if ($form->{duetyp} eq "B") {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.06.$form->{year}";
+ }
+ if ($form->{duetyp} eq "C") {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.09.$form->{year}";
+ }
+ if ($form->{duetyp} eq "D") {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.12.$form->{year}";
+ }
+
+ #Monthly reports
+ SWITCH: {
+ $form->{duetyp} eq "1" && do {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.1.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.01.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "2" && do {
+ $form->{fromdate} = "1.2.$form->{year}";
+
+ #this works from 1901 to 2099, 1900 and 2100 fail.
+ $leap = ($form->{year} % 4 == 0) ? "29" : "28";
+ $form->{todate} = "$leap.2.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "$leap.02.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "3" && do {
+ $form->{fromdate} = "1.3.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.03.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "4" && do {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.4.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.04.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "5" && do {
+ $form->{fromdate} = "1.5.$form->{year}";
+ $form->{todate} = "31.5.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.05.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "6" && do {
+ $form->{fromdate} = "1.6.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.06.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "7" && do {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "31.7.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.07.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "8" && do {
+ $form->{fromdate} = "1.8.$form->{year}";
+ $form->{todate} = "31.8.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.08.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "9" && do {
+ $form->{fromdate} = "1.9.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.09.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "10" && do {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.10.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.10.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "11" && do {
+ $form->{fromdate} = "1.11.$form->{year}";
+ $form->{todate} = "30.11.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "30.11.$form->{year}";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "12" && do {
+ $form->{fromdate} = "1.12.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{comparefromdate} = "1.01.$form->{year}";
+ $form->{comparetodate} = "31.12.$form->{year}";
+ last SWITCH;
+ };
+ }
+ } else {
+ ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate});
+ $form->{fromdate} = "${dd}.${mm}.${yy}";
+ ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate});
+ $form->{todate} = "${dd}.${mm}.${yy}";
+ $form->{comparefromdate} = "01.01.$yy";
+ $form->{comparetodate} = $form->{todate};
+ }
+
+ RP->bwa(\%myconfig, \%$form);
+
+ ($form->{department}) = split /--/, $form->{department};
+
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ $form->{todate} = $form->current_date(\%myconfig) unless $form->{todate};
+
+ # if there are any dates construct a where
+ if ($form->{fromdate} || $form->{todate}) {
+
+ unless ($form->{todate}) {
+ $form->{todate} = $form->current_date(\%myconfig);
+ }
+
+ my %germandate = ("dateformat" => "dd.mm.yyyy");
+
+ $longtodate = $locale->date(\%germandate, $form->{todate}, 1);
+ $shorttodate = $locale->date(\%germandate, $form->{todate}, 0);
+
+ $longfromdate = $locale->date(\%germandate, $form->{fromdate}, 1);
+ $shortfromdate = $locale->date(\%germandate, $form->{fromdate}, 0);
+
+ $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{period} =
+ $locale->text('for Period')
+ . qq|<br>\n$longfromdate |
+ . $locale->text('bis')
+ . qq| $longtodate|;
+ }
+
+ # setup variables for the form
+ @a = qw(company address businessnumber);
+ map { $form->{$_} = $myconfig{$_} } @a;
+ $form->{address} =~ s/\\n/<br>/g;
+ $form->{templates} = $myconfig{templates};
+
+ $form->{IN} = "bwa.html";
+
+ $form->parse_template;
+
+ $lxdebug->leave_sub();
+}
+
+sub generate_ustva {
+ $lxdebug->enter_sub();
+
+ # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
+ # Einlesen der Finanzamtdaten
+ print(STDERR "Winston4\n");
+ get_config($userspath, 'finanzamt.ini');
+
+ # &get_project(generate_bwa);
+ @anmeldungszeitraum =
+ qw(0401, 0402, 0403, 0404, 0405, 0405, 0406, 0407, 0408, 0409, 0410, 0411, 0412, 0441, 0442, 0443, 0444);
+
+ foreach $item (@anmeldungszeitraum) {
+ $form->{$item} = "";
+ }
+ print(STDERR "Winston2\n");
+ if ($form->{reporttype} eq "custom") {
+
+ #forgotten the year --> thisyear
+ if ($form->{year} !~ m/^\d\d\d\d$/) {
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0) =~
+ /(\d\d\d\d)/;
+ $form->{year} = $1;
+ }
+
+ #yearly report
+ if ($form->{duetyp} eq "13") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ }
+
+ #Quater reports
+ if ($form->{duetyp} eq "A") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{"0441"} = "X";
+ }
+ if ($form->{duetyp} eq "B") {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{"0442"} = "X";
+ }
+ if ($form->{duetyp} eq "C") {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{"0443"} = "X";
+ }
+ if ($form->{duetyp} eq "D") {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{"0444"} = "X";
+ }
+
+ #Monthly reports
+ SWITCH: {
+ $form->{duetyp} eq "1" && do {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.1.$form->{year}";
+ $form->{"0401"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "2" && do {
+ $form->{fromdate} = "1.2.$form->{year}";
+
+ #this works from 1901 to 2099, 1900 and 2100 fail.
+ $leap = ($form->{year} % 4 == 0) ? "29" : "28";
+ $form->{todate} = "$leap.2.$form->{year}";
+ $form->{"0402"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "3" && do {
+ $form->{fromdate} = "1.3.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{"0403"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "4" && do {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.4.$form->{year}";
+ $form->{"0404"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "5" && do {
+ $form->{fromdate} = "1.5.$form->{year}";
+ $form->{todate} = "31.5.$form->{year}";
+ $form->{"0405"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "6" && do {
+ $form->{fromdate} = "1.6.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{"0406"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "7" && do {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "31.7.$form->{year}";
+ $form->{"0407"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "8" && do {
+ $form->{fromdate} = "1.8.$form->{year}";
+ $form->{todate} = "31.8.$form->{year}";
+ $form->{"0408"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "9" && do {
+ $form->{fromdate} = "1.9.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{"0409"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "10" && do {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.10.$form->{year}";
+ $form->{"0410"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "11" && do {
+ $form->{fromdate} = "1.11.$form->{year}";
+ $form->{todate} = "30.11.$form->{year}";
+ $form->{"0411"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "12" && do {
+ $form->{fromdate} = "1.12.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{"0412"} = "X";
+ last SWITCH;
+ };
+ }
+ }
+
+ # $locale->date(\%myconfig, $form->current_date(\%myconfig), 0)=~ /(\d\d\d\d)/;
+ # $form->{year}= $1;
+ # $form->{fromdate}="1.1.$form->{year}";
+ # $form->{todate}="31.3.$form->{year}";
+ # $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ # }
+
+ RP->ustva(\%myconfig, \%$form);
+
+ ($form->{department}) = split /--/, $form->{department};
+
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
+ $form->{todate} = $form->current_date(\%myconfig) unless $form->{todate};
+
+ # if there are any dates construct a where
+ if ($form->{fromdate} || $form->{todate}) {
+
+ unless ($form->{todate}) {
+ $form->{todate} = $form->current_date(\%myconfig);
+ }
+
+ $longtodate = $locale->date(\%myconfig, $form->{todate}, 1);
+ $shorttodate = $locale->date(\%myconfig, $form->{todate}, 0);
+
+ $longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
+ $shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
+
+ $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{period} =
+ $locale->text('for Period')
+ . qq|<br>\n$longfromdate |
+ . $locale->text('bis')
+ . qq| $longtodate|;
+ }
+
+ if ($form->{comparefromdate} || $form->{comparetodate}) {
+ $longcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 1);
+ $shortcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 0);
+
+ $longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
+ $shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
+
+ $form->{last_period} = "$shortcomparefromdate<br>\n$shortcomparetodate";
+ $form->{period} .=
+ "<br>\n$longcomparefromdate "
+ . $locale->text('bis')
+ . qq| $longcomparetodate|;
+ }
+
+ $form->{Datum_heute} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0);
+
+ if ( $form->{format} eq 'pdf'
+ or $form->{format} eq 'postscript') {
+ $form->{padding} = "~~";
+ $form->{bold} = "\textbf{";
+ $form->{endbold} = "}";
+ $form->{br} = '\\\\';
+
+ @numbers = qw(51r 86r 97r 93r 96 43 45
+ 66 62 67);
+ foreach $number (@numbers) {
+ $form->{$number} =~ s/,/~~/g;
+ }
+
+ } elsif ($form->{format} eq 'html') {
+ $form->{padding} = " ";
+ $form->{bold} = "<b>";
+ $form->{endbold} = "</b>";
+ $form->{br} = "<br>"
+
+ }
+
+ # setup variables for the form
+ @a = qw(company address businessnumber);
+ map { $form->{$_} = $myconfig{$_} } @a;
+
+ $form->{address} =~ s/\\n/$form->{br}/g;
+
+ if ($form->{winston} eq '1') {
+ print(STDERR "fast bei winston\n");
+ create_winston();
+
+ } else {
+ $form->{templates} = $myconfig{templates};
+ $form->{IN} = "$form->{type}";
+ $form->{IN} .= '.tex'
+ if ( $form->{format} eq 'pdf'
+ or $form->{format} eq 'postscript');
+ $form->{IN} .= '.html' if ($form->{format} eq 'html');
+
+ $form->parse_template(\%myconfig, $userspath);
+
+ # $form->parse_template;
+ }
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+#!/bin/perl
+#=====================================================================
+# Lx-Office ERP
+# Copyright (c) 2004 by Udo Spallek, Aachen
+#
+# Author: Udo Spallek
+# Email: udono@gmx.net
+# Web: http://www.lx-office.org
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+# German Tax authority Module and later ELSTER Interface
+#======================================================================
+
+require "$form->{path}/arap.pl";
+
+#use strict;
+#no strict 'refs';
+#use diagnostics;
+#use warnings FATAL=> 'all';
+#use vars qw($locale $form %myconfig);
+#our ($myconfig);
+#use CGI::Carp "fatalsToBrowser";
+
+use SL::PE;
+use SL::RP;
+use SL::USTVA;
+use SL::User;
+1;
+
+# this is for our long dates
+# $locale->text('January')
+# $locale->text('February')
+# $locale->text('March')
+# $locale->text('April')
+# $locale->text('May ')
+# $locale->text('June')
+# $locale->text('July')
+# $locale->text('August')
+# $locale->text('September')
+# $locale->text('October')
+# $locale->text('November')
+# $locale->text('December')
+
+# this is for our short month
+# $locale->text('Jan')
+# $locale->text('Feb')
+# $locale->text('Mar')
+# $locale->text('Apr')
+# $locale->text('May')
+# $locale->text('Jun')
+# $locale->text('Jul')
+# $locale->text('Aug')
+# $locale->text('Sep')
+# $locale->text('Oct')
+# $locale->text('Nov')
+# $locale->text('Dec')
+#############################
+
+sub report {
+ $lxdebug->enter_sub();
+ my $myconfig = \%myconfig;
+ use CGI;
+ $form->{title} = $locale->text('UStVA');
+ $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1
+
+ # $accrual = ($eur) ? "" : "checked";
+ # $cash = ($eur) ? "checked" : "";
+ my $year = '';
+ my $null = '';
+ ($null, $null, $null, $null, $null, $year, $null, $null, $null) =
+ localtime();
+ $year += 1900;
+
+ my $department = '';
+ local $hide = '';
+ $form->header;
+
+ print qq|
+<body>
+
+<form method=post action=$form->{script}>
+
+<input type=hidden name=title value="$form->{title}">
+
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ $department
+|;
+
+ # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
+ # Einlesen der Finanzamtdaten
+ &get_config($userspath, 'finanzamt.ini');
+
+ my @a = qw(signature name company address businessnumber tel fax email
+ company_street company_city company_email);
+ map { $form->{$_} = $myconfig->{$_} } @a;
+
+ my $oeffnungszeiten = $form->{FA_Oeffnungszeiten};
+ $oeffnungszeiten =~ s/\\\\n/<br>/g;
+ print qq|
+ <tr >
+ <td width="50%" align="left" valign="top">
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Firma') . qq|</b>
+ </legend>
+ |;
+ if ($form->{company} ne '') {
+ print qq|<h3>$form->{company}</h3>\n|;
+ } else {
+ print qq|
+ <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
+ | . $locale->text('Kein Firmenname hinterlegt!') . qq|</a><br>
+ |;
+ }
+
+ #klären, ob $form->{company_street|_address} gesetzt sind
+ ###
+ if ($form->{address} ne '') {
+ my $temp = $form->{address};
+ $temp =~ s/\\n/<br \/>/;
+ print qq|$temp|;
+ ($form->{company_street}, $form->{company_city}) = split("<br \/", $temp);
+ } elsif ($form->{address} eq ''
+ and ($form->{company_street} ne '' and $form->{company_city} ne '')) {
+ print qq|$form->{company_street}<br>\n| if ($form->{company_street} ne '');
+ print qq|$form->{company_city}\n| if ($form->{company_city} ne '');
+ } elsif ($form->{company_street} eq '' or $form->{company_city} eq '') {
+ print qq|
+ <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
+ | . $locale->text('Keine Firmenadresse hinterlegt!') . qq|</a>\n|;
+ }
+
+ print qq|
+ <br>
+ <br>
+ | . $locale->text('Tel.: ') . qq|
+ $form->{tel}
+ <br>
+ | . $locale->text('Fax.: ') . qq|
+ $form->{fax}
+ <br>
+ <br>
+ $form->{email}
+ <br>
+ <br>
+ | . $locale->text('Steuernummer: ') . qq|
+ |;
+
+ if ($form->{steuernummer} ne '') {
+ print qq|$form->{steuernummer}|;
+ } else {
+ print qq|
+ <a href="ustva.pl?path=$form->{path}&action=edit&level=Programm--Finanzamteinstellungen&login=$form->{login}&password=$form->{password}">
+ Keine Steuernummer hinterlegt!</a><br>|;
+ }
+ print qq|
+ <!--<br>
+ | . $locale->text('ELSTER-Steuernummer: ') . qq|
+ $form->{elstersteuernummer}
+ <br>-->
+ <br>
+
+ </fieldset>
+ <br>
+ |;
+ if ($form->{FA_steuerberater_name} ne '') {
+ print qq|
+ <fieldset>
+ <legend>
+ <input checked="checked" title="|
+ . $locale->text('Beraterdaten in UStVA übernehmen?')
+ . qq|" name="FA_steuerberater" id=steuerberater class=checkbox type=checkbox value="1">
+ <b>| . $locale->text('Steuerberater/-in') . qq|</b>
+ </legend>
+
+ $form->{FA_steuerberater_name}<br>
+ $form->{FA_steuerberater_street}<br>
+ $form->{FA_steuerberater_city}<br>
+ Tel: $form->{FA_steuerberater_tel}<br>
+ </fieldset>
+ <br>
+ |;
+ }
+ print qq|
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Voranmeldezeitraum') . qq|</b>
+ </legend>
+ |;
+ &ustva_vorauswahl();
+
+ my @years = ();
+ if (not defined $form->{all_years}) {
+
+ # accounting years if SQL-Ledger Version < 2.4.1
+ # $year = $form->{year} * 1;
+ @years = sort { $b <=> $a } (2000 .. ($year));
+ $form->{all_years} = \@years;
+ }
+ map { $form->{selectaccountingyear} .= qq|<option>$_\n| }
+ @{ $form->{all_years} };
+ print qq|
+ <select name=year title="| . $locale->text('Year') . qq|">
+ |;
+ my $key = '';
+ foreach $key (@years) {
+ print qq|<option |;
+ print qq|selected| if ($key eq $form->{year});
+ print qq| >$key</option>
+ |;
+ }
+
+ my $voranmeld = $form->{FA_voranmeld};
+ print qq| </select>|;
+ my $checked = '';
+ $checked = "checked" if ($form->{kz10} eq '1');
+ print qq|
+ <input name="FA_10" id=FA_10 class=checkbox type=checkbox value="1" $checked title = "|
+ . $locale->text(
+ 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)')
+ . qq|">
+ | . $locale->text('Berichtigte Anmeldung') . qq|
+ <br>
+ |;
+
+ if ($voranmeld ne '') {
+ print qq|
+ <br>
+ | . $locale->text($voranmeld) . qq|
+ |;
+ print qq| mit Dauerfristverlängerung| if ($form->{FA_dauerfrist} eq '1');
+ print qq|
+
+ <br>
+ |;
+ }
+ if ($form->{method} ne '') {
+ print qq|| . $locale->text('Method') . qq|: |;
+ print qq|| . $locale->text('accrual') . qq||
+ if ($form->{method} eq 'accrual');
+ print qq|| . $locale->text('cash') . qq|| if ($form->{method} eq 'cash');
+ }
+ print qq|
+ </fieldset>
+
+ </td>|;
+
+ if ($form->{FA_Name} ne '') {
+ print qq|
+ <td width="50%" valign="top">
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Finanzamt') . qq|</b>
+ </legend>
+ <h3>$form->{FA_Name}</h2>
+ |;
+
+ #if ($form->{FA_Ergaenzung_Name ne ''}){
+ # print qq|
+ # $form->{FA_Ergaenzung_Name} 
+ # <br>
+ # |;
+ #}
+ print qq|
+ $form->{FA_Strasse}
+ <br>
+ $form->{FA_PLZ} $form->{FA_Ort}
+ <br>
+ <br>
+ | . $locale->text('Tel. : ') . qq|
+ $form->{FA_Telefon}
+ <br>
+ | . $locale->text('Fax. : ') . qq|
+ $form->{FA_Fax}
+ <br>
+ <br>
+ <a href="mailto:$form->{FA_Email}?subject=|
+ . CGI::escape("Steuer Nr: $form->{steuernummer}:")
+ . qq|&body=|
+ . CGI::escape(
+ "Sehr geehrte Damen und Herren,\n\n\nMit freundlichen Grüßen\n\n")
+ . CGI::escape($form->{signature}) . qq|">
+ $form->{FA_Email}
+ </a>
+ <br>
+ <a href="$form->{FA_Internet}">
+ $form->{FA_Internet}
+ </a>
+ <br>
+ <br>
+ | . $locale->text('Öffnungszeiten') . qq|
+ <br>
+ $oeffnungszeiten
+ <br>
+ |;
+
+ my $FA_1 =
+ ( $form->{FA_BLZ_1} ne ''
+ && $form->{FA_Kontonummer_1} ne ''
+ && $form->{FA_Bankbezeichnung_1} ne '');
+ my $FA_2 =
+ ( $form->{FA_BLZ_2} ne ''
+ && $form->{FA_Kontonummer_2} ne ''
+ && $form->{FA_Bankbezeichnung_oertlich} ne '');
+
+ if ($FA_1 && $FA_2) {
+ print qq|
+ <br>
+ | . $locale->text('Bankverbindungen') . qq|
+ <table>
+ <tr>
+ <td>
+ $form->{FA_Bankbezeichnung_1}
+ <br>
+ | . $locale->text('Konto: ') . qq|
+ $form->{FA_Kontonummer_1}
+ <br>
+ | . $locale->text('BLZ: ') . qq|
+ $form->{FA_BLZ_1}
+ </td>
+ <td>
+ $form->{FA_Bankbezeichnung_oertlich}
+ <br>
+ | . $locale->text('Konto: ') . qq|
+ $form->{FA_Kontonummer_2}
+ <br>
+ | . $locale->text('BLZ: ') . qq|
+ $form->{FA_BLZ_2}
+ </td>
+ </tr>
+ </table>
+ <br>|;
+ } elsif ($FA_1) {
+ print qq|
+ <br>
+ | . $locale->text('Bankverbindung') . qq|
+ <br>
+ <br>
+ $form->{FA_Bankbezeichnung_1}
+ <br>
+ | . $locale->text('Konto: ') . qq|
+ $form->{FA_Kontonummer_1}
+ <br>
+ | . $locale->text('BLZ: ') . qq|
+ $form->{FA_BLZ_1} <br>
+ <br>|;
+ } elsif ($FA_2) {
+ print qq|
+ <br>
+ | . $locale->text('Bankverbindung') . qq|
+ <br>
+ <br>
+ $form->{FA_Bankbezeichnung_oertlich}
+ <br>
+ | . $locale->text('Konto: ') . qq|
+ $form->{FA_Kontonummer_2}
+ <br>
+ | . $locale->text('BLZ: ') . qq|
+ $form->{FA_BLZ_2}
+ |;
+ }
+ print qq|
+
+ </fieldset>
+ <br>
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Ausgabeformat') . qq|</b>
+ </legend>
+ |;
+
+ &show_options;
+ my $ausgabe = '1';
+ print qq|
+ </fieldset>
+ |;
+
+ # Stichtag der nächsten USTVA berechnen
+ #
+ # ($stichtag, $tage_bis, $ical) = FA->stichtag($today[dd.mm.yyyy],
+ # $FA_dauerfrist[1,0],
+ # $FA_voranmeld[month, quarter])
+ #$tmpdateform= $myconfig{dateformat};
+ # $myconfig{dateformat}= "dd.mm.yyyy";
+ # $form->{today} = $form->datetonum($form->current_date(\%myconfig), \%myconfig);
+ # ($stichtag, $description, $tage_bis, $ical) = FA::stichtag($form->{today}, $form->{FA_dauerfrist},$form->{FA_voranmeld});
+ # $form->{today} = $form->date($stichtag, \%myconfig );
+ #$myconfig{dateformat}= $tmpdateform;
+
+ #print qq|
+ # <br>
+ # <br>
+ # <fieldset>
+ # <label>
+ # |.$locale->text('Anstehende Voranmeldungen').qq|
+ # </label>
+ # <h2 class="confirm">$stichtag<h2>
+ # <h3>$description</h3>
+ # <h4>$form->{today}</h4>
+ #
+ # </fieldset>|;
+
+ } else {
+ print qq|
+ <td width="50%" valign="bottom">
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Hinweise') . qq|</b>
+ </legend>
+ <h2 class="confirm">Die Ausgabefunktionen sind wegen fehlender Daten deaktiviert.</h2>
+ <h3>Hilfe:</h3>
+ <ul>
+ <li><a href="ustva.pl?path=$form->{path}&action=edit&level=Programm--Finanzamteinstellungen&login=$form->{login}&password=$form->{password}">
+ Bitte 'Einstellungen' wählen um die Erweiterten UStVa Funktionen nutzen zu können.</a></li>
+ <br>
+ <li><a href="am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}">
+ Firmendaten können bei den Benutzereinstellungen verändert werden.</a></li>
+ </ul>
+ </fieldset>
+ |;
+ my $ausgabe = '';
+ $hide = q|disabled="disabled"|;
+ }
+
+ print qq|
+ </td>
+ </tr>
+ |;
+
+ #}# end if report = ustva
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size="3" noshade></td>
+ </tr>
+ </table>
+
+ <br>
+ <input type="hidden" name="address" value="$form->{address}">
+ <input type="hidden" name="reporttype" value="custom">
+ <input type="hidden" name="company_street" value="$form->{company_street}">
+ <input type="hidden" name="company_city" value="$form->{company_city}">
+ <input type="hidden" name="path" value="$form->{path}">
+ <input type="hidden" name="login" value="$form->{login}">
+ <input type="hidden" name="password" value="$form->{password}">
+ <table width="100%">
+ <tr>
+ <td align="left">
+ <input type=hidden name=nextsub value=generate_ustva>
+ <input $hide type=submit class=submit name=action value="|
+ . $locale->text('Show') . qq|">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('Config') . qq|">
+ </td>
+ <td align="right">
+
+ <!--</form>
+ <form action="doc/ustva.html" method="get">
+ -->
+ <input type=submit class=submit name=action value="|
+ . $locale->text('Help') . qq|">
+ <!-- </form>-->
+ </td>
+ </tr>
+ </table>
+ |;
+
+ print qq|
+
+ </body>
+ </html>
+ |;
+
+ $lxdebug->leave_sub();
+}
+
+#############################
+
+sub help {
+ $lxdebug->enter_sub();
+
+ # parse help documents under doc
+ my $tmp = $form->{templates};
+ $form->{templates} = 'doc';
+ $form->{help} = 'ustva';
+ $form->{type} = 'help';
+ $form->{format} = 'html';
+ &generate_ustva();
+
+ #$form->{templates} = $tmp;
+ $lxdebug->leave_sub();
+}
+
+sub show {
+ $lxdebug->enter_sub();
+
+ #&generate_ustva();
+ no strict 'refs';
+ &{ $form->{nextsub} };
+ use strict 'refs';
+ $lxdebug->leave_sub();
+}
+
+sub ustva_vorauswahl {
+ $lxdebug->enter_sub();
+
+ #Aktuelles Datum zerlegen:
+ $locale->date(\%myconfig, $form->current_date(\%myconfig, '0', '0'), 0) =~
+ /(\d\d).(\d\d).(\d\d\d\d)/;
+
+ #$locale->date($myconfig, $form->current_date($myconfig), 0)=~ /(\d\d).(\d\d).(\d\d\d\d)/;
+ $form->{day} = $1;
+ $form->{month} = $2;
+ $form->{year} = $3;
+ my $sel = '';
+ my $yymmdd = '';
+
+ # Testdaten erzeugen:
+ #$form->{day}= '11';
+ #$form->{month}= '01';
+ #$form->{year}= 2004;
+ print qq|
+ <input type=hidden name=day value=$form->{day}>
+ <input type=hidden name=month value=$form->{month}>
+ <input type=hidden name=yymmdd value=$yymmdd>
+ <input type=hidden name=sel value=$sel>
+ |;
+
+ if ($form->{FA_voranmeld} eq 'month') {
+
+ # Vorauswahl bei monatlichem Voranmeldungszeitraum
+ print qq|
+ <select name="duetyp" id=zeitraum title="|
+ . $locale->text('Hier den Berechnungszeitraum auswählen...') . qq|">
+ |;
+
+ my %liste = ('01' => 'January',
+ '02' => 'February',
+ '03' => 'March',
+ '04' => 'April',
+ '05' => 'May',
+ '06' => 'June',
+ '07' => 'July',
+ '08' => 'August',
+ '09' => 'September',
+ '10' => 'October',
+ '11' => 'November',
+ '12' => 'December');
+
+ my $yy = $form->{year} * 10000;
+ $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
+ $sel = '';
+ my $dfv = '0'; # Offset für Dauerfristverlängerung
+ #$dfv = '100' if ($form->{FA_dauerfrist} eq '1');
+
+ SWITCH: {
+ $yymmdd <= ($yy + 110 + $dfv) && do {
+ $form->{year} = $form->{year} - 1;
+ $sel = '12';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 210 + $dfv) && do {
+ $sel = '01';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 310 + $dfv) && do {
+ $sel = '02';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 410 + $dfv) && do {
+ $sel = '03';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 510 + $dfv) && do {
+ $sel = '04';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 610 + $dfv) && do {
+ $sel = '05';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 710 + $dfv) && do {
+ $sel = '06';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 810 + $dfv) && do {
+ $sel = '07';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 910 + $dfv) && do {
+ $sel = '08';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1010 + $dfv) && do {
+ $sel = '09';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1110 + $dfv) && do {
+ $sel = '10';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1210) && do {
+ $sel = '11';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1231) && do {
+ $sel = '12';
+ last SWITCH;
+ };
+
+ }
+ my $key = '';
+ foreach $key (sort keys %liste) {
+ my $selected = '';
+ $selected = 'selected' if ($sel eq $key);
+ print qq|
+ <option value="$key" $selected>|
+ . $locale->text("$liste{$key}")
+ . qq|</option>
+
+ |;
+ }
+ print qq|</select>|;
+
+ } elsif ($form->{FA_voranmeld} eq 'quarter') {
+
+ # Vorauswahl bei quartalsweisem Voranmeldungszeitraum
+ my %liste = ('A' => '1.',
+ 'B' => '2.',
+ 'C' => '3.',
+ 'D' => '4.',);
+
+ my $yy = $form->{year} * 10000;
+ $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
+ $sel = '';
+ my $dfv = ''; # Offset für Dauerfristverlängerung
+ $dfv = '100' if ($form->{FA_dauerfrist} eq '1');
+
+ SWITCH: {
+ $yymmdd <= ($yy + 110 + $dfv) && do {
+ $form->{year} = $form->{year} - 1;
+ $sel = 'D';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 410 + $dfv) && do {
+ $sel = 'A';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 710 + $dfv) && do {
+ $sel = 'B';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1010 + $dfv) && do {
+ $sel = 'C';
+ last SWITCH;
+ };
+ $yymmdd <= ($yy + 1231) && do {
+ $sel = 'D';
+ };
+ }
+
+ print qq|<select id="zeitraum" name="duetyp" title="|
+ . $locale->text('Select a period') . qq|" >|;
+ my $key = '';
+ foreach $key (sort keys %liste) {
+ my $selected = '';
+ $selected = 'selected' if ($sel eq $key);
+ print qq|
+ <option value="$key" $selected>$liste{$key} |
+ . $locale->text('Quarter')
+ . qq|</option>
+ |;
+ }
+ print qq|\n</select>
+ |;
+
+ } else {
+
+ # keine Vorauswahl bei Voranmeldungszeitraum
+ print qq|<select id="zeitraum" name="duetyp" title="|
+ . $locale->text('Select a period') . qq|" >|;
+
+ my %listea = ('A' => '1.',
+ 'B' => '2.',
+ 'C' => '3.',
+ 'D' => '4.',);
+
+ my %listeb = ('01' => 'January',
+ '02' => 'February',
+ '03' => 'March',
+ '04' => 'April',
+ '05' => 'May',
+ '06' => 'June',
+ '07' => 'July',
+ '08' => 'August',
+ '09' => 'September',
+ '10' => 'October',
+ '11' => 'November',
+ '12' => 'December',);
+ my $key = '';
+ foreach $key (sort keys %listea) {
+ print qq|
+ <option value="$key">$listea{$key} |
+ . $locale->text('Quarter')
+ . qq|</option>
+
+ |;
+ }
+
+ foreach $key (sort keys %listeb) {
+ print qq|
+ <option value="$key">| . $locale->text("$listeb{$key}") . qq|</option>
+
+ |;
+ }
+ print qq|</select>|;
+ }
+ $lxdebug->leave_sub();
+}
+
+sub config {
+ $lxdebug->enter_sub();
+ edit();
+ $lxdebug->leave_sub();
+}
+
+sub debug {
+ $form->debug();
+}
+
+sub show_options {
+ $lxdebug->enter_sub();
+
+ # $form->{PD}{$form->{type}} = "selected";
+ # $form->{DF}{$form->{format}} = "selected";
+ # $form->{OP}{$form->{media}} = "selected";
+ # $form->{SM}{$form->{sendmode}} = "selected";
+ my $type = qq| <input type=hidden name="type" value="ustva">|;
+ my $media = qq| <input type=hidden name="media" value="screen">|;
+ my $format =
+ qq| <option value=html selected>|
+ . $locale->text('Vorschau')
+ . qq|</option>|;
+ if ($latex) {
+ $format .=
+ qq| <option value=pdf>|
+ . $locale->text('UStVA als PDF-Dokument')
+ . qq|</option>|;
+ }
+
+ #my $disabled= qq|disabled="disabled"|;
+ #$disabled='' if ($form->{elster} eq '1' );
+ if ($form->{elster} eq '1') {
+ $format .=
+ qq|<option value=elster>|
+ . $locale->text('ELSTER Export nach Winston')
+ . qq|</option>|;
+ }
+
+ #$format .= qq|<option value=elster>|.$locale->text('ELSTER Export nach Winston').qq|</option>|;
+ print qq|
+ $type
+ $media
+ <select name=format title = "|
+ . $locale->text('Ausgabeformat auswählen...')
+ . qq|">$format</select>
+ |;
+ $lxdebug->leave_sub();
+}
+
+sub generate_ustva {
+ $lxdebug->enter_sub();
+
+ # Aufruf von get_config aus bin/mozilla/ustva.pl zum
+ # Einlesen der Finanzamtdaten aus finanzamt.ini
+
+ get_config($userspath, 'finanzamt.ini');
+
+ # form vars initialisieren
+ my @anmeldungszeitraum =
+ qw('0401' '0402' '0403' '0404' '0405' '0405' '0406' '0407' '0408' '0409' '0410' '0411' '0412' '0441' '0442' '0443' '0444');
+ my $item = '';
+ foreach $item (@anmeldungszeitraum) {
+ $form->{$item} = "";
+ }
+ if ($form->{reporttype} eq "custom") {
+
+ #forgotten the year --> thisyear
+ if ($form->{year} !~ m/^\d\d\d\d$/) {
+ $locale->date(\$myconfig, $form->current_date(\$myconfig), 0) =~
+ /(\d\d\d\d)/;
+ $form->{year} = $1;
+ }
+
+ #yearly report
+ if ($form->{duetyp} eq "13") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ }
+
+ #Quater reports
+ if ($form->{duetyp} eq "A") {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{'0441'} = "X";
+ }
+ if ($form->{duetyp} eq "B") {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{'0442'} = "X";
+ }
+ if ($form->{duetyp} eq "C") {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{'0443'} = "X";
+ }
+ if ($form->{duetyp} eq "D") {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{'0444'} = "X";
+ }
+
+ #Monthly reports
+ SWITCH: {
+ $form->{duetyp} eq "01" && do {
+ $form->{fromdate} = "1.1.$form->{year}";
+ $form->{todate} = "31.1.$form->{year}";
+ $form->{'0401'} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "02" && do {
+ $form->{fromdate} = "1.2.$form->{year}";
+
+ #this works from 1901 to 2099, 1900 and 2100 fail.
+ my $leap = ($form->{year} % 4 == 0) ? "29" : "28";
+ $form->{todate} = "$leap.2.$form->{year}";
+ $form->{"0402"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "03" && do {
+ $form->{fromdate} = "1.3.$form->{year}";
+ $form->{todate} = "31.3.$form->{year}";
+ $form->{"0403"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "04" && do {
+ $form->{fromdate} = "1.4.$form->{year}";
+ $form->{todate} = "30.4.$form->{year}";
+ $form->{"0404"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "05" && do {
+ $form->{fromdate} = "1.5.$form->{year}";
+ $form->{todate} = "31.5.$form->{year}";
+ $form->{"0405"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "06" && do {
+ $form->{fromdate} = "1.6.$form->{year}";
+ $form->{todate} = "30.6.$form->{year}";
+ $form->{"0406"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "07" && do {
+ $form->{fromdate} = "1.7.$form->{year}";
+ $form->{todate} = "31.7.$form->{year}";
+ $form->{"0407"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "08" && do {
+ $form->{fromdate} = "1.8.$form->{year}";
+ $form->{todate} = "31.8.$form->{year}";
+ $form->{"0408"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "09" && do {
+ $form->{fromdate} = "1.9.$form->{year}";
+ $form->{todate} = "30.9.$form->{year}";
+ $form->{"0409"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "10" && do {
+ $form->{fromdate} = "1.10.$form->{year}";
+ $form->{todate} = "31.10.$form->{year}";
+ $form->{"0410"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "11" && do {
+ $form->{fromdate} = "1.11.$form->{year}";
+ $form->{todate} = "30.11.$form->{year}";
+ $form->{"0411"} = "X";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "12" && do {
+ $form->{fromdate} = "1.12.$form->{year}";
+ $form->{todate} = "31.12.$form->{year}";
+ $form->{"0412"} = "X";
+ last SWITCH;
+ };
+ }
+ }
+
+ #$myconfig = \%myconfig;
+ RP->ustva(\%myconfig, \%$form);
+
+ #??($form->{department}) = split /--/, $form->{department};
+
+ $form->{period} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 1, 0, 0);
+ $form->{todate} = $form->current_date($myconfig) unless $form->{todate};
+
+ # if there are any dates construct a where
+ if ($form->{fromdate} || $form->{todate}) {
+
+ unless ($form->{todate}) {
+ $form->{todate} = $form->current_date($myconfig);
+ }
+
+ my $longtodate = $locale->date($myconfig, $form->{todate}, 1, 0, 0);
+ my $shorttodate = $locale->date($myconfig, $form->{todate}, 0, 0, 0);
+
+ my $longfromdate = $locale->date($myconfig, $form->{fromdate}, 1, 0, 0);
+ my $shortfromdate = $locale->date($myconfig, $form->{fromdate}, 0, 0, 0);
+
+ $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{period} =
+ $locale->text('for Period')
+ . qq|<br>\n$longfromdate |
+ . $locale->text('bis')
+ . qq| $longtodate|;
+ }
+
+ if ($form->{comparefromdate} || $form->{comparetodate}) {
+ my $longcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 1, 0, 0);
+ my $shortcomparefromdate =
+ $locale->date(\%myconfig, $form->{comparefromdate}, 0, 0, 0);
+
+ my $longcomparetodate =
+ $locale->date(\%myconfig, $form->{comparetodate}, 1, 0, 0);
+ my $shortcomparetodate =
+ $locale->date(\%myconfig, $form->{comparetodate}, 0, 0, 0);
+
+ $form->{last_period} = "$shortcomparefromdate<br>\n$shortcomparetodate";
+ $form->{period} .=
+ "<br>\n$longcomparefromdate "
+ . $locale->text('bis')
+ . qq| $longcomparetodate|;
+ }
+
+ $form->{Datum_heute} =
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0, 0, 0);
+
+ # setup variables for the form
+ my @a = ();
+ @a = qw(company businessnumber tel fax email company_email);
+ map { $form->{$_} = $myconfig{$_} } @a;
+
+ if ($form->{address} ne '') {
+ my $temp = $form->{address};
+ $temp =~ s/\\n/<br \/>/;
+ ($form->{company_street}, $form->{company_city}) = split("<br \/>", $temp);
+ }
+
+ if ( $form->{format} eq 'pdf'
+ or $form->{format} eq 'postscript') {
+ $form->{padding} = "~~";
+ $form->{bold} = "\textbf{";
+ $form->{endbold} = "}";
+ $form->{br} = '\\\\';
+
+ my @numbers = qw(51r 86r 97r 93r 96 43 45
+ 66 62 67);
+ my $number = '';
+ foreach $number (@numbers) {
+ $form->{$number} =~ s/,/~~/g;
+ }
+ } elsif ($form->{format} eq 'html') {
+ $form->{padding} = " ";
+ $form->{bold} = "<b>";
+ $form->{endbold} = "</b>";
+ $form->{br} = "<br>";
+ $form->{address} =~ s/\\n/<br \/>/;
+
+ }
+
+ if ($form->{format} eq 'elster') {
+ &create_winston();
+ } else {
+ $form->{templates} = $myconfig{templates};
+ $form->{templates} = "doc" if ($form->{type} eq 'help');
+
+ $form->{IN} = "$form->{type}";
+ $form->{IN} = "$form->{help}" if ($form->{type} eq 'help');
+ $form->{IN} .= "-$form->{year}"
+ if ( $form->{format} eq 'pdf'
+ or $form->{format} eq 'postscript');
+
+ $form->{IN} .= '.tex'
+ if ( $form->{format} eq 'pdf'
+ or $form->{format} eq 'postscript');
+
+ $form->{IN} .= '.html' if ($form->{format} eq 'html');
+
+ #$form->header;
+ #print qq|$myconfig<br>$path|;
+ $form->parse_template($myconfig, $userspath);
+ }
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ # edit all taxauthority prefs
+
+ $form->header;
+ &get_config($userspath, 'finanzamt.ini');
+
+ #&create_steuernummer;
+
+ my $land = $form->{elsterland};
+ my $amt = $form->{elsterFFFF};
+
+ $form->{title} = $locale->text('Finanzamt - Einstellungen');
+ print qq|
+ <body>
+ <form name="verzeichnis" method=post action="$form->{script}">
+ <table width=100%>
+ <tr>
+ <th class="listtop">|
+ . $locale->text('Finanzamt - Einstellungen')
+ . qq|</th>
+ </tr>
+ <tr>
+ <td>
+ <br>
+ <fieldset>
+ <legend><b>|
+ . $locale->text('Angaben zum Finanzamt')
+ . qq|</b></legend>
+ |;
+
+ #print qq|$form->{terminal}|;
+
+ USTVA::fa_auswahl($land, $amt, &elster_hash());
+ print qq|
+ </fieldset>
+ <br>
+ |;
+ my $checked = '';
+ $checked = "checked" if ($form->{method} eq 'accrual');
+ print qq|
+ <fieldset>
+ <legend><b>| . $locale->text('Verfahren') . qq|</b>
+ </legend>
+ <input name=method id=accrual class=radio type=radio value="accrual" $checked>
+ <label for="accrual">| . $locale->text('accrual') . qq|</label>
+ <br>
+ |;
+ $checked = '';
+ $checked = "checked" if ($form->{method} eq 'cash');
+ print qq|
+ <input name=method id=cash class=radio type=radio value="cash" $checked>
+ <label for="cash">| . $locale->text('cash') . qq|</label>
+ </fieldset>
+ <br>
+ <fieldset>
+ <legend><b>| . $locale->text('Voranmeldungszeitraum') . qq|</b>
+ </legend>
+ |;
+ $checked = '';
+ $checked = "checked" if ($form->{FA_voranmeld} eq 'month');
+ print qq|
+ <input name=FA_voranmeld id=month class=radio type=radio value="month" $checked>
+ <label for="month">| . $locale->text('month') . qq|</label>
+ <br>
+ |;
+ $checked = '';
+ $checked = "checked" if ($form->{FA_voranmeld} eq 'quarter');
+ print qq|
+ <input name="FA_voranmeld" id=quarter class=radio type=radio value="quarter" $checked>
+ <label for="quarter">| . $locale->text('quarter') . qq|</label>
+ <br>
+ |;
+ $checked = '';
+ $checked = "checked" if ($form->{FA_dauerfrist} eq '1');
+ print qq|
+ <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1" $checked>
+ <label for="">|
+ . $locale->text('Dauerfristverlängerung')
+ . qq|</label>
+
+ </fieldset>
+ <br>
+ <fieldset>
+ <legend><b>| . $locale->text('Steuerberater/-in') . qq|</b>
+ </legend>
+ |;
+ $checked = '';
+ $checked = "checked" if ($form->{FA_71} eq 'X');
+ print qq|
+ <!-- <input name="FA_71" id=FA_71 class=checkbox type=checkbox value="X" $checked>
+ <label for="FA_71">|
+ . $locale->text('Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)')
+ . qq|</label>
+ <br>
+ <br>-->
+ <table>
+ <tr>
+ <td>
+ | . $locale->text('Name') . qq|
+ </td>
+ <td>
+ | . $locale->text('Straße') . qq|
+ </td>
+ <td>
+ | . $locale->text('PLZ, Ort') . qq|
+ </td>
+ <td>
+ | . $locale->text('Telefon') . qq|
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="FA_steuerberater_name" id=steuerberater size=25 value="$form->{FA_steuerberater_name}">
+ </td>
+ <td>
+ <input name="FA_steuerberater_street" id=steuerberater size=25 value="$form->{FA_steuerberater_street}">
+ </td>
+ <td>
+ <input name="FA_steuerberater_city" id=steuerberater size=25 value="$form->{FA_steuerberater_city}">
+ </td>
+ <td>
+ <input name="FA_steuerberater_tel" id=steuerberater size=25 value="$form->{FA_steuerberater_tel}">
+ </tr>
+ </table>
+
+ </fieldset>
+
+ <br>
+ <br>
+ <hr>
+ <!--<input type=submit class=submit name=action value="|
+ . $locale->text('debug')
+ . qq|">-->
+ <input type=submit class=submit name=action value="|
+ . $locale->text('continue') . qq|">
+ </td>
+ </tr>
+ </table>
+ |;
+
+ my @variables = qw( steuernummer elsterland elstersteuernummer elsterFFFF);
+ my $variable = '';
+ foreach $variable (@variables) {
+ print qq|
+ <input name=$variable type=hidden value="$form->{$variable}">|;
+ }
+ my $steuernummer_new = '';
+
+ #<input type=hidden name="steuernummer_new" value="$form->{$steuernummer_new}">
+ print qq|
+
+ <input type=hidden name="nextsub" value="edit_form">
+ <input type=hidden name="warnung" value="1">
+ <input type=hidden name="saved" value="|
+ . $locale->text('Bitte Angaben überprüfen') . qq|">
+ <input type=hidden name="path" value=$form->{path}>
+ <input type=hidden name="login" value=$form->{login}>
+ <input type=hidden name="password" value=$form->{password}>
+ <input type=hidden name="warnung" value="0">
+ |;
+
+ @variables = qw(FA_Name FA_Strasse FA_PLZ
+ FA_Ort FA_Telefon FA_Fax FA_PLZ_Grosskunden FA_PLZ_Postfach FA_Postfach
+ FA_BLZ_1 FA_Kontonummer_1 FA_Bankbezeichnung_1 FA_BLZ_2
+ FA_Kontonummer_2 FA_Bankbezeichnung_oertlich FA_Oeffnungszeiten
+ FA_Email FA_Internet);
+
+ foreach $variable (@variables) {
+ print qq|
+ <input name=$variable type=hidden value="$form->{$variable}">|;
+ }
+
+ print qq|
+ </form>
+ </body>
+|;
+ $lxdebug->leave_sub();
+}
+
+sub edit_form {
+ $lxdebug->enter_sub();
+ $form->header();
+ print qq|
+ <body>
+ |;
+ my $elsterland = '';
+ my $elster_amt = '';
+ my $elsterFFFF = '';
+ my $elstersteuernummer = '';
+ &get_config($userspath, 'finanzamt.ini')
+ if ($form->{saved} eq $locale->text('saved'));
+
+ # Auf Übergabefehler checken
+ USTVA::info(
+ $locale->text(
+ 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.'
+ ))
+ if ( $form->{elsterFFFF_new} eq 'Auswahl'
+ || $form->{elsterland_new} eq 'Auswahl');
+ USTVA::info(
+ $locale->text(
+ 'Es fehlen Angaben zur Versteuerung.
+ Wenn Sie Ist Versteuert sind, wählen Sie die Einnahmen/Überschuß-Rechnung aus.
+ Sind Sie Soll-Versteuert und Bilanzverpflichtet, dann wählen Sie Bilanz aus.'
+ ))
+ if ($form->{method} eq '');
+
+ # Klären, ob Variablen bereits befüllt sind UND ob veräderungen auf
+ # der vorherigen Maske stattfanden: $change = 1(in der edit sub,
+ # mittels get_config)
+
+ my $change =
+ $form->{elsterland} eq $form->{elsterland_new}
+ && $form->{elsterFFFF} eq $form->{elsterFFFF_new} ? '0' : '1';
+ $change = '0' if ($form->{saved} eq $locale->text('saved'));
+ my $elster_init = &elster_hash();
+
+ #my %elster_init = ();
+ my %elster_init = %$elster_init;
+
+ if ($change eq '1') {
+
+ # Daten ändern
+ $elsterland = $form->{elsterland_new};
+ $elsterFFFF = $form->{elsterFFFF_new};
+ $form->{elsterland} = $elsterland;
+ $form->{elsterFFFF} = $elsterFFFF;
+ $form->{steuernummer} = '';
+ &create_steuernummer;
+
+ # rebuild elster_amt
+ my $amt = '';
+ foreach $amt (keys %{ $elster_init{ $form->{elsterland} } }) {
+ $elster_amt = $amt
+ if ($elster_init{ $form->{elsterland}{$amt} eq $form->{elsterFFFF} });
+ }
+
+ # load the predefined hash data into the FA_* Vars
+ my @variables = qw(FA_Name FA_Strasse FA_PLZ FA_Ort
+ FA_Telefon FA_Fax FA_PLZ_Grosskunden FA_PLZ_Postfach
+ FA_Postfach
+ FA_BLZ_1 FA_Kontonummer_1 FA_Bankbezeichnung_1
+ FA_BLZ_2 FA_Kontonummer_2 FA_Bankbezeichnung_oertlich
+ FA_Oeffnungszeiten FA_Email FA_Internet);
+
+ for (my $i = 0; $i <= 20; $i++) {
+ $form->{ $variables[$i] } =
+ $elster_init->{$elsterland}->{$elsterFFFF}->[$i];
+ }
+
+ } else {
+
+ $elsterland = $form->{elsterland};
+ $elsterFFFF = $form->{elsterFFFF};
+
+ }
+ my $stnr = $form->{steuernummer};
+ $stnr =~ s/\D+//g;
+ my $patterncount = $form->{patterncount};
+ my $elster_pattern = $form->{elster_pattern};
+ my $delimiter = $form->{delimiter};
+ my $steuernummer = '';
+ $steuernummer = $form->{steuernummer} if ($steuernummer eq '');
+
+ #Warnung
+ my $warnung = $form->{warnung};
+
+ #printout form
+ print qq|
+ <form name="elsterform" method=post action="$form->{script}">
+ <table width="100%">
+ <tr>
+ <th colspan="2" class="listtop">|
+ . $locale->text('Finanzamt - Einstellungen')
+ . qq|</th>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <br>
+ |;
+ &show_fa_daten;
+ print qq|
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <br>
+ <fieldset>
+ <legend>
+ <font size="+1">| . $locale->text('Steuernummer') . qq|</font>
+ </legend>
+ <br>
+ |;
+ $steuernummer =
+ USTVA::steuernummer_input($form->{elsterland}, $form->{elsterFFFF},
+ $form->{steuernummer});
+ print qq|
+ </H2><br>
+ </fieldset>
+ <br>
+ <br>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td align="left">
+
+
+ <!--<input type=hidden name=nextsub value="debug">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('debug') . qq|">
+ <input type=hidden name=nextsub value="test">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('test')
+ . qq|">-->
+ <input type=hidden name=lastsub value="edit">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('back') . qq|">
+ |;
+
+ if ($form->{warnung} eq "1") {
+ print qq|
+ <input type=hidden name=nextsub value="edit_form">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('continue') . qq|">
+ <input type=hidden name="saved" value="|
+ . $locale->text('Bitte alle Angaben überprüfen') . qq|">
+ |;
+ } else {
+ print qq|
+ <input type=hidden name="nextsub" value="save">
+ <input type=hidden name="filename" value="finanzamt.ini">
+ <input type=submit class=submit name=action value="|
+ . $locale->text('save') . qq|">
+ |;
+ }
+
+ print qq|
+ </td>
+ <td align="right">
+ <H2 class=confirm>$form->{saved}</H2>
+ </td>
+ </tr>
+ </table>
+ |;
+
+ my @variables = qw(FA_steuerberater_name FA_steuerberater_street
+ FA_steuerberater_city FA_steuerberater_tel
+ FA_voranmeld method
+ FA_dauerfrist FA_71 FA_Name elster
+ path login password type elster_init saved
+ );
+ my $variable = '';
+ foreach $variable (@variables) {
+ print qq|
+ <input name="$variable" type="hidden" value="$form->{$variable}">|;
+ }
+ print qq|
+ <input type=hidden name="elsterland" value="$elsterland">
+ <input type=hidden name="elsterFFFF" value="$elsterFFFF">
+ <input type=hidden name="warnung" value="$warnung">
+ <input type=hidden name="elstersteuernummer" value="$elstersteuernummer">
+ <input type=hidden name="steuernummer" value="$stnr">
+ </form>
+ |;
+ $lxdebug->leave_sub();
+}
+
+sub create_steuernummer {
+ $lxdebug->enter_sub();
+ my $part = $form->{part};
+ my $patterncount = $form->{patterncount};
+ my $delimiter = $form->{delimiter};
+ my $elster_pattern = $form->{elster_pattern};
+
+ # rebuild steuernummer and elstersteuernummer
+ # es gibt eine gespeicherte steuernummer $form->{steuernummer}
+ # und die parts und delimiter
+
+ my $h = 0;
+ my $i = 0;
+
+ my $steuernummer_new = $part;
+ my $elstersteuernummer_new = $form->{elster_FFFF};
+ $elstersteuernummer_new .= '0';
+
+ for ($h = 1; $h < $patterncount; $h++) {
+ $steuernummer_new .= qq|$delimiter|;
+ for (my $i = 1; $i <= length($elster_pattern); $i++) {
+ $steuernummer_new .= $form->{"part_$h\_$i"};
+ $elstersteuernummer_new .= $form->{"part_$h\_$i"};
+ }
+ }
+ if ($form->{steuernummer} ne $steuernummer_new) {
+ $form->{steuernummer} = $steuernummer_new;
+ $form->{elstersteuernummer} = $elstersteuernummer_new;
+ $form->{steuernummer_new} = $steuernummer_new;
+ } else {
+ $form->{steuernummer_new} = '';
+ $form->{elstersteuernummer_new} = '';
+ }
+ $lxdebug->leave_sub();
+}
+
+sub get_config {
+ $lxdebug->enter_sub();
+
+ my ($userpath, $filename) = @_;
+ my ($key, $value) = '';
+ open(FACONF, "$userpath/$filename")
+ or $form->error("$userpath/$filename : $!");
+ while (<FACONF>) {
+ last if /^\[/;
+ next if /^(#|\s)/;
+
+ # remove comments
+ s/\s#.*//g;
+
+ # remove any trailing whitespace
+ s/^\s*(.*?)\s*$/$1/;
+ ($key, $value) = split /=/, $_, 2;
+
+ #if ($value eq ' '){
+ # $form->{$key} = " " ;
+ #} elsif ($value ne ' '){
+ $form->{$key} = "$value";
+
+ #}
+ }
+ close FACONF;
+
+ # Textboxen formatieren: Linebreaks entfernen
+ #
+ #$form->{FA_Oeffnungszeiten} =~ s/\\\\n/<br>/g;
+ $lxdebug->leave_sub();
+}
+
+sub save {
+ $lxdebug->enter_sub();
+ my $filename = $form->{filename};
+
+ #zuerst die steuernummer aus den part, parts_X_Y und delimiter herstellen
+ create_steuernummer;
+
+ # Textboxen formatieren: Linebreaks entfernen
+ #
+ $form->{FA_Oeffnungszeiten} =~ s/\r\n/\\n/g;
+
+ #URL mit http:// davor?
+ $form->{FA_Internet} =~ s/^http:\/\///;
+ $form->{FA_Internet} = 'http://' . $form->{FA_Internet};
+
+ my @config = qw(elster elsterland elstersteuernummer steuernummer
+ elsteramt elsterFFFF FA_Name FA_Strasse
+ FA_PLZ FA_Ort FA_Telefon FA_Fax FA_PLZ_Grosskunden
+ FA_PLZ_Postfach FA_Postfach FA_BLZ_1 FA_Kontonummer_1
+ FA_Bankbezeichnung_1 FA_BLZ_2 FA_Kontonummer_2
+ FA_Bankbezeichnung_oertlich FA_Oeffnungszeiten
+ FA_Email FA_Internet FA_voranmeld method FA_steuerberater_name
+ FA_steuerberater_street FA_steuerberater_city FA_steuerberater_tel
+ FA_71 FA_dauerfrist);
+
+ # Hier kommt dann die Plausibilitätsprüfung der ELSTERSteuernummer
+ if ($form->{elstersteuernummer} ne '000000000') {
+ $form->{elster} = '1';
+ open(CONF, ">$userspath/$filename") or $form->error("$filename : $!");
+
+ # create the config file
+ print CONF qq|# Configuration file for USTVA\n\n|;
+ my $key = '';
+ foreach $key (sort @config) {
+ $form->{$key} =~ s/\\/\\\\/g;
+ $form->{$key} =~ s/"/\\"/g;
+
+ # strip M
+ $form->{$key} =~ s/\r\n/\n/g;
+ print CONF qq|$key=|;
+ if ($form->{$key} ne 'Y') {
+ print CONF qq|$form->{$key}\n|;
+ }
+ if ($form->{$key} eq 'Y') {
+ print CONF qq|checked \n|;
+ }
+ }
+ print CONF qq|\n\n|;
+ close CONF;
+ $form->{saved} = $locale->text('saved');
+
+ } else {
+
+ $form->{saved} = $locale->text('Bitte eine Steuernummer angeben');
+ }
+
+ &edit_form;
+ $lxdebug->leave_sub();
+}
+
+sub show_fa_daten {
+ $lxdebug->enter_sub();
+ my $readonly = $_;
+ my $oeffnungszeiten = $form->{FA_Oeffnungszeiten};
+ $oeffnungszeiten =~ s/\\\\n/\n/g;
+ print qq| <br>
+ <fieldset>
+ <legend>
+ <font size="+1">|
+ . $locale->text('Finanzamt')
+ . qq| $form->{FA_Name}</font>
+ </legend>
+ |;
+
+ #print qq|\n<h4>$form->{FA_Ergaenzung_Name} </h4>
+ # | if ( $form->{FA_Ergaenzung_Name} );
+ print qq|
+ <table width="100%" valign="top">
+ <tr>
+ <td valign="top">
+ <br>
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Address') . qq|</b>
+ </legend>
+
+ <table width="100%">
+ <tr>
+ <td colspan="2">
+ <input name="FA_Strasse" size="40" title="FA_Strasse" value="$form->{FA_Strasse}" $readonly>
+ </td width="100%">
+ </tr>
+ <tr>
+ <td width="116px">
+ <input name="FA_PLZ" size="10" title="FA_PLZ" value="$form->{FA_PLZ}" $readonly>
+ </td>
+ <td>
+ <input name="FA_Ort" size="20" title="FA_Ort" value="$form->{FA_Ort}" $readonly>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ <br>
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Kontakt') . qq|</b>
+ </legend>
+ | . $locale->text('Telefon') . qq|<br>
+ <input name="FA_Telefon" size="40" title="FA_Telefon" value="$form->{FA_Telefon}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Fax') . qq|<br>
+ <input name="FA_Fax" size="40" title="FA_Fax" value="$form->{FA_Fax}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Internet') . qq|<br>
+ <input name="FA_Email" size="40" title="FA_Email" value="$form->{FA_Email}" $readonly>
+ <br>
+ <br>
+ <input name="FA_Internet" size="40" title="" title="FA_Internet" value="$form->{FA_Internet}" $readonly>
+ <br>
+ </fieldset>
+ </td>
+ <td valign="top">
+ <br>
+ <fieldset>
+ <legend>
+ <b>| . $locale->text('Öffnungszeiten') . qq|</b>
+ </legend>
+ <textarea name="FA_Oeffnungszeiten" rows="4" cols="40" $readonly>$oeffnungszeiten</textarea>
+ </fieldset>
+ <br>
+ |;
+ my $FA_1 =
+ ( $form->{FA_BLZ_1} ne ''
+ && $form->{FA_Kontonummer_1} ne ''
+ && $form->{FA_Bankbezeichnung_1} ne '');
+ my $FA_2 =
+ ( $form->{FA_BLZ_2} ne ''
+ && $form->{FA_Kontonummer_2} ne ''
+ && $form->{FA_Bankbezeichnung_oertlich} ne '');
+
+ if ($FA_1 && $FA_2) {
+ print qq|
+ <fieldset>
+ <legend>
+ <b>|
+ . $locale->text('Bankverbindungen des Finanzamts') . qq|</b>
+ <legend>
+ <table>
+ <tr>
+ <td>
+ | . $locale->text('Kreditinstitut') . qq|
+ <br>
+ <input name="FA_Bankbezeichnung_1" size="30" value="$form->{FA_Bankbezeichnung_1}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Kontonummer') . qq|
+ <br>
+ <input name="FA_Kontonummer_1" size="15" value="$form->{FA_Kontonummer_1}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Bankleitzahl') . qq|
+ <br>
+ <input name="FA_BLZ_1" size="15" value="$form->{FA_BLZ_1}" $readonly>
+ </td>
+ <td>
+ | . $locale->text('Kreditinstitut') . qq|
+ <br>
+ <input name="FA_Bankbezeichnung_oertlich" size="30" value="$form->{FA_Bankbezeichnung_oertlich}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Kontonummer') . qq|
+ <br>
+ <input name="FA_Kontonummer_2" size="15" value="$form->{FA_Kontonummer_2}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Bankleitzahl') . qq|
+ <br>
+ <input name="FA_BLZ_2" size="15" value="$form->{FA_BLZ_2}" $readonly>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ |;
+ } elsif ($FA_1) {
+ print qq|
+ <fieldset>
+ <legend>
+ <b>|
+ . $locale->text('Bankverbindung des Finanzamts') . qq|</b>
+ <legend>
+ | . $locale->text('Kontonummer') . qq|
+ <br>
+ <input name="FA_Kontonummer_1" size="30" value="$form->{FA_Kontonummer_1}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Bankleitzahl (BLZ)') . qq|
+ <br>
+ <input name="FA_BLZ_1" size="15" value="$form->{FA_BLZ_1}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Kreditinstitut') . qq|
+ <br>
+ <input name="FA_Bankbezeichnung_1" size="15" value="$form->{FA_Bankbezeichnung_1}" $readonly>
+ <br>
+ </fieldset>
+ |;
+ } else {
+ print qq|
+ <fieldset>
+ <legend>
+ <b>|
+ . $locale->text('Bankverbindung des Finanzamts') . qq|</b>
+ <legend>
+ | . $locale->text('Kontonummer') . qq|
+ <br>
+ <input name="FA_Kontonummer_2" size="30" value="$form->{FA_Kontonummer_2}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Bankleitzahl (BLZ)') . qq|
+ <br>
+ <input name="FA_BLZ_2" size="15" value="$form->{FA_BLZ_2}" $readonly>
+ <br>
+ <br>
+ | . $locale->text('Kreditinstitut') . qq|
+ <br>
+ <input name="FA_Bankbezeichnung_oertlich" size="15" value="$form->{FA_Bankbezeichnung_oertlich}" $readonly>
+ </fieldset>
+ |;
+ }
+ print qq|
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ |;
+ $lxdebug->leave_sub();
+}
+
+sub create_winston {
+ $lxdebug->enter_sub();
+ &get_config($userspath, 'finanzamt.ini');
+
+ # There is no generic Linux GNU/GPL solution out for using ELSTER.
+ # In lack of availability linux users may use windows pendants. I choose
+ # WINSTON, because it's free of coast, it has an API and its tested under
+ # Linux using WINE.
+ # The author of WINSTON developed some c-code to realize ELSTER under
+ # WINDOWS and Linux (http://www.felfri.de/fa_xml/). Next year (2005) I start to
+ # develop a server side solution for LX-Office ELSTER under Linux and
+ # WINDOWS based on this c-code.
+ #
+ # You need to download WINSTON from http://www.felfri.de/winston/
+ # There (http://www.felfri.de/winston/download.htm) you'll find instructions
+ # about WINSTON under Linux WINE
+ # More infos about Winstons API: http://www.felfri.de/winston/schnittstellen.htm
+ my $azr = '';
+ my $file = ''; # Filename for Winstonfile
+ $file .= 'U'; # 1. char 'U' = USTVA
+
+SWITCH:
+ { # 2. and 3. char 01-12= Month 41-44= Quarter (azr:Abrechnungszeitraum)
+ $form->{duetyp} eq "01" && do {
+ $azr = "01";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "02" && do {
+ $azr = "02";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "03" && do {
+ $azr = "03";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "04" && do {
+ $azr = "04";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "05" && do {
+ $azr = "05";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "06" && do {
+ $azr = "06";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "07" && do {
+ $azr = "07";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "08" && do {
+ $azr = "08";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "09" && do {
+ $azr = "09";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "10" && do {
+ $azr = "10";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "11" && do {
+ $azr = "11";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "12" && do {
+ $azr = "12";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "A" && do {
+ $azr = "41";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "B" && do {
+ $azr = "42";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "C" && do {
+ $azr = "43";
+ last SWITCH;
+ };
+ $form->{duetyp} eq "D" && do {
+ $azr = "44";
+ last SWITCH;
+ };
+ do {
+ $form->error(
+ "Ungültiger Anmeldezeitraum.\n
+ Sie können für ELSTER nur einen monatlichen oder
+ quartalsweisen Anmeldezeitraum auswählen."
+ );
+ };
+ }
+
+ $file .= $azr;
+
+ #4. and 5. char = year modulo 100
+ $file .= sprintf("%02d", $form->{year} % 100);
+
+ #6. to 18. char = Elstersteuernummer
+ #Beispiel: Steuernummer in Bayern
+ #111/222/33334 ergibt für UStVA Jan 2004: U01049111022233334
+
+ $file .= $form->{elsterFFFF};
+ $file .= $form->{elstersteuernummer};
+
+ #file suffix
+
+ $file .= '.xml';
+ $form->{elsterfile} = $file;
+
+ #Calculations
+
+ my $k51 =
+ sprintf("%d", $form->parse_amount(\%myconfig, $form->{"51"}))
+ ; # Umsätze zu 16% USt
+ my $k86 =
+ sprintf("%d", $form->parse_amount(\%myconfig, $form->{"86"}))
+ ; # Umsätze zu 7% USt
+ my $k97 =
+ sprintf("%d", $form->parse_amount(\%myconfig, $form->{"97"}))
+ ; # 16% Steuerpflichtige innergemeinsachftliche Erwerbe
+ my $k93 =
+ sprintf("%d", $form->parse_amount(\%myconfig, $form->{"93"}))
+ ; # 16% Steuerpflichtige innergemeinsachftliche Erwerbe
+ my $k94 =
+ sprintf("%d", $form->parse_amount(\%myconfig, $form->{"94"}))
+ ; # neuer Fahrzeuge von Lieferern
+ my $k66 =
+ $form->parse_amount(\%myconfig, $form->{"66"}) *
+ 100; # Vorsteuer 7% plus 16%
+ my $k83 =
+ $form->parse_amount(\%myconfig, $form->{"67"}) * 100; # Umsätze zu 7% USt
+ my $k96 = $form->parse_amount(\%myconfig, $form->{"96"}) * 100; #
+ #
+ # Now build the xml content
+ #
+
+ $form->{elster} = qq|<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- Diese Datei ist mit Lx-Office $form->{version} generiert -->
+<WinstonAusgang>
+ <Formular Typ="UST"></Formular>
+ <Ordnungsnummer>$form->{elstersteuernummer}</Ordnungsnummer>
+ <AnmeldeJahr>$form->{year}</AnmeldeJahr>
+ <AnmeldeZeitraum>$azr</AnmeldeZeitraum>
+ |;
+
+ $form->{elster} .= qq|<Kennzahl Nr="51">$k51</Kennzahl>\n| if ($k51 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="86">$k86</Kennzahl>\n| if ($k86 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="97">$k97</Kennzahl>\n| if ($k97 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="93">$k93</Kennzahl>\n| if ($k93 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="94">$k94</Kennzahl>\n| if ($k94 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="96">$k96</Kennzahl>\n| if ($k96 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="66">$k66</Kennzahl>\n| if ($k66 ne '0');
+ $form->{elster} .= qq|<Kennzahl Nr="83">$k83</Kennzahl>\n| if ($k83 ne '0');
+ $form->{elster} .= qq|\n</WinstonAusgang>\n\n|;
+
+ #$form->header;
+ #print qq|$form->{elsterfile}|;
+ #print qq|$form->{elster}|;
+ $SIG{INT} = 'IGNORE';
+
+ &save_winston;
+ $lxdebug->leave_sub();
+}
+
+sub save_winston {
+ $lxdebug->enter_sub();
+ my $elster = $form->{elster};
+ my $elsterfile = $form->{elsterfile};
+ open(OUT, ">-") or $form->error("STDOUT : $!");
+ print OUT qq|Content-Type: application/file;
+Content-Disposition: attachment; filename="$elsterfile"\n\n|;
+ print OUT $elster;
+ close(OUT);
+ $lxdebug->leave_sub();
+}
+
+sub continue {
+ $lxdebug->enter_sub();
+
+ # allow Symbolic references just here:
+ no strict 'refs';
+ &{ $form->{nextsub} };
+ use strict 'refs';
+ $lxdebug->leave_sub();
+}
+
+sub back { &{ $form->{lastsub} } }
+
+sub elster_hash {
+ $lxdebug->enter_sub();
+ my $finanzamt = USTVA::query_finanzamt(\%myconfig, \%$form);
+ $lxdebug->leave_sub();
+ return $finanzamt;
+}
+
+sub test {
+ $lxdebug->enter_sub();
+
+ # biegt nur den Testeintrag in Programm->Test auf eine Routine um
+
+ $form->header;
+ &elster_send;
+ $lxdebug->leave_sub();
+}
+
+sub elster_send {
+ $lxdebug->enter_sub();
+
+ #read config
+ my $elster_conf = &elster_conf();
+ &elster_xml();
+ use Cwd;
+ $form->{cwd} = cwd();
+ $form->{tmpdir} = $form->{cwd} . '/' . $elster_conf->{'path'};
+ $form->{tmpfile} = $elster_conf->{'err'};
+ my $caller = $elster_conf->{'call'}[0];
+
+ chdir("$form->{tmpdir}") or $form->error($form->cleanup . "chdir : $!");
+ my $send =
+ "faxmlsend $caller -config etc/faxmlsend.cnf -xml faxmlsend.xml -tt faxmlsend.tt -debug";
+
+ system("$send > $form->{tmpfile}");
+ $form->{tmpdir} .= "$elster_conf->{'path'}/";
+ $form->{tmpfile} = "faxmlsend.err";
+ $form->error($form->cleanup
+ . "faxmlsend : OFD meldet: Error 404 \n Internetseite nicht vorhanden")
+ if ($? eq '1024');
+ $form->error($form->cleanup
+ . "faxmlsend : No such File: faxmlsend.xml \n Fehlernummer: $? \n Problem beim öffnen der faxmlsend.xml"
+ )
+ if ($?);
+
+ # foreach my $line (&elster_feedback("$elster_conf->{'path'}")){
+ # print qq|$line\n|;
+ # }
+ print qq|Log:<br>|;
+
+ #for (my $i=0; $i<= )
+ &elster_readlog();
+ print qq|\n ende\n|;
+ $lxdebug->leave_sub();
+}
+
+sub elster_readlog {
+ $lxdebug->enter_sub();
+ my $elster_conf = &elster_conf();
+ open(LOG, "$elster_conf->{'logfile'}")
+ or $form->error("$elster_conf->{'logfile'}: $!");
+ print qq|<listing>|;
+ my $log = '';
+ my $xml = '';
+ my $tmp = '';
+ while (<LOG>) {
+ my $i = 0;
+
+ #$_ =~ s/</<\;/;
+ #$_ =~ s/>/>\;/;
+ $_ =~ s/\s+//mg;
+
+ #$_ =~ s/\015\012//mg;
+ $_ =~ s/</\n</mg;
+
+ #$_ =~ s/\n\n+//mg;
+ if ($_ =~ /^\d\d\d\d\d\d/g) {
+ $log .= qq|$_<br>|;
+
+ #} elsif ($_ =~ /(<([^\/]*?)>)/ ) {
+ } elsif ($_ =~ /(<([^\/].*?)>(.*))/g) {
+
+ #$xml .= qq|$2 = $3\n\n|;
+ #$_ =~ s/\015\012//mg;
+ $_ =~ s/\s+//;
+ $xml .= qq|$_\n|;
+
+ } else {
+ $tmp .= qq|$_<br>|;
+ }
+ $i++;
+ }
+
+ #second parse
+ #my $var='';
+ #while (<$xml>){
+ # $var .= qq|$2 = $3\n\n|;
+ #}
+ #print qq|$log|;
+ print qq|$xml|;
+ print qq|</listing>|;
+
+ # $_=$log;
+ # s{<(\w+)\b([^<>]*)>
+ # ((?:.(?!</?\1\b))*.)
+ # (<\1>) }
+ # { print "markup=",$1," args=",$2," enclosed=",$3," final=",$4 ; "" }gsex;
+ close LOG;
+ $lxdebug->leave_sub();
+}
+
+sub elster_feedback {
+ $lxdebug->enter_sub();
+ my ($file) = @_;
+ my @content = ();
+ print qq|feedback:<br>|;
+ if (-f "$file") {
+ open(FH, "$file");
+ @content = <FH>;
+ close(FH);
+ }
+ $lxdebug->leave_sub();
+ return (@content);
+}
+
+sub elster_conf {
+ $lxdebug->enter_sub();
+ my $elster_conf = { 'path' => 'elster',
+ 'prg' => 'faxmlsend',
+ 'err' => 'faxmlsend.err',
+ 'ttfile' => 'faxmlsend.tt',
+ 'xmlfile' => 'faxmlsend.xml',
+ 'cline' => '-tt $ttfile -xml $xmlfile',
+ 'call' => ['send', 'protokoll', 'anmeldesteuern'],
+ 'logfile' => 'log/faxmlsend.log',
+ 'conffile' => 'faxmlsend.cnf',
+ 'debug' => '-debug' };
+
+ $lxdebug->leave_sub();
+
+ return $elster_conf;
+}
+
+sub elster_xml {
+ $lxdebug->enter_sub();
+
+ my $elster_conf = &elster_conf();
+
+ # $k51 = sprintf("%d", $form->parse_amount(\%myconfig, $form->{"51"})); # Umsätze zu 16% USt
+ # $k86 = sprintf("%d", $form->parse_amount(\%myconfig, $form->{"86"})); # Umsätze zu 7% USt
+ # $k97 = sprintf("%d", $form->parse_amount(\%myconfig, $form->{"97"})); # 16% Steuerpflichtige innergemeinsachftliche Erwerbe
+ # $k93 = sprintf("%d", $form->parse_amount(\%myconfig, $form->{"93"})); # 16% Steuerpflichtige innergemeinsachftliche Erwerbe
+ # $k94 = sprintf("%d", $form->parse_amount(\%myconfig, $form->{"94"})); # neuer Fahrzeuge von Lieferern
+ # $k66 = $form->parse_amount(\%myconfig, $form->{"66"}) * 100;# Vorsteuer 7% plus 16%
+ # $k83 = $form->parse_amount(\%myconfig, $form->{"67"}) * 100;# Umsätze zu 7% USt
+ # $k96 = $form->parse_amount(\%myconfig, $form->{"96"}) * 100;#
+
+ my $TransferHeader = qq|<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="..\\Stylesheet\\ustva.xsl"?>
+<Elster xmlns="http://www.elster.de/2002/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.elster.de/2002/XMLSchema
+..\\Schemata\\elster_UStA_200501_extern.xsd">
+ <TransferHeader version="7">
+ <Verfahren>ElsterAnmeldung</Verfahren>
+ <DatenArt>UStVA</DatenArt>
+ <Vorgang>send-NoSig</Vorgang>
+ <Testmerker>700000004</Testmerker>
+ <HerstellerID>74931</HerstellerID>
+ <DatenLieferant>Helmut</DatenLieferant>
+ <Datei>
+ <Verschluesselung>PKCS#7v1.5</Verschluesselung>
+ <Kompression>GZIP</Kompression>
+ <DatenGroesse>123456789012345678901234567890123456789012</DatenGroesse>
+ <TransportSchluessel/>
+ </Datei>
+ <RC>
+ <Rueckgabe>
+ <Code>0</Code>
+ <Text/>
+ </Rueckgabe>
+ <Stack>
+ <Code>0</Code>
+ <Text/>
+ </Stack>
+ </RC>
+ <VersionClient/>
+ <Zusatz>
+ <Info>test</Info>
+ </Zusatz>
+ </TransferHeader>|;
+
+ my $DatenTeil = qq|
+ <DatenTeil>
+ <Nutzdatenblock>
+ <NutzdatenHeader version="9">
+ <NutzdatenTicket>234234234</NutzdatenTicket>
+ <Empfaenger id="F">9198</Empfaenger>
+ <Hersteller>
+ <ProduktName>ElsterAnmeldung</ProduktName>
+ <ProduktVersion>V 1.4</ProduktVersion>
+ </Hersteller>
+ <DatenLieferant>String, der Lieferanteninfo enthaelt</DatenLieferant>
+ <Zusatz>
+ <Info>....</Info>
+ </Zusatz>
+ </NutzdatenHeader>
+ <Nutzdaten>
+ <!--die Version gibt Auskunft ueber das Jahr und die derzeit gueltige Versionsnummer-->
+ <Anmeldungssteuern art="UStVA" version="200501">
+ <DatenLieferant>
+ <Name>OFD Muenchen</Name>
+ <Strasse>Meiserstr. 6</Strasse>
+ <PLZ>80335</PLZ>
+ <Ort>München</Ort>
+ </DatenLieferant>
+ <Erstellungsdatum>20041127</Erstellungsdatum>
+ <Steuerfall>
+ <Umsatzsteuervoranmeldung>
+ <Jahr>2005</Jahr>
+ <Zeitraum>01</Zeitraum>
+ <Steuernummer>9198011310134</Steuernummer>
+ <Kz09>74931*NameSteuerber.*Berufsbez.*089*59958327*Mandantenname</Kz09>
+ </Umsatzsteuervoranmeldung>
+ </Steuerfall>
+ </Anmeldungssteuern>
+ </Nutzdaten>
+ </Nutzdatenblock>
+ </DatenTeil>
+</Elster>\n|;
+
+ #$DatenTeil .= qq| <Kz51>$k51</Kz51>\n| if ($k51 ne '0');
+ #$DatenTeil .= qq| <Kz86>$k86</Kz86>\n| if ($k86 ne '0');
+ #$DatenTeil .= qq| <Kz97>$k97</Kz97>\n| if ($k97 ne '0');
+ #$DatenTeil .= qq| <Kz93>$k93</Kz93>\n| if ($k93 ne '0');
+ #$DatenTeil .= qq| <Kz94>$k94</Kz94>\n| if ($k94 ne '0');
+ #$DatenTeil .= qq| <Kz96>$k96</Kz96>\n| if ($k96 ne '0');
+ #$DatenTeil .= qq| <Kz66>$k66</Kz66>\n| if ($k66 ne '0');
+ #$DatenTeil .= qq| <Kz83>$k83</Kz83>\n| if ($k83 ne '0');
+
+ my $filename = "$elster_conf->{'path'}/$elster_conf->{'xmlfile'}";
+ open(XML, ">$elster_conf->{'path'}/$elster_conf->{'xmlfile'}")
+ or $form->error("$filename : $!");
+ print XML qq|$TransferHeader $DatenTeil|;
+ close XML;
+ $lxdebug->leave_sub();
+}
+
--- /dev/null
+/* stylesheet for LX-Office ERP */
+
+/* general stuff */
+/*
+A:link { color: #a0522d; text-decoration: none; }
+A:visited { color: #0522d; text-decoration: none; }
+A:active { color: #a0522d; text-decoration: underline; }
+A:hover { color: white;
+ background-color: rgb(187,187,187);
+ text-decoration: none;
+}
+*/
+A:link { color: black; text-decoration: none; }
+A:visited { color: black; text-decoration: none; }
+A:active { color: black; text-decoration: underline; }
+//A:hover { color: white;
+// background-color: rgb(187,187,187);
+// text-decoration: none;
+//}
+
+
+/*
+ Menu: oberste Linkebene
+*/
+A.nohover:hover {
+ /* color: black;*/
+ color:#8c1919;
+ /* font-weight: bolder;
+ background-image: url("px_3.gif");
+ text-decoration:none;
+ */
+}
+
+
+/*
+ Menu : Unterpunkte
+*/
+A:hover {
+ color:#8c1919;
+/* color: black;
+ font-weight: bolder;
+ background-color: #FFFFCC;
+ text-decoration:none;
+*/
+}
+
+
+body {
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 10pt;
+ //background-color: white;
+ background-image: url("../image/fade.png"); background-repeat:repeat-x;
+ color: black
+}
+// .bg { background-image: url("mn_hauptmenu.png");}
+td {
+ font-family: Verdana, Arial, Helvetica;
+ color: black;
+ font-size: 8pt;
+ font-weight: normal;
+}
+td.hover:hover {
+ color: black;
+/* background-color: #FFFFCC;
+ font-size: 8pt;
+ text-decoration: none;
+ border:none;
+ borderWidth:0px;
+ borderColor:2557AD;
+*/
+}
+
+//td {
+// font-family: Verdana, Arial, Helvetica;
+// font-size: 8pt;
+//}
+
+th {
+ font-family: Verdana, Arial, Helvetica;
+ color: black;
+ font-size: 8pt;
+ font-weight: normal;
+}
+
+/* login and admin */
+.login {
+ font-family: Verdana, Arial, Helvetica;
+}
+body.login {
+ background: #b8d1f3;
+ color: #A0A0A0;
+}
+h1.login {
+ font-size: 18pt;
+}
+table.login {
+ background-color: #efedde;
+ padding: 20px;
+}
+td.login {
+ text-align: center;
+}
+th.login {
+ text-align: right;
+}
+
+body.admin {
+ background-color: #FFFFF;
+ color: black;
+}
+
+body.menu {
+ background-image: url("../image/fade.png");background-repeat:repeat-x;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 8t;
+ color: black;
+}
+
+
+/*
+ �erschriftsbalken
+*/
+.listtop {
+ background-color: rgb(236,233,216);
+ text-align:left;
+ padding:5px;
+ font-size: 10pt;
+ color: black;
+ font-weight: bolder;
+ border-style:dashed;
+ border-width:thin;
+}
+
+
+.listelement {
+ background-image: url("../image/fade2.png");
+ //background-image: url("../image/fade.png");
+ background-repeat:repeat-x;
+ border-style:dashed;
+ border-width:thin;
+}
+
+.listelement2 {
+ //background-image: url("../image/fade_short.png");
+ background-image: url("../image/fade2.png");
+ background-repeat:repeat-x;
+ border-style:dashed;
+ border-width:thin;
+}
+
+.listheading {
+ font-size: 9pt;
+ padding:3px;
+ background-color:
+ rgb(236,233,216);
+ color: black;
+ font-weight: bolder;
+ text-align:left;
+ background-image: url("../image/fade.png");
+ border-style:dotted;
+ border-width:thin;
+}
+
+
+.optionen {
+ border:dashed;
+/* padding-top:10px;
+ padding-bottom:10px;
+ padding-left:10px;
+*/
+ border-width:1px;
+ background:efedde;
+}
+
+
+A.listheading:link, A.listheading:active, A.listheading:visited {
+ color: black;
+ text-decoration: none;
+ }
+
+.listrow1 {
+ background-color: rgb(208,207,201);
+ color: black;
+ vertical-align: top;
+}
+
+.listrow0 { background-color: rgb(236,233,216); color: black; vertical-align: top; }
+
+.listsubtotal { font-size: 8pt; background-color: rgb(236,233,216); color: black; font-weight: bolder;}
+
+.listtotal { font-size: 8pt; background-color: rgb(236,233,216); color: black; font-weight: bolder;}
+
+.submit {
+ font-family: Verdana, Arial, Helvetica;
+ color: #000000;
+}
+.checkbox, .radio {
+ font-family: Verdana, Arial, Helvetica;
+ color: #778899;
+}
+
+.plus0 { /* font color for negative numbers */
+ color: red;
+}
+
+.plus1 {
+ color: green;
+}
+
+h2.confirm {
+ color: blue;
+ font-size: 14pt;
+}
+
+h2.error {
+ color: red;
+ font-size: 14pt;
+}
+
+
+/* media stuff */
+
+@media screen {
+ .noscreen { /* items with this class won't display */
+ display: none;
+ }
+}
+
+@media print {
+ .noprint { /* items with this class won't print */
+ display: none;
+ }
+}
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<TITLE>GNU General Public License</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=ffffff>
+
+
+<pre>
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
+
+</BODY>
+</HTML>
+
--- /dev/null
+
+Lx-Office ERP
+Installationsanleitung
+
+
+Folgende Pakete müssen installiert sein:
+========================================
+Webserver (Apache)
+PostgreSQL - Datenbank
+Perl - DBI und Perl - DBD
+Diese Pakete können bei den unterschiedlichen Distributionen anders heißen.
+(Debian: apache, postgresql, libdbi-perl, libdbd-pg-perl, libpgperl)
+(Fedora: httpd, postgresql-server, perl-DBI, perl-DBD-Pg)
+(SuSE: apache2, postgresql-server, perl-DBI, perl-DBD-Pg)
+
+
+Die PostgreSQL Konfiguration muß angepasst werden.
+==================================================
+In der Datei postgresql.conf (/var/lib/pgsql/data/ oder /etc/postgresql/) muß folgender Wert verändert werden:
+
+TCPIP_SOCKET = 1
+
+In der Datei pg_hba.conf (/var/lib/pgsql/data/ oder /etc/postgresql/) müssen die Berichtigungen für den
+Zugriff geändert werden:
+
+alte Eintragung:
+----------------
+local all all ident sameuser
+host all all 127.0.0.1 255.0.0.0 ident sameuser
+
+Änderung:
+---------
+local all all trust
+host all all 127.0.0.1 255.0.0.0 trust
+
+
+Installation des Programmpaketes
+================================
+Die Lx-Office ERP Installationsdatei (lxoffice-erp-2.0.0.tgz) in den DocumentRoot des Webservers
+(/var/www/html/ oder /srv/www/htdocs oder /var/www/) entpacken.
+
+tar xvzf lxoffice-erp-2.0.0.tgz
+
+Verändern Sie evtl. noch den Namen des Verzeichnisses
+
+mv lxoffice-erp/ lx-erp/
+
+Das Verzeichnis muß dem Webserverbenutzer (Debian: www-data, Fedora: apache, SuSE: wwwrun) übergeben werden:
+
+chown apache: -R lx-erp/
+
+
+Datenbankbenutzer anlegen
+=========================
+
+Es sollte zum Zugriff auf die PostgreSQL Datenbank ein Datenbankbenutzer angelegt werden. Führen Sie dazu
+folgende Befehle nacheinander aus.
+
+su - postgres
+createuser -d lxoffice (ohne Passwort)
+oder createuser -d -P lxoffice (mit Passwort)
+
+Wenn Sie später einen Datenbankzugriff konfigurieren, verändern Sie den evtl. voreingestellten Benutzer
+"postgres" auf "lxoffice".
+
+
+PostgreSQL - Datenbank erweitern
+================================
+In der Datenbank "template1" sollte bevor die restliche Konfiguration von LxOffice ERP erfolgt noch folgende
+Funktion hinzugefügt werden:
+
+psql template1 postgres (Zugriff über Admintool auf die Datenbank)
+create function plpgsql_call_handler ()
+returns opaque
+as '/usr/lib/pgsql/plpgsql.so'
+language 'c';
+
+create language 'plpgsql' handler plpgsql_call_handler
+lancompiler 'pl/pgsql';
+
+Bitte beachten Sie, das der Pfad zur Datei plpgsql.so von Distribution zu Distribution verschieden sein kann.
+Bei z.B. Debian befindet sie sich unter '/usr/lib/postgresql/lib/plpgsql.so'.
+
+
+Apache Konfiguration
+====================
+Der Zugriff auf das Programmverzeichnis muß in der Apache Webserver- konfiguration httpd.conf
+(/etc/httpd/conf/) [bei SuSE evtl. httpd2.conf] konfiguriert werden:
+
+AddHandler cgi-script .pl
+Alias /lx-erp/ /var/www/lx-erp/
+<Directory /var/www/lx-erp>
+ Options ExecCGI Includes FollowSymlinks
+</Directory>
+
+<Directory /var/www/lx-erp/users>
+ Order Deny,Allow
+ Deny from All
+</Directory>
+
+
+Datenbank anlegen
+=================
+Das Administrationsmenü finden Sie unter:
+
+http://localhost/lx-erp/admin.pl
+
+Zuerst muß eine Datenbank angelegt werden. Anschließend ein Benutzer. Verwenden Sie für den
+Datenbankzugriff den eben angelegten Benutzer lxoffice.
+
+
+Lx-Office ERP verwenden
+=======================
+Einloggen können Sie sich unter:
+
+http://localhost/lx-erp/login.pl
--- /dev/null
+####################################\r
+# Veraenderungen von Lx-Office ERP #\r
+####################################\r
+\r
+2005-01-03 - Version 2.1.0\r
+ - Export von UStVA - Daten für ELSTER\r
+ - DATEV Exportschnittstelle\r
+ - Neue Optik\r
+ - Automatische Kunden-, Lieferanten- und Artikelnummervergabe\r
+ - umfangreiche Lizenz(Serien-)nummernverwaltung\r
+ - Javascript Kalendar, bei allen Datumsfelder. Global ein-/auschaltbar\r
+ - zuweisen von Kontaktpersonen zu Rechnungen,,Angeboten,Aufträgen\r
+ - Bugfixes\r
+\r
+2005-02-08 - Version 2.1.1\r
+ - Im Datenbankschema Geldbeträge vom Datentyp float nach numeric umgestellt\r
+ - UStVa - Modul überarbeitet\r
+ - Menuicons überarbeitet\r
+ - zusätzliche Felder beim Kunden/Lieferanten\r
+ - Bugfixes\r
+ Bug#145: Fehler bei der Sucher nach Waren über den Hersteller\r
+ Bug#144: Fehler bei der Stringbehandlung in Form.pm\r
+ Bug#137: Fehler im Datenbankschema bei der Speicherung von Einheiten\r
+ Bug#136: cc Beim Versenden von eMails nicht gesetzt\r
+ Bug#123: Javascript-Kalender berücksichtig nur deutsches Datumsformat\r
+ Bug#119: Fehler in der Backuproutine verhindert Rückspielen des Backups\r
+ Kontakte konnten nicht richtig ausgewählt werden
\ No newline at end of file
--- /dev/null
+######################################################################
+# Lx-Office ERP
+# distributed from Linet Services GbR - Braunschweig
+#
+# based von SQL-Ledger - Author: Dieter Simander
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#######################################################################
+
--- /dev/null
+<html>
+ <head>
+ <title>LaTeX-Vorlagen und verfügbare Variablen</title>
+ <style type="text/css">
+ <!--
+.blue {
+ color: #000000;
+ background-color: #b0ecff;
+ border: 1px solid blue;
+ padding-left: 2px;
+ padding-right: 2px;
+ }
+
+table {
+ color: #000000;
+ background-color: #fae8b8;
+ border: 1px solid #be5303;
+ border-collapse: collapse;
+ }
+
+td {
+ border: 1px solid #be5303;
+ padding: 3px;
+ }
+ -->
+ </style>
+
+ </head>
+
+<body>
+
+ <h1>LaTeX-Vorlagen und verfügbare Variablen</h1>
+
+ <p>geschrieben von <a href="mailto:m.bunkus@linet-services.de">Moritz
+ Bunkus</a>. Version: $Id$ </p>
+
+ <hr>
+
+ <h2><a name="inhaltsverzeichnis">Inhaltsverzeichnis</a></h2>
+
+ <ol>
+ <li><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ Inhaltsverzeichnis</a></li>
+
+ <li><a href="latex-template-variablen.html#einfuehrung">Einführung</a>
+ </li>
+
+ <li><a href="latex-template-variablen.html#zuordnung_dateinamen">
+ Zuordnung von Dateinamen zu den Funktionen</a></li>
+
+ <li><a href="latex-template-variablen.html#allgemeine_variablen">
+ Allgemeine Variablen, die in allen Vorlagen vorhanden sind</a><br>
+
+ <ol>
+ <li><a href="latex-template-variablen.html#allgemein_stammdaten">
+ Stammdaten von Kunden und Lieferanten</a></li>
+
+ <li><a href="latex-template-variablen.html#allgemein_verkaeufer">
+ Informationen über den Verkäufer</a></li>
+
+ <li><a href="latex-template-variablen.html#allgemein_steuern">
+ Variablen für jede Steuer</a></li>
+ </ol>
+ </li>
+
+ <li><a href="latex-template-variablen.html#invoice">
+ Variablen in Rechnungen</a>
+
+ <ol>
+ <li><a href="latex-template-variablen.html#invoice_allgemein">
+ Allgemeine Variablen</a></li>
+
+ <li><a href="latex-template-variablen.html#invoice_posten">
+ Variablen für jeden Posten auf der Rechnung</a></li>
+
+ <li><a href="latex-template-variablen.html#invoice_zahlungen">
+ Variablen für die Zahlungseingänge</a></li>
+ </ol>
+ </li>
+
+ <li><a href="latex-template-variablen.html#anderevorlagen">
+ Variablen in anderen Vorlagen</a></li>
+
+ <li><a href="latex-template-variablen.html#bloecke">
+ Blöcke, bedingte Anweisungen und Schleifen</a>
+
+ <ol>
+ <li><a href="latex-template-variablen.html#bloecke_include">
+ Die <code>include</code>-Anweisung</a></li>
+
+ <li><a href="latex-template-variablen.html#bloecke_ifnot">
+ Der <code>if not</code>-Block</a></li>
+
+ <li><a href="latex-template-variablen.html#bloecke_if">
+ Der <code>if</code>-Block</a></li>
+
+ <li><a href="latex-template-variablen.html#bloecke_foreach">
+ Die <code>foreach</code>-Schleife</a></li>
+
+ <li><a href="latex-template-variablen.html#bloecke_pagebreak">
+ Der <code>pagebreak</code>-Block</a></li>
+ </ol>
+ </li>
+
+ </ol>
+
+ <hr>
+
+ <h2><a name="einfuehrung">Einführung</a></h2>
+
+ <p>Dies ist eine Auflistung der Standard-LaTeX-Vorlagen und aller zur
+ Bearbeitung verfügbare Variablen. Eine Variable wird in einer Vorlage
+ durch ihren Inhalt ersetzt, wenn sie in der Form
+ <code><%variablenname%></code> verwendet wird.</p>
+
+ <p>Insgesamt sind technisch gesehen eine ganze Menge mehr Variablen
+ verfügbar als hier aufgelistet werden. Die meisten davon können
+ allerdings innerhalb einer solchen Vorlage nicht sinnvoll verwendet
+ werden. Wenn eine Auflistung dieser Variablen gewollt ist, so kann diese wie
+ folgt erhalten werden:</p>
+
+ <ol>
+
+ <li><code>SL/Form.pm</code> öffnen und am Anfang die Zeile
+ <pre>"use Data::Dumper;"</pre> einfügen.</li>
+
+ <li>In <code>Form.pm</code> die Funktion <code>parse_template</code>
+ suchen und hier die Zeile <pre>print(STDERR Dumper($self));</pre>
+ einfügen.</li>
+
+ <li>Einmal per Browser die gewünschte Vorlage "benutzen", z.B. ein PDF
+ für eine Rechnung erzeugen.</li>
+
+ <li>Im <code>error.log</code> vom Apache steht die Ausgabe der Variablen
+ <code>$self</code> in der Form <code>'key' => 'value',</code>. Alle
+ <code>key</code>s sind verfügbar.</li>
+
+ </ol>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="zuordnung_dateinamen">
+ Zuordnung von den Dateinamen zu den Funktionen</a></h2>
+
+ <p>Diese kurze Auflistung zeigt, welche Vorlage bei welcher Funktion
+ ausgelesen wird:</p>
+
+ <ul>
+ <li><code>bin_list.tex</code> -- Lagerliste</li>
+ <li><code>check.tex</code> -- ?</li>
+ <li><code>invoice.tex</code> -- Rechnung</li>
+ <li><code>packing_list.tex</code> -- Verpackungsliste</li>
+ <li><code>pick_list.tex</code> -- Sammelliste</li>
+ <li><code>purcharse_order.tex</code> -- Bestellung an Lieferanten</li>
+ <li><code>request_quotation.tex</code> -- Anfrage an Lieferanten</li>
+ <li><code>sales_order.tex</code> -- Bestellung</li>
+ <li><code>sales_quotation.tex</code> -- Angebot an Kunden</li>
+ </ul>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="allgemeine_variablen">
+ Allgemeine Variablen, die in allen Vorlagen vorhanden sind</a></h2>
+
+ <h3><a name="allgemein_stammdaten">
+ Stammdaten von Kunden und Lieferanten:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>account_number</code></td>
+ <td>Kontonummer</td>
+ </tr>
+ <tr>
+ <td><code>bank</code></td>
+ <td>Name der Bank</td>
+ </tr>
+ <tr>
+ <td><code>bank_code</code></td>
+ <td>Bankleitzahl</td>
+ </tr>
+ <tr>
+ <td><code>business</code></td>
+ <td>Kundentyp</td>
+ </tr>
+ <tr>
+ <td><code>city</code></td>
+ <td>Stadt</td>
+ </tr>
+ <tr>
+ <td><code>contact</code></td>
+ <td>Kontakt</td>
+ </tr>
+ <tr>
+ <td><code>country</code></td>
+ <td>Land</td>
+ </tr>
+ <tr>
+ <td><code>cp_email</code></td>
+ <td>Email des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_givenname</code></td>
+ <td>Vorname des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_greeting</code></td>
+ <td>Anrede des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_name</code></td>
+ <td>Name des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_phone1</code></td>
+ <td>Telefonnummer 1 des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_phone2</code></td>
+ <td>Telefonnummer 2 des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>cp_title</code></td>
+ <td>Titel des Ansprechpartners</td>
+ </tr>
+ <tr>
+ <td><code>creditlimit</code></td>
+ <td>Kreditlimit</td>
+ </tr>
+ <tr>
+ <td><code>customernumber</code></td>
+ <td>Kundennummer; nur für Kunden</td>
+ </tr>
+ <tr>
+ <td><code>customernotes</code></td>
+ <td>Bemerkungen beim Kunden; nur für Kunden</td>
+ </tr>
+ <tr>
+ <td><code>discount</code></td>
+ <td>Rabatt</td>
+ </tr>
+ <tr>
+ <td><code>email</code></td>
+ <td>Emailadresse</td>
+ </tr>
+ <tr>
+ <td><code>fax</code></td>
+ <td>Faxnummer</td>
+ </tr>
+ <tr>
+ <td><code>homepage</code></td>
+ <td>Homepage</td>
+ </tr>
+ <tr>
+ <td><code>language</code></td>
+ <td>Sprache</td>
+ </tr>
+ <tr>
+ <td><code>name</code></td>
+ <td>Firmenname</td>
+ </tr>
+ <tr>
+ <td><code>phone</code></td>
+ <td>Telefonnummer</td>
+ </tr>
+ <tr>
+ <td><code>shiptocity</code></td>
+ <td>Stadt (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptocontact</code></td>
+ <td>Kontakt (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptocountry</code></td>
+ <td>Land (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptoemail</code></td>
+ <td>Email (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptofax</code></td>
+ <td>Fax (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptoname</code></td>
+ <td>Firmenname (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptophone</code></td>
+ <td>Telefonnummer (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptostreet</code></td>
+ <td>Straße und Hausnummer (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptozipcode</code></td>
+ <td>Postleitzahl (Lieferadresse)
+ <a href="latex-template-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>street</code></td>
+ <td>Straße und Hausnummer</td>
+ </tr>
+ <tr>
+ <td><code>taxnumber</code></td>
+ <td>Steuernummer</td>
+ </tr>
+ <tr>
+ <td><code>terms</code></td>
+ <td>Zahlungsziel</td>
+ </tr>
+ <tr>
+ <td><code>vendoremail</code></td>
+ <td>Email des Lieferanten; nur für Lieferanten</td>
+ </tr>
+ <tr>
+ <td><code>vendorfax</code></td>
+ <td>Faxnummer des Lieferanten; nur für Lieferanten</td>
+ </tr>
+ <tr>
+ <td><code>vendornotes</code></td>
+ <td>Bemerkungen beim Lieferanten; nur für Lieferanten</td>
+ </tr>
+ <tr>
+ <td><code>vendornumber</code></td>
+ <td>Lieferantennummer; nur für Lieferanten</td>
+ </tr>
+ <tr>
+ <td><code>vendorphone</code></td>
+ <td>Telefonnummer des Lieferanten; nur für Lieferanten</td>
+ </tr>
+ <tr>
+ <td><code>zipcode</code></td>
+ <td>Postleitzahl</td>
+ </tr>
+ </table>
+ </p>
+
+ <p><a name="anmerkung_shipto"><em>Anmerkung</em></a>: Sind die
+ <code>shipto*</code>-Felder in den Stammdaten nicht eingetragen, so haben
+ die Variablen <code>shipto*</code> den gleichen Wert wie die die
+ entsprechenden Variablen der Lieferdaten. Das bedeutet, dass sich einige
+ <code>shipto*</code>-Variablen so nicht in den Stammdaten wiederfinden
+ sondern schlicht Kopien der Lieferdatenvariablen sind
+ (z.B. <code>shiptocontact</code>).</p>
+
+ <h3><a name="allgemein_verkaeufer">
+ Informationen über den Verkäufer:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>employee_email</code></td>
+ <td>Email</td>
+ </tr>
+ <tr>
+ <td><code>employee_fax</code></td>
+ <td>Fax</td>
+ </tr>
+ <tr>
+ <td><code>employee_name</code></td>
+ <td>voller Name</td>
+ </tr>
+ <tr>
+ <td><code>employee_signature</code></td>
+ <td>Signatur</td>
+ </tr>
+ <tr>
+ <td><code>employee_tel</code></td>
+ <td>Telefonnummer</td>
+ </tr>
+ </table>
+ </p>
+
+ <h3><a name="allgemein_steuern">
+ Variablen für die einzelnen Steuern:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>tax</code></td>
+ <td>Steuer</td>
+ </tr>
+ <tr>
+ <td><code>taxbase</code></td>
+ <td>zu versteuernder Betrag</td>
+ </tr>
+ <tr>
+ <td><code>taxdescription</code></td>
+ <td>Name der Steuer</td>
+ </tr>
+ <tr>
+ <td><code>taxrate</code></td>
+ <td>Steuersatz</td>
+ </tr>
+ </table>
+ </p>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="invoice">Variablen in Rechnungen</a></h2>
+
+ <h3><a name="invoice_allgemein">Allgemeine Variablen:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>creditremaining</code></td>
+ <td>Verbleibender Kredit</td>
+ </tr>
+ <tr>
+ <td><code>currency</code></td>
+ <td>Währung</td>
+ </tr>
+ <tr>
+ <td><code>cusordnumber</code></td>
+ <td>Bestellnummer beim Kunden</td>
+ </tr>
+ <tr>
+ <td><code>duedate</code></td>
+ <td>Fälligkeitsdatum</td>
+ </tr>
+ <tr>
+ <td><code>intnotes</code></td>
+ <td>Interne Bemerkungen</td>
+ </tr>
+ <tr>
+ <td><code>invdate</code></td>
+ <td>Rechnungsdatum</td>
+ </tr>
+ <tr>
+ <td><code>invnumber</code></td>
+ <td>Rechnungsnummer</td>
+ </tr>
+ <tr>
+ <td><code>invtotal</code></td>
+ <td>gesamter Rechnungsbetrag</td>
+ </tr>
+ <tr>
+ <td><code>notes</code></td>
+ <td>Bemerkungen der Rechnung</td>
+ </tr>
+ <tr>
+ <td><code>ordnumber</code></td>
+ <td>Auftragsnummer</td>
+ </tr>
+ <tr>
+ <td><code>quonumber</code></td>
+ <td>Angebotsnummer</td>
+ </tr>
+ <tr>
+ <td><code>shippingdate</code></td>
+ <td>Lieferdatum</td>
+ </tr>
+ <tr>
+ <td><code>shippingpoint</code></td>
+ <td>Versandort</td>
+ </tr>
+ <tr>
+ <td><code>shipvia</code></td>
+ <td>Transportmittel</td>
+ </tr>
+ <tr>
+ <td><code>subtotal</code></td>
+ <td>Zwischensumme aller Posten ohne Steuern</td>
+ </tr>
+ <tr>
+ <td><code>sumcarriedforward</code></td>
+ <td>Zwischensumme aller bisher ausgegebenen Posten. Sollte nur in einem
+ <a href="latex-template-variablen.html#bloecke_pagebreak">
+ <code>pagebreak</code></a>-Block verwendet werden.</td>
+ </tr>
+ <tr>
+ <td><code>total</code></td>
+ <td>Restsumme der Rechnung (Summe abzüglich bereits bezahlter Posten)</td>
+ </tr>
+ </table>
+ </p>
+
+ <h3><a name="invoice_posten">
+ Variablen für jeden Posten auf der Rechnung:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>assembly</code></td>
+ <td>Erzeugnis</td>
+ </tr>
+ <tr>
+ <td><code>bin</code></td>
+ <td>Stellage</td>
+ </tr>
+ <tr>
+ <td><code>deliverydate</code></td>
+ <td>Lieferdatum</td>
+ </tr>
+ <tr>
+ <td><code>description</code></td>
+ <td>Artikelbeschreibung</td>
+ </tr>
+ <tr>
+ <td><code>linetotal</code></td>
+ <td>Zeilensumme (Anzahl * Einzelpreis)</td>
+ </tr>
+ <tr>
+ <td><code>listprice</code></td>
+ <td>Listenpreis</td>
+ </tr>
+ <tr>
+ <td><code>netprice</code></td>
+ <td>Nettopreis</td>
+ </tr>
+ <tr>
+ <td><code>number</code></td>
+ <td>Artikelnummer</td>
+ </tr>
+ <tr>
+ <td><code>partnotes</code></td>
+ <td>Die beim Artikel gespeicherten Bemerkungen</td>
+ </tr>
+ <tr>
+ <td><code>partsgroup</code></td>
+ <td>Warengruppe</td>
+ </tr>
+ <tr>
+ <td><code>projectnumber</code></td>
+ <td>Projektnummer</td>
+ </tr>
+ <tr>
+ <td><code>qty</code></td>
+ <td>Anzahl</td>
+ </tr>
+ <tr>
+ <td><code>runningnumber</code></td>
+ <td>Position auf der Rechnung (1, 2, 3...)</td>
+ </tr>
+ <tr>
+ <td><code>sellprice</code></td>
+ <td>Verkaufspreis</td>
+ </tr>
+ <tr>
+ <td><code>serialnumber</code></td>
+ <td>Seriennummer</td>
+ </tr>
+ <tr>
+ <td><code>unit</code></td>
+ <td>Einheit</td>
+ </tr>
+ </table>
+ </p>
+
+ <h3><a name="invoice_zahlungen">
+ Variablen für die einzelnen Zahlungseingänge:</a></h3>
+
+ <p>
+ <table border="1">
+ <tr><th>Variablenname</th><th>Bedeutung</th></tr>
+ <tr>
+ <td><code>datepaid</code></td>
+ <td>Datum</td>
+ </tr>
+ <tr>
+ <td><code>memo</code></td>
+ <td>Memo</td>
+ </tr>
+ <tr>
+ <td><code>paid</code></td>
+ <td>Betrag</td>
+ </tr>
+ <tr>
+ <td><code>source</code></td>
+ <td>Beleg</td>
+ </tr>
+ <tr>
+ <td><code>exchangerate</code></td>
+ <td>Wechselkurs</td>
+ </tr>
+ <tr>
+ <td><code>forex</code></td>
+ <td>Konto</td>
+ </tr>
+ </table>
+ </p>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="anderevorlagen">
+ Variablen in anderen Vorlagen</a></h2>
+
+ <p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
+ Rechnung. Allerdings heißen die Variablen, die mit <code>inv</code>
+ beginnen, jetzt anders. Bei den Angeboten fangen sie mit <code>quo</code>
+ für "quotation" an: <code>quodate</code> für Angebotsdatum
+ etc. Bei Bestellungen wiederum fangen sie mit <code>ord</code> für
+ "order" an: <code>ordnumber</code> für Bestellnummer etc.</p>
+
+ <p>Manche Variablen sind in anderen Vorlagen hingegen gar nicht vorhanden wie
+ z.B. die für bereits verbuchte Zahlungseingänge. Dies sind
+ Variablen, die vom Geschäftsablauf her in der entsprechenden Vorlage
+ keine Bedeutung haben oder noch nicht belegt sein können.</p>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="bloecke">
+ Blöcke, bedingte Anweisungen und Schleifen</a></h2>
+
+ <p>Der Parser kennt neben den Variablen einige weitere Konstrukte, die
+ gesondert behandelt werden. Diese sind wie Variablennamen in spezieller
+ Weise markiert: <code><%anweisung%></code></p>
+
+ <p><b>Achtung: Blöcke können momentan nicht verschachtelt
+ werden.</b> Das bedeutet, dass innerhalb einer
+ <code><%foreach%></code>-Schleife keine
+ <code><%if%></code>-Abfragen verwendet werden können. Dieses
+ kann man aber mit LaTeX-Bordmitteln selber nachgebildet werden. Dazu muss
+ im Vorspann das Paket <code>ifthen</code> eingebunden werden. Das Konstrukt
+ selber sieht dann wie folgt aus:</p>
+
+ <p class="blue"><code>\ifthenelse{\equal{<%variable%>}{}}{}{Dieser
+ Text erscheint nur, wenn <%variable%> nicht leer ist.}</code></p>
+
+ <h3><a name="bloecke_include">Die <code>include</code>-Anweisung</a></h3>
+
+ <p class="blue"><code><%include dateiname.ext%></code></p>
+
+ <p>Fügt den Inhalt einer Datei an der entsprechenden Stelle ein. Der
+ eingefügte Text wird ganz normal durch den Parser behandelt und kann
+ Variablen und Blöcke enthalten.</p>
+
+ <h3><a name="bloecke_ifnot">Der <code>if not</code>-Block</a></h3>
+
+ <p class="blue"><code><%if not variablenname%><br>
+ ...<br>
+ <%end if></code></p>
+
+ <p>Eine normale "if-not-then"-Bedingung. Die Zeilen zwischen dem "if not" und
+ dem "end" werden nur ausgegeben, wenn die Variable "variablenname" nicht
+ gesetzt oder gleich 0 ist.</p>
+
+ <h3><a name="bloecke_if">Der <code>if</code>-Block</a></h3>
+
+ <p class="blue"><code><%if variablenname%><br>
+ ...<br>
+ <%end if></code></p>
+
+ <p>Eine normale "if-then"-Bedingung. Die Zeilen zwischen dem "if" und dem
+ "end" werden nur ausgegeben, wenn die Variable "variablenname" gesetzt und
+ ungleich 0 ist.</p>
+
+ <h3><a name="bloecke_foreach">Die <code>foreach</code>-Schleife</a></h3>
+
+ <p class="blue"><code><%foreach variablenname%><br>
+ ...<br>
+ <%end foreach></code></p>
+
+ <p>Fügt die Zeilen zwischen den beiden Anweisungen so oft ein, wie das
+ Perl-Array der Variablen "variablenname" Elemente enthät. Dieses
+ Konstrukt wird zur Ausgabe der einzelnen Posten einer Rechnung / eines
+ Angebots sowie zur Ausgabe der Steuern benutzt. In jedem Durchlauf werden
+ die <a href="latex-template-variablen.html#invoice_posten">zeilenbezogenen
+ Variablen</a> jeweils auf den Wert für die aktuelle Position
+ gesetzt.</p>
+
+ <p>Die Syntax sieht normalerweise wie folgt aus:</p>
+
+ <p class="blue"><code><%foreach number%><br>
+ Position: <%runningnumber%><br>
+ Anzahl: <%qty%><br>
+ Artikelnummer: <%number%><br>
+ Beschreibung: <%description%><br>
+ ...<br>
+ <%end foreach></code></p>
+
+ <h3><a name="bloecke_pagebreak">Der <code>pagebreak</code>-Block</a></h3>
+
+ <p class="blue"><code><%pagebreak ZpZ ZeS ZzS%><br>
+ ...<br>
+ <%end pagebreak%></code></p>
+
+ <p>Dieser Block legt das Verhalten beim manuellen Einfügen eines
+ Seitenumbruchs fest. Normalerweise bricht LaTeX die Seiten selber um. Beim
+ Rechnungsdruck ist das oft nicht gewünscht, oder man möchte im
+ Falle eines Seitenumbruchs den Übertrag etc. mit ausgeben. Deswegen
+ versucht der Parser, manuell Seitenumbrüche einzufügen,
+ während er einen <code>foreach</code>-Block auswertet, weil hier die
+ manuellen Seitenumbrüche erforderlich werden. Dafür benötigt
+ der Parser aber drei Informationen:</p>
+
+ <p>
+ <ol>
+ <li>Wieviele Zeichen passen bei der Variablen "description" pro Posten
+ in eine Zeile? Das ist der Parameter "ZpZ" (Zeichen pro Zeile).</li>
+ <li>Wieviele Zeilen/Posten passen auf die erste Seite? Das
+ ist der Parameter "ZeS" (Zeilen erste Seite).</li>
+ <li>Wieviele Zeilen/Posten passen auf die zweite und alle nachfolgenden
+ Seiten? Das ist der Parameter "ZzS" (Zeilen zweite Seite).</li>
+ </ol>
+ </p>
+
+ <p>Diese Parameter sind drei Zahlen, die manuell durch Verwendung von langen
+ Warenbezeichnungen und Rechnungen mit vielen Posten bestimmt werden
+ müssen.</p>
+
+ <p>Üblicherweise wird in diesem Block zuerst die aktuelle Tabelle
+ geschlossen, eventuell Text eingefügt (z.B. "Fortsetzung auf der
+ nächsten Seite"), dann ein Seitenumbruch erzwungen, eventuell Text
+ eingefügt (z.B. "Übertrag von der vorherigen Seite:
+ <%sumcarriedforward%> EUR") und die Tabelle wieder geöffnet.</p>
+
+ <p>Wird kein manueller Seitenumbruch gewüscht, so kann dieser Block
+ komplett entfallen.</p>
+
+ <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+</body>
+</html>
--- /dev/null
+Lx-Office Style Guide
+---------------------
+
+Die folgenden Regeln haben das Ziel, den Code möglichst gut les- und wartbar
+zu machen. Dazu gehört zum Einen, dass der Code einheitlich eingerückt ist,
+aber auch, dass Mehrdeutigkeit so weit es geht vermieden wird (Stichworte
+"Klammern" oder "Hash-Keys").
+
+Diese Regeln sind keine Schikane, sondern erleichtern allen das Leben!
+
+Zum einfachen Formartieren von Perl-Scripten gibt es das Tool "perltidy",
+das man weitgehend konfigurieren kann. Bei fast allen nachfolgenden Punkten
+sind die dazugehörigen perltidy-Optionen angegeben. perltidy ist bei den
+meisten Linux-Distributionen enthalten und kann ansonten unter
+http://perltidy.sourceforge.net heruntergeladen werden.
+
+Jeder, der einen Patch schickt, sollte sein Script vorher durch perltidy
+laufen lassen. Damit werden einige der nachfolgenden Regeln automatisch
+befolgt, andere hingegen nicht. Dort, wo keine perltidy-Optionen angegeben
+sind, muss der Programmierer selbst für die Einhaltung sorgen.
+
+--------------------------------------------------------------------------
+
+1. Es werden keine "echten" TAB-Zeichen sondern Leerzeichen verwendet.
+ Perltidy: -nt
+
+2. Die Einrückung beträgt zwei Leerzeichen.
+ Perltidy: -i=2
+ Beispiel:
+
+ sub debug {
+ print(STDERR "Debugging.\n");
+ }
+
+3. Öffnende geschweifte Klammern befinden sich auf der gleichen Zeile wie
+ der letzte Befehl.
+ Perltidy: -nbl -nsbl -bar
+ Beispiele:
+
+ sub debug {
+ ...
+ }
+
+ oder
+
+ if ($form->{"path"} eq "bin/mozilla") {
+ ...
+ }
+
+4. Schließende geschweifte Klammern sind so weit eingerückt wie der Befehl/
+ die öffnende schließende Klammer, die den Block gestartet hat, und nicht
+ auf der Ebene des Inhalts. Die gleichen Beispiele wie bei 3. gelten.
+ Perltidy: macht's automatisch
+
+5. Die Wörter "else" "elsif", "while" befinden sich auf der gleichen
+ Zeile wie schließende geschweifte Klammern.
+ Perltidy: -ce
+ Beispiele:
+
+ if ($form->{"sum"} > 1000) {
+ ...
+ } elsif ($form->{"sum"} > 0) {
+ ...
+ } else {
+ ...
+ }
+
+ do {
+ ...
+ } while ($a > 0);
+
+6. Parameter von Funktionsaufrufen müssen mit runden Klammern versehen
+ werden.
+
+ Achtung: perltidy kann dieses nicht erledigen. Der Programmierer muss
+ selber darauf achten!
+
+ Beispiel:
+
+ debug("Konnte Datei nicht oeffnen.\n");
+
+7. Verschiedene Klammern
+
+ 7.1 Aufeinander folgende runde Klammern sollten nicht durch Leerzeichen
+ abgesetzt werden.
+ Perltidy: -pt=2
+ Beispiel:
+
+ if (($form->{"debug"} == 1) && (($form->{"sum"} - 100) < 0)) {
+ ...
+ }
+
+ 7.2 Nach und vor eckigen Klammern sollten keine Leerzeichen stehen.
+ Perltidy: -sbt=2
+ Beispiel:
+
+ $array[$i + 1] = 4;
+
+ 7.3 Nach und vor geschweiften Klammern sollten keine Leerzeichen stehen,
+ es sei denn, sie sind verschachtelt.
+ Beispiel:
+
+ $form->{"sum"} += $form->{"row_${i}"};
+
+ $form->{ $form->{"index"} } += 1;
+
+ 7.4 Nach und vor geschweiften Klammern, die Codeblöcke beschränken,
+ sollten Leerzeichen stehen, wenn sich der Codeblock über nur eine
+ Zeile erstreckt.
+ Perltidy: -bbt=0
+ Beispiel:
+
+ map({ $form->{"sum"} += $form->{"row_$_"}; } (1..$rowcount));
+ $form->{ $row + 1 } = 5;
+
+8. Mehrzeilige Befehle
+
+ 8.1 Werden die Parameter eines Funktionsaufrufes auf mehrere Zeilen
+ aufgeteilt, so m[ssen diese bis zu der Spalte eingerückt werden,
+ in der die ersten Funktionsparameter in der ersten Zeile stehen.
+ Perltidy: -lp -vt=1 -vtc=1
+ Beispiel:
+
+ $sth = $dbh->prepare("SELECT * FROM some_table WHERE col = ?",
+ $form->{"some_col_value"});
+
+ 8.2 Wird ein Befehl auf einer neuen Zeile forgesetzt, so ist ab der
+ zweiten Zeile zusätzlich zwei Leerzeichen einzurücken.
+ Perltidy: -ci=2
+ Beispiel:
+
+ my $rowcount =
+ $form->{"row_$i"} ? $i : $form->{"rowcount"} - $form->{"rowbase"};
+
+9. Kommentare
+
+ 9.1 Kommentare, die alleine in einer Zeile stehen, sollten soweit wie der
+ Code eingerückt sein.
+ Perltidy: -ibc
+
+ 9.2 Seitliche hängende Kommentare sollten einheitlich formatiert werden.
+ Perltidy: -hsc
+
+10. Hash-Keys sind, sofern es sich um Zeichenketten und nicht um
+ Nummern handelt, in Anführungszeichen zu setzen.
+
+ Achtung: perltidy kann dieses nicht erledigen. Der Programmierer muss
+ selber darauf achten!
+
+ Beispiele:
+
+ $form->{"sum"} = 0;
+ $form->{"row_$i"} = $form->{"row_$i"} - 5;
+ $some_hash{42} = 54;
+
+11. Die Maximale Zeilenlänge ist nicht bescränkt. Zeilenlängen <= 79
+ helfen, weil sie dann im Textmodus / per SSH deutlich besser lesbar
+ sind. Oft genug ist es aber nicht möglich oder nur unter großen
+ Verrenkungen, diese Vorgabe einzuhalten.
+
+ Zeilen sollten nicht länger als 79 Zeichen sein.
+ Perltidy: -l=79
+
+--------------------------------------------------------------------------
+
+Vollständige Liste aller Optionen, die ich für perltidy benutze. Diese
+können in ~/.perltidyrc geschrieben werden:
+
+-syn
+-i=2
+-nt
+-pt=2
+-sbt=2
+-ci=2
+-ibc
+-hsc
+-noll
+-nsts
+-nsfs
+-asc
+-dsm
+-aws
+-bbc
+-bbs
+-bbb
+-mbl=1
+-nsob
+-ce
+-nbl
+-nsbl
+-cti=0
+-bbt=0
+-bar
+-l=79
+-lp
+-vt=1
+-vtc=1
--- /dev/null
+<style type="text/css">\r
+<!--\r
+\r
+h1.help {font-family: Verdana, Arial, Helvetica;\r
+ font-size: 12pt;\r
+ color: black\r
+ }\r
+h2.help {font-family: Verdana, Arial, Helvetica;\r
+ font-size: 12pt;\r
+ color: black\r
+ }\r
+h3.help {font-family: Verdana, Arial, Helvetica;\r
+ font-size: 10pt;\r
+ color: black;\r
+ fornt-weight: bolder\r
+ }\r
+h4.help {font-family: Verdana, Arial, Helvetica;\r
+ font-size: 10pt;\r
+ color: black;\r
+ font-style:italic\r
+ }\r
+p.help {font-family: Verdana, Arial, Helvetica;\r
+ font-size: 10pt;\r
+ color: black\r
+ }\r
+p.help.alert { color: red }\r
+.lx { font-family:'Times New Roman', Times, serif }\r
+A { font-family: Verdana, Arial, Helvetica;\r
+ font-size: 10pt\r
+}\r
+A.help {color: darkred; text-decoration: none;}\r
+A.help:visited {color: midnightblue; text-decoration: none;}\r
+A.help:active {text-decoration: none;}\r
+A.help:hover {color: blue; text-decoration: none;}\r
+\r
+-->\r
+</style>\r
+<body>\r
+<table width=100%>\r
+ <tr><a name="top">\r
+ <a name="top"><th class=listtop><h1 class="help">Hilfe zur Umsatzteuer-Voranmeldung mit <span class="lx"><i>Lx</i>-Office</a></span></h1></th>\r
+ </tr>\r
+<table>\r
+<p class="help alert">HINWEIS: In der Berechnungsroutine zur UStVa hat sich ein Probem herausgestellt, das unter gewissen Bedingungen um einige Cent differierende Werte im Vergleich zur exakten Berechnung liefert. Dieser Fehler betrifft nur Buchungen, deren Steuerbetrag manuell verändert und nicht automatisch während der Buchung berechnet wurde. (Näheres auf Anfrage bei der <a class="help" target="_blank" href="https://lists.sourceforge.net/lists/listinfo/lx-office-devel">lx-office-devel Mailingliste</a> oder unter<a class="help" target="_blank" href="http://lx-office.linet-services.de/anthill/query.php?bug=49"> Anthill Bug 49</a>)</p>\r
+<h2 class="help">Inhalt</h2>\r
+<ul>\r
+<li><a class="help" href="#overview">Überblick</a></li>\r
+<li><a class="help" href="#paperustva">Papiergebundene Umsatzsteuer-Voranmeldung</a></li>\r
+<li><a class="help" href="#winstonustva">ELSTER Umsatzsteuer-Voranmeldung mit Winston</a></li>\r
+<ul>\r
+<li><a class="help" href="#winstoninstall">Hinweise zur Installation von Winston</a></li></li>\r
+</ul>\r
+<li><a class="help" href="#tutorial">Tutorial zur UStVa mit <span class="lx"><i>Lx</i>-Office</span ></a></li>\r
+<ul>\r
+<li><a class="help" href="#config">UStVa Einstellungen</a></li>\r
+<li><a class="help" href="#create">Eine UStVa mit <span class="lx"><i>Lx</i>-Office</span > erstellen</a></li>\r
+</ul>\r
+<li><a class="help" href="#appendix">Anhang</a></li>\r
+<ul>\r
+<li><a class="help" href="#appendix1">UStVa Kennziffern die von <span class="lx"><i>Lx</i>-Office</span > unterstützt werden</a></li>\r
+</ul>\r
+</ul>\r
+<a name="overview">\r
+<h2 class="help">Überblick</h2></a>\r
+<p class="help">Die Umsatzsteuer Voranmeldung mit <span class="lx"><i>Lx</i>-Office</span > hat das Ziel, den gesamten Ablauf von der Steuerberechnug bis zur Anmeldung beim Finanzamt zu automatisieren.\r
+<p class="help">Es besteht die klassische Möglichkeit ein amtliches Steuerformular mit den gängigsten Angaben auszudrucken oder die Steuerdaten via <a class="help" target="_blank" href="https://www.elster.de/faq_elster.php">ELSTER</a> (Elektronische Steuererklärung) online an das Finanzamt zu senden. Dabei wird die ELSTER Software <a class="help" target="_blank" href="http://www.felfri.de/winston/">Winston</a> zur Übertragung der Daten aus <span class="lx"><i>Lx</i>-Office</span > genutzt. Winston ist für Linux (unter <a class="help" target="_blank" href="http://www.winehq.org">Wine</a>) oder Windows als <a class="help" target="_blank" href="http://felfri.de/winston/hilfe/faq.htm#Freeware">kostenloses Freewareprogramm</a> erhältlich.</p>\r
+<br />\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="#bottom">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br />\r
+<br />\r
+<a name="paperustva">\r
+<h2 class="help">Papiergebundene Umsatzsteuer Voranmeldung</h2></a>\r
+<p class="help">Die Papiergebundene UStVa ist die klassische Variante einer Voranmeldung, die früher von Hand ausgefüllt werden musste und dem Finanzamt postalisch zugesendet wurde. <span class="lx"><i>Lx</i>-Office</span > unterstützt den Benutzer dabei das Dokument mit Voreinstellungen und Buchhaltungsdaten auszufüllen.</p>\r
+\r
+<a name="winstonustva">\r
+<h2 class="help">ELSTER Umsatzsteuer Voranmeldung mit Winston</h2></a>\r
+<p class="help">Das neue UStVa Verfahren via ELSTER wird ab dem 1. 1. 2005 verpflichtend für alle Gewerbetreibenden bundesweit eingeführt. <!--[stimmt das?, wo stehts?]-->\r
+Um eine ELSTER Schnittstelle zu realisieren, greift <span class="lx"><i>Lx</i>-Office</span > auf die Software Winston zurück, die getrennt installiert werden muß.</p>\r
+<p class="help">Die eigentliche Schnittstelle zu Winston bildet eine XML-Datei, die in <span class="lx"><i>Lx</i>-Office</span >\r
+generiert wird und mittels 'Speichern unter...' in den Ordner 'Ausgang' der Winstoninstallation abgelegt werden muss.</p>\r
+<p class="help">Nach dem Programmstart von Winston ist der Datensatz der UStVa unter Datei->Ausgangskorb zu finden. Von dort kann er dann bearbeitet oder direkt gesendet werden.</p>\r
+<p class="help alert">Vorsicht, die Umsatzsteuer Voranmeldung bitte immer vor dem Absenden in Winston überprüfen.</p>\r
+\r
+<a name="winstoninstall">\r
+<h3 class="help">Hinweise<i></i> zur Installation von Winston</h3></a>\r
+<p class="help">Da Winston nur über eine grafische Benutzerschnittstelle zu bedienen ist, sollte die Installation auf einem Clientrechner mit Internetzugang und Anbindung an <span class="lx"><i>Lx</i>-Office</span > erfolgen.</p>\r
+<p class="help">Nach dem <a target="_blank" class="help" href="http://www.felfri.de/winston/download.htm">Download</a> von Winston das Programm installieren. Weitere Hinweise zur <a target="_blank" class="help" href="http://www.felfri.de/winston/download.htm" target="_blank">Installation</a> sind auf der Homepage von Winston zu finden. </p>\r
+<br>\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="#bottom">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br>\r
+<a name="tutorial">\r
+<h3 class="help">Tutorial zur UStVa mit <span class="lx"><i>Lx</i>-Office</span ></h3></a>\r
+<a name="config"><h4 class="help">UStVa Einstellungen</h4></a>\r
+<p class="help">Starten Sie die UStVa Funktion von <span class="lx"><i>Lx</i>-Office</span > unter Berichte -> UStVa.</p>\r
+<p class="help">Beim ersten Start des UStVa Moduls ist es notwendig, einige Einstellungen vorzunehmen. Wählen Sie den Knopf 'Einstellungen'.</p>\r
+<p class="help">Im 'Einstellungen' Menü wählen Sie das Bundesland in dem Ihr Finanzamt sitzt. Dann wählen Sie ihr Finanzamt aus.</p>\r
+<p class="help">Das Berechnungsverfahren für die UStVa hängt davon ab, ob sie Ist oder Soll Versteuert werden. Wenn sie Ist-Versteuert werden, wählen sie die Einnahmen/Überschuß-Rechnung aus. Werden Sie Soll-Versteuert oder bilanzverpflichtet, dann wählen Sie Bilanz aus.</p>\r
+<p class="help">Die Einstellungen zum Voranmeldungszeitraum entsprechend vornehmen.</p>\r
+<p class="help">Wenn Sie einen Steuerberater zu Rate ziehen, können Sie diese Information ebenfalls hinterlegen. Auf 'weiter' ticken.</p>\r
+<p class="help">Auf der zweiten Seite des Konfigurationsmenüs sehen Sie einige Kontaktdaten zu ihrem Finanzamt. Unten ergänzen Sie bitte die Steuernummer. Mit der Tabulator Taste können Sie bequem die einzelnen Ziffern eingeben.</p>\r
+<p class="help alert">Hinweis: Die Steuernummer wird nicht auf Plausibilität geprüft.</p>\r
+<p class="help">Wenn alle Eingaben überprüft sind, speichern auswählen.</p>\r
+<br />\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="#bottom">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br />\r
+<a name="create"><h4 class="help">Eine UStVa mit <span class="lx"><i>Lx</i>-Office</span > erstellen</h4></a>\r
+<p class="help">Starten Sie die UStVa Funktion von <span class="lx"><i>Lx</i>-Office</span > unter Berichte -> UStVa.</p>\r
+<p class="help">Das Feld <b>Firma</b> beinhaltet Daten über die eigene Firma. Dort sollten Firmenname, Anschrift, Telefon, Fax und ihre Steuernummer eingetragen sein. Wenn der Eintrag für die Steuernummer nicht vorhanden ist, dann wird die Auswahl 'Ausgabeformat' ausgeblendet und der 'Anzeigen' Knopf deaktiviert. Anstatt dessen erscheint eine Fehlermeldung. Ticken Sie einfach auf die Fehlermeldung, dann gelangen Sie zu den jeweiligen <a class="help" href="#config">Einstellungen</a>. Dort können dann alle fehlenden Einträge Vorgenommen werden.</p>\r
+<p class="help">Wählen Sie das Ausgabeformat 'Vorschau' aus für einen schnellen HTML Überblick.</p>\r
+<p class="help">Das Ausgabeformat 'UStVA als PDF Dokument' gibt ein PDF Dokument aus, das beispielsweise mir dem <a class="help" target="_blank" href="http://www.adobe.de/products/acrobat/readstep2.html">Adobe Reader</a> dargestellt werden kann.</p>\r
+<p class="help">Wählen Sie den ELSTER Export nach Winston um eine elektrische Steuererklärung zu erzeugen. Dabei erscheint ein 'Datei speichern unter...' Dialog Ihres Browsers, der Sie auffordert, eine xml-Datei zu speichern.</p>\r
+<p class="help">Wählen Sie als Speicherort das Verzeichnis 'Ausgang' ihrer Winston Installation.</p>\r
+<p class="help">Der Speicherort des Ordners 'Ausgang' hängt von ihrer Installation ab. Dieser Ordner liegt normalerweise im Winston Programmverzeichnis.</p>\r
+<p class="help">Sollte sich der Ordner 'Ausgang' nicht im Programmverzeichnis von Winston befinden, dann kann er in Winston unter Optionen->Einstellungen->Benutzereinstellungen aktiviert werden. Unter Optionen->Einstellungen->Sondereinstellungen kann nachgeschaut werden in welchem Verzeichnis sich das Unterverzeichnis Ausgang befindet. Dort wird die xml-Datei dann gespeichert.\r
+</p>\r
+<p class="help">Legen Sie eine Verknüpfung auf dem Desktop zum Winston Augangsordner, um diesen in Zukunft schneller zu finden.</p>\r
+<p class="help">Weitere <a class="help" target="_blank" href="http://www.felfri.de/winston/hilfe/index.htm">Hilfe</a> zur Bedienung von Winston finden Sie auf der <a class="help" target="_blank" href="http://www.felfri.de/winston"></a>Winston Homepage</a>.</p>\r
+<!--<img src="templates/helppics/ustva/ustva1.00.png" alt="Textillustration" border="1">-->\r
+<br>\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="#bottom">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br>\r
+<a name="appendix">\r
+<h2 class="help">Anhang</h2></a>\r
+<a name="appendix1">\r
+<h3 class="help">UStVa Kennziffern die von <span class="lx"><i>Lx</i>-Office</span > unterstützt werden</h3></a>\r
+<p class="help">Hier sind Finanzdaten und Voreinstellungen aus Lx-office aufgelistet. Dabei\r
+werden zur Orientierung auch die aktuellen Werte angezeigt.</p>\r
+<p class="help"><small>Zeilennummern beziehen sich auf das UStVa Formular 2005</small></p>\r
+\r
+<table width="100%">\r
+<tr>\r
+ <th colspan="3" class="listheading">UStVa Kennziffern</th>\r
+</tr>\r
+<tr>\r
+ <th class="listheading">Kennziffer</th>\r
+ <th class="listheading">Bemerkung</th>\r
+ <th class="listheading">aktueller Wert</th>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>10 </td>\r
+ <td> </td>\r
+ <td>\r
+ <%10%>\r
+ </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>71 </td>\r
+ <td>noch nicht verfügbar</td>\r
+ <td>\r
+ <%71%>\r
+ </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>43 </td>\r
+ <td> </td>\r
+ <td>\r
+ <%43%>\r
+ </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>45</td>\r
+ <td> </td>\r
+ <td>\r
+ <%45%>\r
+ </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>51r</td>\r
+ <td></td>\r
+ <td>\r
+ <%51r%>\r
+ </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>62 </td>\r
+ <td> </td>\r
+ <td><%62%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>66 </td>\r
+ <td> </td>\r
+ <td><%66%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>67 </td>\r
+ <td> </td>\r
+ <td><%67%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>86r </td>\r
+ <td> </td>\r
+ <td> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>93r </td>\r
+ <td> </td>\r
+ <td><%93r%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>96 </td>\r
+ <td> </td>\r
+ <td><%96%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>97r </td>\r
+ <td> </td>\r
+ <td><%97r%> </td>\r
+</tr>\r
+</table>\r
+<br />\r
+<table width="100%">\r
+<tr>\r
+ <th colspan="3" class="listheading">Finanzamt (Zeile 5 bis 10)</th>\r
+</tr>\r
+<tr>\r
+ <th class="listheading">Feldname </th>\r
+ <th class="listheading">Bemerkung </th>\r
+ <th class="listheading">aktueller Wert</th>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Name</td>\r
+ <td></td>\r
+ <td><%FA_Name%></td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Straße </td>\r
+ <td> </td>\r
+ <td><%FA_Strasse%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>PLZ</td>\r
+ <td> </td>\r
+ <td><%FA_PLZ%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Stadt</td>\r
+ <td> </td>\r
+ <td><%FA_Ort%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Fax</td>\r
+ <td> </td>\r
+ <td><%FA_FAX%> </td>\r
+</tr>\r
+</table>\r
+<br>\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="#bottom">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br>\r
+<br />\r
+<table width="100%">\r
+<tr>\r
+ <th colspan="3" class="listheading">Firma (Zeile 12 bis 16)</th>\r
+</tr>\r
+<tr>\r
+ <th class="listheading">Feldname </th>\r
+ <th class="listheading">Bemerkung </th>\r
+ <th class="listheading">aktueller Wert</th>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Name</td>\r
+ <td> </td>\r
+ <td><%company%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Straße </td>\r
+ <td> </td>\r
+ <td><%company_street%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Stadt</td>\r
+ <td> </td>\r
+ <td><%company_cty%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Steuernummer</td>\r
+ <td> </td>\r
+ <td><%steuernummer%> </td>\r
+</tr>\r
+</table>\r
+<p class="listheading0">Firmenadresse:<br />\r
+<%address%></p>\r
+<br />\r
+<table width=100%>\r
+<tr>\r
+ <th colspan="3" class="listheading">Steuerberater/-in (Zeile 78 bis 82)</th>\r
+</tr>\r
+<tr>\r
+ <th class="listheading">Feldname </th>\r
+ <th class="listheading">Bemerkung </th>\r
+ <th class="listheading">aktueller Wert</th>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Name</td>\r
+ <td> </td>\r
+ <td><%FA_steuerberater_name%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Straße </td>\r
+ <td> </td>\r
+ <td><%FA_steuerberater_street%> </td>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Stadt</td>\r
+ <td> </td>\r
+ <td><%FA_steuerberater_city%> </td>\r
+</tr>\r
+<tr class="listrow1">\r
+ <td>Telefon</td>\r
+ <td> </td>\r
+ <td><%FA_steuerberater_tel%> </td>\r
+</tr>\r
+</table>\r
+<br />\r
+<table width="100%">\r
+<tr>\r
+ <th colspan="3" class="listheading">Sonstiges</th>\r
+</tr>\r
+<tr>\r
+ <th class="listheading">Feld</th>\r
+ <th class="listheading">Beschreibung</th>\r
+ <th class="listheading">aktueller Wert</th>\r
+</tr>\r
+<tr class="listrow0">\r
+ <td>Datum</td>\r
+ <td>aktuelles Tagesdatum</td>\r
+ <td><%Datum_heute%></td>\r
+</tr>\r
+</table>\r
+<br />\r
+<a name="bottom"> </a>\r
+<br>\r
+<table bgcolor="lightgrey" width="100%">\r
+<tr align="right" valign="bottom">\r
+ <td align="left"><a class="help" href="http://homer/lx-erp/ustva.pl?path=<%path%>&action=report&level=Reports&login=<%login%>&password=<%password%>">[zurück zur UStVa]</a></td><td><a class="help" href="#top">[Anfang/Inhalt]</a> <a class="help" href="">[Ende]</a>\r
+ </td>\r
+</tr>\r
+</table>\r
+<br>\r
+</body>\r
+</html>
\ No newline at end of file
--- /dev/null
+/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar. They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly. This script should not be seen as part of the calendar. It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up. If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+
+// $Id: calendar-setup.js,v 1.15 2004/02/04 08:10:03 mishoo Exp $
+
+/**
+ * This function "patches" an input field (or other element) to use a calendar
+ * widget for date selection.
+ *
+ * The "params" is a single object that can have the following properties:
+ *
+ * prop. name | description
+ * -------------------------------------------------------------------------------------------------
+ * inputField | the ID of an input field to store the date
+ * displayArea | the ID of a DIV or other element to show the date
+ * button | ID of a button or other element that will trigger the calendar
+ * eventName | event that will trigger the calendar, without the "on" prefix (default: "click")
+ * ifFormat | date format that will be stored in the input field
+ * daFormat | the date format that will be used to display the date in displayArea
+ * singleClick | (true/false) wether the calendar is in single click mode or not (default: true)
+ * firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc.
+ * align | alignment (default: "Br"); if you don't know what's this see the calendar documentation
+ * range | array with 2 elements. Default: [1900, 2999] -- the range of years available
+ * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers
+ * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
+ * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
+ * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
+ * onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay)
+ * onClose | function that gets called when the calendar is closed. [default]
+ * onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar.
+ * date | the date that the calendar will be initially displayed to
+ * showsTime | default: false; if true the calendar will include a time selector
+ * timeFormat | the time format; can be "12" or "24", default is "12"
+ * electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
+ * step | configures the step of the years in drop-down boxes; default: 2
+ * position | configures the calendar absolute position; default: null
+ * cache | if "true" (but default: "false") it will reuse the same calendar object, where possible
+ * showOthers | if "true" (but default: "false") it will show days from other months too
+ *
+ * None of them is required, they all have default values. However, if you
+ * pass none of "inputField", "displayArea" or "button" you'll get a warning
+ * saying "nothing to setup".
+ */
+Calendar.setup = function (params) {
+ function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
+
+ param_default("inputField", null);
+ param_default("displayArea", null);
+ param_default("button", null);
+ param_default("eventName", "click");
+ param_default("ifFormat", "%Y/%m/%d");
+ param_default("daFormat", "%Y/%m/%d");
+ param_default("singleClick", true);
+ param_default("disableFunc", null);
+ param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined
+ param_default("firstDay", 1); // defaults to "Sunday" first
+ param_default("align", "Br");
+ param_default("range", [1900, 2999]);
+ param_default("weekNumbers", true);
+ param_default("flat", null);
+ param_default("flatCallback", null);
+ param_default("onSelect", null);
+ param_default("onClose", null);
+ param_default("onUpdate", null);
+ param_default("date", null);
+ param_default("showsTime", false);
+ param_default("timeFormat", "24");
+ param_default("electric", true);
+ param_default("step", 2);
+ param_default("position", null);
+ param_default("cache", false);
+ param_default("showOthers", false);
+
+ var tmp = ["inputField", "displayArea", "button"];
+ for (var i in tmp) {
+ if (typeof params[tmp[i]] == "string") {
+ params[tmp[i]] = document.getElementById(params[tmp[i]]);
+ }
+ }
+ if (!(params.flat || params.inputField || params.displayArea || params.button)) {
+ alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");
+ return false;
+ }
+
+ function onSelect(cal) {
+ var p = cal.params;
+ var update = (cal.dateClicked || p.electric);
+ if (update && p.flat) {
+ if (typeof p.flatCallback == "function")
+ p.flatCallback(cal);
+ else
+ alert("No flatCallback given -- doing nothing.");
+ return false;
+ }
+ if (update && p.inputField) {
+ p.inputField.value = cal.date.print(p.ifFormat);
+ if (typeof p.inputField.onchange == "function")
+ p.inputField.onchange();
+ }
+ if (update && p.displayArea)
+ p.displayArea.innerHTML = cal.date.print(p.daFormat);
+ if (update && p.singleClick && cal.dateClicked)
+ cal.callCloseHandler();
+ if (update && typeof p.onUpdate == "function")
+ p.onUpdate(cal);
+ };
+
+ if (params.flat != null) {
+ if (typeof params.flat == "string")
+ params.flat = document.getElementById(params.flat);
+ if (!params.flat) {
+ alert("Calendar.setup:\n Flat specified but can't find parent.");
+ return false;
+ }
+ var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
+ cal.showsTime = params.showsTime;
+ cal.time24 = (params.timeFormat == "24");
+ cal.params = params;
+ cal.weekNumbers = params.weekNumbers;
+ cal.setRange(params.range[0], params.range[1]);
+ cal.setDateStatusHandler(params.dateStatusFunc);
+ cal.create(params.flat);
+ cal.show();
+ return false;
+ }
+
+ var triggerEl = params.button || params.displayArea || params.inputField;
+ triggerEl["on" + params.eventName] = function() {
+ var dateEl = params.inputField || params.displayArea;
+ var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
+ var mustCreate = false;
+ var cal = window.calendar;
+ if (!(cal && params.cache)) {
+ window.calendar = cal = new Calendar(params.firstDay,
+ params.date,
+ params.onSelect || onSelect,
+ params.onClose || function(cal) { cal.hide(); });
+ cal.showsTime = params.showsTime;
+ cal.time24 = (params.timeFormat == "24");
+ cal.weekNumbers = params.weekNumbers;
+ mustCreate = true;
+ } else {
+ if (params.date)
+ cal.setDate(params.date);
+ cal.hide();
+ }
+ cal.showsOtherMonths = params.showOthers;
+ cal.yearStep = params.step;
+ cal.setRange(params.range[0], params.range[1]);
+ cal.params = params;
+ cal.setDateStatusHandler(params.dateStatusFunc);
+ cal.setDateFormat(dateFmt);
+ if (mustCreate)
+ cal.create();
+ cal.parseDate(dateEl.value || dateEl.innerHTML);
+ cal.refresh();
+ if (!params.position)
+ cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+ else
+ cal.showAt(params.position[0], params.position[1]);
+ return false;
+ };
+};
--- /dev/null
+/* The main calendar widget. DIV containing a table. */
+
+.calendar {
+ position: relative;
+ display: none;
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4d0c8;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+.calendar table {
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ font-size: 11px;
+ color: #000;
+ cursor: default;
+ background: #d4d0c8;
+ font-family: tahoma,verdana,sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+ text-align: center;
+ padding: 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+ background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+ font-weight: bold;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #848078;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+ border-bottom: 1px solid #000;
+ padding: 2px;
+ text-align: center;
+ background: #f4f0e8;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+ color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+ border-top: 2px solid #fff;
+ border-right: 2px solid #000;
+ border-bottom: 2px solid #000;
+ border-left: 2px solid #fff;
+ padding: 0px;
+ background-color: #e4e0d8;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ background-color: #c4c0b8;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+ width: 2em;
+ text-align: right;
+ padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+ font-size: 80%;
+ color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+ color: #faa;
+}
+
+.calendar table .wn {
+ padding: 2px 3px 2px 2px;
+ border-right: 1px solid #000;
+ background: #f4f0e8;
+}
+
+.calendar tbody .rowhilite td {
+ background: #e4e0d8;
+}
+
+.calendar tbody .rowhilite td.wn {
+ background: #d4d0c8;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+ padding: 1px 3px 1px 1px;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+ padding: 2px 2px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+ font-weight: bold;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+ padding: 2px 2px 0px 2px;
+ background: #e4e0d8;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+ color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+ font-weight: bold;
+ color: #00f;
+}
+
+.calendar tbody .disabled { color: #999; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+ visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+ display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+ background: #f4f0e8;
+ padding: 1px;
+ border: 1px solid #000;
+ background: #848078;
+ color: #fff;
+ text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ padding: 1px;
+ background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+ padding: 2px 0px 0px 2px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+ position: absolute;
+ display: none;
+ width: 4em;
+ top: 0px;
+ left: 0px;
+ cursor: default;
+ border-top: 1px solid #fff;
+ border-right: 1px solid #000;
+ border-bottom: 1px solid #000;
+ border-left: 1px solid #fff;
+ background: #e4e0d8;
+ font-size: 90%;
+ padding: 1px;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+ text-align: center;
+ padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+ width: 4em;
+}
+
+.calendar .combo .active {
+ background: #c4c0b8;
+ padding: 0px;
+ border-top: 1px solid #000;
+ border-right: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+ background: #048;
+ color: #fea;
+}
+
+.calendar td.time {
+ border-top: 1px solid #000;
+ padding: 1px 0px;
+ text-align: center;
+ background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+ padding: 0px 3px 0px 4px;
+ border: 1px solid #889;
+ font-weight: bold;
+ background-color: #fff;
+}
+
+.calendar td.time .ampm {
+ text-align: center;
+}
+
+.calendar td.time .colon {
+ padding: 0px 2px 0px 3px;
+ font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+ border-color: #000;
+ background-color: #766;
+ color: #fff;
+}
+
+.calendar td.time span.active {
+ border-color: #f00;
+ background-color: #000;
+ color: #0f0;
+}
--- /dev/null
+/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
+ * ------------------------------------------------------------------
+ *
+ * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+
+// $Id: calendar.js,v 1.34 2004/02/06 18:53:11 mishoo Exp $
+
+/** The Calendar object constructor. */
+Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
+ // member variables
+ this.activeDiv = null;
+ this.currentDateEl = null;
+ this.getDateStatus = null;
+ this.timeout = null;
+ this.onSelected = onSelected || null;
+ this.onClose = onClose || null;
+ this.dragging = false;
+ this.hidden = false;
+ this.minYear = 1970;
+ this.maxYear = 2050;
+ this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+ this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+ this.isPopup = true;
+ this.weekNumbers = true;
+ this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
+ this.showsOtherMonths = false;
+ this.dateStr = dateStr;
+ this.ar_days = null;
+ this.showsTime = false;
+ this.time24 = true;
+ this.yearStep = 2;
+ // HTML elements
+ this.table = null;
+ this.element = null;
+ this.tbody = null;
+ this.firstdayname = null;
+ // Combo boxes
+ this.monthsCombo = null;
+ this.yearsCombo = null;
+ this.hilitedMonth = null;
+ this.activeMonth = null;
+ this.hilitedYear = null;
+ this.activeYear = null;
+ // Information
+ this.dateClicked = false;
+
+ // one-time initializations
+ if (typeof Calendar._SDN == "undefined") {
+ // table of short day names
+ if (typeof Calendar._SDN_len == "undefined")
+ Calendar._SDN_len = 3;
+ var ar = new Array();
+ for (var i = 8; i > 0;) {
+ ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
+ }
+ Calendar._SDN = ar;
+ // table of short month names
+ if (typeof Calendar._SMN_len == "undefined")
+ Calendar._SMN_len = 3;
+ ar = new Array();
+ for (var i = 12; i > 0;) {
+ ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
+ }
+ Calendar._SMN = ar;
+ }
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
+ !/opera/i.test(navigator.userAgent) );
+
+Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
+
+/// detect Opera browser
+Calendar.is_opera = /opera/i.test(navigator.userAgent);
+
+/// detect KHTML-based browsers
+Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+// library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+ var SL = 0, ST = 0;
+ var is_div = /^div$/i.test(el.tagName);
+ if (is_div && el.scrollLeft)
+ SL = el.scrollLeft;
+ if (is_div && el.scrollTop)
+ ST = el.scrollTop;
+ var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
+ if (el.offsetParent) {
+ var tmp = this.getAbsolutePos(el.offsetParent);
+ r.x += tmp.x;
+ r.y += tmp.y;
+ }
+ return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+ var related = evt.relatedTarget;
+ if (!related) {
+ var type = evt.type;
+ if (type == "mouseover") {
+ related = evt.fromElement;
+ } else if (type == "mouseout") {
+ related = evt.toElement;
+ }
+ }
+ while (related) {
+ if (related == el) {
+ return true;
+ }
+ related = related.parentNode;
+ }
+ return false;
+};
+
+Calendar.removeClass = function(el, className) {
+ if (!(el && el.className)) {
+ return;
+ }
+ var cls = el.className.split(" ");
+ var ar = new Array();
+ for (var i = cls.length; i > 0;) {
+ if (cls[--i] != className) {
+ ar[ar.length] = cls[i];
+ }
+ }
+ el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+ Calendar.removeClass(el, className);
+ el.className += " " + className;
+};
+
+Calendar.getElement = function(ev) {
+ if (Calendar.is_ie) {
+ return window.event.srcElement;
+ } else {
+ return ev.currentTarget;
+ }
+};
+
+Calendar.getTargetElement = function(ev) {
+ if (Calendar.is_ie) {
+ return window.event.srcElement;
+ } else {
+ return ev.target;
+ }
+};
+
+Calendar.stopEvent = function(ev) {
+ ev || (ev = window.event);
+ if (Calendar.is_ie) {
+ ev.cancelBubble = true;
+ ev.returnValue = false;
+ } else {
+ ev.preventDefault();
+ ev.stopPropagation();
+ }
+ return false;
+};
+
+Calendar.addEvent = function(el, evname, func) {
+ if (el.attachEvent) { // IE
+ el.attachEvent("on" + evname, func);
+ } else if (el.addEventListener) { // Gecko / W3C
+ el.addEventListener(evname, func, true);
+ } else {
+ el["on" + evname] = func;
+ }
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+ if (el.detachEvent) { // IE
+ el.detachEvent("on" + evname, func);
+ } else if (el.removeEventListener) { // Gecko / W3C
+ el.removeEventListener(evname, func, true);
+ } else {
+ el["on" + evname] = null;
+ }
+};
+
+Calendar.createElement = function(type, parent) {
+ var el = null;
+ if (document.createElementNS) {
+ // use the XHTML namespace; IE won't normally get here unless
+ // _they_ "fix" the DOM2 implementation.
+ el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+ } else {
+ el = document.createElement(type);
+ }
+ if (typeof parent != "undefined") {
+ parent.appendChild(el);
+ }
+ return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+ with (Calendar) {
+ addEvent(el, "mouseover", dayMouseOver);
+ addEvent(el, "mousedown", dayMouseDown);
+ addEvent(el, "mouseout", dayMouseOut);
+ if (is_ie) {
+ addEvent(el, "dblclick", dayMouseDblClick);
+ el.setAttribute("unselectable", true);
+ }
+ }
+};
+
+Calendar.findMonth = function(el) {
+ if (typeof el.month != "undefined") {
+ return el;
+ } else if (typeof el.parentNode.month != "undefined") {
+ return el.parentNode;
+ }
+ return null;
+};
+
+Calendar.findYear = function(el) {
+ if (typeof el.year != "undefined") {
+ return el;
+ } else if (typeof el.parentNode.year != "undefined") {
+ return el.parentNode;
+ }
+ return null;
+};
+
+Calendar.showMonthsCombo = function () {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ var cal = cal;
+ var cd = cal.activeDiv;
+ var mc = cal.monthsCombo;
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ if (cal.activeMonth) {
+ Calendar.removeClass(cal.activeMonth, "active");
+ }
+ var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+ Calendar.addClass(mon, "active");
+ cal.activeMonth = mon;
+ var s = mc.style;
+ s.display = "block";
+ if (cd.navtype < 0)
+ s.left = cd.offsetLeft + "px";
+ else {
+ var mcw = mc.offsetWidth;
+ if (typeof mcw == "undefined")
+ // Konqueror brain-dead techniques
+ mcw = 50;
+ s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
+ }
+ s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ var cal = cal;
+ var cd = cal.activeDiv;
+ var yc = cal.yearsCombo;
+ if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ if (cal.activeYear) {
+ Calendar.removeClass(cal.activeYear, "active");
+ }
+ cal.activeYear = null;
+ var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+ var yr = yc.firstChild;
+ var show = false;
+ for (var i = 12; i > 0; --i) {
+ if (Y >= cal.minYear && Y <= cal.maxYear) {
+ yr.firstChild.data = Y;
+ yr.year = Y;
+ yr.style.display = "block";
+ show = true;
+ } else {
+ yr.style.display = "none";
+ }
+ yr = yr.nextSibling;
+ Y += fwd ? cal.yearStep : -cal.yearStep;
+ }
+ if (show) {
+ var s = yc.style;
+ s.display = "block";
+ if (cd.navtype < 0)
+ s.left = cd.offsetLeft + "px";
+ else {
+ var ycw = yc.offsetWidth;
+ if (typeof ycw == "undefined")
+ // Konqueror brain-dead techniques
+ ycw = 50;
+ s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
+ }
+ s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+ }
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ if (cal.timeout) {
+ clearTimeout(cal.timeout);
+ }
+ var el = cal.activeDiv;
+ if (!el) {
+ return false;
+ }
+ var target = Calendar.getTargetElement(ev);
+ ev || (ev = window.event);
+ Calendar.removeClass(el, "active");
+ if (target == el || target.parentNode == el) {
+ Calendar.cellClick(el, ev);
+ }
+ var mon = Calendar.findMonth(target);
+ var date = null;
+ if (mon) {
+ date = new Date(cal.date);
+ if (mon.month != date.getMonth()) {
+ date.setMonth(mon.month);
+ cal.setDate(date);
+ cal.dateClicked = false;
+ cal.callHandler();
+ }
+ } else {
+ var year = Calendar.findYear(target);
+ if (year) {
+ date = new Date(cal.date);
+ if (year.year != date.getFullYear()) {
+ date.setFullYear(year.year);
+ cal.setDate(date);
+ cal.dateClicked = false;
+ cal.callHandler();
+ }
+ }
+ }
+ with (Calendar) {
+ removeEvent(document, "mouseup", tableMouseUp);
+ removeEvent(document, "mouseover", tableMouseOver);
+ removeEvent(document, "mousemove", tableMouseOver);
+ cal._hideCombos();
+ _C = null;
+ return stopEvent(ev);
+ }
+};
+
+Calendar.tableMouseOver = function (ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return;
+ }
+ var el = cal.activeDiv;
+ var target = Calendar.getTargetElement(ev);
+ if (target == el || target.parentNode == el) {
+ Calendar.addClass(el, "hilite active");
+ Calendar.addClass(el.parentNode, "rowhilite");
+ } else {
+ if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
+ Calendar.removeClass(el, "active");
+ Calendar.removeClass(el, "hilite");
+ Calendar.removeClass(el.parentNode, "rowhilite");
+ }
+ ev || (ev = window.event);
+ if (el.navtype == 50 && target != el) {
+ var pos = Calendar.getAbsolutePos(el);
+ var w = el.offsetWidth;
+ var x = ev.clientX;
+ var dx;
+ var decrease = true;
+ if (x > pos.x + w) {
+ dx = x - pos.x - w;
+ decrease = false;
+ } else
+ dx = pos.x - x;
+
+ if (dx < 0) dx = 0;
+ var range = el._range;
+ var current = el._current;
+ var count = Math.floor(dx / 10) % range.length;
+ for (var i = range.length; --i >= 0;)
+ if (range[i] == current)
+ break;
+ while (count-- > 0)
+ if (decrease) {
+ if (--i < 0)
+ i = range.length - 1;
+ } else if ( ++i >= range.length )
+ i = 0;
+ var newval = range[i];
+ el.firstChild.data = newval;
+
+ cal.onUpdateTime();
+ }
+ var mon = Calendar.findMonth(target);
+ if (mon) {
+ if (mon.month != cal.date.getMonth()) {
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ Calendar.addClass(mon, "hilite");
+ cal.hilitedMonth = mon;
+ } else if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ } else {
+ if (cal.hilitedMonth) {
+ Calendar.removeClass(cal.hilitedMonth, "hilite");
+ }
+ var year = Calendar.findYear(target);
+ if (year) {
+ if (year.year != cal.date.getFullYear()) {
+ if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ Calendar.addClass(year, "hilite");
+ cal.hilitedYear = year;
+ } else if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ } else if (cal.hilitedYear) {
+ Calendar.removeClass(cal.hilitedYear, "hilite");
+ }
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+ if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+ return Calendar.stopEvent(ev);
+ }
+};
+
+Calendar.calDragIt = function (ev) {
+ var cal = Calendar._C;
+ if (!(cal && cal.dragging)) {
+ return false;
+ }
+ var posX;
+ var posY;
+ if (Calendar.is_ie) {
+ posY = window.event.clientY + document.body.scrollTop;
+ posX = window.event.clientX + document.body.scrollLeft;
+ } else {
+ posX = ev.pageX;
+ posY = ev.pageY;
+ }
+ cal.hideShowCovered();
+ var st = cal.element.style;
+ st.left = (posX - cal.xOffs) + "px";
+ st.top = (posY - cal.yOffs) + "px";
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+ var cal = Calendar._C;
+ if (!cal) {
+ return false;
+ }
+ cal.dragging = false;
+ with (Calendar) {
+ removeEvent(document, "mousemove", calDragIt);
+ removeEvent(document, "mouseup", calDragEnd);
+ tableMouseUp(ev);
+ }
+ cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+ var el = Calendar.getElement(ev);
+ if (el.disabled) {
+ return false;
+ }
+ var cal = el.calendar;
+ cal.activeDiv = el;
+ Calendar._C = cal;
+ if (el.navtype != 300) with (Calendar) {
+ if (el.navtype == 50) {
+ el._current = el.firstChild.data;
+ addEvent(document, "mousemove", tableMouseOver);
+ } else
+ addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
+ addClass(el, "hilite active");
+ addEvent(document, "mouseup", tableMouseUp);
+ } else if (cal.isPopup) {
+ cal._dragStart(ev);
+ }
+ if (el.navtype == -1 || el.navtype == 1) {
+ if (cal.timeout) clearTimeout(cal.timeout);
+ cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+ } else if (el.navtype == -2 || el.navtype == 2) {
+ if (cal.timeout) clearTimeout(cal.timeout);
+ cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+ } else {
+ cal.timeout = null;
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+ Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
+ if (Calendar.is_ie) {
+ document.selection.empty();
+ }
+};
+
+Calendar.dayMouseOver = function(ev) {
+ var el = Calendar.getElement(ev);
+ if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+ return false;
+ }
+ if (el.ttip) {
+ if (el.ttip.substr(0, 1) == "_") {
+ el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+ }
+ el.calendar.tooltips.firstChild.data = el.ttip;
+ }
+ if (el.navtype != 300) {
+ Calendar.addClass(el, "hilite");
+ if (el.caldate) {
+ Calendar.addClass(el.parentNode, "rowhilite");
+ }
+ }
+ return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+ with (Calendar) {
+ var el = getElement(ev);
+ if (isRelated(el, ev) || _C || el.disabled) {
+ return false;
+ }
+ removeClass(el, "hilite");
+ if (el.caldate) {
+ removeClass(el.parentNode, "rowhilite");
+ }
+ el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
+ return stopEvent(ev);
+ }
+};
+
+/**
+ * A generic "click" handler :) handles all types of buttons defined in this
+ * calendar.
+ */
+Calendar.cellClick = function(el, ev) {
+ var cal = el.calendar;
+ var closing = false;
+ var newdate = false;
+ var date = null;
+ if (typeof el.navtype == "undefined") {
+ Calendar.removeClass(cal.currentDateEl, "selected");
+ Calendar.addClass(el, "selected");
+ closing = (cal.currentDateEl == el);
+ if (!closing) {
+ cal.currentDateEl = el;
+ }
+ cal.date = new Date(el.caldate);
+ date = cal.date;
+ newdate = true;
+ // a date was clicked
+ if (!(cal.dateClicked = !el.otherMonth))
+ cal._init(cal.firstDayOfWeek, date);
+ } else {
+ if (el.navtype == 200) {
+ Calendar.removeClass(el, "hilite");
+ cal.callCloseHandler();
+ return;
+ }
+ date = (el.navtype == 0) ? new Date() : new Date(cal.date);
+ // unless "today" was clicked, we assume no date was clicked so
+ // the selected handler will know not to close the calenar when
+ // in single-click mode.
+ // cal.dateClicked = (el.navtype == 0);
+ cal.dateClicked = false;
+ var year = date.getFullYear();
+ var mon = date.getMonth();
+ function setMonth(m) {
+ var day = date.getDate();
+ var max = date.getMonthDays(m);
+ if (day > max) {
+ date.setDate(max);
+ }
+ date.setMonth(m);
+ };
+ switch (el.navtype) {
+ case 400:
+ Calendar.removeClass(el, "hilite");
+ var text = Calendar._TT["ABOUT"];
+ if (typeof text != "undefined") {
+ text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
+ } else {
+ // FIXME: this should be removed as soon as lang files get updated!
+ text = "Help and about box text is not translated into this language.\n" +
+ "If you know this language and you feel generous please update\n" +
+ "the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
+ "and send it back to <mishoo@infoiasi.ro> to get it into the distribution ;-)\n\n" +
+ "Thank you!\n" +
+ "http://dynarch.com/mishoo/calendar.epl\n";
+ }
+ alert(text);
+ return;
+ case -2:
+ if (year > cal.minYear) {
+ date.setFullYear(year - 1);
+ }
+ break;
+ case -1:
+ if (mon > 0) {
+ setMonth(mon - 1);
+ } else if (year-- > cal.minYear) {
+ date.setFullYear(year);
+ setMonth(11);
+ }
+ break;
+ case 1:
+ if (mon < 11) {
+ setMonth(mon + 1);
+ } else if (year < cal.maxYear) {
+ date.setFullYear(year + 1);
+ setMonth(0);
+ }
+ break;
+ case 2:
+ if (year < cal.maxYear) {
+ date.setFullYear(year + 1);
+ }
+ break;
+ case 100:
+ cal.setFirstDayOfWeek(el.fdow);
+ return;
+ case 50:
+ var range = el._range;
+ var current = el.firstChild.data;
+ for (var i = range.length; --i >= 0;)
+ if (range[i] == current)
+ break;
+ if (ev && ev.shiftKey) {
+ if (--i < 0)
+ i = range.length - 1;
+ } else if ( ++i >= range.length )
+ i = 0;
+ var newval = range[i];
+ el.firstChild.data = newval;
+ cal.onUpdateTime();
+ return;
+ case 0:
+ // TODAY will bring us here
+ if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
+ // remember, "date" was previously set to new
+ // Date() if TODAY was clicked; thus, it
+ // contains today date.
+ return false;
+ }
+ break;
+ }
+ if (!date.equalsTo(cal.date)) {
+ cal.setDate(date);
+ newdate = true;
+ }
+ }
+ if (newdate) {
+ cal.callHandler();
+ }
+ if (closing) {
+ Calendar.removeClass(el, "hilite");
+ cal.callCloseHandler();
+ }
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+ * This function creates the calendar inside the given parent. If _par is
+ * null than it creates a popup calendar inside the BODY element. If _par is
+ * an element, be it BODY, then it creates a non-popup calendar (still
+ * hidden). Some properties need to be set before calling this function.
+ */
+Calendar.prototype.create = function (_par) {
+ var parent = null;
+ if (! _par) {
+ // default parent is the document body, in which case we create
+ // a popup calendar.
+ parent = document.getElementsByTagName("body")[0];
+ this.isPopup = true;
+ } else {
+ parent = _par;
+ this.isPopup = false;
+ }
+ this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+ var table = Calendar.createElement("table");
+ this.table = table;
+ table.cellSpacing = 0;
+ table.cellPadding = 0;
+ table.calendar = this;
+ Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+ var div = Calendar.createElement("div");
+ this.element = div;
+ div.className = "calendar";
+ if (this.isPopup) {
+ div.style.position = "absolute";
+ div.style.display = "none";
+ }
+ div.appendChild(table);
+
+ var thead = Calendar.createElement("thead", table);
+ var cell = null;
+ var row = null;
+
+ var cal = this;
+ var hh = function (text, cs, navtype) {
+ cell = Calendar.createElement("td", row);
+ cell.colSpan = cs;
+ cell.className = "button";
+ if (navtype != 0 && Math.abs(navtype) <= 2)
+ cell.className += " nav";
+ Calendar._add_evs(cell);
+ cell.calendar = cal;
+ cell.navtype = navtype;
+ if (text.substr(0, 1) != "&") {
+ cell.appendChild(document.createTextNode(text));
+ }
+ else {
+ // FIXME: dirty hack for entities
+ cell.innerHTML = text;
+ }
+ return cell;
+ };
+
+ row = Calendar.createElement("tr", thead);
+ var title_length = 6;
+ (this.isPopup) && --title_length;
+ (this.weekNumbers) && ++title_length;
+
+ hh("?", 1, 400).ttip = Calendar._TT["INFO"];
+ this.title = hh("", title_length, 300);
+ this.title.className = "title";
+ if (this.isPopup) {
+ this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+ this.title.style.cursor = "move";
+ hh("×", 1, 200).ttip = Calendar._TT["CLOSE"];
+ }
+
+ row = Calendar.createElement("tr", thead);
+ row.className = "headrow";
+
+ this._nav_py = hh("«", 1, -2);
+ this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
+
+ this._nav_pm = hh("‹", 1, -1);
+ this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
+
+ this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
+ this._nav_now.ttip = Calendar._TT["GO_TODAY"];
+
+ this._nav_nm = hh("›", 1, 1);
+ this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
+
+ this._nav_ny = hh("»", 1, 2);
+ this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
+
+ // day names
+ row = Calendar.createElement("tr", thead);
+ row.className = "daynames";
+ if (this.weekNumbers) {
+ cell = Calendar.createElement("td", row);
+ cell.className = "name wn";
+ cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
+ }
+ for (var i = 7; i > 0; --i) {
+ cell = Calendar.createElement("td", row);
+ cell.appendChild(document.createTextNode(""));
+ if (!i) {
+ cell.navtype = 100;
+ cell.calendar = this;
+ Calendar._add_evs(cell);
+ }
+ }
+ this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
+ this._displayWeekdays();
+
+ var tbody = Calendar.createElement("tbody", table);
+ this.tbody = tbody;
+
+ for (i = 6; i > 0; --i) {
+ row = Calendar.createElement("tr", tbody);
+ if (this.weekNumbers) {
+ cell = Calendar.createElement("td", row);
+ cell.appendChild(document.createTextNode(""));
+ }
+ for (var j = 7; j > 0; --j) {
+ cell = Calendar.createElement("td", row);
+ cell.appendChild(document.createTextNode(""));
+ cell.calendar = this;
+ Calendar._add_evs(cell);
+ }
+ }
+
+ if (this.showsTime) {
+ row = Calendar.createElement("tr", tbody);
+ row.className = "time";
+
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = 2;
+ cell.innerHTML = Calendar._TT["TIME"] || " ";
+
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = this.weekNumbers ? 4 : 3;
+
+ (function(){
+ function makeTimePart(className, init, range_start, range_end) {
+ var part = Calendar.createElement("span", cell);
+ part.className = className;
+ part.appendChild(document.createTextNode(init));
+ part.calendar = cal;
+ part.ttip = Calendar._TT["TIME_PART"];
+ part.navtype = 50;
+ part._range = [];
+ if (typeof range_start != "number")
+ part._range = range_start;
+ else {
+ for (var i = range_start; i <= range_end; ++i) {
+ var txt;
+ if (i < 10 && range_end >= 10) txt = '0' + i;
+ else txt = '' + i;
+ part._range[part._range.length] = txt;
+ }
+ }
+ Calendar._add_evs(part);
+ return part;
+ };
+ var hrs = cal.date.getHours();
+ var mins = cal.date.getMinutes();
+ var t12 = !cal.time24;
+ var pm = (hrs > 12);
+ if (t12 && pm) hrs -= 12;
+ var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
+ var span = Calendar.createElement("span", cell);
+ span.appendChild(document.createTextNode(":"));
+ span.className = "colon";
+ var M = makeTimePart("minute", mins, 0, 59);
+ var AP = null;
+ cell = Calendar.createElement("td", row);
+ cell.className = "time";
+ cell.colSpan = 2;
+ if (t12)
+ AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
+ else
+ cell.innerHTML = " ";
+
+ cal.onSetTime = function() {
+ var hrs = this.date.getHours();
+ var mins = this.date.getMinutes();
+ var pm = (hrs > 12);
+ if (pm && t12) hrs -= 12;
+ H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
+ M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
+ if (t12)
+ AP.firstChild.data = pm ? "pm" : "am";
+ };
+
+ cal.onUpdateTime = function() {
+ var date = this.date;
+ var h = parseInt(H.firstChild.data, 10);
+ if (t12) {
+ if (/pm/i.test(AP.firstChild.data) && h < 12)
+ h += 12;
+ else if (/am/i.test(AP.firstChild.data) && h == 12)
+ h = 0;
+ }
+ var d = date.getDate();
+ var m = date.getMonth();
+ var y = date.getFullYear();
+ date.setHours(h);
+ date.setMinutes(parseInt(M.firstChild.data, 10));
+ date.setFullYear(y);
+ date.setMonth(m);
+ date.setDate(d);
+ this.dateClicked = false;
+ this.callHandler();
+ };
+ })();
+ } else {
+ this.onSetTime = this.onUpdateTime = function() {};
+ }
+
+ var tfoot = Calendar.createElement("tfoot", table);
+
+ row = Calendar.createElement("tr", tfoot);
+ row.className = "footrow";
+
+ cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
+ cell.className = "ttip";
+ if (this.isPopup) {
+ cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+ cell.style.cursor = "move";
+ }
+ this.tooltips = cell;
+
+ div = Calendar.createElement("div", this.element);
+ this.monthsCombo = div;
+ div.className = "combo";
+ for (i = 0; i < Calendar._MN.length; ++i) {
+ var mn = Calendar.createElement("div");
+ mn.className = Calendar.is_ie ? "label-IEfix" : "label";
+ mn.month = i;
+ mn.appendChild(document.createTextNode(Calendar._SMN[i]));
+ div.appendChild(mn);
+ }
+
+ div = Calendar.createElement("div", this.element);
+ this.yearsCombo = div;
+ div.className = "combo";
+ for (i = 12; i > 0; --i) {
+ var yr = Calendar.createElement("div");
+ yr.className = Calendar.is_ie ? "label-IEfix" : "label";
+ yr.appendChild(document.createTextNode(""));
+ div.appendChild(yr);
+ }
+
+ this._init(this.firstDayOfWeek, this.date);
+ parent.appendChild(this.element);
+};
+
+/** keyboard navigation, only for popup calendars */
+Calendar._keyEvent = function(ev) {
+ if (!window.calendar) {
+ return false;
+ }
+ (Calendar.is_ie) && (ev = window.event);
+ var cal = window.calendar;
+ var act = (Calendar.is_ie || ev.type == "keypress");
+ if (ev.ctrlKey) {
+ switch (ev.keyCode) {
+ case 37: // KEY left
+ act && Calendar.cellClick(cal._nav_pm);
+ break;
+ case 38: // KEY up
+ act && Calendar.cellClick(cal._nav_py);
+ break;
+ case 39: // KEY right
+ act && Calendar.cellClick(cal._nav_nm);
+ break;
+ case 40: // KEY down
+ act && Calendar.cellClick(cal._nav_ny);
+ break;
+ default:
+ return false;
+ }
+ } else switch (ev.keyCode) {
+ case 32: // KEY space (now)
+ Calendar.cellClick(cal._nav_now);
+ break;
+ case 27: // KEY esc
+ act && cal.callCloseHandler();
+ break;
+ case 37: // KEY left
+ case 38: // KEY up
+ case 39: // KEY right
+ case 40: // KEY down
+ if (act) {
+ var date = cal.date.getDate() - 1;
+ var el = cal.currentDateEl;
+ var ne = null;
+ var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
+ switch (ev.keyCode) {
+ case 37: // KEY left
+ (--date >= 0) && (ne = cal.ar_days[date]);
+ break;
+ case 38: // KEY up
+ date -= 7;
+ (date >= 0) && (ne = cal.ar_days[date]);
+ break;
+ case 39: // KEY right
+ (++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
+ break;
+ case 40: // KEY down
+ date += 7;
+ (date < cal.ar_days.length) && (ne = cal.ar_days[date]);
+ break;
+ }
+ if (!ne) {
+ if (prev) {
+ Calendar.cellClick(cal._nav_pm);
+ } else {
+ Calendar.cellClick(cal._nav_nm);
+ }
+ date = (prev) ? cal.date.getMonthDays() : 1;
+ el = cal.currentDateEl;
+ ne = cal.ar_days[date - 1];
+ }
+ Calendar.removeClass(el, "selected");
+ Calendar.addClass(ne, "selected");
+ cal.date = new Date(ne.caldate);
+ cal.callHandler();
+ cal.currentDateEl = ne;
+ }
+ break;
+ case 13: // KEY enter
+ if (act) {
+ cal.callHandler();
+ cal.hide();
+ }
+ break;
+ default:
+ return false;
+ }
+ return Calendar.stopEvent(ev);
+};
+
+/**
+ * (RE)Initializes the calendar to the given date and firstDayOfWeek
+ */
+Calendar.prototype._init = function (firstDayOfWeek, date) {
+ var today = new Date();
+ this.table.style.visibility = "hidden";
+ var year = date.getFullYear();
+ if (year < this.minYear) {
+ year = this.minYear;
+ date.setFullYear(year);
+ } else if (year > this.maxYear) {
+ year = this.maxYear;
+ date.setFullYear(year);
+ }
+ this.firstDayOfWeek = firstDayOfWeek;
+ this.date = new Date(date);
+ var month = date.getMonth();
+ var mday = date.getDate();
+ var no_days = date.getMonthDays();
+
+ // calendar voodoo for computing the first day that would actually be
+ // displayed in the calendar, even if it's from the previous month.
+ // WARNING: this is magic. ;-)
+ date.setDate(1);
+ var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
+ if (day1 < 0)
+ day1 += 7;
+ date.setDate(-day1);
+ date.setDate(date.getDate() + 1);
+
+ var row = this.tbody.firstChild;
+ var MN = Calendar._SMN[month];
+ var ar_days = new Array();
+ var weekend = Calendar._TT["WEEKEND"];
+ for (var i = 0; i < 6; ++i, row = row.nextSibling) {
+ var cell = row.firstChild;
+ if (this.weekNumbers) {
+ cell.className = "day wn";
+ cell.firstChild.data = date.getWeekNumber();
+ cell = cell.nextSibling;
+ }
+ row.className = "daysrow";
+ var hasdays = false;
+ for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
+ var iday = date.getDate();
+ var wday = date.getDay();
+ cell.className = "day";
+ var current_month = (date.getMonth() == month);
+ if (!current_month) {
+ if (this.showsOtherMonths) {
+ cell.className += " othermonth";
+ cell.otherMonth = true;
+ } else {
+ cell.className = "emptycell";
+ cell.innerHTML = " ";
+ cell.disabled = true;
+ continue;
+ }
+ } else {
+ cell.otherMonth = false;
+ hasdays = true;
+ }
+ cell.disabled = false;
+ cell.firstChild.data = iday;
+ if (typeof this.getDateStatus == "function") {
+ var status = this.getDateStatus(date, year, month, iday);
+ if (status === true) {
+ cell.className += " disabled";
+ cell.disabled = true;
+ } else {
+ if (/disabled/i.test(status))
+ cell.disabled = true;
+ cell.className += " " + status;
+ }
+ }
+ if (!cell.disabled) {
+ ar_days[ar_days.length] = cell;
+ cell.caldate = new Date(date);
+ cell.ttip = "_";
+ if (current_month && iday == mday) {
+ cell.className += " selected";
+ this.currentDateEl = cell;
+ }
+ if (date.getFullYear() == today.getFullYear() &&
+ date.getMonth() == today.getMonth() &&
+ iday == today.getDate()) {
+ cell.className += " today";
+ cell.ttip += Calendar._TT["PART_TODAY"];
+ }
+ if (weekend.indexOf(wday.toString()) != -1) {
+ cell.className += cell.otherMonth ? " oweekend" : " weekend";
+ }
+ }
+ }
+ if (!(hasdays || this.showsOtherMonths))
+ row.className = "emptyrow";
+ }
+ this.ar_days = ar_days;
+ this.title.firstChild.data = Calendar._MN[month] + ", " + year;
+ this.onSetTime();
+ this.table.style.visibility = "visible";
+ // PROFILE
+ // this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+/**
+ * Calls _init function above for going to a certain date (but only if the
+ * date is different than the currently selected one).
+ */
+Calendar.prototype.setDate = function (date) {
+ if (!date.equalsTo(this.date)) {
+ this._init(this.firstDayOfWeek, date);
+ }
+};
+
+/**
+ * Refreshes the calendar. Useful if the "disabledHandler" function is
+ * dynamic, meaning that the list of disabled date can change at runtime.
+ * Just * call this function if you think that the list of disabled dates
+ * should * change.
+ */
+Calendar.prototype.refresh = function () {
+ this._init(this.firstDayOfWeek, this.date);
+};
+
+/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
+Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
+ this._init(firstDayOfWeek, this.date);
+ this._displayWeekdays();
+};
+
+/**
+ * Allows customization of what dates are enabled. The "unaryFunction"
+ * parameter must be a function object that receives the date (as a JS Date
+ * object) and returns a boolean value. If the returned value is true then
+ * the passed date will be marked as disabled.
+ */
+Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+ this.getDateStatus = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+ this.minYear = a;
+ this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+ if (this.onSelected) {
+ this.onSelected(this, this.date.print(this.dateFormat));
+ }
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+ if (this.onClose) {
+ this.onClose(this);
+ }
+ this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+ var el = this.element.parentNode;
+ el.removeChild(this.element);
+ Calendar._C = null;
+ window.calendar = null;
+};
+
+/**
+ * Moves the calendar element to a different section in the DOM tree (changes
+ * its parent).
+ */
+Calendar.prototype.reparent = function (new_parent) {
+ var el = this.element;
+ el.parentNode.removeChild(el);
+ new_parent.appendChild(el);
+};
+
+// This gets called when the user presses a mouse button anywhere in the
+// document, if the calendar is shown. If the click was outside the open
+// calendar this function closes it.
+Calendar._checkCalendar = function(ev) {
+ if (!window.calendar) {
+ return false;
+ }
+ var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+ for (; el != null && el != calendar.element; el = el.parentNode);
+ if (el == null) {
+ // calls closeHandler which should hide the calendar.
+ window.calendar.callCloseHandler();
+ return Calendar.stopEvent(ev);
+ }
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+ var rows = this.table.getElementsByTagName("tr");
+ for (var i = rows.length; i > 0;) {
+ var row = rows[--i];
+ Calendar.removeClass(row, "rowhilite");
+ var cells = row.getElementsByTagName("td");
+ for (var j = cells.length; j > 0;) {
+ var cell = cells[--j];
+ Calendar.removeClass(cell, "hilite");
+ Calendar.removeClass(cell, "active");
+ }
+ }
+ this.element.style.display = "block";
+ this.hidden = false;
+ if (this.isPopup) {
+ window.calendar = this;
+ Calendar.addEvent(document, "keydown", Calendar._keyEvent);
+ Calendar.addEvent(document, "keypress", Calendar._keyEvent);
+ Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
+ }
+ this.hideShowCovered();
+};
+
+/**
+ * Hides the calendar. Also removes any "hilite" from the class of any TD
+ * element.
+ */
+Calendar.prototype.hide = function () {
+ if (this.isPopup) {
+ Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
+ Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
+ Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
+ }
+ this.element.style.display = "none";
+ this.hidden = true;
+ this.hideShowCovered();
+};
+
+/**
+ * Shows the calendar at a given absolute position (beware that, depending on
+ * the calendar element style -- position property -- this might be relative
+ * to the parent's containing rectangle).
+ */
+Calendar.prototype.showAt = function (x, y) {
+ var s = this.element.style;
+ s.left = x + "px";
+ s.top = y + "px";
+ this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el, opts) {
+ var self = this;
+ var p = Calendar.getAbsolutePos(el);
+ if (!opts || typeof opts != "string") {
+ this.showAt(p.x, p.y + el.offsetHeight);
+ return true;
+ }
+ function fixPosition(box) {
+ if (box.x < 0)
+ box.x = 0;
+ if (box.y < 0)
+ box.y = 0;
+ var cp = document.createElement("div");
+ var s = cp.style;
+ s.position = "absolute";
+ s.right = s.bottom = s.width = s.height = "0px";
+ document.body.appendChild(cp);
+ var br = Calendar.getAbsolutePos(cp);
+ document.body.removeChild(cp);
+ if (Calendar.is_ie) {
+ br.y += document.body.scrollTop;
+ br.x += document.body.scrollLeft;
+ } else {
+ br.y += window.scrollY;
+ br.x += window.scrollX;
+ }
+ var tmp = box.x + box.width - br.x;
+ if (tmp > 0) box.x -= tmp;
+ tmp = box.y + box.height - br.y;
+ if (tmp > 0) box.y -= tmp;
+ };
+ this.element.style.display = "block";
+ Calendar.continuation_for_the_fucking_khtml_browser = function() {
+ var w = self.element.offsetWidth;
+ var h = self.element.offsetHeight;
+ self.element.style.display = "none";
+ var valign = opts.substr(0, 1);
+ var halign = "l";
+ if (opts.length > 1) {
+ halign = opts.substr(1, 1);
+ }
+ // vertical alignment
+ switch (valign) {
+ case "T": p.y -= h; break;
+ case "B": p.y += el.offsetHeight; break;
+ case "C": p.y += (el.offsetHeight - h) / 2; break;
+ case "t": p.y += el.offsetHeight - h; break;
+ case "b": break; // already there
+ }
+ // horizontal alignment
+ switch (halign) {
+ case "L": p.x -= w; break;
+ case "R": p.x += el.offsetWidth; break;
+ case "C": p.x += (el.offsetWidth - w) / 2; break;
+ case "r": p.x += el.offsetWidth - w; break;
+ case "l": break; // already there
+ }
+ p.width = w;
+ p.height = h + 40;
+ self.monthsCombo.style.display = "none";
+ fixPosition(p);
+ self.showAt(p.x, p.y);
+ };
+ if (Calendar.is_khtml)
+ setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+ else
+ Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+ this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+ this.ttDateFormat = str;
+};
+
+/**
+ * Tries to identify the date represented in a string. If successful it also
+ * calls this.setDate which moves the calendar to the given date.
+ */
+Calendar.prototype.parseDate = function (str, fmt) {
+ var y = 0;
+ var m = -1;
+ var d = 0;
+ var a = str.split(/\W+/);
+ if (!fmt) {
+ fmt = this.dateFormat;
+ }
+ var b = fmt.match(/%./g);
+ var i = 0, j = 0;
+ var hr = 0;
+ var min = 0;
+ for (i = 0; i < a.length; ++i) {
+ if (!a[i])
+ continue;
+ switch (b[i]) {
+ case "%d":
+ case "%e":
+ d = parseInt(a[i], 10);
+ break;
+
+ case "%m":
+ m = parseInt(a[i], 10) - 1;
+ break;
+
+ case "%Y":
+ case "%y":
+ y = parseInt(a[i], 10);
+ (y < 100) && (y += (y > 29) ? 1900 : 2000);
+ break;
+
+ case "%b":
+ case "%B":
+ for (j = 0; j < 12; ++j) {
+ if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+ }
+ break;
+
+ case "%H":
+ case "%I":
+ case "%k":
+ case "%l":
+ hr = parseInt(a[i], 10);
+ break;
+
+ case "%P":
+ case "%p":
+ if (/pm/i.test(a[i]) && hr < 12)
+ hr += 12;
+ break;
+
+ case "%M":
+ min = parseInt(a[i], 10);
+ break;
+ }
+ }
+ if (y != 0 && m != -1 && d != 0) {
+ this.setDate(new Date(y, m, d, hr, min, 0));
+ return;
+ }
+ y = 0; m = -1; d = 0;
+ for (i = 0; i < a.length; ++i) {
+ if (a[i].search(/[a-zA-Z]+/) != -1) {
+ var t = -1;
+ for (j = 0; j < 12; ++j) {
+ if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+ }
+ if (t != -1) {
+ if (m != -1) {
+ d = m+1;
+ }
+ m = t;
+ }
+ } else if (parseInt(a[i], 10) <= 12 && m == -1) {
+ m = a[i]-1;
+ } else if (parseInt(a[i], 10) > 31 && y == 0) {
+ y = parseInt(a[i], 10);
+ (y < 100) && (y += (y > 29) ? 1900 : 2000);
+ } else if (d == 0) {
+ d = a[i];
+ }
+ }
+ if (y == 0) {
+ var today = new Date();
+ y = today.getFullYear();
+ }
+ if (m != -1 && d != 0) {
+ this.setDate(new Date(y, m, d, hr, min, 0));
+ }
+};
+
+
+
+
+
+
+
+
+
+
+
+
+Calendar.prototype.hideShowCovered = function () {
+ var tags = new Array("applet", "iframe", "select");
+ var el = this.element;
+
+ var p = Calendar.getAbsolutePos(el);
+ var EX1 = p.x;
+ var EX2 = el.offsetWidth + EX1;
+ var EY1 = p.y;
+ var EY2 = el.offsetHeight + EY1;
+
+ for (var k = tags.length; k > 0; ) {
+ var ar = document.getElementsByTagName(tags[--k]);
+ var cc = null;
+
+ for (var i = ar.length; i > 0;) {
+ cc = ar[--i];
+
+ p = Calendar.getAbsolutePos(cc);
+ var CX1 = p.x;
+ var CX2 = cc.offsetWidth + CX1;
+ var CY1 = p.y;
+ var CY2 = cc.offsetHeight + CY1;
+
+ if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+ cc.style.visibility = "visible";
+ } else {
+ cc.style.visibility = "hidden";
+ }
+ }
+ }
+};
+
+
+
+/*
+ replaced with function from jscalendar 0.9.2 because hidden elements doens't show up again in konqui
+
+Calendar.prototype.hideShowCovered = function () {
+ var self = this;
+ Calendar.continuation_for_the_fucking_khtml_browser = function() {
+ function getVisib(obj){
+ var value = obj.style.visibility;
+ if (!value) {
+ if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
+ if (!Calendar.is_khtml)
+ value = document.defaultView.
+ getComputedStyle(obj, "").getPropertyValue("visibility");
+ else
+ value = '';
+ } else if (obj.currentStyle) { // IE
+ value = obj.currentStyle.visibility;
+ } else
+ value = '';
+ }
+ return value;
+ };
+
+ var tags = new Array("applet", "iframe", "select");
+ var el = self.element;
+
+ var p = Calendar.getAbsolutePos(el);
+ var EX1 = p.x;
+ var EX2 = el.offsetWidth + EX1;
+ var EY1 = p.y;
+ var EY2 = el.offsetHeight + EY1;
+
+ for (var k = tags.length; k > 0; ) {
+ var ar = document.getElementsByTagName(tags[--k]);
+ var cc = null;
+
+ for (var i = ar.length; i > 0;) {
+ cc = ar[--i];
+
+ p = Calendar.getAbsolutePos(cc);
+ var CX1 = p.x;
+ var CX2 = cc.offsetWidth + CX1;
+ var CY1 = p.y;
+ var CY2 = cc.offsetHeight + CY1;
+
+ if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+ if (!cc.__msh_save_visibility) {
+ cc.__msh_save_visibility = getVisib(cc);
+ }
+ cc.style.visibility = cc.__msh_save_visibility;
+ } else {
+ if (!cc.__msh_save_visibility) {
+ cc.__msh_save_visibility = getVisib(cc);
+ }
+ cc.style.visibility = "hidden";
+ }
+ }
+ }
+ };
+ if (Calendar.is_khtml)
+ setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+ else
+ Calendar.continuation_for_the_fucking_khtml_browser();
+};*/
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+ var fdow = this.firstDayOfWeek;
+ var cell = this.firstdayname;
+ var weekend = Calendar._TT["WEEKEND"];
+ for (var i = 0; i < 7; ++i) {
+ cell.className = "day name";
+ var realday = (i + fdow) % 7;
+ if (i) {
+ cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
+ cell.navtype = 100;
+ cell.calendar = this;
+ cell.fdow = realday;
+ Calendar._add_evs(cell);
+ }
+ if (weekend.indexOf(realday.toString()) != -1) {
+ Calendar.addClass(cell, "weekend");
+ }
+ cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
+ cell = cell.nextSibling;
+ }
+};
+
+/** Internal function. Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+ this.monthsCombo.style.display = "none";
+ this.yearsCombo.style.display = "none";
+};
+
+/** Internal function. Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+ if (this.dragging) {
+ return;
+ }
+ this.dragging = true;
+ var posX;
+ var posY;
+ if (Calendar.is_ie) {
+ posY = window.event.clientY + document.body.scrollTop;
+ posX = window.event.clientX + document.body.scrollLeft;
+ } else {
+ posY = ev.clientY + window.scrollY;
+ posX = ev.clientX + window.scrollX;
+ }
+ var st = this.element.style;
+ this.xOffs = posX - parseInt(st.left);
+ this.yOffs = posY - parseInt(st.top);
+ with (Calendar) {
+ addEvent(document, "mousemove", calDragIt);
+ addEvent(document, "mouseup", calDragEnd);
+ }
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Constants used for time computations */
+Date.SECOND = 1000 /* milliseconds */;
+Date.MINUTE = 60 * Date.SECOND;
+Date.HOUR = 60 * Date.MINUTE;
+Date.DAY = 24 * Date.HOUR;
+Date.WEEK = 7 * Date.DAY;
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function(month) {
+ var year = this.getFullYear();
+ if (typeof month == "undefined") {
+ month = this.getMonth();
+ }
+ if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+ return 29;
+ } else {
+ return Date._MD[month];
+ }
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+ var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+ var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+ var time = now - then;
+ return Math.floor(time / Date.DAY);
+};
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+ var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+ var DoW = d.getDay();
+ d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+ var ms = d.valueOf(); // GMT
+ d.setMonth(0);
+ d.setDate(4); // Thu in Week 1
+ return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Checks dates equality (ignores time) */
+Date.prototype.equalsTo = function(date) {
+ return ((this.getFullYear() == date.getFullYear()) &&
+ (this.getMonth() == date.getMonth()) &&
+ (this.getDate() == date.getDate()) &&
+ (this.getHours() == date.getHours()) &&
+ (this.getMinutes() == date.getMinutes()));
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (str) {
+ var m = this.getMonth();
+ var d = this.getDate();
+ var y = this.getFullYear();
+ var wn = this.getWeekNumber();
+ var w = this.getDay();
+ var s = {};
+ var hr = this.getHours();
+ var pm = (hr >= 12);
+ var ir = (pm) ? (hr - 12) : hr;
+ var dy = this.getDayOfYear();
+ if (ir == 0)
+ ir = 12;
+ var min = this.getMinutes();
+ var sec = this.getSeconds();
+ s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
+ s["%A"] = Calendar._DN[w]; // full weekday name
+ s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
+ s["%B"] = Calendar._MN[m]; // full month name
+ // FIXME: %c : preferred date and time representation for the current locale
+ s["%C"] = 1 + Math.floor(y / 100); // the century number
+ s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+ s["%e"] = d; // the day of the month (range 1 to 31)
+ // FIXME: %D : american date style: %m/%d/%y
+ // FIXME: %E, %F, %G, %g, %h (man strftime)
+ s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+ s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+ s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+ s["%k"] = hr; // hour, range 0 to 23 (24h format)
+ s["%l"] = ir; // hour, range 1 to 12 (12h format)
+ s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+ s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+ s["%n"] = "\n"; // a newline character
+ s["%p"] = pm ? "PM" : "AM";
+ s["%P"] = pm ? "pm" : "am";
+ // FIXME: %r : the time in am/pm notation %I:%M:%S %p
+ // FIXME: %R : the time in 24-hour notation %H:%M
+ s["%s"] = Math.floor(this.getTime() / 1000);
+ s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+ s["%t"] = "\t"; // a tab character
+ // FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+ s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+ s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON)
+ s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN)
+ // FIXME: %x : preferred date representation for the current locale without the time
+ // FIXME: %X : preferred time representation for the current locale without the date
+ s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+ s["%Y"] = y; // year with the century
+ s["%%"] = "%"; // a literal '%' character
+
+ var re = /%./g;
+
+ if (!Calendar.is_ie5)
+ return str.replace(re, function (par) { return s[par] || par; });
+
+
+ var a = str.match(re);
+ for (var i = 0; i < a.length; i++) {
+ var tmp = s[a[i]];
+ if (tmp) {
+ re = new RegExp(a[i], 'g');
+ str = str.replace(re, tmp);
+ }
+ }
+
+ return str;
+};
+
+Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
+Date.prototype.setFullYear = function(y) {
+ var d = new Date(this);
+ d.__msh_oldSetFullYear(y);
+ if (d.getMonth() != this.getMonth())
+ this.setDate(28);
+ this.__msh_oldSetFullYear(y);
+};
+
+// END: DATE OBJECT PATCHES
+
+
+// global object that remembers the calendar
+window.calendar = null;
--- /dev/null
+// ** I18N Afrikaans
+Calendar._DN = new Array
+("Sondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrydag",
+ "Saterdag",
+ "Sondag");
+Calendar._MN = new Array
+("Januarie",
+ "Februarie",
+ "Maart",
+ "April",
+ "Mei",
+ "Junie",
+ "Julie",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Verander eerste dag van die week";
+Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)";
+Calendar._TT["GO_TODAY"] = "Gaan na vandag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)";
+Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)";
+Calendar._TT["SEL_DATE"] = "Kies datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif";
+Calendar._TT["PART_TODAY"] = " (vandag)";
+Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste";
+Calendar._TT["SUN_FIRST"] = "Display Sunday first";
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terça",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sábado",
+ "Domingo");
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Março",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Altera primeiro dia da semana";
+Calendar._TT["PREV_YEAR"] = "Ano anterior(hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Mês anterior (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Hoje";
+Calendar._TT["NEXT_MONTH"] = "Mês seguinte (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "ano seguinte (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Seleciona uma data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrasta calendário";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+Calendar._TT["MON_FIRST"] = "Inicia na segunda-feira";
+Calendar._TT["SUN_FIRST"] = "Inicia no domingo";
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, dd de MM de y";
+
+Calendar._TT["WK"] = "sem";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Diumenge",
+ "Dilluns",
+ "Dimarts",
+ "Dimecres",
+ "Dijous",
+ "Divendres",
+ "Dissabte",
+ "Diumenge");
+Calendar._MN = new Array
+("Gener",
+ "Febrer",
+ "Març",
+ "Abril",
+ "Maig",
+ "Juny",
+ "Juliol",
+ "Agost",
+ "Setembre",
+ "Octubre",
+ "Novembre",
+ "Desembre");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Canvia el primer dia de la setmana";
+Calendar._TT["PREV_YEAR"] = "Any anterior (mantenir per a menu)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (mantenir per a menu)";
+Calendar._TT["GO_TODAY"] = "Anar a avui";
+Calendar._TT["NEXT_MONTH"] = "Mes següent (mantenir per a menu)";
+Calendar._TT["NEXT_YEAR"] = "Any següent (mantenir per a menu)";
+Calendar._TT["SEL_DATE"] = "Seleccionar data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per a moure";
+Calendar._TT["PART_TODAY"] = " (avui)";
+Calendar._TT["MON_FIRST"] = "Mostrar dilluns primer";
+Calendar._TT["SUN_FIRST"] = "Mostrar diumenge primer";
+Calendar._TT["CLOSE"] = "Tancar";
+Calendar._TT["TODAY"] = "Avui";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "sem";
--- /dev/null
+/*
+ calendar-cs-win.js
+ language: Czech
+ encoding: windows-1250
+ author: Lubos Jerabek (xnet@seznam.cz)
+*/
+
+// ** I18N
+Calendar._DN = new Array('Nedìle','Pondìlí','Úterý','Støeda','Ètvrtek','Pátek','Sobota','Nedìle');
+Calendar._DN3 = new Array('Ne','Po','Út','St','Èt','Pá','So','Ne');
+Calendar._MN = new Array('Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec');
+Calendar._MN3 = new Array('Led','Úno','Bøe','Dub','Kvì','Èrv','Èvc','Srp','Záø','Øíj','Lis','Pro');
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Zmìna prvního dne v týdnu";
+Calendar._TT["PREV_YEAR"] = "Pøedchozí rok (pøidr\9e pro menu)";
+Calendar._TT["PREV_MONTH"] = "Pøedchozí mìsíc (pøidr\9e pro menu)";
+Calendar._TT["GO_TODAY"] = "Dne\9aní datum";
+Calendar._TT["NEXT_MONTH"] = "Dal\9aí mìsíc (pøidr\9e pro menu)";
+Calendar._TT["NEXT_YEAR"] = "Dal\9aí rok (pøidr\9e pro menu)";
+Calendar._TT["SEL_DATE"] = "Vyber datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Chy\9d a táhni, pro pøesun";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "Uka\9e jako první Pondìlí";
+Calendar._TT["SUN_FIRST"] = "Uka\9e jako první Nedìli";
+Calendar._TT["CLOSE"] = "Zavøít";
+Calendar._TT["TODAY"] = "Dnes";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, 5.MM y";
+
+Calendar._TT["WK"] = "wk";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Søndag",
+ "Mandag",
+ "Tirsdag",
+ "Onsdag",
+ "Torsdag",
+ "Fredag",
+ "Lørdag",
+ "Søndag");
+Calendar._MN = new Array
+("January",
+ "Februar",
+ "Marts",
+ "April",
+ "Maj",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om Kalenderen";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For den seneste version besøg: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." +
+"\n\n" +
+"Valg af dato:\n" +
+"- Brug \xab, \xbb knapperne for at vælge år\n" +
+"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" +
+"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Valg af tid:\n" +
+"- Klik på en vilkårlig del for større værdi\n" +
+"- eller Shift-klik for for mindre værdi\n" +
+"- eller klik og træk for hurtigere valg.";
+
+Calendar._TT["TOGGLE"] = "Skift første ugedag";
+Calendar._TT["PREV_YEAR"] = "Ét år tilbage (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Én måned tilbage (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Gå til i dag";
+Calendar._TT["NEXT_MONTH"] = "Én måned frem (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Ét år frem (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Vælg dag";
+Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet";
+Calendar._TT["PART_TODAY"] = " (i dag)";
+Calendar._TT["MON_FIRST"] = "Vis mandag først";
+Calendar._TT["SUN_FIRST"] = "Vis søndag først";
+Calendar._TT["CLOSE"] = "Luk vinduet";
+Calendar._TT["TODAY"] = "I dag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%d. %b, %Y";
+
+Calendar._TT["WK"] = "wk";
--- /dev/null
+// Author: Hartwig Weinkauf h_weinkauf@gmx.de
+// �erarbeitet und fehlende Texte hinzugefgt von Gerhard Neinert (gerhard at neinert punkt de)
+// Feel free to use / redistribute under the GNU LGPL.
+// ** I18N
+
+// short day names
+Calendar._SDN = new Array
+("So",
+ "Mo",
+ "Di",
+ "Mi",
+ "Do",
+ "Fr",
+ "Sa",
+ "So");
+
+// full day names
+Calendar._DN = new Array
+("Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag",
+ "Sonntag");
+
+// short day names only use 2 letters instead of 3
+Calendar._SDN_len = 2;
+
+// full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "M\u00e4rz",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "M\u00e4r",
+ "Apr",
+ "Mai",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dez");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Über den Kalender";
+
+Calendar._TT["ABOUT"] =
+"DHTML Datum/Zeit Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Donwload neueste Version: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Datumsauswahl:\n" +
+"- Jahr ausw\u00e4hlen mit \xab und \xbb\n" +
+"- Monat ausw\u00e4hlen mit " + String.fromCharCode(0x2039) + " und " + String.fromCharCode(0x203a) + "\n" +
+"- Fr Auswahl aus Liste Maustaste gedr\u00fcckt halten.";
+
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Zeit w\u00e4hlen:\n" +
+"- Stunde/Minute weiter mit Mausklick\n" +
+"- Stunde/Minute zurck mit Shift-Mausklick\n" +
+"- oder f\u00fcr schnellere Auswahl nach links oder rechts ziehen.";
+
+
+// Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen";
+Calendar._TT["PREV_YEAR"] = "Jahr zur\u00fcck (halten -> Auswahlmen\u00fc)";
+Calendar._TT["PREV_MONTH"] = "Monat zur\u00fcck (halten -> Auswahlmen\u00fc)";
+Calendar._TT["GO_TODAY"] = "Gehe zum heutigen Datum";
+Calendar._TT["NEXT_MONTH"] = "Monat vor (halten -> Auswahlmen\u00fc)";
+Calendar._TT["NEXT_YEAR"] = "Jahr vor (halten -> Auswahlmen\u00fc)";
+Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen";
+Calendar._TT["DRAG_TO_MOVE"] = "Klicken und halten um zu verschieben";
+Calendar._TT["PART_TODAY"] = " (heute)";
+Calendar._TT["MON_FIRST"] = "Wochenanzeige mit Montag beginnen";
+Calendar._TT["SUN_FIRST"] = "Wochenanzeige mit Sonntag beginnen";
+Calendar._TT["CLOSE"] = "Schlie\u00dfen";
+Calendar._TT["TODAY"] = "Heute";
+
+Calendar._TT["DAY_FIRST"] = "%s ist Wochenanfang";
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
+
+
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "Datum ausw\u00e4hlen";
+
+Calendar._TT["WK"] = "KW";
+Calendar._TT["TIME"] = "Zeit:";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Toggle startdag van de week";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)";
+Calendar._TT["GO_TODAY"] = "Naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "Vandaag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "wk";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Κυριακή",
+ "Δευτέρα",
+ "Τρίτη",
+ "Τετάρτη",
+ "Πέμπτη",
+ "Παρασκευή",
+ "Σάββατο",
+ "Κυριακή");
+
+Calendar._SDN = new Array
+("Κυ",
+ "Δε",
+ "Tρ",
+ "Τε",
+ "Πε",
+ "Πα",
+ "Σα",
+ "Κυ");
+
+Calendar._MN = new Array
+("Ιανουάριος",
+ "Φεβρουάριος",
+ "Μάρτιος",
+ "Απρίλιος",
+ "Μάϊος",
+ "Ιούνιος",
+ "Ιούλιος",
+ "Αύγουστος",
+ "Σεπτέμβριος",
+ "Οκτώβριος",
+ "Νοέμβριος",
+ "Δεκέμβριος");
+
+Calendar._SMN = new Array
+("Ιαν",
+ "Φεβ",
+ "Μαρ",
+ "Απρ",
+ "Μαι",
+ "Ιουν",
+ "Ιουλ",
+ "Αυγ",
+ "Σεπ",
+ "Οκτ",
+ "Νοε",
+ "Δεκ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Για το ημερολόγιο";
+
+Calendar._TT["ABOUT"] =
+"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Για τελευταία έκδοση: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Επιλογή ημερομηνίας:\n" +
+"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
+"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
+"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Επιλογή ώρας:\n" +
+"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
+"- ή Shift-κλικ για μείωση\n" +
+"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
+Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
+Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
+Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
+Calendar._TT["GO_TODAY"] = "Σήμερα";
+Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
+Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
+Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
+Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
+Calendar._TT["PART_TODAY"] = " (σήμερα)";
+Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
+Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
+Calendar._TT["CLOSE"] = "Κλείσιμο";
+Calendar._TT["TODAY"] = "Σήμερα";
+Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
+
+Calendar._TT["WK"] = "εβδ";
+
--- /dev/null
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat",
+ "Sun");
+
+// full month names
+Calendar._MN = new Array
+("January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "About the calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Date selection:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
+"- Hold mouse button on any of the above buttons for faster selection.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- Click on any of the time parts to increase it\n" +
+"- or Shift-click to decrease it\n" +
+"- or click and drag for faster selection.";
+
+Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Go Today";
+Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Select date";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
+Calendar._TT["PART_TODAY"] = " (today)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Display %s first";
+
+// This may be locale-dependent. It specifies the week-end days, as an array
+// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
+Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Time:";
--- /dev/null
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miircoles",
+ "Jueves",
+ "Viernes",
+ "Sabado",
+ "Domingo");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dom",
+ "Lun",
+ "Mar",
+ "Mii",
+ "Jue",
+ "Vie",
+ "Sab",
+ "Dom");
+
+// full month names
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// short month names
+Calendar._SMN = new Array
+("Ene",
+ "Feb",
+ "Mar",
+ "Abr",
+ "May",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Acerca del calendario";
+
+Calendar._TT["ABOUT"] =
+"Selector DHTML de Fecha/Hora\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Para conseguir la zltima versisn visite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para mas detalles." +
+"\n\n" +
+"Seleccisn de fecha:\n" +
+"- Use los botones \xab, \xbb para seleccionar el aqo\n" +
+"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga pulsado el ratsn en cualquiera de estos botones para una seleccisn rapida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Seleccisn de hora:\n" +
+"- Pulse en cualquiera de las partes de la hora para incrementarla\n" +
+"- s pulse las mayzsculas mientras hace clic para decrementarla\n" +
+"- s haga clic y arrastre el ratsn para una seleccisn mas rapida.";
+
+Calendar._TT["PREV_YEAR"] = "Aqo anterior (mantener para menu)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menu)";
+Calendar._TT["GO_TODAY"] = "Ir a hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menu)";
+Calendar._TT["NEXT_YEAR"] = "Aqo siguiente (mantener para menu)";
+Calendar._TT["SEL_DATE"] = "Seleccionar fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover";
+Calendar._TT["PART_TODAY"] = " (hoy)";
+Calendar._TT["MON_FIRST"] = "Mostrar lunes primero";
+Calendar._TT["SUN_FIRST"] = "Mostrar domingo primero";
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+Calendar._TT["TIME_PART"] = "(Mayzscula-)Clic o arrastre para cambiar valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "sem";
--- /dev/null
+// ** I18N
+
+// Calendar FI language (Finnish, Suomi)
+// Author: Jarno Käyhkö, <gambler@phnet.fi>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("Sunnuntai",
+ "Maanantai",
+ "Tiistai",
+ "Keskiviikko",
+ "Torstai",
+ "Perjantai",
+ "Lauantai",
+ "Sunnuntai");
+
+// short day names
+Calendar._SDN = new Array
+("Su",
+ "Ma",
+ "Ti",
+ "Ke",
+ "To",
+ "Pe",
+ "La",
+ "Su");
+
+// full month names
+Calendar._MN = new Array
+("Tammikuu",
+ "Helmikuu",
+ "Maaliskuu",
+ "Huhtikuu",
+ "Toukokuu",
+ "Kesäkuu",
+ "Heinäkuu",
+ "Elokuu",
+ "Syyskuu",
+ "Lokakuu",
+ "Marraskuu",
+ "Joulukuu");
+
+// short month names
+Calendar._SMN = new Array
+("Tam",
+ "Hel",
+ "Maa",
+ "Huh",
+ "Tou",
+ "Kes",
+ "Hei",
+ "Elo",
+ "Syy",
+ "Lok",
+ "Mar",
+ "Jou");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Tietoja kalenterista";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Uusin versio osoitteessa: http://dynarch.com/mishoo/calendar.epl\n" +
+"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Päivämäärä valinta:\n" +
+"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" +
+"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" +
+"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Ajan valinta:\n" +
+"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" +
+"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" +
+"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin.";
+
+Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)";
+Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["GO_TODAY"] = "Siirry tähän päivään";
+Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)";
+Calendar._TT["SEL_DATE"] = "Valitse päivämäärä";
+Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa";
+Calendar._TT["PART_TODAY"] = " (tänään)";
+Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä";
+Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä";
+Calendar._TT["CLOSE"] = "Sulje";
+Calendar._TT["TODAY"] = "Tänään";
+Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y";
+
+Calendar._TT["WK"] = "Vko";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Dimanche",
+ "Lundi",
+ "Mardi",
+ "Mercredi",
+ "Jeudi",
+ "Vendredi",
+ "Samedi",
+ "Dimanche");
+Calendar._MN = new Array
+("Janvier",
+ "Février",
+ "Mars",
+ "Avril",
+ "Mai",
+ "Juin",
+ "Juillet",
+ "Août",
+ "Septembre",
+ "Octobre",
+ "Novembre",
+ "Décembre");
+Calendar._SDN = new Array
+("Lun",
+ "Mar",
+ "Mer",
+ "Jeu",
+ "Thu",
+ "Ven",
+ "Sam",
+ "Dim");
+Calendar._SMN = new Array
+("Jan",
+ "Fev",
+ "Mar",
+ "Avr",
+ "Mai",
+ "Juin",
+ "Juil",
+ "Aout",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+
+Calendar._TT["INFO"] = "A propos du calendrier";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Heure Selecteur\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Pour la derniere version visitez: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribué par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." +
+"\n\n" +
+"Selection de la date :\n" +
+"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" +
+"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" +
+"- Garder la souris sur n'importe quels boutons pour un selection plus rapide";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selection de l\'heure:\n" +
+"- Cliquer sur heures ou minutes pour incrementer\n" +
+"- ou Maj-clic pour decrementer\n" +
+"- ou clic et glisser deplacer pour un selection plus rapide";
+
+Calendar._TT["TOGGLE"] = "Changer le premier jour de la semaine";
+Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)";
+Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)";
+Calendar._TT["GO_TODAY"] = "Atteindre date du jour";
+Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)";
+Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)";
+Calendar._TT["SEL_DATE"] = "Choisir une date";
+Calendar._TT["DRAG_TO_MOVE"] = "Déplacer";
+Calendar._TT["PART_TODAY"] = " (Aujourd'hui)";
+Calendar._TT["MON_FIRST"] = "Commencer par lundi";
+Calendar._TT["SUN_FIRST"] = "Commencer par dimanche";
+Calendar._TT["CLOSE"] = "Fermer";
+Calendar._TT["TODAY"] = "Aujourd'hui";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%y";
+Calendar._TT["TT_DATE_FORMAT"] = " %A %e %B %Y";
+
+Calendar._TT["WK"] = "sem";
--- /dev/null
+/* Croatian language file for the DHTML Calendar version 0.9.2
+* Author Krunoslav Zubrinic <krunoslav.zubrinic@vip.hr>, June 2003.
+* Feel free to use this script under the terms of the GNU Lesser General
+* Public License, as long as you do not remove or alter this notice.
+*/
+Calendar._DN = new Array
+("Nedjelja",
+ "Ponedjeljak",
+ "Utorak",
+ "Srijeda",
+ "Četvrtak",
+ "Petak",
+ "Subota",
+ "Nedjelja");
+Calendar._MN = new Array
+("Siječanj",
+ "Veljača",
+ "Ožujak",
+ "Travanj",
+ "Svibanj",
+ "Lipanj",
+ "Srpanj",
+ "Kolovoz",
+ "Rujan",
+ "Listopad",
+ "Studeni",
+ "Prosinac");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan";
+Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
+Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
+Calendar._TT["GO_TODAY"] = "Idi na tekući dan";
+Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)";
+Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)";
+Calendar._TT["SEL_DATE"] = "Izaberite datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
+Calendar._TT["PART_TODAY"] = " (today)";
+Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
+Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
+Calendar._TT["CLOSE"] = "Zatvori";
+Calendar._TT["TODAY"] = "Danas";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
+
+Calendar._TT["WK"] = "Tje";
\ No newline at end of file
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Vasárnap",
+ "Hétfõ",
+ "Kedd",
+ "Szerda",
+ "Csütörtök",
+ "Péntek",
+ "Szombat",
+ "Vasárnap");
+Calendar._MN = new Array
+("január",
+ "február",
+ "március",
+ "április",
+ "május",
+ "június",
+ "július",
+ "augusztus",
+ "szeptember",
+ "október",
+ "november",
+ "december");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "A hét elsõ napjának beállítása";
+Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)";
+Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)";
+Calendar._TT["GO_TODAY"] = "Mai napra ugrás";
+Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)";
+Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)";
+Calendar._TT["SEL_DATE"] = "Válasszon dátumot";
+Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz";
+Calendar._TT["PART_TODAY"] = " (ma)";
+Calendar._TT["MON_FIRST"] = "Hétfõ legyen a hét elsõ napja";
+Calendar._TT["SUN_FIRST"] = "Vasárnap legyen a hét elsõ napja";
+Calendar._TT["CLOSE"] = "Bezár";
+Calendar._TT["TODAY"] = "Ma";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "M d, D";
+
+Calendar._TT["WK"] = "hét";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Domenica",
+ "Lunedì",
+ "Martedì",
+ "Mercoledì",
+ "Giovedì",
+ "Venerdì",
+ "Sabato",
+ "Domenica");
+Calendar._MN = new Array
+("Gennaio",
+ "Febbraio",
+ "Marzo",
+ "Aprile",
+ "Maggio",
+ "Giugno",
+ "Luglio",
+ "Agosto",
+ "Settembre",
+ "Ottobre",
+ "Novembre",
+ "Dicembre");
+
+// short month names
+Calendar._SMN = new Array
+("Gen",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Mag",
+ "Giu",
+ "Lug",
+ "Ago",
+ "Set",
+ "Ott",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "a proposito del calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Per le ultime versioni vai a: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuito su licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." +
+"\n\n" +
+"selezione della data:\n" +
+"- Usa i bottoni \xab, \xbb per selezionare l'anno\n" +
+"- Usa i bottoni " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per selezionare il mese\n" +
+"- Utilizza il mouse per una selezione rapida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"selezione dell'ora:\n" +
+"- Clicca sull'ora visualizzata per aumentarla\n" +
+"- o Shift-click per diminuirla\n" +
+"- o click a trascina per la selezione rapida.";
+
+
+Calendar._TT["TOGGLE"] = "Modifica il primo giorno della settimana";
+Calendar._TT["PREV_YEAR"] = "Anno prec. (tieni premuto per menu)";
+Calendar._TT["PREV_MONTH"] = "Mese prec. (tieni premuto per menu)";
+Calendar._TT["GO_TODAY"] = "Vai a oggi";
+Calendar._TT["NEXT_MONTH"] = "Mese succ. (tieni premuto per menu)";
+Calendar._TT["NEXT_YEAR"] = "Anno succ. (tieni premuto per menu)";
+Calendar._TT["SEL_DATE"] = "Seleziona data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostare";
+Calendar._TT["PART_TODAY"] = " (oggi)";
+Calendar._TT["MON_FIRST"] = "Parti da lunedì";
+Calendar._TT["SUN_FIRST"] = "Parti da domenica";
+Calendar._TT["CLOSE"] = "Chiudi";
+Calendar._TT["TODAY"] = "Oggi";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b ";
+
+Calendar._TT["WK"] = "Setti";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("\93ú",
+ "\8c\8e",
+ "\89Î",
+ "\90\85",
+ "\96Ø",
+ "\8bà",
+ "\93y",
+ "\93ú");
+Calendar._MN = new Array
+("1\8c\8e",
+ "2\8c\8e",
+ "3\8c\8e",
+ "4\8c\8e",
+ "5\8c\8e",
+ "6\8c\8e",
+ "7\8c\8e",
+ "8\8c\8e",
+ "9\8c\8e",
+ "10\8c\8e",
+ "11\8c\8e",
+ "12\8c\8e");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "\8fT\82Ì\8dÅ\8f\89\82Ì\97j\93ú\82ð\90Ø\82è\91Ö\82¦";
+Calendar._TT["PREV_YEAR"] = "\91O\94N";
+Calendar._TT["PREV_MONTH"] = "\91O\8c\8e";
+Calendar._TT["GO_TODAY"] = "\8d¡\93ú";
+Calendar._TT["NEXT_MONTH"] = "\97\82\8c\8e";
+Calendar._TT["NEXT_YEAR"] = "\97\82\94N";
+Calendar._TT["SEL_DATE"] = "\93ú\95t\91I\91ð";
+Calendar._TT["DRAG_TO_MOVE"] = "\83E\83B\83\93\83h\83E\82Ì\88Ú\93®";
+Calendar._TT["PART_TODAY"] = " (\8d¡\93ú)";
+Calendar._TT["MON_FIRST"] = "\8c\8e\97j\93ú\82ð\90æ\93ª\82É";
+Calendar._TT["SUN_FIRST"] = "\93ú\97j\93ú\82ð\90æ\93ª\82É";
+Calendar._TT["CLOSE"] = "\95Â\82¶\82é";
+Calendar._TT["TODAY"] = "\8d¡\93ú";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "%m\8c\8e %d\93ú (%a)";
+
+Calendar._TT["WK"] = "\8fT";
--- /dev/null
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// Translation: Yourim Yi <yyi@yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("일요일",
+ "월요일",
+ "화요일",
+ "수요일",
+ "목요일",
+ "금요일",
+ "토요일",
+ "일요일");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("일",
+ "월",
+ "화",
+ "수",
+ "목",
+ "금",
+ "토",
+ "일");
+
+// full month names
+Calendar._MN = new Array
+("1월",
+ "2월",
+ "3월",
+ "4월",
+ "5월",
+ "6월",
+ "7월",
+ "8월",
+ "9월",
+ "10월",
+ "11월",
+ "12월");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar 에 대해서";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"\n"+
+"최신 버전을 받으시려면 http://dynarch.com/mishoo/calendar.epl 에 방문하세요\n" +
+"\n"+
+"GNU LGPL 라이센스로 배포됩니다. \n"+
+"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." +
+"\n\n" +
+"날짜 선택:\n" +
+"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
+"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
+"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"시간 선택:\n" +
+"- 마우스로 누르면 시간이 증가합니다\n" +
+"- Shift 키와 함께 누르면 감소합니다\n" +
+"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
+
+Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)";
+Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)";
+Calendar._TT["GO_TODAY"] = "오늘 날짜로";
+Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)";
+Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)";
+Calendar._TT["SEL_DATE"] = "날짜를 선택하세요";
+Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요";
+Calendar._TT["PART_TODAY"] = " (오늘)";
+Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로";
+Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로";
+Calendar._TT["CLOSE"] = "닫기";
+Calendar._TT["TODAY"] = "오늘";
+Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "주";
--- /dev/null
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// Translation: Yourim Yi <yyi@yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("ÀÏ¿äÀÏ",
+ "¿ù¿äÀÏ",
+ "È¿äÀÏ",
+ "¼ö¿äÀÏ",
+ "¸ñ¿äÀÏ",
+ "±Ý¿äÀÏ",
+ "Åä¿äÀÏ",
+ "ÀÏ¿äÀÏ");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("ÀÏ",
+ "¿ù",
+ "ȭ",
+ "¼ö",
+ "¸ñ",
+ "±Ý",
+ "Åä",
+ "ÀÏ");
+
+// full month names
+Calendar._MN = new Array
+("1¿ù",
+ "2¿ù",
+ "3¿ù",
+ "4¿ù",
+ "5¿ù",
+ "6¿ù",
+ "7¿ù",
+ "8¿ù",
+ "9¿ù",
+ "10¿ù",
+ "11¿ù",
+ "12¿ù");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar ¿¡ ´ëÇؼ";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"\n"+
+"ÃֽŠ¹öÀüÀ» ¹ÞÀ¸½Ã·Á¸é http://dynarch.com/mishoo/calendar.epl ¿¡ ¹æ¹®Çϼ¼¿ä\n" +
+"\n"+
+"GNU LGPL ¶óÀ̼¾½º·Î ¹èÆ÷µË´Ï´Ù. \n"+
+"¶óÀ̼¾½º¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://gnu.org/licenses/lgpl.html À» ÀÐÀ¸¼¼¿ä." +
+"\n\n" +
+"³¯Â¥ ¼±ÅÃ:\n" +
+"- ¿¬µµ¸¦ ¼±ÅÃÇÏ·Á¸é \xab, \xbb ¹öÆ°À» »ç¿ëÇÕ´Ï´Ù\n" +
+"- ´ÞÀ» ¼±ÅÃÇÏ·Á¸é " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ¹öÆ°À» ´©¸£¼¼¿ä\n" +
+"- °è¼Ó ´©¸£°í ÀÖÀ¸¸é À§ °ªµéÀ» ºü¸£°Ô ¼±ÅÃÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"½Ã°£ ¼±ÅÃ:\n" +
+"- ¸¶¿ì½º·Î ´©¸£¸é ½Ã°£ÀÌ Áõ°¡ÇÕ´Ï´Ù\n" +
+"- Shift Å°¿Í ÇÔ²² ´©¸£¸é °¨¼ÒÇÕ´Ï´Ù\n" +
+"- ´©¸¥ »óÅ¿¡¼ ¸¶¿ì½º¸¦ ¿òÁ÷À̸é Á» ´õ ºü¸£°Ô °ªÀÌ º¯ÇÕ´Ï´Ù.\n";
+
+Calendar._TT["PREV_YEAR"] = "Áö³ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["PREV_MONTH"] = "Áö³ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["GO_TODAY"] = "¿À´Ã ³¯Â¥·Î";
+Calendar._TT["NEXT_MONTH"] = "´ÙÀ½ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["NEXT_YEAR"] = "´ÙÀ½ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["SEL_DATE"] = "³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä";
+Calendar._TT["DRAG_TO_MOVE"] = "¸¶¿ì½º µå·¡±×·Î À̵¿ Çϼ¼¿ä";
+Calendar._TT["PART_TODAY"] = " (¿À´Ã)";
+Calendar._TT["MON_FIRST"] = "¿ù¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["SUN_FIRST"] = "ÀÏ¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["CLOSE"] = "´Ý±â";
+Calendar._TT["TODAY"] = "¿À´Ã";
+Calendar._TT["TIME_PART"] = "(Shift-)Ŭ¸¯ ¶Ç´Â µå·¡±× Çϼ¼¿ä";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "ÁÖ";
--- /dev/null
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas@solmetra.lt>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "Trečiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Šeštadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Šeš",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "Gegužė",
+ "Birželis",
+ "Liepa",
+ "Rugpjūtis",
+ "Rugsėjis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendorių";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Naujausią versiją rasite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metų pasirinkimas: \xab, \xbb\n" +
+"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" +
+"- Jei spausite kartu su Shift, skaičius sumažės.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelę.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti šiandieną";
+Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datą";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (šiandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uždaryti";
+Calendar._TT["TODAY"] = "Šiandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
--- /dev/null
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas@solmetra.lt>
+// Encoding: Windows-1257
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "Treèiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Ðeðtadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Ðeð",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "Geguþë",
+ "Birþelis",
+ "Liepa",
+ "Rugpjûtis",
+ "Rugsëjis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendoriø";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Naujausià versijà rasite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Platinamas pagal GNU LGPL licencijà. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metø pasirinkimas: \xab, \xbb\n" +
+"- Mënesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelës klaviðà greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandø arba minuèiø - skaièus padidës vienetu.\n" +
+"- Jei spausite kartu su Shift, skaièius sumaþës.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelæ.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mënuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti ðiandienà";
+Calendar._TT["NEXT_MONTH"] = "Kitas mënuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datà";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (ðiandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitës diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitës diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uþdaryti";
+Calendar._TT["TODAY"] = "Ðiandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)";
+Calendar._TT["GO_TODAY"] = "Ga naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "Vandaag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, d MM";
+
+Calendar._TT["WK"] = "wk";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Søndag",
+ "Mandag",
+ "Tirsdag",
+ "Onsdag",
+ "Torsdag",
+ "Fredag",
+ "Lørdag",
+ "Søndag");
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "Mars",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Skift første ukedag";
+Calendar._TT["PREV_YEAR"] = "Et år tilbake (hold for meny)";
+Calendar._TT["PREV_MONTH"] = "En måned tilbake (hold for meny)";
+Calendar._TT["GO_TODAY"] = "Gå til i dag";
+Calendar._TT["NEXT_MONTH"] = "En måned fram (hold for meny)";
+Calendar._TT["NEXT_YEAR"] = "Et år fram (hold for meny)";
+Calendar._TT["SEL_DATE"] = "Velg dag";
+Calendar._TT["DRAG_TO_MOVE"] = "Dra vinduet";
+Calendar._TT["PART_TODAY"] = " (i dag)";
+Calendar._TT["MON_FIRST"] = "Vis mandag først";
+Calendar._TT["SUN_FIRST"] = "Vis søndag først";
+Calendar._TT["CLOSE"] = "Lukk vinduet";
+Calendar._TT["TODAY"] = "I dag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D d. M, y";
+
+Calendar._TT["WK"] = "wk";
--- /dev/null
+// ** I18N
+
+// Calendar PL language
+// Author: Dariusz Pietrzak, <eyck@ghost.anime.pl>
+// Author: Janusz Piwowarski, <jpiw@go2.pl>
+// Encoding: utf-8
+// Distributed under the same terms as the calendar itself.
+
+Calendar._DN = new Array
+("Niedziela",
+ "Poniedziałek",
+ "Wtorek",
+ "Środa",
+ "Czwartek",
+ "Piątek",
+ "Sobota",
+ "Niedziela");
+Calendar._SDN = new Array
+("Nie",
+ "Pn",
+ "Wt",
+ "Śr",
+ "Cz",
+ "Pt",
+ "So",
+ "Nie");
+Calendar._MN = new Array
+("Styczeń",
+ "Luty",
+ "Marzec",
+ "Kwiecień",
+ "Maj",
+ "Czerwiec",
+ "Lipiec",
+ "Sierpień",
+ "Wrzesień",
+ "Październik",
+ "Listopad",
+ "Grudzień");
+Calendar._SMN = new Array
+("Sty",
+ "Lut",
+ "Mar",
+ "Kwi",
+ "Maj",
+ "Cze",
+ "Lip",
+ "Sie",
+ "Wrz",
+ "Paź",
+ "Lis",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Aby pobrać najnowszą wersję, odwiedź: http://dynarch.com/mishoo/calendar.epl\n" +
+"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." +
+"\n\n" +
+"Wybór daty:\n" +
+"- Użyj przycisków \xab, \xbb by wybrać rok\n" +
+"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" +
+"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" +
+"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" +
+"- lub kliknij i przeciągnij dla szybszego wyboru.";
+
+//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia";
+Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprzedni miesiąc (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Idź do dzisiaj";
+Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datę";
+Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć";
+Calendar._TT["PART_TODAY"] = " (dzisiaj)";
+Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "Dzisiaj";
+Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A";
+
+Calendar._TT["WK"] = "ty";
--- /dev/null
+// ** I18N
+// Calendar PL language
+// Author: Artur Filipiak, <imagen@poczta.fm>
+// January, 2004
+// Encoding: UTF-8
+Calendar._DN = new Array
+("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela");
+
+Calendar._SDN = new Array
+("N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N");
+
+Calendar._MN = new Array
+("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień");
+
+Calendar._SMN = new Array
+("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Wybór daty:\n" +
+"- aby wybrać rok użyj przycisków \xab, \xbb\n" +
+"- aby wybrać miesiąc użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- aby przyspieszyć wybór przytrzymaj wciśnięty przycisk myszy nad ww. przyciskami.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- aby zwiększyć wartość kliknij na dowolnym elemencie selekcji czasu\n" +
+"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" +
+"- możesz również poruszać myszkę w lewo i prawo wraz z wciśniętym lewym klawiszem.";
+
+Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprz. miesiąc (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Pokaż dziś";
+Calendar._TT["NEXT_MONTH"] = "Nast. miesiąc (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datę";
+Calendar._TT["DRAG_TO_MOVE"] = "Przesuń okienko";
+Calendar._TT["PART_TODAY"] = " (dziś)";
+Calendar._TT["MON_FIRST"] = "Pokaż Poniedziałek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "Pokaż Niedzielę jako pierwszą";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "Dziś";
+Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
\ No newline at end of file
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terça",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sábado",
+ "Domingo");
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Março",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Trocar o primeiro dia da semana";
+Calendar._TT["PREV_YEAR"] = "Ano Anterior (mantenha para menu)";
+Calendar._TT["PREV_MONTH"] = "Mês Anterior (mantenha para menu)";
+Calendar._TT["GO_TODAY"] = "Ir para hoje";
+Calendar._TT["NEXT_MONTH"] = "Próximo Mês (mantenha para menu)";
+Calendar._TT["NEXT_YEAR"] = "Próximo Ano (mantenha para menu)";
+Calendar._TT["SEL_DATE"] = "Escolha Data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+Calendar._TT["MON_FIRST"] = "Mostrar Segunda primeiro";
+Calendar._TT["SUN_FIRST"] = "Mostrar Domingo primeiro";
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "a-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "sm";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Duminică",
+ "Luni",
+ "Marţi",
+ "Miercuri",
+ "Joi",
+ "Vineri",
+ "Sâmbătă",
+ "Duminică");
+Calendar._SDN_len = 2;
+Calendar._MN = new Array
+("Ianuarie",
+ "Februarie",
+ "Martie",
+ "Aprilie",
+ "Mai",
+ "Iunie",
+ "Iulie",
+ "August",
+ "Septembrie",
+ "Octombrie",
+ "Noiembrie",
+ "Decembrie");
+
+// tooltips
+Calendar._TT = {};
+
+Calendar._TT["INFO"] = "Despre calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Pentru ultima versiune vizitaţi: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Selecţia datei:\n" +
+"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" +
+"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" +
+"- Tineţi butonul mouse-ului apăsat pentru selecţie mai rapidă.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selecţia orei:\n" +
+"- Click pe ora sau minut pentru a mări valoarea cu 1\n" +
+"- Sau Shift-Click pentru a micşora valoarea cu 1\n" +
+"- Sau Click şi drag pentru a selecta mai repede.";
+
+Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)";
+Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)";
+Calendar._TT["GO_TODAY"] = "Data de azi";
+Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)";
+Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)";
+Calendar._TT["SEL_DATE"] = "Selectează data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mişca";
+Calendar._TT["PART_TODAY"] = " (astăzi)";
+Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi";
+Calendar._TT["WEEKEND"] = "0,6";
+Calendar._TT["CLOSE"] = "Închide";
+Calendar._TT["TODAY"] = "Astăzi";
+Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B";
+
+Calendar._TT["WK"] = "spt";
+Calendar._TT["TIME"] = "Ora:";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Âîñêðåñåíüå",
+ "Ïîíåäåëüíèê",
+ "Âòîðíèê",
+ "Ñðåäà",
+ "×åòâåðã",
+ "Ïÿòíèöà",
+ "Ñóááîòà",
+ "Âîñêðåñåíüå");
+Calendar._MN = new Array
+("ßíâàðü",
+ "Ôåâðàëü",
+ "Ìàðò",
+ "Àïðåëü",
+ "Ìàé",
+ "Èþíü",
+ "Èþëü",
+ "Àâãóñò",
+ "Ñåíòÿáðü",
+ "Îêòÿáðü",
+ "Íîÿáðü",
+ "Äåêàáðü");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Ñìåíèòü äåíü íà÷àëà íåäåëè (ÏÍ/ÂÑ)";
+Calendar._TT["PREV_YEAR"] = "Ïðåä. ãîä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["PREV_MONTH"] = "Ïðåä. ìåñÿö (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["GO_TODAY"] = "Íà ñåãîäíÿ";
+Calendar._TT["NEXT_MONTH"] = "Ñëåä. ìåñÿö (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["NEXT_YEAR"] = "Ñëåä. ãîä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["SEL_DATE"] = "Âûáðàòü äàòó";
+Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåòàùèòü";
+Calendar._TT["PART_TODAY"] = " (ñåãîäíÿ)";
+Calendar._TT["MON_FIRST"] = "Ïîêàçàòü ïîíåäåëüíèê ïåðâûì";
+Calendar._TT["SUN_FIRST"] = "Ïîêàçàòü âîñêðåñåíüå ïåðâûì";
+Calendar._TT["CLOSE"] = "Çàêðûòü";
+Calendar._TT["TODAY"] = "Ñåãîäíÿ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "íåä";
--- /dev/null
+/* Slovenian language file for the DHTML Calendar version 0.9.2 \r
+* Author David Milost <mercy@volja.net>, January 2004.\r
+* Feel free to use this script under the terms of the GNU Lesser General\r
+* Public License, as long as you do not remove or alter this notice.\r
+*/\r
+ // full day names\r
+Calendar._DN = new Array\r
+("Nedelja",\r
+ "Ponedeljek",\r
+ "Torek",\r
+ "Sreda",\r
+ "Četrtek",\r
+ "Petek",\r
+ "Sobota",\r
+ "Nedelja");\r
+ // short day names\r
+ Calendar._SDN = new Array\r
+("Ned",\r
+ "Pon",\r
+ "Tor",\r
+ "Sre",\r
+ "Čet",\r
+ "Pet",\r
+ "Sob",\r
+ "Ned");\r
+// short month names\r
+Calendar._SMN = new Array\r
+("Jan",\r
+ "Feb",\r
+ "Mar",\r
+ "Apr",\r
+ "Maj",\r
+ "Jun",\r
+ "Jul",\r
+ "Avg",\r
+ "Sep",\r
+ "Okt",\r
+ "Nov",\r
+ "Dec");\r
+ // full month names\r
+Calendar._MN = new Array\r
+("Januar",\r
+ "Februar",\r
+ "Marec",\r
+ "April",\r
+ "Maj",\r
+ "Junij",\r
+ "Julij",\r
+ "Avgust",\r
+ "September",\r
+ "Oktober",\r
+ "November",\r
+ "December");\r
+\r
+// tooltips\r
+// tooltips\r
+Calendar._TT = {};\r
+Calendar._TT["INFO"] = "O koledarju";\r
+\r
+Calendar._TT["ABOUT"] =\r
+"DHTML Date/Time Selector\n" +\r
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)\r
+"Za zadnjo verzijo pojdine na naslov: http://dynarch.com/mishoo/calendar.epl\n" +\r
+"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +\r
+"\n\n" +\r
+"Izbor datuma:\n" +\r
+"- Uporabite \xab, \xbb gumbe za izbor leta\n" +\r
+"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +\r
+"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";\r
+Calendar._TT["ABOUT_TIME"] = "\n\n" +\r
+"Izbor ćasa:\n" +\r
+"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" +\r
+"- ali Shift-click za zmanj. le-tega\n" +\r
+"- ali kliknite in povlecite za hiter izbor.";\r
+\r
+Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden";\r
+Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";\r
+Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";\r
+Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan";\r
+Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";\r
+Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";\r
+Calendar._TT["SEL_DATE"] = "Izberite datum";\r
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";\r
+Calendar._TT["PART_TODAY"] = " (danes)";\r
+Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";\r
+Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";\r
+Calendar._TT["CLOSE"] = "Zapri";\r
+Calendar._TT["TODAY"] = "Danes";\r
+\r
+// date formats\r
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";\r
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";\r
+\r
+Calendar._TT["WK"] = "Ted";
\ No newline at end of file
--- /dev/null
+// ** I18N
+
+// Calendar SK language
+// Author: Peter Valach (pvalach@gmx.net)
+// Encoding: utf-8
+// Last update: 2003/10/29
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("NedeÄľa",
+ "Pondelok",
+ "Utorok",
+ "Streda",
+ "Ĺ tvrtok",
+ "Piatok",
+ "Sobota",
+ "NedeÄľa");
+
+// short day names
+Calendar._SDN = new Array
+("Ned",
+ "Pon",
+ "Uto",
+ "Str",
+ "Ĺ tv",
+ "Pia",
+ "Sob",
+ "Ned");
+
+// full month names
+Calendar._MN = new Array
+("Január",
+ "Február",
+ "Marec",
+ "AprĂl",
+ "Máj",
+ "JĂşn",
+ "JĂşl",
+ "August",
+ "September",
+ "OktĂłber",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Máj",
+ "JĂşn",
+ "JĂşl",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendári";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" +
+"Poslednú verziu nájdete na: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuované pod GNU LGPL. Viď http://gnu.org/licenses/lgpl.html pre detaily." +
+"\n\n" +
+"Výber dátumu:\n" +
+"- Použite tlačidlá \xab, \xbb pre výber roku\n" +
+"- Použite tlačidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre výber mesiaca\n" +
+"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podrĹľĂte dlhšie, zobrazĂ sa rĂ˝chly vĂ˝ber.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Výber času:\n" +
+"- Kliknutie na niektorú položku času ju zvýši\n" +
+"- Shift-klik ju znĂĹľi\n" +
+"- Ak podrĹľĂte tlaÄŤĂtko stlaÄŤenĂ©, posĂşvanĂm menĂte hodnotu.";
+
+Calendar._TT["PREV_YEAR"] = "Predošlý rok (podržte pre menu)";
+Calendar._TT["PREV_MONTH"] = "Predošlý mesiac (podržte pre menu)";
+Calendar._TT["GO_TODAY"] = "Prejsť na dnešok";
+Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)";
+Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)";
+Calendar._TT["SEL_DATE"] = "Zvoľte dátum";
+Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂm tlaÄŤĂtka zmenĂte polohu";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝";
+Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş";
+Calendar._TT["CLOSE"] = "ZavrieĹĄ";
+Calendar._TT["TODAY"] = "Dnes";
+Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ hodnotu";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b";
+
+Calendar._TT["WK"] = "týž";
--- /dev/null
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miercoles",
+ "Jueves",
+ "Viernes",
+ "Sabado",
+ "Domingo");
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Información del Calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Nuevas versiones en: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." +
+"\n\n" +
+"Selección de Fechas:\n" +
+"- Use \xab, \xbb para seleccionar el año\n" +
+"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga presionado el botón del ratón en cualquiera de las opciones superiores para un acceso rapido .";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selección del Reloj:\n" +
+"- Seleccione la hora para cambiar el reloj\n" +
+"- o presione Shift-click para disminuirlo\n" +
+"- o presione click y arrastre del ratón para una selección rapida.";
+
+Calendar._TT["TOGGLE"] = "Primer dia de la semana";
+Calendar._TT["PREV_YEAR"] = "Año anterior (Presione para menu)";
+Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)";
+Calendar._TT["GO_TODAY"] = "Ir a Hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)";
+Calendar._TT["NEXT_YEAR"] = "Año Siguiente (Presione para menu)";
+Calendar._TT["SEL_DATE"] = "Seleccione fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva";
+Calendar._TT["PART_TODAY"] = " (Hoy)";
+Calendar._TT["MON_FIRST"] = "Lunes Primero";
+Calendar._TT["SUN_FIRST"] = "Domingo Primero";
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "Smn";
--- /dev/null
+// ** I18N
+
+// Calendar SV language (Swedish, svenska)
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// Translation team: <sv@li.org>
+// Translator: Leonard Norrgård <leonard.norrgard@refactor.fi>
+// Last translator: Leonard Norrgård <leonard.norrgard@refactor.fi>
+// Encoding: iso-latin-1
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible. We strongly believe that
+// Unicode is the answer to a real internationalized world. Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("söndag",
+ "måndag",
+ "tisdag",
+ "onsdag",
+ "torsdag",
+ "fredag",
+ "lördag",
+ "söndag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary. We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+// Calendar._SDN_len = N; // short day name length
+// Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+Calendar._SDN_len = 2;
+Calendar._SMN_len = 3;
+
+// full month names
+Calendar._MN = new Array
+("januari",
+ "februari",
+ "mars",
+ "april",
+ "maj",
+ "juni",
+ "juli",
+ "augusti",
+ "september",
+ "oktober",
+ "november",
+ "december");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om kalendern";
+
+Calendar._TT["ABOUT"] =
+"DHTML Datum/tid-väljare\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"För senaste version gå till: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html för detaljer." +
+"\n\n" +
+"Val av datum:\n" +
+"- Använd knapparna \xab, \xbb för att välja år\n" +
+"- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja månad\n" +
+"- Håll musknappen nedtryckt på någon av ovanstående knappar för snabbare val.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Val av tid:\n" +
+"- Klicka på en del av tiden för att öka den delen\n" +
+"- eller skift-klicka för att minska den\n" +
+"- eller klicka och drag för snabbare val.";
+
+Calendar._TT["PREV_YEAR"] = "Föregående år (håll för menu)";
+Calendar._TT["PREV_MONTH"] = "Föregående månad (håll för menu)";
+Calendar._TT["GO_TODAY"] = "Gå till dagens datum";
+Calendar._TT["NEXT_MONTH"] = "Följande månad (håll för menu)";
+Calendar._TT["NEXT_YEAR"] = "Följande år (håll för menu)";
+Calendar._TT["SEL_DATE"] = "Välj datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta";
+Calendar._TT["PART_TODAY"] = " (idag)";
+Calendar._TT["MON_FIRST"] = "Visa måndag först";
+Calendar._TT["SUN_FIRST"] = "Visa söndag först";
+Calendar._TT["CLOSE"] = "Stäng";
+Calendar._TT["TODAY"] = "Idag";
+Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y";
+
+Calendar._TT["WK"] = "vecka";
--- /dev/null
+//////////////////////////////////////////////////////////////////////////////////////////////\r
+// Turkish Translation by Nuri AKMAN\r
+// Location: Ankara/TURKEY\r
+// e-mail : nuriakman@hotmail.com\r
+// Date : April, 9 2003\r
+//\r
+// Note: if Turkish Characters does not shown on you screen\r
+// please include falowing line your html code:\r
+//\r
+// <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">\r
+//\r
+//////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+// ** I18N\r
+Calendar._DN = new Array\r
+("Pazar",\r
+ "Pazartesi",\r
+ "Salý",\r
+ "Çarþamba",\r
+ "Perþembe",\r
+ "Cuma",\r
+ "Cumartesi",\r
+ "Pazar");\r
+Calendar._MN = new Array\r
+("Ocak",\r
+ "Þubat",\r
+ "Mart",\r
+ "Nisan",\r
+ "Mayýs",\r
+ "Haziran",\r
+ "Temmuz",\r
+ "Aðustos",\r
+ "Eylül",\r
+ "Ekim",\r
+ "Kasým",\r
+ "Aralýk");\r
+\r
+// tooltips\r
+Calendar._TT = {};\r
+Calendar._TT["TOGGLE"] = "Haftanýn ilk gününü kaydýr";\r
+Calendar._TT["PREV_YEAR"] = "Önceki Yýl (Menü için basýlý tutunuz)";\r
+Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basýlý tutunuz)";\r
+Calendar._TT["GO_TODAY"] = "Bugün'e git";\r
+Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basýlý tutunuz)";\r
+Calendar._TT["NEXT_YEAR"] = "Sonraki Yýl (Menü için basýlý tutunuz)";\r
+Calendar._TT["SEL_DATE"] = "Tarih seçiniz";\r
+Calendar._TT["DRAG_TO_MOVE"] = "Taþýmak için sürükleyiniz";\r
+Calendar._TT["PART_TODAY"] = " (bugün)";\r
+Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden baþlasýn";\r
+Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden baþlasýn";\r
+Calendar._TT["CLOSE"] = "Kapat";\r
+Calendar._TT["TODAY"] = "Bugün";\r
+\r
+// date formats\r
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";\r
+Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";\r
+\r
+Calendar._TT["WK"] = "Hafta";\r
--- /dev/null
+// ** Translated by ATang ** I18N\r
+Calendar._DN = new Array\r
+("ÐÇÆÚÈÕ",\r
+ "ÐÇÆÚÒ»",\r
+ "ÐÇÆÚ¶þ",\r
+ "ÐÇÆÚÈý",\r
+ "ÐÇÆÚËÄ",\r
+ "ÐÇÆÚÎå",\r
+ "ÐÇÆÚÁù",\r
+ "ÐÇÆÚÈÕ");\r
+Calendar._MN = new Array\r
+("Ò»ÔÂ",\r
+ "¶þÔÂ",\r
+ "ÈýÔÂ",\r
+ "ËÄÔÂ",\r
+ "ÎåÔÂ",\r
+ "ÁùÔÂ",\r
+ "ÆßÔÂ",\r
+ "°ËÔÂ",\r
+ "¾ÅÔÂ",\r
+ "Ê®ÔÂ",\r
+ "ʮһÔÂ",\r
+ "Ê®¶þÔÂ");\r
+\r
+// tooltips\r
+Calendar._TT = {};\r
+Calendar._TT["TOGGLE"] = "Çл»ÖÜ¿ªÊ¼µÄÒ»Ìì";\r
+Calendar._TT["PREV_YEAR"] = "ÉÏÒ»Äê (°´×¡³ö²Ëµ¥)";\r
+Calendar._TT["PREV_MONTH"] = "ÉÏÒ»Ô (°´×¡³ö²Ëµ¥)";\r
+Calendar._TT["GO_TODAY"] = "µ½½ñÈÕ";\r
+Calendar._TT["NEXT_MONTH"] = "ÏÂÒ»Ô (°´×¡³ö²Ëµ¥)";\r
+Calendar._TT["NEXT_YEAR"] = "ÏÂÒ»Äê (°´×¡³ö²Ëµ¥)";\r
+Calendar._TT["SEL_DATE"] = "Ñ¡ÔñÈÕÆÚ";\r
+Calendar._TT["DRAG_TO_MOVE"] = "Í϶¯";\r
+Calendar._TT["PART_TODAY"] = " (½ñÈÕ)";\r
+Calendar._TT["MON_FIRST"] = "Ê×ÏÈÏÔʾÐÇÆÚÒ»";\r
+Calendar._TT["SUN_FIRST"] = "Ê×ÏÈÏÔʾÐÇÆÚÈÕ";\r
+Calendar._TT["CLOSE"] = "¹Ø±Õ";\r
+Calendar._TT["TODAY"] = "½ñÈÕ";\r
+\r
+// date formats\r
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";\r
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";\r
+\r
+Calendar._TT["WK"] = "ÖÜ";\r
--- /dev/null
+#!/usr/bin/perl
+#
+
+use SL::LXDebug;
+$lxdebug = LXDebug->new();
+
+use SL::Form;
+
+eval { require "lx-erp.conf"; };
+
+$form = new Form;
+
+eval { require("$userspath/$form->{login}.conf"); };
+
+$locale = new Locale "$myconfig{countrycode}", "kopf";
+
+eval { require "bin/mozilla/kopf.pl"; };
--- /dev/null
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (C) 2002
+#
+# German texts:
+#
+# Author: Thomas Bayen <tbayen@bayen.de>
+# Gunter Ohrner <G.Ohrner@post.rwth-aachen.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+######################################################################
--- /dev/null
+#=====================================================================
+# SQL-Ledger Accounting
+# Copyright (C) 2002
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#======================================================================
+#
+# this is a variation of the Lingua package
+# written for check and receipt printing
+# it returns a properly formatted text string
+# for a number up to 10**12
+
+sub init {
+ my $self = shift;
+
+ %{ $self->{numbername} } =
+ (0 => 'Null',
+ 1 => 'ein',
+ 2 => 'zwei',
+ 3 => 'drei',
+ 4 => 'vier',
+ 5 => 'fünf',
+ 6 => 'sechs',
+ 7 => 'sieben',
+ 8 => 'acht',
+ 9 => 'neun',
+ 10 => 'zehn',
+ 11 => 'elf',
+ 12 => 'zwölf',
+ 13 => 'dreizehn',
+ 14 => 'vierzehn',
+ 15 => 'fünfzehn',
+ 16 => 'sechzehn',
+ 17 => 'siebzehn',
+ 18 => 'achtzehn',
+ 19 => 'neunzehn',
+ 20 => 'zwanzig',
+ 30 => 'dreissig',
+ 40 => 'vierzig',
+ 50 => 'fünfzig',
+ 60 => 'sechzig',
+ 70 => 'siebzig',
+ 80 => 'achtzig',
+ 90 => 'neunzig',
+ 10**2 => 'hundert',
+ 10**3 => 'tausend',
+ 10**6 => 'million',
+ 10**9 => 'milliarde',
+ 10**12 => 'billion'
+ );
+
+}
+
+
+sub num2text {
+ my ($self, $amount) = @_;
+
+ return $self->{numbername}{0} unless $amount;
+
+ my @textnumber = ();
+
+ # split amount into chunks of 3
+ my @num = reverse split //, $amount;
+ my @numblock = ();
+ my ($i, $appendn);
+ my @a = ();
+
+ while (@num) {
+ @a = ();
+ for (1 .. 3) {
+ push @a, shift @num;
+ }
+ push @numblock, join / /, reverse @a;
+ }
+
+ my $belowhundred = !$#numblock;
+
+ while (@numblock) {
+
+ $i = $#numblock;
+ @num = split //, $numblock[$i];
+ $appendn = "";
+
+ $numblock[$i] *= 1;
+
+ if ($numblock[$i] == 0) {
+ pop @numblock;
+ next;
+ }
+
+ if ($numblock[$i] > 99) {
+ # the one from hundreds
+ push @textnumber, $self->{numbername}{$num[0]};
+
+ # add hundred designation
+ push @textnumber, $self->{numbername}{10**2};
+
+ # reduce numblock
+ $numblock[$i] -= $num[0] * 100;
+ }
+
+ $appendn = 'en' if ($i == 2);
+ $appendn = 'n' if ($i > 2);
+
+ if ($numblock[$i] > 9) {
+ # tens
+ push @textnumber, $self->format_ten($numblock[$i], $belowhundred);
+ } elsif ($numblock[$i] > 1) {
+ # ones
+ push @textnumber, $self->{numbername}{$numblock[$i]};
+ } elsif ($numblock[$i] == 1) {
+ if ($i == 0) {
+ push @textnumber, $self->{numbername}{$numblock[$i]}.'s';
+ } else {
+ if ($i >= 2) {
+ push @textnumber, $self->{numbername}{$numblock[$i]}.'e';
+ } else {
+ push @textnumber, $self->{numbername}{$numblock[$i]};
+ }
+ }
+ $appendn = "";
+ }
+
+ # add thousand, million
+ if ($i) {
+ $amount = 10**($i * 3);
+ push @textnumber, $self->{numbername}{$amount}.$appendn;
+ }
+
+ pop @numblock;
+
+ }
+
+ join '', @textnumber;
+
+}
+
+
+sub format_ten {
+ my ($self, $amount, $belowhundred) = @_;
+
+ my $textnumber = "";
+ my @num = split //, $amount;
+
+ if ($amount > 20) {
+ if ($num[1] == 0) {
+ $textnumber = $self->{numbername}{$amount};
+ } else {
+ if ($belowhundred) {
+ $amount = $num[0] * 10;
+ $textnumber = $self->{numbername}{$num[1]}.'und'.$self->{numbername}{$amount};
+ } else {
+ $amount = $num[0] * 10;
+ $textnumber = $self->{numbername}{$amount}.$self->{numbername}{$num[1]};
+ $textnumber .= 's' if ($num[1] == 1);
+ }
+ }
+ } else {
+ $textnumber = $self->{numbername}{$amount};
+ }
+
+ $textnumber;
+
+}
+
+
+1;
+
--- /dev/null
+$self{texts} = {
+ 'Access Control' => 'Zugriffkontrolle',
+ 'Add User' => 'Benutzer erfassen',
+ 'Address' => 'Adresse',
+ 'Administration' => 'Administration',
+ 'Administrator' => 'Administrator',
+ 'All Datasets up to date!' => 'Alle Datenbanken sind auf aktuellem Stand.',
+ 'Cannot create Lock!' => 'System kann nicht gesperrt werden!',
+ 'Change Admin Password' => 'Administratorpasswort ändern',
+ 'Change Password' => 'Passwort ändern',
+ 'Character Set' => 'Zeichensatz',
+ 'Click on login name to edit!' => 'Zum Bearbeiten den Zugriffsnamen anklicken!',
+ 'Company' => 'Firma',
+ 'Connect to' => 'Als Vorlage verwenden',
+ 'Continue' => 'Weiter',
+ 'Create Chart of Accounts' => 'Kontenplan anlegen',
+ 'Create Dataset' => 'Datenbank anlegen',
+ 'DBI not installed!' => 'DBI ist nicht installiert!',
+ 'DUNS-Nr' => 'DUNS-Nr.',
+ 'Database' => 'Datenbank',
+ 'Database Administration' => 'Datenbankadministration',
+ 'Database Driver not checked!' => 'Kein Datenbanktreiber ausgewählt!',
+ 'Database User missing!' => 'Datenbankbenutzer fehlt!',
+ 'Dataset' => 'Datenbank',
+ 'Dataset missing!' => 'Datenbank fehlt!',
+ 'Dataset updated!' => 'Datenbank erneuert!',
+ 'Date Format' => 'Datumsformat',
+ 'Delete' => 'Löschen',
+ 'Delete Dataset' => 'Datenbank löschen',
+ 'Directory' => 'Verzeichnis',
+ 'Driver' => 'Treiber',
+ 'Dropdown Limit' => 'Auswahllistenbegrenzung',
+ 'E-mail' => 'eMail',
+ 'Edit User' => 'Benutzerdaten bearbeiten',
+ 'Existing Datasets' => 'existierende Datenbanken',
+ 'Fax' => 'Fax',
+ 'File locked!' => 'Datei gesperrt!',
+ 'Host' => 'Datenbankcomputer',
+ 'Hostname missing!' => 'Computername fehlt!',
+ 'Incorrect Password!' => 'Ungültiges Passwort!',
+ 'Language' => 'Sprache',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Für lokale Verbindungen "Rechner" und "Port" freilassen.',
+ 'Lock System' => 'System sperren',
+ 'Lockfile created!' => 'System gesperrt!',
+ 'Lockfile removed!' => 'System entsperrt!',
+ 'Login' => 'Anmeldung',
+ 'Login name missing!' => 'Loginname fehlt.',
+ 'Manager' => 'Manager',
+ 'Multibyte Encoding' => 'Schriftsatz',
+ 'Name' => 'Name',
+ 'New Templates' => 'neue Vorlagen',
+ 'No Database Drivers available!' => 'Kein Datenbanktreiber verfügbar!',
+ 'No Dataset selected!' => 'Keine Datenbank ausgewählt!',
+ 'Nothing to delete!' => 'Es konnte nichts gelöscht werden!',
+ 'Number Format' => 'Zahlenformat',
+ 'Oracle Database Administration' => 'Oracle Datenbankadministration',
+ 'Password' => 'Passwort',
+ 'Password changed!' => 'Passwort geändert!',
+ 'Pg Database Administration' => 'Datenbankadministration',
+ 'Phone' => 'Telefon',
+ 'Port' => 'Port',
+ 'Port missing!' => 'Portangabe fehlt!',
+ 'Printer' => 'Drucker',
+ 'Save' => 'Speichern',
+ 'Setup Templates' => 'Vorlagen auswählen',
+ 'Signature' => 'Unterschrift',
+ 'Steuernummer' => 'Steuernummer',
+ 'Stylesheet' => 'Stilvorlage',
+ 'Supervisor' => 'Supervisor',
+ 'Templates' => 'Vorlagen',
+ 'The following Datasets are not in use and can be deleted' => 'Die folgenden Datenbanken sind nicht in Verwendung und können gelöscht werden',
+ 'The following Datasets need to be updated' => 'Folgende Datenbanken müssen aktualisiert werden',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehenden Zugriffsnamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
+ 'Unlock System' => 'System entsperren',
+ 'Update Dataset' => 'Datenbank aktualisieren',
+ 'Use Templates' => 'benutze Vorlagen',
+ 'User' => 'Benutzer',
+ 'User deleted!' => 'Benutzer gelöscht!',
+ 'User saved!' => 'Benutzer gespeichert!',
+ 'Ust-IDNr' => 'USt-IdNr.',
+ 'Version' => 'Version',
+ 'WEBDAV-Zugriff' => 'WEBDAV-Zugriff',
+ 'You must enter a host and port for local and remote connections!' => '"Rechner" und "Port" müssen für lokale und externe Verbindungen eingetragen werden!',
+ 'does not exist' => 'existiert nicht',
+ 'is already a member!' => 'ist bereits ein Mitglied!',
+ 'localhost' => 'lokaler Rechner',
+ 'successfully created!' => 'wurde erfolgreich erstellt',
+ 'successfully deleted!' => 'wurde erfolgreich gelöscht',
+ 'website' => 'Webseite',
+};
+
+$self{subs} = {
+ 'add_user' => 'add_user',
+ 'adminlogin' => 'adminlogin',
+ 'change_admin_password' => 'change_admin_password',
+ 'change_password' => 'change_password',
+ 'check_password' => 'check_password',
+ 'continue' => 'continue',
+ 'create_dataset' => 'create_dataset',
+ 'dbcreate' => 'dbcreate',
+ 'dbdelete' => 'dbdelete',
+ 'dbdriver_defaults' => 'dbdriver_defaults',
+ 'dbselect_source' => 'dbselect_source',
+ 'dbupdate' => 'dbupdate',
+ 'delete' => 'delete',
+ 'delete_dataset' => 'delete_dataset',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'get_value' => 'get_value',
+ 'list_users' => 'list_users',
+ 'lock_system' => 'lock_system',
+ 'login' => 'login',
+ 'login_name' => 'login_name',
+ 'oracle_database_administration' => 'oracle_database_administration',
+ 'pg_database_administration' => 'pg_database_administration',
+ 'save' => 'save',
+ 'unlock_system' => 'unlock_system',
+ 'update_dataset' => 'update_dataset',
+ 'benutzer_erfassen' => 'add_user',
+ 'administratorpasswort_ändern' => 'change_admin_password',
+ 'passwort_ändern' => 'change_password',
+ 'weiter' => 'continue',
+ 'datenbank_anlegen' => 'create_dataset',
+ 'löschen' => 'delete',
+ 'datenbank_löschen' => 'delete_dataset',
+ 'system_sperren' => 'lock_system',
+ 'anmeldung' => 'login',
+ 'oracle_datenbankadministration' => 'oracle_database_administration',
+ 'datenbankadministration' => 'pg_database_administration',
+ 'speichern' => 'save',
+ 'system_entsperren' => 'unlock_system',
+ 'datenbank_aktualisieren' => 'update_dataset',
+};
+
+1;
--- /dev/null
+# These are all the texts to build the translations files.
+# The file has the form of 'english text' => 'foreign text',
+# you can add the translation in this file or in the 'missing' file
+# run locales.pl from this directory to rebuild the translation files
+
+$self{texts} = {
+ ' erfolgreich storniert!' => '',
+ ' nicht storniert! Allgemeiner Fehler' => '',
+ ' nicht storniert! PAGO Rückmeldung: ' => '',
+ 'AP' => 'Einkauf',
+ 'AP Aging' => 'Offene Verbindlichkeiten',
+ 'AP Transaction' => 'Kreditorenbuchung',
+ 'AP Transactions' => 'Kreditorenbuchungen',
+ 'AR' => 'Verkauf',
+ 'AR Aging' => 'Offene Forderungen',
+ 'AR Transaction' => 'Debitorenbuchung',
+ 'AR Transactions' => 'Debitorenbuchungen',
+ 'About' => 'über',
+ 'Abrechnungsnummer' => 'Abrechnungsnummer',
+ 'Abteilung' => 'Abteilung',
+ 'Access Control' => 'Zugriffkontrolle',
+ 'Account' => 'Konto',
+ 'Account Number' => 'Kontonummer',
+ 'Account Number missing!' => 'Kontonummer fehlt!',
+ 'Account Type' => 'Kontoart',
+ 'Account Type missing!' => 'Kontoart fehlt!',
+ 'Account deleted!' => 'Konto gelöscht!',
+ 'Account saved!' => 'Konto gespeichert!',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Accrual' => 'Bilanzierung',
+ 'Active' => 'Aktiv',
+ 'Add' => 'Erfassen',
+ 'Add AP Transaction' => 'Kreditorenbuchung',
+ 'Add AR Transaction' => 'Debitorenbuchung',
+ 'Add Account' => 'Konto erfassen',
+ 'Add Accounts Payables Transaction' => 'Kreditorenbuchung erfassen',
+ 'Add Accounts Receivables Transaction' => 'Debitorenbuchung erfassen',
+ 'Add Assembly' => 'Erzeugnis erfassen',
+ 'Add Business' => 'Kundentyp erfassen',
+ 'Add Customer' => 'Kunde erfassen',
+ 'Add Department' => 'Abteilung erfassen',
+ 'Add Exchangerate' => 'Wechselkurs erfassen',
+ 'Add GIFI' => 'GIFI erfassen',
+ 'Add General Ledger Transaction' => 'Dialogbuchen',
+ 'Add Group' => 'Warengruppe erfassen',
+ 'Add License' => 'Lizenz erfassen',
+ 'Add Part' => 'Ware erfassen',
+ 'Add Project' => 'Projekt erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add RFQ' => 'Neue Preisanfrage',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add SIC' => 'SIC erfassen',
+ 'Add Sales Invoice' => 'Rechnung erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Service' => 'Dienstleistung erfassen',
+ 'Add Transaction' => 'Dialogbuchen',
+ 'Add User' => 'Benutzer erfassen',
+ 'Add Vendor' => 'Lieferant erfassen',
+ 'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
+ 'Add Warehouse' => 'Lager erfassen',
+ 'Address' => 'Adresse',
+ 'Administration' => 'Administration',
+ 'Administrator' => 'Administrator',
+ 'All' => 'Alle',
+ 'All Accounts' => 'Alle Konten',
+ 'All Datasets up to date!' => 'Alle Datenbanken sind auf aktuellem Stand.',
+ 'Amount' => 'Betrag',
+ 'Amount Due' => 'Betrag fällig',
+ 'Angaben zum Finanzamt' => 'Angaben zum Finanzamt',
+ 'Anstehende Voranmeldungen' => 'Anstehende Voranmeldungen',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Invoice Number' => 'Soll die Rechnung mit folgender Nummer wirklich gelöscht werden:',
+ 'Are you sure you want to delete Order Number' => 'Soll der Auftrag mit folgender Nummer wirklich gelöscht werden:',
+ 'Are you sure you want to delete Quotation Number' => 'Sind Sie sicher, dass Angebotnummer gelöscht werden soll?',
+ 'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
+ 'Are you sure you want to remove the marked entries from the queue?' => 'Sind Sie sicher, dass die markierten Einträge von der Warteschlange gelöscht werden sollen?',
+ 'Assemblies' => 'Erzeugnisse',
+ 'Assemblies restocked!' => 'Erzeugnisse sind im Lager!',
+ 'Assembly Number missing!' => 'Erzeugnisnummer fehlt!',
+ 'Asset' => 'Aktiva',
+ 'Attachment' => 'als Anhang',
+ 'Audit Control' => 'Bücherkontrolle',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Ausgabeformat' => 'Ausgabeformat',
+ 'Ausgabeformat auswählen...' => 'Ausgabeformat auswählen...',
+ 'BLZ: ' => 'BLZ: ',
+ 'BOM' => 'Stückliste',
+ 'BWA' => 'BWA',
+ 'Backup' => 'Datensicherung',
+ 'Backup sent to' => 'Eine Sicherungskopie wurde gesandt an',
+ 'Balance' => 'Bilanz',
+ 'Balance Sheet' => 'Bilanz',
+ 'Bank' => 'Bank',
+ 'Bank Code Number' => 'Bankleitzahl',
+ 'Bankleitzahl' => 'Bankleitzahl',
+ 'Bankleitzahl (BLZ)' => 'Bankleitzahl (BLZ)',
+ 'Bankverbindung' => 'Bankverbindung',
+ 'Bankverbindung des Finanzamts' => 'Bankverbindung des Finanzamts',
+ 'Bankverbindungen' => 'Bankverbindungen',
+ 'Bankverbindungen des Finanzamts' => 'Bankverbindungen des Finanzamts',
+ 'Batch Printing' => 'Druck',
+ 'Bcc' => 'Bcc',
+ 'Belegnummer' => 'Buchungsnummer',
+ 'Beraterdaten in UStVA übernehmen?' => 'Beraterdaten in UStVA übernehmen?',
+ 'Beratername' => 'Beratername',
+ 'Beraternummer' => 'Beraternummer',
+ 'Berichtigte Anmeldung' => 'Berichtigte Anmeldung',
+ 'Betrag' => 'Betrag',
+ 'Bilanz' => 'Bilanz',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Bis' => 'bis',
+ 'Bis Konto: ' => 'bis Konto: ',
+ 'Bitte Angaben überprüfen' => 'Bitte Angaben überprüfen',
+ 'Bitte alle Angaben überprüfen' => 'Bitte alle Angaben überprüfen',
+ 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.' => 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.',
+ 'Bitte eine Steuernummer angeben' => 'Bitte eine Steuernummer angeben',
+ 'Books are open' => 'Die Bücher sind geöffnet.',
+ 'Bought' => 'gekauft',
+ 'Buchungsdatum' => 'Buchungsdatum',
+ 'Buchungsjournal' => 'Buchungsjournal',
+ 'Business' => 'Firma',
+ 'Business Number' => 'Firmennummer',
+ 'Business deleted!' => 'Firma gelöscht.',
+ 'Business saved!' => 'Firma gespeichert.',
+ 'C' => 'G',
+ 'COGS' => 'Umsatzkosten',
+ 'Cannot create Lock!' => 'System kann nicht gesperrt werden!',
+ 'Cannot delete account!' => 'Konto kann nicht gelöscht werden!',
+ 'Cannot delete customer!' => 'Kunde kann nicht gelöscht werden!',
+ 'Cannot delete default account!' => 'Das Standard-Konto kann nicht gelöscht werden!',
+ 'Cannot delete invoice!' => 'Rechnung kann nicht gelöscht werden!',
+ 'Cannot delete item!' => 'Artikel kann nicht gelöscht werden!',
+ 'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
+ 'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!',
+ 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!',
+ 'Cannot delete vendor!' => 'Lieferant kann nicht gelöscht werden!',
+ 'Cannot have a value in both Debit and Credit!' => 'Es kann nicht gleichzeitig Soll und Haben gebucht werden!',
+ 'Cannot post Payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot post Receipt!' => 'Beleg kann nicht gebucht werden!',
+ 'Cannot post a transaction without a value!' => 'Eine Buchung ohne Betrag kann nicht vorgenommen werden!',
+ 'Cannot post invoice for a closed period!' => 'Das Rechnungsdatum fällt in einen abgeschlossen Zeitraum!',
+ 'Cannot post invoice!' => 'Rechnung kann nicht gebucht werden!',
+ 'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
+ 'Cannot post payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!',
+ 'Cannot post transaction!' => 'Rechnung kann nicht gebucht werden!',
+ 'Cannot process payment for a closed period!' => 'Es kann keine Zahlung in einem abgeschlossenen Zeitraum verbucht werden!',
+ 'Cannot remove files!' => 'Dateien können nicht gelöscht werden!',
+ 'Cannot save account!' => 'Konto kann nicht gespeichert werden!',
+ 'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
+ 'Cannot save preferences!' => 'Benutzereinstellungen können nicht gespeichert werden!',
+ 'Cannot save quotation!' => 'Angebot kann nicht gespeichert werden!',
+ 'Cannot stock assemblies!' => 'Erzeugnisse können nicht ins Lager!',
+ 'Cash' => 'Zahlungsverkehr',
+ 'Cc' => 'Cc',
+ 'Change Admin Password' => 'Administratorpasswort ändern',
+ 'Change Password' => 'Passwort ändern',
+ 'Character Set' => 'Zeichensatz',
+ 'Chart of Accounts' => 'Kontenübersicht',
+ 'Check' => 'Scheck',
+ 'Checks' => 'Schecks',
+ 'City' => 'Stadt',
+ 'Cleared Balance' => 'abgeschlossen',
+ 'Click on login name to edit!' => 'Zum Bearbeiten den Zugriffsnamen anklicken!',
+ 'Close' => '',
+ 'Close Books up to' => 'Die Bücher abschließen bis zum',
+ 'Closed' => 'Geschlossen',
+ 'Code' => 'kode',
+ 'Code missing!' => 'kode fehlt!',
+ 'Comment' => 'Kommentar',
+ 'Company' => 'Firma',
+ 'Company Name' => 'Firmenname',
+ 'Compare to' => 'Gegenüberstellen zu',
+ 'Config' => 'Konfiguration',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Connect to' => 'Als Vorlage verwenden',
+ 'Contact' => 'Kontakt',
+ 'Contact Person' => 'Ansprechpartner',
+ 'Contact missing!' => 'Kontakt fehlt!',
+ 'Continue' => 'Weiter',
+ 'Contra' => 'gegen',
+ 'Copies' => 'Kopien',
+ 'Copy to COA' => 'In Kontenplan kopieren',
+ 'Correct Tax' => 'Steuer anpassen',
+ 'Cost Center' => 'Kostenstelle',
+ 'Could not save!' => 'Konnte nicht speichern!',
+ 'Could not transfer Inventory!' => 'Konnte Waren nicht umlagern!',
+ 'Country' => 'Land',
+ 'Create Chart of Accounts' => 'Kontenplan anlegen',
+ 'Create Dataset' => 'Datenbank anlegen',
+ 'Credit' => 'Haben',
+ 'Credit Account' => 'Habenkonto',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Credit Tax' => 'Umsatzsteuer',
+ 'Credit Tax Account' => 'Umsatzsteuerkonto',
+ 'Curr' => 'Währung',
+ 'Currency' => 'Währung',
+ 'Current' => 'Betrag',
+ 'Current Earnings' => 'Gewinn',
+ 'Customer' => 'Kunde',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer Order Number' => 'Bestellnummer des Kunden',
+ 'Customer deleted!' => 'Kunde gelöscht!',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Customer saved!' => 'Kunde gespeichert!',
+ 'Customernumberinit' => 'Kundennummernkreis',
+ 'Customers' => 'Kunden',
+ 'Customized Report' => 'Vorgewählte Zeiträume',
+ 'DATEV - Export Assistent' => 'DATEV-Exportassistent',
+ 'DATEV Angaben' => 'DATEV-Angaben',
+ 'DATEX - Export Assistent' => 'DATEV-Exportassistent',
+ 'DBI not installed!' => 'DBI ist nicht installiert!',
+ 'DFV-Kennzeichen' => 'DFV-Kennzeichen',
+ 'DUNS-Nr' => 'DUNS-Nr.',
+ 'Database' => 'Datenbank',
+ 'Database Administration' => 'Datenbankadministration',
+ 'Database Driver not checked!' => 'Kein Datenbanktreiber ausgewählt!',
+ 'Database Host' => 'Datenbankcomputer',
+ 'Database User missing!' => 'Datenbankbenutzer fehlt!',
+ 'Dataset' => 'Datenbank',
+ 'Dataset missing!' => 'Datenbank fehlt!',
+ 'Dataset updated!' => 'Datenbank erneuert!',
+ 'Date' => 'Datum',
+ 'Date Format' => 'Datumsformat',
+ 'Date Paid' => 'Zahlungsdatum',
+ 'Date Received' => 'Empfangsdatum',
+ 'Date missing!' => 'Datum fehlt!',
+ 'Date received missing!' => 'Empfangsdatum fehlt!',
+ 'Datenträgernummer' => 'Datenträgernummer',
+ 'Datum von' => 'Datum von',
+ 'Dauerfristverlängerung' => 'Dauerfristverlängerung',
+ 'Debit' => 'Soll',
+ 'Debit Account' => 'Sollkonto',
+ 'Debit Tax' => 'Vorsteuer',
+ 'Debit Tax Account' => 'Vorsteuerkonto',
+ 'Debit and credit out of balance!' => 'Soll und Haben müssen gleich sein.',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Decimalplaces' => 'Dezimalstellen',
+ 'Decrease' => 'Verringern',
+ 'Delete' => 'Löschen',
+ 'Delete Account' => 'Konto löschen',
+ 'Delete Dataset' => 'Datenbank löschen',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Department' => 'Abteilung',
+ 'Department / Comment' => 'Abteilung / Kommentar',
+ 'Department deleted!' => 'Abteilung gelöscht.',
+ 'Department saved!' => 'Abteilung gespeichert.',
+ 'Departments' => 'Abteilungen',
+ 'Deposit' => 'Gutschrift',
+ 'Description' => 'Beschreibung',
+ 'Description missing!' => 'Beschreibung fehlt.',
+ 'Difference' => 'Differenz',
+ 'Directory' => 'Verzeichnis',
+ 'Discount' => 'Rabatt',
+ 'Do not remind' => 'Nicht erinnern',
+ 'Done' => 'Fertig',
+ 'Drawing' => 'Zeichnung',
+ 'Driver' => 'Treiber',
+ 'Dropdown Limit' => 'Auswahllistenbegrenzung',
+ 'Due' => 'Fällig',
+ 'Due Date' => 'Fälligkeitsdatum',
+ 'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
+ 'E-mail' => 'eMail',
+ 'E-mail Statement to' => 'Fälligkeitsabrechnung als eMail an',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'ELSTER Export nach Winston' => 'ELSTER Export nach Winston',
+ 'ELSTER-Steuernummer: ' => 'ELSTER-Steuernummer: ',
+ 'EUR' => 'E/Ü-Rechnung',
+ 'Edit' => 'Bearbeiten',
+ 'Edit Account' => 'Kontodaten bearbeiten',
+ 'Edit Accounts Payables Transaction' => 'Kreditorenbuchung bearbeiten',
+ 'Edit Accounts Receivables Transaction' => 'Debitorenbuchung bearbeiten',
+ 'Edit Assembly' => 'Erzeugnis bearbeiten',
+ 'Edit Business' => 'Kundentyp bearbeiten',
+ 'Edit Customer' => 'Kunde editieren',
+ 'Edit Department' => 'Abteilung bearbeiten',
+ 'Edit GIFI' => 'GIFI editieren',
+ 'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
+ 'Edit Group' => 'Warengruppe editieren',
+ 'Edit Part' => 'Ware bearbeiten',
+ 'Edit Preferences for' => 'Benutzereinstellungen für',
+ 'Edit Project' => 'Projekt bearbeiten',
+ 'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
+ 'Edit Quotation' => 'Angebot bearbeiten',
+ 'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit SIC' => 'SIC bearbeiten',
+ 'Edit Sales Invoice' => 'Rechnung bearbeiten',
+ 'Edit Sales Order' => 'Auftrag bearbeiten',
+ 'Edit Service' => 'Dienstleistung bearbeiten',
+ 'Edit Template' => 'Vorlage bearbeiten',
+ 'Edit User' => 'Benutzerdaten bearbeiten',
+ 'Edit Vendor' => 'Lieferant editieren',
+ 'Edit Vendor Invoice' => 'Einkaufsrechnung bearbeiten',
+ 'Edit Warehouse' => 'Lager bearbeiten',
+ 'Employee' => 'Bearbeiter',
+ 'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte Währungskürzel mit maximal 3 Buchstaben aufführen; Ihre eigene LandesWährung zuerst (z.B. EUR:USD:CAD)',
+ 'Equity' => 'Passiva',
+ 'Exch' => 'Wechselkurs.',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate Difference' => 'Wechselkursunterschied',
+ 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Existing Datasets' => 'existierende Datenbanken',
+ 'Expense' => 'Aufwandskonto',
+ 'Expense Account' => 'Aufwandskonto',
+ 'Expense/Asset' => 'Aufwand/Anlagen',
+ 'Expired licenses' => 'Abgelaufene Lizenzen',
+ 'Expiring in x month(s)' => 'Die in x Monat(en) ablaufen',
+ 'Export Buchungsdaten' => 'Export Buchungsdaten',
+ 'Export Stammdaten' => 'Export Stammdaten',
+ 'Extended' => 'Gesamt',
+ 'EÜR' => 'EÜR',
+ 'Fax' => 'Fax',
+ 'Fax. : ' => 'Fax. : ',
+ 'Fax.: ' => 'Fax.: ',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'File locked!' => 'Datei gesperrt!',
+ 'Finanzamt' => 'Finanzamt',
+ 'Finanzamt - Einstellungen' => 'Finanzamt - Einstellungen',
+ 'Firma' => 'Firma',
+ 'Foreign Exchange Gain' => 'Wechselkurserträge',
+ 'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
+ 'Free report period' => 'Freier Zeitraum',
+ 'From' => 'von',
+ 'GIFI' => 'GIFI',
+ 'GIFI deleted!' => 'GIFI gelöscht!',
+ 'GIFI missing!' => 'GIFI fehlt!',
+ 'GIFI saved!' => 'GIFI gespeichert!',
+ 'GL Transaction' => 'Dialogbuchung',
+ 'General Ledger' => 'Finanzbuchhaltung',
+ 'Geschäftsvolumen' => 'Geschäftsvolumen',
+ 'Given Name' => 'Vorname',
+ 'Greeting' => 'Anrede',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'Group deleted!' => 'Warengruppe gelöscht!',
+ 'Group missing!' => 'Warengruppe fehlt!',
+ 'Group saved!' => 'Warengruppe gespeichert!',
+ 'Groups' => 'Warengruppen',
+ 'HTML' => 'HTML',
+ 'HTML Templates' => 'HTML-Vorlagen',
+ 'Heading' => 'Überschrift',
+ 'Help' => 'Hilfe',
+ 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
+ 'Hinweise' => 'Hinweise',
+ 'Homepage' => 'Homepage',
+ 'Host' => 'Datenbankcomputer',
+ 'Hostname missing!' => 'Computername fehlt!',
+ 'I' => 'I',
+ 'ID' => 'Buchungsnummer',
+ 'II' => 'II',
+ 'III' => 'III',
+ 'IV' => 'IV',
+ 'Idea Terra CSV' => '',
+ 'Image' => 'Grafik',
+ 'In-line' => 'im Text',
+ 'Include Exchangerate Difference' => 'Wechselkursunterschied einbeziehen',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Include in drop-down menus' => 'In Aufklappmenü aufnehmen',
+ 'Income Statement' => 'GuV',
+ 'Incoming Payments' => 'Zahlungseingänge',
+ 'Incorrect Password!' => 'Ungültiges Passwort!',
+ 'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
+ 'Increase' => 'Erhöhen',
+ 'Individual Items' => 'Einzelteile',
+ 'Internal Notes' => 'interne Bemerkungen',
+ 'Internet' => 'Internet',
+ 'Inventory' => 'Inventar',
+ 'Inventory Account' => 'Warenbestand',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => 'Bevor dieses Erzeugnis als ungültig markiert werden kann, muÃ\9f das Inventar auf Null sein!',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => 'Bevor diese Ware als ungültig markiert werden kann, muÃ\9f das Inventar Null sein!',
+ 'Inventory saved!' => 'Inventar gespeichert.',
+ 'Inventory transferred!' => 'Inventar umgelagert.',
+ 'Invoice' => 'Rechnung',
+ 'Invoice And Key' => '',
+ 'Invoice Date' => 'Rechnungsdatum',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Invoice deleted!' => 'Rechnung gelöscht!',
+ 'Invoices' => 'Rechnungen',
+ 'Is this a summary account to record' => 'Summenkonto für',
+ 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)' => 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)',
+ 'Item deleted!' => 'Artikel gelöscht!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Journal' => 'Buchungsjournal',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'KNE Export erfolgreich!' => 'KNE-Export erfolgreich!',
+ 'KNr. beim Kunden' => 'KNr. beim Kunden',
+ 'Kein Firmenname hinterlegt!' => 'Kein Firmenname hinterlegt!',
+ 'Keine Firmenadresse hinterlegt!' => 'Keine Firmenadresse hinterlegt!',
+ 'Keine Steuerautomatik möglich!' => 'Keine Steuerautomatik möglich!',
+ 'Kontakt' => 'Kontakt',
+ 'Konten' => 'Konten',
+ 'Konto: ' => 'Konto: ',
+ 'Kontonummer' => 'Kontonummer',
+ 'Kontonummernerweiterung (KNE)' => 'Kontonummernerweiterung (KNE)',
+ 'Kreditinstitut' => 'Kreditinstitut',
+ 'Kundennummer' => 'Kundennummer',
+ 'LaTeX Templates' => 'LaTeX-Vorlagen',
+ 'Language' => 'Sprache',
+ 'Last Article Number' => 'Letzte Artikelnummer',
+ 'Last Cost' => 'Einkaufspreis',
+ 'Last Customer Number' => 'Letzte Kundennummer',
+ 'Last Invoice Number' => 'Letzte Rechnungsnummer',
+ 'Last Numbers & Default Accounts' => 'Laufende Zähler und Standardkonten',
+ 'Last Purchase Order Number' => 'Letzte Lieferantenbestellnummer',
+ 'Last RFQ Number' => 'Letzte Anfragenummer',
+ 'Last Sales Order Number' => 'Letzte Kundenbestellnummer',
+ 'Last Sales Quotation Number' => 'Letzte Angebotsnummer',
+ 'Last Service Number' => 'Letzte Dienstleistungsnr.',
+ 'Last Vendor Number' => 'Letzte Lieferantennummer',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Für lokale Verbindungen "Rechner" und "Port" freilassen.',
+ 'Liability' => 'Passiva',
+ 'License' => 'Lizenz',
+ 'License key' => 'Lizenzschlüssel',
+ 'Licensed to' => 'Lizensiert für',
+ 'Licenses' => 'Lizenzen',
+ 'Line Total' => 'Zeilensumme',
+ 'Link' => 'Verknüpfungen',
+ 'Link Accounts' => 'Konten verknüpfen',
+ 'List Accounts' => 'Kontenliste',
+ 'List Businesses' => 'Liste Kundentypen',
+ 'List Departments' => 'Abteilungsliste',
+ 'List Price' => 'Listenpreis',
+ 'List SIC' => 'SIC anzeigen',
+ 'List Transactions' => 'Buchungsliste',
+ 'Lock System' => 'System sperren',
+ 'Lockfile created!' => 'System gesperrt!',
+ 'Lockfile removed!' => 'System entsperrt!',
+ 'Login' => 'Anmeldung',
+ 'Login Name' => 'Benutzername',
+ 'Login name missing!' => 'Loginname fehlt.',
+ 'Logout' => 'Abmeldung',
+ 'Make' => 'Hersteller',
+ 'Manager' => 'Manager',
+ 'Mandantennummer' => 'Mandantennummer',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'Marked entries printed!' => 'Markierte Einträge wurden gedruckt!',
+ 'Master Data' => 'Stammdaten',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Message' => 'Nachricht',
+ 'Method' => 'Verfahren',
+ 'Microfiche' => 'Mikrofilm',
+ 'Mitarbeiter' => 'Mitarbeiter',
+ 'Model' => 'Modell',
+ 'Monat' => 'Monat',
+ 'Monthly' => 'monatlich',
+ 'Mosu' => '',
+ 'Multibyte Encoding' => 'Schriftsatz',
+ 'MwSt. inkl.' => 'MwSt. inkl.',
+ 'N/A' => 'N.Z.',
+ 'Name' => 'Name',
+ 'Name missing!' => 'Name fehlt!',
+ 'New Account' => '',
+ 'New Templates' => 'neue Vorlagen',
+ 'No' => 'Nein',
+ 'No Database Drivers available!' => 'Kein Datenbanktreiber verfügbar!',
+ 'No Dataset selected!' => 'Keine Datenbank ausgewählt!',
+ 'No email address for' => 'Keine eMailaddresse für',
+ 'No licenses were found that match the search criteria.' => 'Es wurden keine Lizenzen gefunden, auf die die Suchkriterien zutreffen.',
+ 'No.' => 'Position',
+ 'Non-taxable Purchases' => 'Nicht zu versteuernde Einkäufe',
+ 'Non-taxable Sales' => 'Nicht zu versteuernde Verkäufe',
+ 'Notes' => 'Bemerkungen',
+ 'Nothing entered!' => 'Es wurde nichts eingegeben.',
+ 'Nothing selected!' => 'Es wurde nichts ausgewählt!',
+ 'Nothing to delete!' => 'Es konnte nichts gelöscht werden!',
+ 'Nothing to transfer!' => 'Es gibt nichts zum Umlagern!',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number Format' => 'Zahlenformat',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'O' => 'O',
+ 'OBE Export erfolgreich!' => 'OBE-Export erfolgreich!',
+ 'Obsolete' => 'Ungültig',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'On Hand' => 'Auf Lager',
+ 'On Order' => 'ist bestellt',
+ 'Open' => 'Offen',
+ 'Options' => 'Optionen',
+ 'Oracle Database Administration' => 'Oracle Datenbankadministration',
+ 'Order' => 'Auftrag',
+ 'Order Date' => 'Auftragsdatum',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order deleted!' => 'Auftrag gelöscht!',
+ 'Ordered' => 'Vom Kunde bestellt',
+ 'Orders' => 'Aufträge',
+ 'Ordnumber' => '',
+ 'Orphaned' => 'nie benutzt',
+ 'Out of balance!' => 'Summen stimmen nicht berein!',
+ 'Own Product' => 'eigenes Produkt',
+ 'PDF' => 'PDF',
+ 'PLZ, Ort' => 'PLZ, Ort',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Packing Lists' => 'Lieferschein',
+ 'Pago Clearing' => '',
+ 'Paid' => 'bezahlt',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Part Number' => 'Artikelnummer',
+ 'Part Number missing!' => 'Artikelnummer fehlt!',
+ 'Partnumber not unique!' => 'Artikelnummer bereits vorhanden!',
+ 'Parts' => 'Waren',
+ 'Parts Inventory' => 'Warenliste',
+ 'Password' => 'Passwort',
+ 'Password changed!' => 'Passwort geändert!',
+ 'Payables' => 'Verbindlichkeiten',
+ 'Payment' => 'Zahlungsausgang',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Payment posted!' => 'Zahlung gebucht!',
+ 'Payments' => 'Zahlungsausgänge',
+ 'Pg Database Administration' => 'Datenbankadministration',
+ 'Phone' => 'Telefon',
+ 'Phone1' => 'Telefon 1 ',
+ 'Phone2' => 'Telefon 2',
+ 'Pick List' => 'Sammelliste',
+ 'Please enter a license key.' => 'Bitte geben Sie einen Lizenzschlüssel an.',
+ 'Please enter a number of licenses.' => 'Bitte geben Sie die Anzahl Lizenzschlüssel an.',
+ 'Port' => 'Port',
+ 'Port missing!' => 'Portangabe fehlt!',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Postscript' => 'Postscript',
+ 'Preferences' => 'Benutzereinstellungen',
+ 'Preferences saved!' => 'Einstellungen gespeichert!',
+ 'Prepayment' => 'Vorauszahlung',
+ 'Price' => 'Preis',
+ 'Print' => 'Drucken',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Printing ... ' => 'Es wird gedruckt.',
+ 'Profit Center' => 'Erfolgsreich',
+ 'Programm' => 'Programm',
+ 'Project' => 'Projekt',
+ 'Project Number' => 'Projektnummer',
+ 'Project Number missing!' => 'Projektnummer fehlt!',
+ 'Project Transactions' => 'Projektbuchungen',
+ 'Project deleted!' => 'Projekt gelöscht!',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Project saved!' => 'Projekt gespeichert!',
+ 'Projects' => 'Projekte',
+ 'Projecttransactions' => 'Projektbuchungen',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Purchase Orders' => 'Lieferantenaufträge',
+ 'Qty' => 'Menge',
+ 'Quantity' => 'Menge',
+ 'Quartal' => 'Quartal',
+ 'Quarter' => 'Quartal',
+ 'Quarterly' => 'quartalsweise',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date' => 'Angebotsdatum',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number' => 'Angebotsnummer',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Quotation deleted!' => 'Angebot wurde gelöscht.',
+ 'Quotations' => 'Angebote',
+ 'Quoted' => 'Angeboten',
+ 'RFQ' => 'Anfrage',
+ 'RFQ Number' => 'Anfragenummer',
+ 'RFQs' => 'Anfragen',
+ 'ROP' => 'Mindestlagerbestand',
+ 'Rate' => 'Rate',
+ 'Recd' => 'erhalten',
+ 'Receipt' => 'Zahlungseingang',
+ 'Receipt posted!' => 'Beleg gebucht!',
+ 'Receipts' => 'Zahlungseingänge',
+ 'Receivables' => 'Forderungen',
+ 'Receive Merchandise' => 'Waren einlagern',
+ 'Reconciliation' => 'Kontenabstimmung',
+ 'Record in' => 'Buchen auf',
+ 'Reference' => 'Referenz',
+ 'Reference missing!' => 'Referenz fehlt!',
+ 'Remaining' => 'Rest',
+ 'Reminder' => 'Erinnerung',
+ 'Remove' => 'entfernen',
+ 'Removed spoolfiles!' => 'Druckdateien entfernt!',
+ 'Removing marked entries from queue ...' => 'Markierte Einträge werden von der Warteschlange entfernt ...',
+ 'Report for' => 'Bericht für',
+ 'Reports' => 'Berichte',
+ 'Request for Quotation' => 'Anfrage',
+ 'Request for Quotations' => 'Anfragen',
+ 'Required by' => 'Lieferdatum',
+ 'Revenue' => 'Erlöskonto',
+ 'Revenue Account' => 'Erlöskonto',
+ 'SIC' => 'SIC',
+ 'SIC deleted!' => 'SIC gelöscht',
+ 'SIC saved!' => 'SIC gespeichert',
+ 'Sales Invoice' => 'Rechnung',
+ 'Sales Invoices' => 'Kundenrechnung',
+ 'Sales Order' => 'Auftrag',
+ 'Sales Orders' => 'Aufträge',
+ 'Salesman' => 'Vertreter',
+ 'Salesman missing!' => 'Vertreter fehlt!',
+ 'Salesperson' => 'Verkäufer',
+ 'Save' => 'Speichern',
+ 'Save and AP Transaction' => 'Speichern und Kreditorenbuchung erfassen',
+ 'Save and AR Transaction' => 'Speichern und Debitorenbuchung erfassen',
+ 'Save and Invoice' => 'Speichern und Rechnung erfassen',
+ 'Save and Order' => 'Speichern und Auftrag erfassen',
+ 'Save and Quotation' => 'Speichern und Angebot',
+ 'Save and RFQ' => 'Speichern und Lieferantenanfrage',
+ 'Save as new' => 'als neu speichern',
+ 'Save to File' => 'auf Festplatte speichern',
+ 'Screen' => 'Bildschirm',
+ 'Select' => 'auswählen',
+ 'Select a period' => 'Bitte Zeitraum auswählen',
+ 'Select all' => 'Alle auswählen',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sell Price' => 'Verkaufspreis',
+ 'Send by E-Mail' => 'Per eMail schicken',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Serial Number' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Service Items' => 'Dienstleistungen',
+ 'Service Number missing!' => 'Dienstleistungsnummer fehlt!',
+ 'Services' => 'Dienstleistungen',
+ 'Setup Templates' => 'Vorlagen auswählen',
+ 'Ship' => 'Lagerausgang',
+ 'Ship Merchandise' => 'Waren versenden',
+ 'Ship to' => 'Lieferadresse',
+ 'Ship via' => 'Transportmittel',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Shipping Date' => 'Lieferdatum',
+ 'Shipping Date missing!' => 'Lieferdatum fehlt.',
+ 'Shipping Point' => 'Versandort',
+ 'Shopartikel' => 'Shopartikel',
+ 'Short' => 'kurz',
+ 'Show' => 'Zeigen',
+ 'Signature' => 'Unterschrift',
+ 'Sold' => 'verkauft',
+ 'Soll- und Habenkonto sind gleich!' => 'Soll- und Habenkonto sind gleich!',
+ 'Source' => 'Beleg',
+ 'Split Credit' => 'Haben splitten',
+ 'Split Debit' => 'Soll splitten',
+ 'Spoolfile' => 'Druckdatei',
+ 'Standard Industrial Codes' => 'SIC',
+ 'Statement' => 'Sammelrechnung',
+ 'Statement Balance' => 'Sammelrechnungsbilanz',
+ 'Statement sent to' => 'Sammelrechnung verschickt an',
+ 'Statements sent to printer!' => 'Sammelrechnungen an Drucker geschickt!',
+ 'Steuerberater/-in' => 'Steuerberater/-in',
+ 'Steuernummer' => 'Steuernummer',
+ 'Steuernummer: ' => 'Steuernummer: ',
+ 'Steuersatz' => 'Steuersatz',
+ 'Still to post' => '',
+ 'Stock' => 'einlagern',
+ 'Stock Assembly' => 'Erzeugnis einlagern',
+ 'Storno' => 'Storno',
+ 'Straße' => 'Straße',
+ 'Street' => 'Straße',
+ 'Stylesheet' => 'Stilvorlage',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Supervisor' => 'Supervisor',
+ 'SysID' => 'SysID',
+ 'SysID1' => 'SysID1',
+ 'SysID2' => 'SysID2',
+ 'Sysid missing!' => 'Sysid fehlt!',
+ 'System' => 'System',
+ 'TOP100' => 'TOP100',
+ 'Tax' => 'Steuer',
+ 'Tax Accounts' => 'Steuerkonto',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'Tax Number' => 'Steuernummer',
+ 'Tax Number / SSN' => 'Steuernummer',
+ 'Tax collected' => 'vereinnahmte Steuer',
+ 'Tax paid' => 'Vorsteuer',
+ 'Taxable' => 'Steuerpflichtig',
+ 'Tel. : ' => 'Tel. : ',
+ 'Tel.: ' => 'Tel.: ',
+ 'Telefon' => 'Telefon',
+ 'Template saved!' => 'Schablone gespeichert!',
+ 'Templates' => 'Vorlagen',
+ 'Terms: Net' => 'Zahlungsziel',
+ 'The following Datasets are not in use and can be deleted' => 'Die folgenden Datenbanken sind nicht in Verwendung und können gelöscht werden',
+ 'The following Datasets need to be updated' => 'Folgende Datenbanken müssen aktualisiert werden',
+ 'The licensing module has been deactivated in lx-erp.conf.' => 'Das Lizenzverwaltungsmodul wurde in lx-erp.conf deaktiviert.',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!',
+ 'Title' => 'Titel',
+ 'To' => 'An',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => 'Um einer Gruppe einen neuen Benutzer hinzuzufügen, ändern und speichern Sie am einfachsten einen bestehenden Zugriffsnamen. Unter dem neuen Namen wird dann ein Benutzer mit denselben Einstellungen angelegt.',
+ 'Top 100' => 'Top 100',
+ 'Top 100 hinzufuegen' => 'Top 100 hinzufügen',
+ 'Top Level' => 'Hauptartikelbezeichnung',
+ 'Total' => 'Summe',
+ 'Trade Discount' => 'Rabatt',
+ 'Transaction Date missing!' => 'Buchungsdatum fehlt!',
+ 'Transaction deleted!' => 'Buchung gelöscht!',
+ 'Transaction posted!' => 'Buchung verbucht!',
+ 'Transaction reversal enforced for all dates' => 'Fehleintragungen müssen für jeden Zeitraum mit einer Kontraeintragung ausgebessert werden',
+ 'Transaction reversal enforced up to' => 'Fehleintragungen können bis zu dem angegebenen Zeitraum nur mit einer Kontraeintragung ausgebessert werden!',
+ 'Transfer' => 'Umlagerung',
+ 'Transfer Inventory' => 'Ware umlagern',
+ 'Transfer to' => 'umlagern nach',
+ 'Trial Balance' => 'Vergleichsbilanz',
+ 'Type of Business' => 'Kundentyp',
+ 'USt-IdNr.' => 'USt-IdNr.',
+ 'UStVA' => 'UStVA',
+ 'UStVA als PDF-Dokument' => 'UStVa als PDF-Dokument',
+ 'UStVa' => 'UStVa',
+ 'UStVa Einstellungen' => 'UStVa Einstellungen',
+ 'Umsatzsteuervoranmeldung' => 'Umsatzsteuervoranmeldung',
+ 'Unit' => 'Einheit',
+ 'Unit of measure' => 'Maßeinheit',
+ 'Unlock System' => 'System entsperren',
+ 'Update' => 'Erneuern',
+ 'Update Dataset' => 'Datenbank aktualisieren',
+ 'Updated' => 'Erneuert am',
+ 'Use Templates' => 'benutze Vorlagen',
+ 'User' => 'Benutzer',
+ 'User deleted!' => 'Benutzer gelöscht!',
+ 'User saved!' => 'Benutzer gespeichert!',
+ 'Username' => 'Benutzername',
+ 'Ust-IDNr' => 'USt-IdNr.',
+ 'Valid until' => 'gültig bis',
+ 'Vendor' => 'Lieferant',
+ 'Vendor Invoice' => 'Einkaufsrechnung',
+ 'Vendor Invoices' => 'Einkaufsrechnungen',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor deleted!' => 'Lieferant gelöscht!',
+ 'Vendor missing!' => 'Lieferant fehlt!',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Vendor saved!' => 'Lieferant gespeichert!',
+ 'Vendors' => 'Lieferanten',
+ 'Verfahren' => 'Verfahren',
+ 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)' => 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)',
+ 'Verrechnungseinheit' => 'Verrechnungseinheit',
+ 'Version' => 'Version',
+ 'View License' => 'Lizenz ansehen',
+ 'Von Konto: ' => 'von Konto: ',
+ 'Voranmeldezeitraum' => 'Voranmeldezeitraum',
+ 'Voranmeldungszeitraum' => 'Voranmeldungszeitraum',
+ 'Vorschau' => 'Vorschau',
+ 'WEBDAV-Zugriff' => 'WEBDAV-Zugriff',
+ 'Warehouse' => 'Lager',
+ 'Warehouse deleted!' => 'Das Lager wurde gelöscht.',
+ 'Warehouse saved!' => 'Das Lager wurde gespeichert.',
+ 'Warehouses' => 'Lager',
+ 'Weight' => 'Gewicht',
+ 'Weight Unit' => 'Gewichtseinheit',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'YYYY' => 'JJJJ',
+ 'Year' => 'Jahr',
+ 'Year End' => 'Jahresende',
+ 'Yearly' => 'jährlich',
+ 'Yes' => 'Ja',
+ 'You are logged out!' => 'Auf Wiedersehen!',
+ 'You did not enter a name!' => 'Sie haben keinen Namen eingegeben!',
+ 'You must enter a host and port for local and remote connections!' => '"Rechner" und "Port" müssen für lokale und externe Verbindungen eingetragen werden!',
+ 'Zeitraum' => 'Zeitraum',
+ 'Zipcode' => 'PLZ',
+ 'accrual' => 'Bilanzierung (Soll-Versteuerung)',
+ 'as at' => 'zum Stand',
+ 'back' => 'zurück',
+ 'bis' => 'bis',
+ 'button' => '?',
+ 'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)',
+ 'choice' => 'auswählen',
+ 'choice part' => 'Artikel auswählen',
+ 'config' => 'Konfiguration',
+ 'continue' => 'weiter',
+ 'days' => 'Tage',
+ 'debug' => 'Debug',
+ 'does not exist' => 'existiert nicht',
+ 'done' => 'erledigt',
+ 'ea' => 'Stk',
+ 'emailed to' => 'gemailt an',
+ 'for Period' => 'für den Zeitraum',
+ 'hr' => 'Stunde',
+ 'is already a member!' => 'ist bereits ein Mitglied!',
+ 'list' => 'auflisten',
+ 'localhost' => 'lokaler Rechner',
+ 'month' => 'monatliche Abgabe',
+ 'number' => 'Nummer',
+ 'posted!' => 'gebucht',
+ 'quarter' => 'vierteljährliche (quartalsweise) Abgabe',
+ 'save' => 'speichern',
+ 'saved' => 'gespeichert',
+ 'saved!' => 'gespeichert',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+ 'soldtotal' => 'verkaufte Anzahl',
+ 'successfully created!' => 'wurde erfolgreich erstellt',
+ 'successfully deleted!' => 'wurde erfolgreich gelöscht',
+ 'test' => 'test',
+ 'ustva' => 'UStVA',
+ 'website' => 'Webseite',
+ 'winston_export' => 'Winston-Export',
+ 'Öffnungszeiten' => 'Öffnungszeiten',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Einkauf',
+ 'AR' => 'Verkauf',
+ 'Account' => 'Konto',
+ 'Account Number' => 'Kontonummer',
+ 'Account Number missing!' => 'Kontonummer fehlt!',
+ 'Account Type' => 'Kontoart',
+ 'Account Type missing!' => 'Kontoart fehlt!',
+ 'Account deleted!' => 'Konto gelöscht!',
+ 'Account saved!' => 'Konto gespeichert!',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add' => 'Erfassen',
+ 'Add Account' => 'Konto erfassen',
+ 'Add Business' => 'Kundentyp erfassen',
+ 'Add Department' => 'Abteilung erfassen',
+ 'Add GIFI' => 'GIFI erfassen',
+ 'Add SIC' => 'SIC erfassen',
+ 'Add Warehouse' => 'Lager erfassen',
+ 'Address' => 'Adresse',
+ 'Asset' => 'Aktiva',
+ 'Audit Control' => 'Bücherkontrolle',
+ 'BWA' => 'BWA',
+ 'Backup sent to' => 'Eine Sicherungskopie wurde gesandt an',
+ 'Bilanz' => 'Bilanz',
+ 'Books are open' => 'Die Bücher sind geöffnet.',
+ 'Business Number' => 'Firmennummer',
+ 'Business deleted!' => 'Firma gelöscht.',
+ 'Business saved!' => 'Firma gespeichert.',
+ 'COGS' => 'Umsatzkosten',
+ 'Cannot delete account!' => 'Konto kann nicht gelöscht werden!',
+ 'Cannot delete default account!' => 'Das Standard-Konto kann nicht gelöscht werden!',
+ 'Cannot save account!' => 'Konto kann nicht gespeichert werden!',
+ 'Cannot save preferences!' => 'Benutzereinstellungen können nicht gespeichert werden!',
+ 'Character Set' => 'Zeichensatz',
+ 'Chart of Accounts' => 'Kontenübersicht',
+ 'Close Books up to' => 'Die Bücher abschließen bis zum',
+ 'Code' => 'kode',
+ 'Code missing!' => 'kode fehlt!',
+ 'Company' => 'Firma',
+ 'Continue' => 'Weiter',
+ 'Copy to COA' => 'In Kontenplan kopieren',
+ 'Cost Center' => 'Kostenstelle',
+ 'Credit' => 'Haben',
+ 'Customernumberinit' => 'Kundennummernkreis',
+ 'Date Format' => 'Datumsformat',
+ 'Debit' => 'Soll',
+ 'Delete' => 'Löschen',
+ 'Delete Account' => 'Konto löschen',
+ 'Department deleted!' => 'Abteilung gelöscht.',
+ 'Department saved!' => 'Abteilung gespeichert.',
+ 'Departments' => 'Abteilungen',
+ 'Description' => 'Beschreibung',
+ 'Description missing!' => 'Beschreibung fehlt.',
+ 'Discount' => 'Rabatt',
+ 'Dropdown Limit' => 'Auswahllistenbegrenzung',
+ 'E-mail' => 'eMail',
+ 'Edit' => 'Bearbeiten',
+ 'Edit Account' => 'Kontodaten bearbeiten',
+ 'Edit Business' => 'Kundentyp bearbeiten',
+ 'Edit Department' => 'Abteilung bearbeiten',
+ 'Edit GIFI' => 'GIFI editieren',
+ 'Edit Preferences for' => 'Benutzereinstellungen für',
+ 'Edit SIC' => 'SIC bearbeiten',
+ 'Edit Template' => 'Vorlage bearbeiten',
+ 'Edit Warehouse' => 'Lager bearbeiten',
+ 'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte Währungskürzel mit maximal 3 Buchstaben aufführen; Ihre eigene LandesWährung zuerst (z.B. EUR:USD:CAD)',
+ 'Equity' => 'Passiva',
+ 'Expense' => 'Aufwandskonto',
+ 'Expense Account' => 'Aufwandskonto',
+ 'Expense/Asset' => 'Aufwand/Anlagen',
+ 'EÜR' => 'EÜR',
+ 'Fax' => 'Fax',
+ 'Foreign Exchange Gain' => 'Wechselkurserträge',
+ 'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
+ 'GIFI' => 'GIFI',
+ 'GIFI deleted!' => 'GIFI gelöscht!',
+ 'GIFI missing!' => 'GIFI fehlt!',
+ 'GIFI saved!' => 'GIFI gespeichert!',
+ 'Heading' => 'Überschrift',
+ 'Include in drop-down menus' => 'In Aufklappmenü aufnehmen',
+ 'Inventory' => 'Inventar',
+ 'Inventory Account' => 'Warenbestand',
+ 'Is this a summary account to record' => 'Summenkonto für',
+ 'Language' => 'Sprache',
+ 'Last Article Number' => 'Letzte Artikelnummer',
+ 'Last Customer Number' => 'Letzte Kundennummer',
+ 'Last Invoice Number' => 'Letzte Rechnungsnummer',
+ 'Last Numbers & Default Accounts' => 'Laufende Zähler und Standardkonten',
+ 'Last Purchase Order Number' => 'Letzte Lieferantenbestellnummer',
+ 'Last RFQ Number' => 'Letzte Anfragenummer',
+ 'Last Sales Order Number' => 'Letzte Kundenbestellnummer',
+ 'Last Sales Quotation Number' => 'Letzte Angebotsnummer',
+ 'Last Service Number' => 'Letzte Dienstleistungsnr.',
+ 'Last Vendor Number' => 'Letzte Lieferantennummer',
+ 'Liability' => 'Passiva',
+ 'Link' => 'Verknüpfungen',
+ 'Name' => 'Name',
+ 'No' => 'Nein',
+ 'No email address for' => 'Keine eMailaddresse für',
+ 'Number' => 'Nummer',
+ 'Number Format' => 'Zahlenformat',
+ 'Parts Inventory' => 'Warenliste',
+ 'Password' => 'Passwort',
+ 'Payables' => 'Verbindlichkeiten',
+ 'Payment' => 'Zahlungsausgang',
+ 'Phone' => 'Telefon',
+ 'Preferences saved!' => 'Einstellungen gespeichert!',
+ 'Profit Center' => 'Erfolgsreich',
+ 'Rate' => 'Rate',
+ 'Receipt' => 'Zahlungseingang',
+ 'Receivables' => 'Forderungen',
+ 'Revenue' => 'Erlöskonto',
+ 'Revenue Account' => 'Erlöskonto',
+ 'SIC deleted!' => 'SIC gelöscht',
+ 'SIC saved!' => 'SIC gespeichert',
+ 'Salesman' => 'Vertreter',
+ 'Save' => 'Speichern',
+ 'Service Items' => 'Dienstleistungen',
+ 'Signature' => 'Unterschrift',
+ 'Standard Industrial Codes' => 'SIC',
+ 'Steuersatz' => 'Steuersatz',
+ 'Stylesheet' => 'Stilvorlage',
+ 'Tax' => 'Steuer',
+ 'Tax Accounts' => 'Steuerkonto',
+ 'Template saved!' => 'Schablone gespeichert!',
+ 'Transaction reversal enforced for all dates' => 'Fehleintragungen müssen für jeden Zeitraum mit einer Kontraeintragung ausgebessert werden',
+ 'Transaction reversal enforced up to' => 'Fehleintragungen können bis zu dem angegebenen Zeitraum nur mit einer Kontraeintragung ausgebessert werden!',
+ 'Type of Business' => 'Kundentyp',
+ 'Umsatzsteuervoranmeldung' => 'Umsatzsteuervoranmeldung',
+ 'Warehouse deleted!' => 'Das Lager wurde gelöscht.',
+ 'Warehouse saved!' => 'Das Lager wurde gespeichert.',
+ 'Warehouses' => 'Lager',
+ 'Weight Unit' => 'Gewichtseinheit',
+ 'Year End' => 'Jahresende',
+ 'Yes' => 'Ja',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'account_header' => 'account_header',
+ 'add' => 'add',
+ 'add_account' => 'add_account',
+ 'add_business' => 'add_business',
+ 'add_department' => 'add_department',
+ 'add_gifi' => 'add_gifi',
+ 'add_sic' => 'add_sic',
+ 'add_warehouse' => 'add_warehouse',
+ 'audit_control' => 'audit_control',
+ 'backup' => 'backup',
+ 'business_header' => 'business_header',
+ 'config' => 'config',
+ 'continue' => 'continue',
+ 'copy_to_coa' => 'copy_to_coa',
+ 'delete' => 'delete',
+ 'delete_account' => 'delete_account',
+ 'delete_business' => 'delete_business',
+ 'delete_department' => 'delete_department',
+ 'delete_gifi' => 'delete_gifi',
+ 'delete_sic' => 'delete_sic',
+ 'delete_warehouse' => 'delete_warehouse',
+ 'department_header' => 'department_header',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_stylesheet' => 'display_stylesheet',
+ 'doclose' => 'doclose',
+ 'edit' => 'edit',
+ 'edit_account' => 'edit_account',
+ 'edit_business' => 'edit_business',
+ 'edit_department' => 'edit_department',
+ 'edit_gifi' => 'edit_gifi',
+ 'edit_sic' => 'edit_sic',
+ 'edit_template' => 'edit_template',
+ 'edit_warehouse' => 'edit_warehouse',
+ 'form_footer' => 'form_footer',
+ 'gifi_footer' => 'gifi_footer',
+ 'gifi_header' => 'gifi_header',
+ 'list_account' => 'list_account',
+ 'list_business' => 'list_business',
+ 'list_department' => 'list_department',
+ 'list_gifi' => 'list_gifi',
+ 'list_sic' => 'list_sic',
+ 'list_warehouse' => 'list_warehouse',
+ 'save' => 'save',
+ 'save_account' => 'save_account',
+ 'save_business' => 'save_business',
+ 'save_department' => 'save_department',
+ 'save_gifi' => 'save_gifi',
+ 'save_preferences' => 'save_preferences',
+ 'save_sic' => 'save_sic',
+ 'save_template' => 'save_template',
+ 'save_warehouse' => 'save_warehouse',
+ 'section_menu' => 'section_menu',
+ 'sic_header' => 'sic_header',
+ 'warehouse_header' => 'warehouse_header',
+ 'erfassen' => 'add',
+ 'konto_erfassen' => 'add_account',
+ 'weiter' => 'continue',
+ 'in_kontenplan_kopieren' => 'copy_to_coa',
+ 'löschen' => 'delete',
+ 'bearbeiten' => 'edit',
+ 'kontodaten_bearbeiten' => 'edit_account',
+ 'speichern' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Kreditorenbuchung',
+ 'AP Transactions' => 'Kreditorenbuchungen',
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Accounts Payables Transaction' => 'Kreditorenbuchung erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Amount Due' => 'Betrag fällig',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bis' => 'bis',
+ 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!',
+ 'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
+ 'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!',
+ 'Cannot post transaction!' => 'Rechnung kann nicht gebucht werden!',
+ 'Closed' => 'Geschlossen',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Continue' => 'Weiter',
+ 'Correct Tax' => 'Steuer anpassen',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Currency' => 'Währung',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Date Paid' => 'Zahlungsdatum',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Due Date' => 'Fälligkeitsdatum',
+ 'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
+ 'Edit Accounts Payables Transaction' => 'Kreditorenbuchung bearbeiten',
+ 'Employee' => 'Bearbeiter',
+ 'Exch' => 'Wechselkurs.',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'ID' => 'Buchungsnummer',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date' => 'Rechnungsdatum',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Open' => 'Offen',
+ 'Order' => 'Auftrag',
+ 'Order Number' => 'Auftragsnummer',
+ 'Paid' => 'bezahlt',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Payments' => 'Zahlungsausgänge',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Project' => 'Projekt',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Remaining' => 'Rest',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Source' => 'Beleg',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax' => 'Steuer',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'Total' => 'Summe',
+ 'Transaction deleted!' => 'Buchung gelöscht!',
+ 'Transaction posted!' => 'Buchung verbucht!',
+ 'Update' => 'Erneuern',
+ 'Vendor' => 'Lieferant',
+ 'Vendor Invoice' => 'Einkaufsrechnung',
+ 'Vendor missing!' => 'Lieferant fehlt!',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Yes' => 'Ja',
+ 'button' => '?',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_subtotal' => 'ap_subtotal',
+ 'ap_transaction' => 'ap_transaction',
+ 'ap_transactions' => 'ap_transactions',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'kreditorenbuchung' => 'ap_transaction',
+ 'kreditorenbuchung_erfassen' => 'add_accounts_payables_transaction',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'kreditorenbuchung_bearbeiten' => 'edit_accounts_payables_transaction',
+ 'buchen' => 'post',
+ 'neu_buchen' => 'post_as_new',
+ 'erneuern' => 'update',
+ 'einkaufsrechnung' => 'vendor_invoice',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AR Transaction' => 'Debitorenbuchung',
+ 'AR Transactions' => 'Debitorenbuchungen',
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Accounts Receivables Transaction' => 'Debitorenbuchung erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Amount Due' => 'Betrag fällig',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bis' => 'bis',
+ 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!',
+ 'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
+ 'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!',
+ 'Cannot post transaction!' => 'Rechnung kann nicht gebucht werden!',
+ 'Closed' => 'Geschlossen',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Continue' => 'Weiter',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Currency' => 'Währung',
+ 'Customer' => 'Kunde',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Date Paid' => 'Zahlungsdatum',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Due Date' => 'Fälligkeitsdatum',
+ 'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
+ 'Edit Accounts Receivables Transaction' => 'Debitorenbuchung bearbeiten',
+ 'Exch' => 'Wechselkurs.',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'ID' => 'Buchungsnummer',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Incoming Payments' => 'Zahlungseingänge',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date' => 'Rechnungsdatum',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Open' => 'Offen',
+ 'Order' => 'Auftrag',
+ 'Order Number' => 'Auftragsnummer',
+ 'Paid' => 'bezahlt',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Project' => 'Projekt',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Remaining' => 'Rest',
+ 'Sales Invoice' => 'Rechnung',
+ 'Salesperson' => 'Verkäufer',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Ship via' => 'Transportmittel',
+ 'Shipping Point' => 'Versandort',
+ 'Source' => 'Beleg',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax' => 'Steuer',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'Total' => 'Summe',
+ 'Transaction deleted!' => 'Buchung gelöscht!',
+ 'Transaction posted!' => 'Buchung verbucht!',
+ 'Update' => 'Erneuern',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Yes' => 'Ja',
+ 'button' => '?',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_subtotal' => 'ar_subtotal',
+ 'ar_transaction' => 'ar_transaction',
+ 'ar_transactions' => 'ar_transactions',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'debitorenbuchung' => 'ar_transaction',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'buchen' => 'post',
+ 'neu_buchen' => 'post_as_new',
+ 'rechnung' => 'sales_invoice',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Address' => 'Adresse',
+ 'Continue' => 'Weiter',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Description' => 'Beschreibung',
+ 'Number' => 'Nummer',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'weiter' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Are you sure you want to remove the marked entries from the queue?' => 'Sind Sie sicher, dass die markierten Einträge von der Warteschlange gelöscht werden sollen?',
+ 'Bis' => 'bis',
+ 'Cannot remove files!' => 'Dateien können nicht gelöscht werden!',
+ 'Checks' => 'Schecks',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Continue' => 'Weiter',
+ 'Customer' => 'Kunde',
+ 'Date' => 'Datum',
+ 'From' => 'von',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Marked entries printed!' => 'Markierte Einträge wurden gedruckt!',
+ 'Order' => 'Auftrag',
+ 'Order Number' => 'Auftragsnummer',
+ 'Packing Lists' => 'Lieferschein',
+ 'Print' => 'Drucken',
+ 'Printing ... ' => 'Es wird gedruckt.',
+ 'Purchase Orders' => 'Lieferantenaufträge',
+ 'Quotation' => 'Angebot',
+ 'Quotation Number' => 'Angebotsnummer',
+ 'Quotations' => 'Angebote',
+ 'RFQs' => 'Anfragen',
+ 'Receipts' => 'Zahlungseingänge',
+ 'Reference' => 'Referenz',
+ 'Remove' => 'entfernen',
+ 'Removed spoolfiles!' => 'Druckdateien entfernt!',
+ 'Removing marked entries from queue ...' => 'Markierte Einträge werden von der Warteschlange entfernt ...',
+ 'Sales Invoices' => 'Kundenrechnung',
+ 'Sales Orders' => 'Aufträge',
+ 'Select all' => 'Alle auswählen',
+ 'Spoolfile' => 'Druckdatei',
+ 'To' => 'An',
+ 'Vendor' => 'Lieferant',
+ 'Yes' => 'Ja',
+ 'button' => '?',
+ 'done' => 'erledigt',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'continue' => 'continue',
+ 'display' => 'display',
+ 'list_spool' => 'list_spool',
+ 'print' => 'print',
+ 'remove' => 'remove',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_all' => 'select_all',
+ 'yes' => 'yes',
+ 'weiter' => 'continue',
+ 'drucken' => 'print',
+ 'entfernen' => 'remove',
+ 'alle_auswählen' => 'select_all',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Konto',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Bilanz',
+ 'Chart of Accounts' => 'Kontenübersicht',
+ 'Credit' => 'Haben',
+ 'Date' => 'Datum',
+ 'Debit' => 'Soll',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'GIFI' => 'GIFI',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'List Transactions' => 'Buchungsliste',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Project Number' => 'Projektnummer',
+ 'Reference' => 'Referenz',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Subtotal' => 'Zwischensumme',
+ 'To' => 'An',
+};
+
+$self{subs} = {
+ 'ca_subtotal' => 'ca_subtotal',
+ 'chart_of_accounts' => 'chart_of_accounts',
+ 'list' => 'list',
+ 'list_transactions' => 'list_transactions',
+ 'buchungsliste' => 'list_transactions',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Einkauf',
+ 'AR' => 'Verkauf',
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Address' => 'Adresse',
+ 'All' => 'Alle',
+ 'Amount' => 'Betrag',
+ 'Cannot post Payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot post Receipt!' => 'Beleg kann nicht gebucht werden!',
+ 'Cannot post payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot process payment for a closed period!' => 'Es kann keine Zahlung in einem abgeschlossenen Zeitraum verbucht werden!',
+ 'Continue' => 'Weiter',
+ 'Currency' => 'Währung',
+ 'Customer' => 'Kunde',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Date missing!' => 'Datum fehlt!',
+ 'Department' => 'Abteilung',
+ 'Deposit' => 'Gutschrift',
+ 'Description' => 'Beschreibung',
+ 'Due' => 'Fällig',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Invoice' => 'Rechnung',
+ 'Invoices' => 'Rechnungen',
+ 'Memo' => 'Memo',
+ 'Number' => 'Nummer',
+ 'PDF' => 'PDF',
+ 'Payment' => 'Zahlungsausgang',
+ 'Payment posted!' => 'Zahlung gebucht!',
+ 'Post' => 'Buchen',
+ 'Postscript' => 'Postscript',
+ 'Prepayment' => 'Vorauszahlung',
+ 'Print' => 'Drucken',
+ 'Printer' => 'Drucker',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Queue' => 'Warteschlange',
+ 'Receipt' => 'Zahlungseingang',
+ 'Receipt posted!' => 'Beleg gebucht!',
+ 'Screen' => 'Bildschirm',
+ 'Select' => 'auswählen',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Source' => 'Beleg',
+ 'Update' => 'Erneuern',
+ 'Vendor' => 'Lieferant',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'button' => '?',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'display' => 'display',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'list_invoices' => 'list_invoices',
+ 'name_selected' => 'name_selected',
+ 'payment' => 'payment',
+ 'post' => 'post',
+ 'print' => 'print',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'section_menu' => 'section_menu',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'weiter' => 'continue',
+ 'buchen' => 'post',
+ 'drucken' => 'print',
+ 'erneuern' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Abteilung' => 'Abteilung',
+ 'Account Number' => 'Kontonummer',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add' => 'Erfassen',
+ 'Add Customer' => 'Kunde erfassen',
+ 'Add Vendor' => 'Lieferant erfassen',
+ 'Address' => 'Adresse',
+ 'All' => 'Alle',
+ 'Bank' => 'Bank',
+ 'Bank Code Number' => 'Bankleitzahl',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Cannot delete customer!' => 'Kunde kann nicht gelöscht werden!',
+ 'Cannot delete vendor!' => 'Lieferant kann nicht gelöscht werden!',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Contact' => 'Kontakt',
+ 'Contact Person' => 'Ansprechpartner',
+ 'Continue' => 'Weiter',
+ 'Country' => 'Land',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer deleted!' => 'Kunde gelöscht!',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Customer saved!' => 'Kunde gespeichert!',
+ 'Customers' => 'Kunden',
+ 'Delete' => 'Löschen',
+ 'Discount' => 'Rabatt',
+ 'E-mail' => 'eMail',
+ 'Edit Customer' => 'Kunde editieren',
+ 'Edit Vendor' => 'Lieferant editieren',
+ 'Fax' => 'Fax',
+ 'GIFI' => 'GIFI',
+ 'Given Name' => 'Vorname',
+ 'Greeting' => 'Anrede',
+ 'Homepage' => 'Homepage',
+ 'ID' => 'Buchungsnummer',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Invoice' => 'Rechnung',
+ 'Invoices' => 'Rechnungen',
+ 'KNr. beim Kunden' => 'KNr. beim Kunden',
+ 'Kundennummer' => 'Kundennummer',
+ 'Language' => 'Sprache',
+ 'Name' => 'Name',
+ 'Name missing!' => 'Name fehlt!',
+ 'Notes' => 'Bemerkungen',
+ 'Number' => 'Nummer',
+ 'Obsolete' => 'Ungültig',
+ 'Order' => 'Auftrag',
+ 'Orders' => 'Aufträge',
+ 'Orphaned' => 'nie benutzt',
+ 'Password' => 'Passwort',
+ 'Phone' => 'Telefon',
+ 'Phone1' => 'Telefon 1 ',
+ 'Phone2' => 'Telefon 2',
+ 'Quotation' => 'Angebot',
+ 'Quotations' => 'Angebote',
+ 'SIC' => 'SIC',
+ 'Salesman' => 'Vertreter',
+ 'Salesman missing!' => 'Vertreter fehlt!',
+ 'Save' => 'Speichern',
+ 'Save and AP Transaction' => 'Speichern und Kreditorenbuchung erfassen',
+ 'Save and AR Transaction' => 'Speichern und Debitorenbuchung erfassen',
+ 'Save and Invoice' => 'Speichern und Rechnung erfassen',
+ 'Save and Order' => 'Speichern und Auftrag erfassen',
+ 'Save and Quotation' => 'Speichern und Angebot',
+ 'Save and RFQ' => 'Speichern und Lieferantenanfrage',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Street' => 'Straße',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'Tax Number' => 'Steuernummer',
+ 'Tax Number / SSN' => 'Steuernummer',
+ 'Taxable' => 'Steuerpflichtig',
+ 'Terms: Net' => 'Zahlungsziel',
+ 'Title' => 'Titel',
+ 'Type of Business' => 'Kundentyp',
+ 'USt-IdNr.' => 'USt-IdNr.',
+ 'Update' => 'Erneuern',
+ 'Username' => 'Benutzername',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor deleted!' => 'Lieferant gelöscht!',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Vendor saved!' => 'Lieferant gespeichert!',
+ 'Vendors' => 'Lieferanten',
+ 'Zipcode' => 'PLZ',
+ 'days' => 'Tage',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'check_salesman' => 'check_salesman',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'list_names' => 'list_names',
+ 'salesman_selected' => 'salesman_selected',
+ 'save' => 'save',
+ 'save_and_ap_transaction' => 'save_and_ap_transaction',
+ 'save_and_ar_transaction' => 'save_and_ar_transaction',
+ 'save_and_invoice' => 'save_and_invoice',
+ 'save_and_order' => 'save_and_order',
+ 'save_and_quotation' => 'save_and_quotation',
+ 'save_and_rfq' => 'save_and_rfq',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_salesman' => 'select_salesman',
+ 'update' => 'update',
+ 'erfassen' => 'add',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'speichern' => 'save',
+ 'speichern_und_kreditorenbuchung_erfassen' => 'save_and_ap_transaction',
+ 'speichern_und_debitorenbuchung_erfassen' => 'save_and_ar_transaction',
+ 'speichern_und_rechnung_erfassen' => 'save_and_invoice',
+ 'speichern_und_auftrag_erfassen' => 'save_and_order',
+ 'speichern_und_angebot' => 'save_and_quotation',
+ 'speichern_und_lieferantenanfrage' => 'save_and_rfq',
+ 'erneuern' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Abrechnungsnummer' => 'Abrechnungsnummer',
+ 'April' => 'April',
+ 'August' => 'August',
+ 'Beratername' => 'Beratername',
+ 'Beraternummer' => 'Beraternummer',
+ 'Bis Konto: ' => 'bis Konto: ',
+ 'Continue' => 'Weiter',
+ 'DATEV Angaben' => 'DATEV-Angaben',
+ 'DATEX - Export Assistent' => 'DATEV-Exportassistent',
+ 'DFV-Kennzeichen' => 'DFV-Kennzeichen',
+ 'Datenträgernummer' => 'Datenträgernummer',
+ 'Datum von' => 'Datum von',
+ 'December' => 'Dezember',
+ 'Export Buchungsdaten' => 'Export Buchungsdaten',
+ 'Export Stammdaten' => 'Export Stammdaten',
+ 'February' => 'Februar',
+ 'I' => 'I',
+ 'II' => 'II',
+ 'III' => 'III',
+ 'IV' => 'IV',
+ 'January' => 'Januar',
+ 'July' => 'Juli',
+ 'June' => 'Juni',
+ 'KNE Export erfolgreich!' => 'KNE-Export erfolgreich!',
+ 'Konten' => 'Konten',
+ 'Kontonummernerweiterung (KNE)' => 'Kontonummernerweiterung (KNE)',
+ 'Mandantennummer' => 'Mandantennummer',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'Monat' => 'Monat',
+ 'November' => 'November',
+ 'OBE Export erfolgreich!' => 'OBE-Export erfolgreich!',
+ 'October' => 'Oktober',
+ 'Password' => 'Passwort',
+ 'Quartal' => 'Quartal',
+ 'September' => 'September',
+ 'Von Konto: ' => 'von Konto: ',
+ 'Zeitraum' => 'Zeitraum',
+ 'bis' => 'bis',
+};
+
+$self{subs} = {
+ 'continue' => 'continue',
+ 'export' => 'export',
+ 'export2' => 'export2',
+ 'export3' => 'export3',
+ 'export_bewegungsdaten' => 'export_bewegungsdaten',
+ 'export_stammdaten' => 'export_stammdaten',
+ 'weiter' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Address' => 'Adresse',
+ 'Angaben zum Finanzamt' => 'Angaben zum Finanzamt',
+ 'Bankleitzahl (BLZ)' => 'Bankleitzahl (BLZ)',
+ 'Bankleitzahl (BLZ) 1' => 'Bankleitzahl (BLZ) 1',
+ 'Bankleitzahl (BLZ) 2' => 'Bankleitzahl (BLZ) 2',
+ 'Bankverbindung des Finanzamts' => 'Bankverbindung des Finanzamts',
+ 'Bankverbindungen des Finanzamts' => 'Bankverbindungen des Finanzamts',
+ 'Bei der Anfertigung dieser Steueranmeldung hat mitgewirkt (Zeilen 78 bis 82)' => 'Bei der Anfertigung dieser Steueranmeldung hat mitgewirkt (Zeilen 78 bis 82)',
+ 'Bitte Angaben überprüfen' => 'Bitte Angaben überprüfen',
+ 'Bitte alle Angaben überprüfen' => 'Bitte alle Angaben überprüfen',
+ 'Bitte eine Steuernummer angeben' => 'Bitte eine Steuernummer angeben',
+ 'Continue' => 'Weiter',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Description' => 'Artikelbezeichnung',
+ 'Fax' => 'Fax',
+ 'Finanzamt' => 'Finanzamt',
+ 'Finanzamt - Einstellungen' => 'Finanzamt - Einstellungen',
+ 'Internet' => 'Internet',
+ 'Kontonummer' => 'Kontonummer',
+ 'Kontonummer 1' => 'Kontonummer 1',
+ 'Kontonummer 2' => 'Kontonummer 2',
+ 'Kreditinstitut' => 'Kreditinstitut',
+ 'Kreditinstitut 1' => 'Kreditinstitut 1',
+ 'Kreditinstitut 2' => 'Kreditinstitut 2',
+ 'Number' => 'Artikelnummer',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Sonstige Angaben zur UStVA' => 'Sonstige Angaben zur UStVA',
+ 'Steuernummer' => 'Steuernummer',
+ 'Telefon' => 'Telefon',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Verfahren' => 'Verfahren',
+ 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)' => 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)',
+ 'Voranmeldungszeitraum' => 'Voranmeldungszeitraum',
+ 'accrual' => 'Bilanzierung (Soll-Versteuerung)',
+ 'back' => 'zurück',
+ 'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)',
+ 'continue' => 'weiter',
+ 'debug' => 'Debug',
+ 'month' => 'monatliche Abgabe',
+ 'quarter' => 'vierteljährliche (quartalsweise) Abgabe',
+ 'save' => 'speichern',
+ 'saved' => 'gespeichert',
+ 'Öffnungszeiten' => 'Öffnungszeiten',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'back' => 'back',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_steuernummer' => 'create_steuernummer',
+ 'create_winston' => 'create_winston',
+ 'debug' => 'debug',
+ 'edit' => 'edit',
+ 'edit_form' => 'edit_form',
+ 'get_config' => 'get_config',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'save' => 'save',
+ 'save_winston' => 'save_winston',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'show_fa_daten' => 'show_fa_daten',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'weiter' => 'continue',
+ 'zurück' => 'back',
+ 'weiter' => 'continue',
+ 'debug' => 'debug',
+ 'speichern' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Kreditorenbuchung',
+ 'AR Transaction' => 'Debitorenbuchung',
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add General Ledger Transaction' => 'Dialogbuchen',
+ 'Address' => 'Adresse',
+ 'All' => 'Alle',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
+ 'Asset' => 'Aktiva',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Bilanz',
+ 'Belegnummer' => 'Buchungsnummer',
+ 'Betrag' => 'Betrag',
+ 'Bis' => 'bis',
+ 'Buchungsdatum' => 'Buchungsdatum',
+ 'Buchungsjournal' => 'Buchungsjournal',
+ 'Cannot delete transaction!' => 'Buchung kann nicht gelöscht werden!',
+ 'Cannot have a value in both Debit and Credit!' => 'Es kann nicht gleichzeitig Soll und Haben gebucht werden!',
+ 'Cannot post a transaction without a value!' => 'Eine Buchung ohne Betrag kann nicht vorgenommen werden!',
+ 'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!',
+ 'Close' => 'Close',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Continue' => 'Weiter',
+ 'Contra' => 'gegen',
+ 'Credit' => 'Haben',
+ 'Credit Account' => 'Habenkonto',
+ 'Credit Tax' => 'Umsatzsteuer',
+ 'Credit Tax Account' => 'Umsatzsteuerkonto',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Debit' => 'Soll',
+ 'Debit Account' => 'Sollkonto',
+ 'Debit Tax' => 'Vorsteuer',
+ 'Debit Tax Account' => 'Vorsteuerkonto',
+ 'Debit and credit out of balance!' => 'Soll und Haben müssen gleich sein.',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Description missing!' => 'Beschreibung fehlt.',
+ 'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
+ 'Equity' => 'Passiva',
+ 'Expense' => 'Aufwandskonto',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'GIFI' => 'GIFI',
+ 'GL Transaction' => 'Dialogbuchung',
+ 'General Ledger' => 'Finanzbuchhaltung',
+ 'ID' => 'Buchungsnummer',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Keine Steuerautomatik möglich!' => 'Keine Steuerautomatik möglich!',
+ 'Liability' => 'Passiva',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Mitarbeiter' => 'Mitarbeiter',
+ 'MwSt. inkl.' => 'MwSt. inkl.',
+ 'New Account' => 'New Account',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Reference' => 'Referenz',
+ 'Reference missing!' => 'Referenz fehlt!',
+ 'Revenue' => 'Erlöskonto',
+ 'Sales Invoice' => 'Rechnung',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Soll- und Habenkonto sind gleich!' => 'Soll- und Habenkonto sind gleich!',
+ 'Source' => 'Beleg',
+ 'Split Credit' => 'Haben splitten',
+ 'Split Debit' => 'Soll splitten',
+ 'Still to post' => 'Still to post',
+ 'Storno' => 'Storno',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax' => 'Steuer',
+ 'Transaction Date missing!' => 'Buchungsdatum fehlt!',
+ 'Transaction deleted!' => 'Buchung gelöscht!',
+ 'Update' => 'Erneuern',
+ 'Vendor Invoice' => 'Einkaufsrechnung',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Yes' => 'Ja',
+ 'button' => '?',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'close' => 'close',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_split_credit' => 'display_split_credit',
+ 'display_split_debit' => 'display_split_debit',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'generate_report' => 'generate_report',
+ 'gl_subtotal' => 'gl_subtotal',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'new_account' => 'new_account',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'split_credit' => 'split_credit',
+ 'split_debit' => 'split_debit',
+ 'storno' => 'storno',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'kreditorenbuchung' => 'ap_transaction',
+ 'debitorenbuchung' => 'ar_transaction',
+ 'close' => 'close',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'dialogbuchung' => 'gl_transaction',
+ 'new_account' => 'new_account',
+ 'buchen' => 'post',
+ 'neu_buchen' => 'post_as_new',
+ 'rechnung' => 'sales_invoice',
+ 'haben_splitten' => 'split_credit',
+ 'soll_splitten' => 'split_debit',
+ 'storno' => 'storno',
+ 'erneuern' => 'update',
+ 'einkaufsrechnung' => 'vendor_invoice',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Active' => 'Aktiv',
+ 'Add' => 'Erfassen',
+ 'Add Assembly' => 'Erzeugnis erfassen',
+ 'Add Part' => 'Ware erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Service' => 'Dienstleistung erfassen',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Assemblies' => 'Erzeugnisse',
+ 'Assemblies restocked!' => 'Erzeugnisse sind im Lager!',
+ 'Assembly Number missing!' => 'Erzeugnisnummer fehlt!',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'BOM' => 'Stückliste',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Bought' => 'gekauft',
+ 'COGS' => 'Umsatzkosten',
+ 'Cannot delete item!' => 'Artikel kann nicht gelöscht werden!',
+ 'Cannot stock assemblies!' => 'Erzeugnisse können nicht ins Lager!',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Country' => 'Land',
+ 'Customer Number' => 'Kundennummer',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Discount' => 'Rabatt',
+ 'Drawing' => 'Zeichnung',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Edit Assembly' => 'Erzeugnis bearbeiten',
+ 'Edit Part' => 'Ware bearbeiten',
+ 'Edit Service' => 'Dienstleistung bearbeiten',
+ 'Expense' => 'Aufwandskonto',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'Geschäftsvolumen' => 'Geschäftsvolumen',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'Image' => 'Grafik',
+ 'In-line' => 'im Text',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Individual Items' => 'Einzelteile',
+ 'Inventory' => 'Inventar',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => 'Bevor dieses Erzeugnis als ungültig markiert werden kann, muÃ\9f das Inventar auf Null sein!',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => 'Bevor diese Ware als ungültig markiert werden kann, muÃ\9f das Inventar Null sein!',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Item deleted!' => 'Artikel gelöscht!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Last Cost' => 'Einkaufspreis',
+ 'License' => 'Lizenz',
+ 'Line Total' => 'Zeilensumme',
+ 'Link Accounts' => 'Konten verknüpfen',
+ 'List Price' => 'Listenpreis',
+ 'Make' => 'Hersteller',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Message' => 'Nachricht',
+ 'Microfiche' => 'Mikrofilm',
+ 'Model' => 'Modell',
+ 'Name' => 'Name',
+ 'No.' => 'Position',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Obsolete' => 'Ungültig',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'On Hand' => 'Auf Lager',
+ 'On Order' => 'ist bestellt',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Ordered' => 'Vom Kunde bestellt',
+ 'Orphaned' => 'nie benutzt',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Part Number' => 'Artikelnummer',
+ 'Part Number missing!' => 'Artikelnummer fehlt!',
+ 'Partnumber not unique!' => 'Artikelnummer bereits vorhanden!',
+ 'Parts' => 'Waren',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Quoted' => 'Angeboten',
+ 'RFQ' => 'Anfrage',
+ 'ROP' => 'Mindestlagerbestand',
+ 'Required by' => 'Lieferdatum',
+ 'Revenue' => 'Erlöskonto',
+ 'Sales Order' => 'Auftrag',
+ 'Save' => 'Speichern',
+ 'Save as new' => 'als neu speichern',
+ 'Screen' => 'Bildschirm',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sell Price' => 'Verkaufspreis',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Serial Number' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Service Number missing!' => 'Dienstleistungsnummer fehlt!',
+ 'Services' => 'Dienstleistungen',
+ 'Ship' => 'Lagerausgang',
+ 'Ship to' => 'Lieferadresse',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Shopartikel' => 'Shopartikel',
+ 'Short' => 'kurz',
+ 'Sold' => 'verkauft',
+ 'Stock' => 'einlagern',
+ 'Stock Assembly' => 'Erzeugnis einlagern',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'TOP100' => 'TOP100',
+ 'To' => 'An',
+ 'Top 100' => 'Top 100',
+ 'Top 100 hinzufuegen' => 'Top 100 hinzufügen',
+ 'Top Level' => 'Hauptartikelbezeichnung',
+ 'Total' => 'Summe',
+ 'Unit' => 'Einheit',
+ 'Unit of measure' => 'Maßeinheit',
+ 'Update' => 'Erneuern',
+ 'Updated' => 'Erneuert am',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Verrechnungseinheit' => 'Verrechnungseinheit',
+ 'Weight' => 'Gewicht',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Zipcode' => 'PLZ',
+ 'button' => '?',
+ 'choice' => 'auswählen',
+ 'choice part' => 'Artikel auswählen',
+ 'ea' => 'Stk',
+ 'emailed to' => 'gemailt an',
+ 'hr' => 'Stunde',
+ 'list' => 'auflisten',
+ 'number' => 'Nummer',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+ 'soldtotal' => 'verkaufte Anzahl',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'addtop100' => 'addtop100',
+ 'assembly_row' => 'assembly_row',
+ 'check_form' => 'check_form',
+ 'choice' => 'choice',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'generate_report' => 'generate_report',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'link_part' => 'link_part',
+ 'list' => 'list',
+ 'list_assemblies' => 'list_assemblies',
+ 'makemodel_row' => 'makemodel_row',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'order' => 'order',
+ 'parts_subtotal' => 'parts_subtotal',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'quotation' => 'quotation',
+ 'restock_assemblies' => 'restock_assemblies',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'stock_assembly' => 'stock_assembly',
+ 'top100' => 'top100',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'erfassen' => 'add',
+ 'erzeugnis_erfassen' => 'add_assembly',
+ 'ware_erfassen' => 'add_part',
+ 'dienstleistung_erfassen' => 'add_service',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'erzeugnis_bearbeiten' => 'edit_assembly',
+ 'ware_bearbeiten' => 'edit_part',
+ 'dienstleistung_bearbeiten' => 'edit_service',
+ 'speichern' => 'save',
+ 'als_neu_speichern' => 'save_as_new',
+ 'top100' => 'top100',
+ 'erneuern' => 'update',
+ 'auswählen' => 'choice',
+ 'auflisten' => 'list',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Country' => 'Land',
+ 'Customer Number' => 'Kundennummer',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Discount' => 'Rabatt',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'In-line' => 'im Text',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'License' => 'Lizenz',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Message' => 'Nachricht',
+ 'No.' => 'Position',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Required by' => 'Lieferdatum',
+ 'Sales Order' => 'Auftrag',
+ 'Screen' => 'Bildschirm',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Ship' => 'Lagerausgang',
+ 'Ship to' => 'Lieferadresse',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'To' => 'An',
+ 'Unit' => 'Einheit',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Zipcode' => 'PLZ',
+ 'emailed to' => 'gemailt an',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+};
+
+$self{subs} = {
+ 'check_form' => 'check_form',
+ 'customer_details' => 'customer_details',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'order' => 'order',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'quotation' => 'quotation',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'weiter' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Invoice Number' => 'Soll die Rechnung mit folgender Nummer wirklich gelöscht werden:',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Cannot delete invoice!' => 'Rechnung kann nicht gelöscht werden!',
+ 'Cannot post invoice for a closed period!' => 'Das Rechnungsdatum fällt in einen abgeschlossen Zeitraum!',
+ 'Cannot post invoice!' => 'Rechnung kann nicht gebucht werden!',
+ 'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Contact Person' => 'Ansprechpartner',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Country' => 'Land',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Currency' => 'Währung',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Discount' => 'Rabatt',
+ 'Due Date' => 'Fälligkeitsdatum',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Edit Vendor Invoice' => 'Einkaufsrechnung bearbeiten',
+ 'Exch' => 'Wechselkurs.',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'In-line' => 'im Text',
+ 'Internal Notes' => 'interne Bemerkungen',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date' => 'Rechnungsdatum',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Invoice deleted!' => 'Rechnung gelöscht!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'License' => 'Lizenz',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Message' => 'Nachricht',
+ 'No.' => 'Position',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Order' => 'Auftrag',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Payments' => 'Zahlungsausgänge',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Record in' => 'Buchen auf',
+ 'Remaining' => 'Rest',
+ 'Required by' => 'Lieferdatum',
+ 'Sales Order' => 'Auftrag',
+ 'Screen' => 'Bildschirm',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Ship' => 'Lagerausgang',
+ 'Ship to' => 'Lieferadresse',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Source' => 'Beleg',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'To' => 'An',
+ 'Total' => 'Summe',
+ 'Unit' => 'Einheit',
+ 'Update' => 'Erneuern',
+ 'Vendor' => 'Lieferant',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor missing!' => 'Lieferant fehlt!',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Yes' => 'Ja',
+ 'Zipcode' => 'PLZ',
+ 'button' => '?',
+ 'ea' => 'Stk',
+ 'emailed to' => 'gemailt an',
+ 'posted!' => 'gebucht',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'quotation' => 'quotation',
+ 'sales_invoice' => 'sales_invoice',
+ 'section_menu' => 'section_menu',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'auftrag' => 'order',
+ 'buchen' => 'post',
+ 'neu_buchen' => 'post_as_new',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Invoice' => 'Rechnung erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Invoice Number' => 'Soll die Rechnung mit folgender Nummer wirklich gelöscht werden:',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Business' => 'Firma',
+ 'Cannot delete invoice!' => 'Rechnung kann nicht gelöscht werden!',
+ 'Cannot post invoice for a closed period!' => 'Das Rechnungsdatum fällt in einen abgeschlossen Zeitraum!',
+ 'Cannot post invoice!' => 'Rechnung kann nicht gebucht werden!',
+ 'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Contact Person' => 'Ansprechpartner',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Country' => 'Land',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Currency' => 'Währung',
+ 'Customer' => 'Kunde',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer Order Number' => 'Bestellnummer des Kunden',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Discount' => 'Rabatt',
+ 'Due Date' => 'Fälligkeitsdatum',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Edit Sales Invoice' => 'Rechnung bearbeiten',
+ 'Exch' => 'Wechselkurs.',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'In-line' => 'im Text',
+ 'Incoming Payments' => 'Zahlungseingänge',
+ 'Internal Notes' => 'interne Bemerkungen',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date' => 'Rechnungsdatum',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Invoice deleted!' => 'Rechnung gelöscht!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'License' => 'Lizenz',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Message' => 'Nachricht',
+ 'No.' => 'Position',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Order' => 'Auftrag',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Print' => 'Drucken',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number' => 'Angebotsnummer',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Record in' => 'Buchen auf',
+ 'Remaining' => 'Rest',
+ 'Required by' => 'Lieferdatum',
+ 'Sales Order' => 'Auftrag',
+ 'Salesperson' => 'Verkäufer',
+ 'Screen' => 'Bildschirm',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Ship' => 'Lagerausgang',
+ 'Ship to' => 'Lieferadresse',
+ 'Ship via' => 'Transportmittel',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Shipping Point' => 'Versandort',
+ 'Source' => 'Beleg',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'To' => 'An',
+ 'Total' => 'Summe',
+ 'Trade Discount' => 'Rabatt',
+ 'Unit' => 'Einheit',
+ 'Update' => 'Erneuern',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Yes' => 'Ja',
+ 'Zipcode' => 'PLZ',
+ 'button' => '?',
+ 'ea' => 'Stk',
+ 'emailed to' => 'gemailt an',
+ 'posted!' => 'gebucht',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'quotation' => 'quotation',
+ 'sales_invoice' => 'sales_invoice',
+ 'section_menu' => 'section_menu',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'email' => 'e_mail',
+ 'auftrag' => 'order',
+ 'buchen' => 'post',
+ 'neu_buchen' => 'post_as_new',
+ 'drucken' => 'print',
+ 'lieferadresse' => 'ship_to',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Logout' => 'Abmeldung',
+};
+
+$self{subs} = {
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Erfassen',
+ 'Add License' => 'Lizenz erfassen',
+ 'All' => 'Alle',
+ 'City' => 'Stadt',
+ 'Comment' => 'Kommentar',
+ 'Company Name' => 'Firmenname',
+ 'Continue' => 'Weiter',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Description' => 'Beschreibung',
+ 'Expired licenses' => 'Abgelaufene Lizenzen',
+ 'Expiring in x month(s)' => 'Die in x Monat(en) ablaufen',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Invoice Number' => 'Rechnungsnummer',
+ 'License key' => 'Lizenzschlüssel',
+ 'Licenses' => 'Lizenzen',
+ 'No licenses were found that match the search criteria.' => 'Es wurden keine Lizenzen gefunden, auf die die Suchkriterien zutreffen.',
+ 'Own Product' => 'eigenes Produkt',
+ 'Part Number' => 'Artikelnummer',
+ 'Please enter a license key.' => 'Bitte geben Sie einen Lizenzschlüssel an.',
+ 'Please enter a number of licenses.' => 'Bitte geben Sie die Anzahl Lizenzschlüssel an.',
+ 'Quantity' => 'Menge',
+ 'Save' => 'Speichern',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Street' => 'Straße',
+ 'The licensing module has been deactivated in lx-erp.conf.' => 'Das Lizenzverwaltungsmodul wurde in lx-erp.conf deaktiviert.',
+ 'Update' => 'Erneuern',
+ 'Valid until' => 'gültig bis',
+ 'View License' => 'Lizenz ansehen',
+ 'Zipcode' => 'PLZ',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'details' => 'details',
+ 'do_add' => 'do_add',
+ 'do_search' => 'do_search',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'print_customer_selection' => 'print_customer_selection',
+ 'print_license_form' => 'print_license_form',
+ 'print_part_selection' => 'print_part_selection',
+ 'quot' => 'quot',
+ 'save' => 'save',
+ 'search' => 'search',
+ 'set_std_hidden' => 'set_std_hidden',
+ 'update' => 'update',
+ 'erfassen' => 'add',
+ 'weiter' => 'continue',
+ 'speichern' => 'save',
+ 'erneuern' => 'update',
+};
+
+1;
--- /dev/null
+#!/usr/bin/perl
+
+# -n do not include custom_ scripts
+
+use FileHandle;
+
+
+$basedir = "../..";
+$bindir = "$basedir/bin/mozilla";
+$menufile = "menu.ini";
+
+foreach $item (@ARGV) {
+ $item =~ s/-//g;
+ $arg{$item} = 1;
+}
+
+opendir DIR, "$bindir" or die "$!";
+@progfiles = grep { /\.pl/; !/(_|^\.)/ } readdir DIR;
+seekdir DIR, 0;
+@customfiles = grep /_/, readdir DIR;
+closedir DIR;
+
+# put customized files into @customfiles
+@customfiles = () if ($arg{n});
+
+if ($arg{n}) {
+ @menufiles = ($menufile);
+} else {
+ opendir DIR, "$basedir" or die "$!";
+ @menufiles = grep { /.*?_$menufile$/ } readdir DIR;
+ closedir DIR;
+ unshift @menufiles, $menufile;
+}
+
+
+# slurp the translations in
+if (-f 'all') {
+ require "all";
+}
+
+
+foreach $file (@progfiles) {
+
+ %locale = ();
+ %submit = ();
+ %subrt = ();
+
+ &scanfile("$bindir/$file");
+
+ # scan custom_{module}.pl or {login}_{module}.pl files
+ foreach $customfile (@customfiles) {
+ if ($customfile =~ /_$file/) {
+ if (-f "$bindir/$customfile") {
+ &scanfile("$bindir/$customfile");
+ }
+ }
+ }
+
+ # if this is the menu.pl file
+ if ($file eq 'menu.pl') {
+ foreach $item (@menufiles) {
+ &scanmenu("$basedir/$item");
+ }
+ }
+
+ $file =~ s/\.pl//;
+
+
+ eval { require 'missing'; };
+ unlink 'missing';
+
+ foreach $text (keys %$missing) {
+ if ($locale{$text}) {
+ unless ($self{texts}{$text}) {
+ $self{texts}{$text} = $missing->{$text};
+ }
+ }
+ }
+
+
+ open FH, ">$file" or die "$! : $file";
+
+ print FH q|$self{texts} = {
+|;
+
+ foreach $key (sort keys %locale) {
+ if ($self{texts}{$key}) {
+ $text = $self{texts}{$key};
+ } else {
+ $text = $key;
+ }
+ $text =~ s/'/\\'/g;
+ $text =~ s/\\$/\\\\/;
+
+ $keytext = $key;
+ $keytext =~ s/'/\\'/g;
+ $keytext =~ s/\\$/\\\\/;
+
+ print FH qq| '$keytext'|.(' ' x (27-length($keytext))).qq| => '$text',\n|;
+ }
+
+ print FH q|};
+
+$self{subs} = {
+|;
+
+ foreach $key (sort keys %subrt) {
+ $text = $key;
+ $text =~ s/'/\\'/g;
+ $text =~ s/\\$/\\\\/;
+ print FH qq| '$text'|.(' ' x (27-length($text))).qq| => '$text',\n|;
+ }
+
+ foreach $key (sort keys %submit) {
+ $text = ($self{texts}{$key}) ? $self{texts}{$key} : $key;
+ $text =~ s/'/\\'/g;
+ $text =~ s/\\$/\\\\/;
+
+ $english_sub = $key;
+ $english_sub =~ s/'/\\'/g;
+ $english_sub =~ s/\\$/\\\\/;
+ $english_sub = lc $key;
+
+ $translated_sub = lc $text;
+ $english_sub =~ s/( |-|,)/_/g;
+ $translated_sub =~ s/( |-|,)/_/g;
+ print FH qq| '$translated_sub'|.(' ' x (27-length($translated_sub))).qq| => '$english_sub',\n|;
+ }
+
+ print FH q|};
+
+1;
+|;
+
+ close FH;
+}
+
+
+# now print out all
+
+open FH, ">all" or die "$! : all";
+
+print FH q|# These are all the texts to build the translations files.
+# The file has the form of 'english text' => 'foreign text',
+# you can add the translation in this file or in the 'missing' file
+# run locales.pl from this directory to rebuild the translation files
+
+$self{texts} = {
+|;
+
+
+foreach $key (sort keys %alllocales) {
+ $text = $self{texts}{$key};
+
+ $count++;
+
+ $text =~ s/'/\\'/g;
+ $text =~ s/\\$/\\\\/;
+ $key =~ s/'/\\'/g;
+ $key =~ s/\\$/\\\\/;
+
+ unless ($text) {
+ $notext++;
+ push @missing, $key;
+ }
+
+ print FH qq| '$key'|.(' ' x (27-length($key))).qq| => '$text',\n|;
+
+}
+
+print FH q|};
+
+1;
+|;
+
+close FH;
+
+
+if (@missing) {
+ open FH, ">missing" or die "$! : missing";
+
+ print FH q|# add the missing texts and run locales.pl to rebuild
+
+$missing = {
+|;
+
+ foreach $text (@missing) {
+ print FH qq| '$text'|.(' ' x (27-length($text))).qq| => '',\n|;
+ }
+
+ print FH q|};
+
+1;
+|;
+
+ close FH;
+
+}
+
+open(FH, "LANGUAGE");
+@language = <FH>;
+close(FH);
+$trlanguage = $language[0];
+chomp $trlanguage;
+
+$per = sprintf("%.1f", ($count - $notext) / $count * 100);
+print "\n$trlanguage - ${per}%\n";
+
+exit;
+# eom
+
+
+sub scanfile {
+ my $file = shift;
+
+ return unless (-f "$file");
+
+ my $fh = new FileHandle;
+ open $fh, "$file" or die "$! : $file";
+
+ while (<$fh>) {
+ # is this another file
+ if (/require\s+\W.*\.pl/) {
+ my $newfile = $&;
+ $newfile =~ s/require\s+\W//;
+ $newfile =~ s/\$form->{path}\///;
+ &scanfile("$bindir/$newfile");
+ }
+
+ # is this a sub ?
+ if (/^sub /) {
+ ($null, $subrt) = split / +/;
+ $subrt{$subrt} = 1;
+ next;
+ }
+
+ my $rc = 1;
+
+ while ($rc) {
+ if (/Locale/) {
+ unless (/^use /) {
+ my ($null, $country) = split /,/;
+ $country =~ s/^ +["']//;
+ $country =~ s/["'].*//;
+ }
+ }
+
+ if (/\$locale->text.*?\W\)/) {
+ my $string = $&;
+ $string =~ s/\$locale->text\(\s*['"(q|qq)]['\/\\\|~]*//;
+ $string =~ s/\W\)+.*$//;
+
+ # if there is no $ in the string record it
+ unless ($string =~ /\$\D.*/) {
+ # this guarantees one instance of string
+ $locale{$string} = 1;
+
+ # this one is for all the locales
+ $alllocales{$string} = 1;
+
+ # is it a submit button before $locale->
+ if (/type=submit/) {
+ $submit{$string} = 1;
+ }
+ }
+ }
+
+ # exit loop if there are no more locales on this line
+ ($rc) = ($' =~ /\$locale->text/);
+ # strip text
+ s/^.*?\$locale->text.*?\)//;
+ }
+ }
+
+ close($fh);
+
+}
+
+
+sub scanmenu {
+ my $file = shift;
+
+ my $fh = new FileHandle;
+ open $fh, "$file" or die "$! : $file";
+
+ my @a = grep /^\[/, <$fh>;
+ close($fh);
+
+ # strip []
+ grep { s/(\[|\])//g } @a;
+
+ foreach my $item (@a) {
+ @b = split /--/, $item;
+ foreach $string (@b) {
+ chomp $string;
+ $locale{$string} = 1;
+ $alllocales{$string} = 1;
+ }
+ }
+
+}
+
+
--- /dev/null
+$self{texts} = {
+ 'About' => 'über',
+ 'Database Host' => 'Datenbankcomputer',
+ 'Dataset' => 'Datenbank',
+ 'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
+ 'Licensed to' => 'Lizensiert für',
+ 'Login' => 'Anmeldung',
+ 'Login Name' => 'Benutzername',
+ 'Password' => 'Passwort',
+ 'User' => 'Benutzer',
+ 'Version' => 'Version',
+ 'You are logged out!' => 'Auf Wiedersehen!',
+ 'You did not enter a name!' => 'Sie haben keinen Namen eingegeben!',
+ 'localhost' => 'lokaler Rechner',
+};
+
+$self{subs} = {
+ 'company_logo' => 'company_logo',
+ 'login' => 'login',
+ 'login_screen' => 'login_screen',
+ 'logout' => 'logout',
+ 'anmeldung' => 'login',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Einkauf',
+ 'AP Aging' => 'Offene Verbindlichkeiten',
+ 'AR' => 'Verkauf',
+ 'AR Aging' => 'Offene Forderungen',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add AP Transaction' => 'Kreditorenbuchung',
+ 'Add AR Transaction' => 'Debitorenbuchung',
+ 'Add Account' => 'Konto erfassen',
+ 'Add Assembly' => 'Erzeugnis erfassen',
+ 'Add Business' => 'Kundentyp erfassen',
+ 'Add Customer' => 'Kunde erfassen',
+ 'Add Department' => 'Abteilung erfassen',
+ 'Add Group' => 'Warengruppe erfassen',
+ 'Add License' => 'Lizenz erfassen',
+ 'Add Part' => 'Ware erfassen',
+ 'Add Project' => 'Projekt erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add RFQ' => 'Neue Preisanfrage',
+ 'Add SIC' => 'SIC erfassen',
+ 'Add Sales Invoice' => 'Rechnung erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Service' => 'Dienstleistung erfassen',
+ 'Add Transaction' => 'Dialogbuchen',
+ 'Add Vendor' => 'Lieferant erfassen',
+ 'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
+ 'Assemblies' => 'Erzeugnisse',
+ 'Audit Control' => 'Bücherkontrolle',
+ 'BWA' => 'BWA',
+ 'Backup' => 'Datensicherung',
+ 'Balance Sheet' => 'Bilanz',
+ 'Batch Printing' => 'Druck',
+ 'Cash' => 'Zahlungsverkehr',
+ 'Chart of Accounts' => 'Kontenübersicht',
+ 'Check' => 'Scheck',
+ 'Checks' => 'Schecks',
+ 'Customers' => 'Kunden',
+ 'DATEV - Export Assistent' => 'DATEV-Exportassistent',
+ 'Departments' => 'Abteilungen',
+ 'General Ledger' => 'Finanzbuchhaltung',
+ 'Groups' => 'Warengruppen',
+ 'HTML Templates' => 'HTML-Vorlagen',
+ 'Idea Terra CSV' => 'Idea Terra CSV',
+ 'Income Statement' => 'GuV',
+ 'Invoice' => 'Rechnung',
+ 'Invoices' => 'Rechnungen',
+ 'Journal' => 'Buchungsjournal',
+ 'LaTeX Templates' => 'LaTeX-Vorlagen',
+ 'Licenses' => 'Lizenzen',
+ 'List Accounts' => 'Kontenliste',
+ 'List Businesses' => 'Liste Kundentypen',
+ 'List Departments' => 'Abteilungsliste',
+ 'List SIC' => 'SIC anzeigen',
+ 'Logout' => 'Abmeldung',
+ 'Master Data' => 'Stammdaten',
+ 'Mosu' => 'Mosu',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing Lists' => 'Lieferschein',
+ 'Parts' => 'Waren',
+ 'Payment' => 'Zahlungsausgang',
+ 'Payments' => 'Zahlungsausgänge',
+ 'Preferences' => 'Benutzereinstellungen',
+ 'Programm' => 'Programm',
+ 'Projects' => 'Projekte',
+ 'Projecttransactions' => 'Projektbuchungen',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Purchase Orders' => 'Lieferantenaufträge',
+ 'Quotation' => 'Angebot',
+ 'Quotations' => 'Angebote',
+ 'RFQ' => 'Anfrage',
+ 'RFQs' => 'Anfragen',
+ 'Receipt' => 'Zahlungseingang',
+ 'Receipts' => 'Zahlungseingänge',
+ 'Reports' => 'Berichte',
+ 'SIC' => 'SIC',
+ 'Sales Invoices' => 'Kundenrechnung',
+ 'Sales Order' => 'Auftrag',
+ 'Sales Orders' => 'Aufträge',
+ 'Save to File' => 'auf Festplatte speichern',
+ 'Send by E-Mail' => 'Per eMail schicken',
+ 'Services' => 'Dienstleistungen',
+ 'Statement' => 'Sammelrechnung',
+ 'Stylesheet' => 'Stilvorlage',
+ 'System' => 'System',
+ 'Trial Balance' => 'Vergleichsbilanz',
+ 'Type of Business' => 'Kundentyp',
+ 'UStVa' => 'UStVa',
+ 'UStVa Einstellungen' => 'UStVa Einstellungen',
+ 'Vendor Invoices' => 'Einkaufsrechnungen',
+ 'Vendors' => 'Lieferanten',
+ 'Version' => 'Version',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'display' => 'display',
+ 'section_menu' => 'section_menu',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add' => 'Erfassen',
+ 'Add Exchangerate' => 'Wechselkurs erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Invoice' => 'Rechnung erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Order Number' => 'Soll der Auftrag mit folgender Nummer wirklich gelöscht werden:',
+ 'Are you sure you want to delete Quotation Number' => 'Sind Sie sicher, dass Angebotnummer gelöscht werden soll?',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Bis' => 'bis',
+ 'Business' => 'Firma',
+ 'C' => 'G',
+ 'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
+ 'Cannot delete quotation!' => 'Angebot kann nicht gelöscht werden!',
+ 'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
+ 'Cannot save quotation!' => 'Angebot kann nicht gespeichert werden!',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Closed' => 'Geschlossen',
+ 'Company Name' => 'Firmenname',
+ 'Confirm!' => 'Bestätigen Sie!',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Contact Person' => 'Ansprechpartner',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Could not save!' => 'Konnte nicht speichern!',
+ 'Could not transfer Inventory!' => 'Konnte Waren nicht umlagern!',
+ 'Country' => 'Land',
+ 'Credit Limit' => 'Kreditlimit',
+ 'Curr' => 'Währung',
+ 'Currency' => 'Währung',
+ 'Customer' => 'Kunde',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer Order Number' => 'Bestellnummer des Kunden',
+ 'Customer missing!' => 'Kundenname fehlt!',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Date' => 'Datum',
+ 'Date Received' => 'Empfangsdatum',
+ 'Date received missing!' => 'Empfangsdatum fehlt!',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delete' => 'Löschen',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Discount' => 'Rabatt',
+ 'Done' => 'Fertig',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
+ 'Edit Quotation' => 'Angebot bearbeiten',
+ 'Edit Request for Quotation' => 'Anfrage bearbeiten',
+ 'Edit Sales Order' => 'Auftrag bearbeiten',
+ 'Employee' => 'Bearbeiter',
+ 'Exchangerate' => 'Wechselkurs',
+ 'Exchangerate missing!' => 'Es fehlt der Wechselkurs!',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'From' => 'von',
+ 'Group' => 'Warengruppe',
+ 'Group Items' => 'Waren gruppieren',
+ 'ID' => 'Buchungsnummer',
+ 'In-line' => 'im Text',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Internal Notes' => 'interne Bemerkungen',
+ 'Inventory saved!' => 'Inventar gespeichert.',
+ 'Inventory transferred!' => 'Inventar umgelagert.',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
+ 'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'License' => 'Lizenz',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Message' => 'Nachricht',
+ 'No.' => 'Position',
+ 'Notes' => 'Bemerkungen',
+ 'Nothing entered!' => 'Es wurde nichts eingegeben.',
+ 'Nothing to transfer!' => 'Es gibt nichts zum Umlagern!',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'O' => 'O',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'Open' => 'Offen',
+ 'Order' => 'Auftrag',
+ 'Order Date' => 'Auftragsdatum',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'Order deleted!' => 'Auftrag gelöscht!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Verpackungsliste',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Part Number' => 'Artikelnummer',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Print' => 'Drucken',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Purchase Order' => 'Lieferantenauftrag',
+ 'Purchase Orders' => 'Lieferantenaufträge',
+ 'Qty' => 'Menge',
+ 'Queue' => 'Warteschlange',
+ 'Queued' => 'In Warteschlange eingereiht.',
+ 'Quotation' => 'Angebot',
+ 'Quotation Date' => 'Angebotsdatum',
+ 'Quotation Date missing!' => 'Angebotsdatum fehlt!',
+ 'Quotation Number' => 'Angebotsnummer',
+ 'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'Quotation deleted!' => 'Angebot wurde gelöscht.',
+ 'Quotations' => 'Angebote',
+ 'RFQ Number' => 'Anfragenummer',
+ 'Recd' => 'erhalten',
+ 'Receive Merchandise' => 'Waren einlagern',
+ 'Remaining' => 'Rest',
+ 'Request for Quotation' => 'Anfrage',
+ 'Request for Quotations' => 'Anfragen',
+ 'Required by' => 'Lieferdatum',
+ 'Sales Order' => 'Auftrag',
+ 'Sales Orders' => 'Aufträge',
+ 'Salesperson' => 'Verkäufer',
+ 'Save' => 'Speichern',
+ 'Save as new' => 'als neu speichern',
+ 'Screen' => 'Bildschirm',
+ 'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Serial No.' => 'Seriennummer',
+ 'Service' => 'Dienstleistung',
+ 'Ship' => 'Lagerausgang',
+ 'Ship Merchandise' => 'Waren versenden',
+ 'Ship to' => 'Lieferadresse',
+ 'Ship via' => 'Transportmittel',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Shipping Date' => 'Lieferdatum',
+ 'Shipping Date missing!' => 'Lieferdatum fehlt.',
+ 'Shipping Point' => 'Versandort',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax' => 'Steuer',
+ 'Tax Included' => 'Steuer im Preis inbegriffen',
+ 'Terms: Net' => 'Zahlungsziel',
+ 'To' => 'An',
+ 'Total' => 'Summe',
+ 'Trade Discount' => 'Rabatt',
+ 'Transfer' => 'Umlagerung',
+ 'Transfer Inventory' => 'Ware umlagern',
+ 'Transfer to' => 'umlagern nach',
+ 'Unit' => 'Einheit',
+ 'Update' => 'Erneuern',
+ 'Valid until' => 'gültig bis',
+ 'Vendor' => 'Lieferant',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor missing!' => 'Lieferant fehlt!',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Warehouse' => 'Lager',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Yes' => 'Ja',
+ 'Zipcode' => 'PLZ',
+ 'button' => '?',
+ 'days' => 'Tage',
+ 'ea' => 'Stk',
+ 'emailed to' => 'gemailt an',
+ 'saved!' => 'gespeichert',
+ 'sent' => 'gesendet',
+ 'sent to printer' => 'an Drucker geschickt',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'backorder_exchangerate' => 'backorder_exchangerate',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_backorder' => 'create_backorder',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'display_ship_receive' => 'display_ship_receive',
+ 'done' => 'done',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice' => 'invoice',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'list_transfer' => 'list_transfer',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'new_license' => 'new_license',
+ 'order' => 'order',
+ 'order_links' => 'order_links',
+ 'orders' => 'orders',
+ 'poso' => 'poso',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_order' => 'prepare_order',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'purchase_order' => 'purchase_order',
+ 'quotation' => 'quotation',
+ 'sales_invoice' => 'sales_invoice',
+ 'sales_order' => 'sales_order',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'save_exchangerate' => 'save_exchangerate',
+ 'search' => 'search',
+ 'search_transfer' => 'search_transfer',
+ 'section_menu' => 'section_menu',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_receive' => 'ship_receive',
+ 'ship_to' => 'ship_to',
+ 'subtotal' => 'subtotal',
+ 'transfer' => 'transfer',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'erfassen' => 'add',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'fertig' => 'done',
+ 'email' => 'e_mail',
+ 'rechnung' => 'invoice',
+ 'auftrag' => 'order',
+ 'drucken' => 'print',
+ 'lieferantenauftrag' => 'purchase_order',
+ 'angebot' => 'quotation',
+ 'auftrag' => 'sales_order',
+ 'speichern' => 'save',
+ 'als_neu_speichern' => 'save_as_new',
+ 'lieferadresse' => 'ship_to',
+ 'umlagerung' => 'transfer',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add' => 'Erfassen',
+ 'Add Group' => 'Warengruppe erfassen',
+ 'Add Project' => 'Projekt erfassen',
+ 'All' => 'Alle',
+ 'Continue' => 'Weiter',
+ 'Delete' => 'Löschen',
+ 'Description' => 'Beschreibung',
+ 'Edit Group' => 'Warengruppe editieren',
+ 'Edit Project' => 'Projekt bearbeiten',
+ 'Group' => 'Warengruppe',
+ 'Group deleted!' => 'Warengruppe gelöscht!',
+ 'Group missing!' => 'Warengruppe fehlt!',
+ 'Group saved!' => 'Warengruppe gespeichert!',
+ 'Groups' => 'Warengruppen',
+ 'Number' => 'Nummer',
+ 'Orphaned' => 'nie benutzt',
+ 'Project' => 'Projekt',
+ 'Project Number missing!' => 'Projektnummer fehlt!',
+ 'Project deleted!' => 'Projekt gelöscht!',
+ 'Project saved!' => 'Projekt gespeichert!',
+ 'Projects' => 'Projekte',
+ 'Save' => 'Speichern',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'display' => 'display',
+ 'edit' => 'edit',
+ 'form_partsgroup_footer' => 'form_partsgroup_footer',
+ 'form_partsgroup_header' => 'form_partsgroup_header',
+ 'form_project_footer' => 'form_project_footer',
+ 'form_project_header' => 'form_project_header',
+ 'partsgroup_report' => 'partsgroup_report',
+ 'project_report' => 'project_report',
+ 'save' => 'save',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'erfassen' => 'add',
+ 'weiter' => 'continue',
+ 'löschen' => 'delete',
+ 'speichern' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Balance' => 'Bilanz',
+ 'Cleared Balance' => 'abgeschlossen',
+ 'Continue' => 'Weiter',
+ 'Date' => 'Datum',
+ 'Decrease' => 'Verringern',
+ 'Deposit' => 'Gutschrift',
+ 'Description' => 'Beschreibung',
+ 'Difference' => 'Differenz',
+ 'Done' => 'Fertig',
+ 'Exchangerate Difference' => 'Wechselkursunterschied',
+ 'From' => 'von',
+ 'Increase' => 'Erhöhen',
+ 'Out of balance!' => 'Summen stimmen nicht berein!',
+ 'Payment' => 'Zahlungsausgang',
+ 'Reconciliation' => 'Kontenabstimmung',
+ 'Select all' => 'Alle auswählen',
+ 'Source' => 'Beleg',
+ 'Statement Balance' => 'Sammelrechnungsbilanz',
+ 'To' => 'An',
+ 'Update' => 'Erneuern',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'continue' => 'continue',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'done' => 'done',
+ 'get_payments' => 'get_payments',
+ 'reconciliation' => 'reconciliation',
+ 'section_menu' => 'section_menu',
+ 'select_all' => 'select_all',
+ 'update' => 'update',
+ 'weiter' => 'continue',
+ 'fertig' => 'done',
+ 'alle_auswählen' => 'select_all',
+ 'erneuern' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Aging' => 'Offene Verbindlichkeiten',
+ 'AR Aging' => 'Offene Forderungen',
+ 'Account' => 'Konto',
+ 'Account Number' => 'Kontonummer',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Accrual' => 'Bilanzierung',
+ 'Address' => 'Adresse',
+ 'All Accounts' => 'Alle Konten',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Bilanz',
+ 'Balance Sheet' => 'Bilanz',
+ 'Bcc' => 'Bcc',
+ 'Bis' => 'bis',
+ 'Cc' => 'Cc',
+ 'Compare to' => 'Gegenüberstellen zu',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Credit' => 'Haben',
+ 'Current' => 'Betrag',
+ 'Current Earnings' => 'Gewinn',
+ 'Customer' => 'Kunde',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Customized Report' => 'Vorgewählte Zeiträume',
+ 'Date' => 'Datum',
+ 'Debit' => 'Soll',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Decimalplaces' => 'Dezimalstellen',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Due' => 'Fällig',
+ 'E-mail' => 'eMail',
+ 'E-mail Statement to' => 'Fälligkeitsabrechnung als eMail an',
+ 'EUR' => 'E/Ü-Rechnung',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Free report period' => 'Freier Zeitraum',
+ 'From' => 'von',
+ 'GIFI' => 'GIFI',
+ 'HTML' => 'HTML',
+ 'Heading' => 'Überschrift',
+ 'ID' => 'Buchungsnummer',
+ 'In-line' => 'im Text',
+ 'Include Exchangerate Difference' => 'Wechselkursunterschied einbeziehen',
+ 'Include in Report' => 'In Bericht aufnehmen',
+ 'Income Statement' => 'GuV',
+ 'Invoice' => 'Rechnung',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Memo' => 'Memo',
+ 'Message' => 'Nachricht',
+ 'Method' => 'Verfahren',
+ 'Monthly' => 'monatlich',
+ 'N/A' => 'N.Z.',
+ 'Non-taxable Purchases' => 'Nicht zu versteuernde Einkäufe',
+ 'Non-taxable Sales' => 'Nicht zu versteuernde Verkäufe',
+ 'Nothing selected!' => 'Es wurde nichts ausgewählt!',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'PDF' => 'PDF',
+ 'Payments' => 'Zahlungsausgänge',
+ 'Postscript' => 'Postscript',
+ 'Print' => 'Drucken',
+ 'Printer' => 'Drucker',
+ 'Project' => 'Projekt',
+ 'Project Number' => 'Projektnummer',
+ 'Project Transactions' => 'Projektbuchungen',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Quarter' => 'Quartal',
+ 'Quarterly' => 'quartalsweise',
+ 'Receipts' => 'Zahlungseingänge',
+ 'Reference' => 'Referenz',
+ 'Report for' => 'Bericht für',
+ 'Screen' => 'Bildschirm',
+ 'Select all' => 'Alle auswählen',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Select postscript or PDF!' => 'Postscript oder PDF auswählen!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Source' => 'Beleg',
+ 'Statement' => 'Sammelrechnung',
+ 'Statement sent to' => 'Sammelrechnung verschickt an',
+ 'Statements sent to printer!' => 'Sammelrechnungen an Drucker geschickt!',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Tax' => 'Steuer',
+ 'Tax collected' => 'vereinnahmte Steuer',
+ 'Tax paid' => 'Vorsteuer',
+ 'Total' => 'Summe',
+ 'Trial Balance' => 'Vergleichsbilanz',
+ 'Vendor' => 'Lieferant',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'YYYY' => 'JJJJ',
+ 'Year' => 'Jahr',
+ 'Yearly' => 'jährlich',
+ 'Zeitraum' => 'Zeitraum',
+ 'as at' => 'zum Stand',
+ 'bis' => 'bis',
+ 'button' => '?',
+ 'config' => 'Konfiguration',
+ 'debug' => 'Debug',
+ 'for Period' => 'für den Zeitraum',
+ 'ustva' => 'UStVA',
+ 'winston_export' => 'Winston-Export',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'add_transaction' => 'add_transaction',
+ 'aging' => 'aging',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'config' => 'config',
+ 'continue' => 'continue',
+ 'debug' => 'debug',
+ 'display' => 'display',
+ 'e_mail' => 'e_mail',
+ 'generate_ap_aging' => 'generate_ap_aging',
+ 'generate_ar_aging' => 'generate_ar_aging',
+ 'generate_balance_sheet' => 'generate_balance_sheet',
+ 'generate_bwa' => 'generate_bwa',
+ 'generate_income_statement' => 'generate_income_statement',
+ 'generate_projects' => 'generate_projects',
+ 'generate_tax_report' => 'generate_tax_report',
+ 'generate_trial_balance' => 'generate_trial_balance',
+ 'generate_ustva' => 'generate_ustva',
+ 'get_project' => 'get_project',
+ 'gl_transaction' => 'gl_transaction',
+ 'list_accounts' => 'list_accounts',
+ 'list_payments' => 'list_payments',
+ 'name_selected' => 'name_selected',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'report' => 'report',
+ 'sales_invoice' => 'sales_invoice',
+ 'section_menu' => 'section_menu',
+ 'select_all' => 'select_all',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'statement_details' => 'statement_details',
+ 'tax_subtotal' => 'tax_subtotal',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'winston_export' => 'winston_export',
+ 'weiter' => 'continue',
+ 'email' => 'e_mail',
+ 'drucken' => 'print',
+ 'alle_auswählen' => 'select_all',
+ 'konfiguration' => 'config',
+ 'debug' => 'debug',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Address' => 'Adresse',
+ 'Angaben zum Finanzamt' => 'Angaben zum Finanzamt',
+ 'Anstehende Voranmeldungen' => 'Anstehende Voranmeldungen',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Ausgabeformat' => 'Ausgabeformat',
+ 'Ausgabeformat auswählen...' => 'Ausgabeformat auswählen...',
+ 'BLZ: ' => 'BLZ: ',
+ 'Bankleitzahl' => 'Bankleitzahl',
+ 'Bankleitzahl (BLZ)' => 'Bankleitzahl (BLZ)',
+ 'Bankverbindung' => 'Bankverbindung',
+ 'Bankverbindung des Finanzamts' => 'Bankverbindung des Finanzamts',
+ 'Bankverbindungen' => 'Bankverbindungen',
+ 'Bankverbindungen des Finanzamts' => 'Bankverbindungen des Finanzamts',
+ 'Beraterdaten in UStVA übernehmen?' => 'Beraterdaten in UStVA übernehmen?',
+ 'Berichtigte Anmeldung' => 'Berichtigte Anmeldung',
+ 'Bitte Angaben überprüfen' => 'Bitte Angaben überprüfen',
+ 'Bitte alle Angaben überprüfen' => 'Bitte alle Angaben überprüfen',
+ 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.' => 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.',
+ 'Bitte eine Steuernummer angeben' => 'Bitte eine Steuernummer angeben',
+ 'Config' => 'Konfiguration',
+ 'Continue' => 'Weiter',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Dauerfristverlängerung' => 'Dauerfristverlängerung',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Description' => 'Beschreibung',
+ 'ELSTER Export nach Winston' => 'ELSTER Export nach Winston',
+ 'ELSTER-Steuernummer: ' => 'ELSTER-Steuernummer: ',
+ 'Fax' => 'Fax',
+ 'Fax. : ' => 'Fax. : ',
+ 'Fax.: ' => 'Fax.: ',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Finanzamt' => 'Finanzamt',
+ 'Finanzamt - Einstellungen' => 'Finanzamt - Einstellungen',
+ 'Firma' => 'Firma',
+ 'Help' => 'Hilfe',
+ 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
+ 'Hinweise' => 'Hinweise',
+ 'Internet' => 'Internet',
+ 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)' => 'Ist dies eine berichtigte Anmeldung? (Nr. 10/Zeile 15 Steuererklärung)',
+ 'Jan' => 'Jan',
+ 'January' => 'Januar',
+ 'Jul' => 'Jul',
+ 'July' => 'Juli',
+ 'Jun' => 'Jun',
+ 'June' => 'Juni',
+ 'Kein Firmenname hinterlegt!' => 'Kein Firmenname hinterlegt!',
+ 'Keine Firmenadresse hinterlegt!' => 'Keine Firmenadresse hinterlegt!',
+ 'Kontakt' => 'Kontakt',
+ 'Konto: ' => 'Konto: ',
+ 'Kontonummer' => 'Kontonummer',
+ 'Kreditinstitut' => 'Kreditinstitut',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Method' => 'Verfahren',
+ 'Name' => 'Name',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'PLZ, Ort' => 'PLZ, Ort',
+ 'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
+ 'Quarter' => 'Quartal',
+ 'Select a period' => 'Bitte Zeitraum auswählen',
+ 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen',
+ 'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Show' => 'Zeigen',
+ 'Steuerberater/-in' => 'Steuerberater/-in',
+ 'Steuernummer' => 'Steuernummer',
+ 'Steuernummer: ' => 'Steuernummer: ',
+ 'Straße' => 'Straße',
+ 'Tel. : ' => 'Tel. : ',
+ 'Tel.: ' => 'Tel.: ',
+ 'Telefon' => 'Telefon',
+ 'UStVA' => 'UStVA',
+ 'UStVA als PDF-Dokument' => 'UStVa als PDF-Dokument',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'Verfahren' => 'Verfahren',
+ 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)' => 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)',
+ 'Voranmeldezeitraum' => 'Voranmeldezeitraum',
+ 'Voranmeldungszeitraum' => 'Voranmeldungszeitraum',
+ 'Vorschau' => 'Vorschau',
+ 'Year' => 'Jahr',
+ 'accrual' => 'Bilanzierung (Soll-Versteuerung)',
+ 'back' => 'zurück',
+ 'bis' => 'bis',
+ 'cash' => 'E/Ü-Rechnung (Ist-Versteuerung)',
+ 'continue' => 'weiter',
+ 'debug' => 'Debug',
+ 'for Period' => 'für den Zeitraum',
+ 'month' => 'monatliche Abgabe',
+ 'quarter' => 'vierteljährliche (quartalsweise) Abgabe',
+ 'save' => 'speichern',
+ 'saved' => 'gespeichert',
+ 'test' => 'test',
+ 'Öffnungszeiten' => 'Öffnungszeiten',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'back' => 'back',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'config' => 'config',
+ 'continue' => 'continue',
+ 'create_steuernummer' => 'create_steuernummer',
+ 'create_winston' => 'create_winston',
+ 'debug' => 'debug',
+ 'edit' => 'edit',
+ 'edit_form' => 'edit_form',
+ 'elster_conf' => 'elster_conf',
+ 'elster_feedback' => 'elster_feedback',
+ 'elster_hash' => 'elster_hash',
+ 'elster_readlog' => 'elster_readlog',
+ 'elster_send' => 'elster_send',
+ 'elster_xml' => 'elster_xml',
+ 'generate_ustva' => 'generate_ustva',
+ 'get_config' => 'get_config',
+ 'gl_transaction' => 'gl_transaction',
+ 'help' => 'help',
+ 'name_selected' => 'name_selected',
+ 'project_selected' => 'project_selected',
+ 'report' => 'report',
+ 'sales_invoice' => 'sales_invoice',
+ 'save' => 'save',
+ 'save_winston' => 'save_winston',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'show' => 'show',
+ 'show_fa_daten' => 'show_fa_daten',
+ 'show_options' => 'show_options',
+ 'test' => 'test',
+ 'ustva_vorauswahl' => 'ustva_vorauswahl',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'konfiguration' => 'config',
+ 'weiter' => 'continue',
+ 'hilfe' => 'help',
+ 'zeigen' => 'show',
+ 'zurück' => 'back',
+ 'weiter' => 'continue',
+ 'debug' => 'debug',
+ 'speichern' => 'save',
+ 'test' => 'test',
+};
+
+1;
--- /dev/null
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (c) 2003
+#
+# British English texts:
+#
+# Author:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#######################################################################
+
--- /dev/null
+British English
--- /dev/null
+$self{texts} = {
+ 'Access Control' => 'Access Control',
+ 'Accounting' => 'Accounting',
+ 'Add User' => 'Add User',
+ 'Address' => 'Address',
+ 'Administration' => 'Administration',
+ 'Administrator' => 'Administrator',
+ 'All Datasets up to date!' => 'All Datasets up to date!',
+ 'Change Admin Password' => 'Change Admin Password',
+ 'Change Password' => 'Change Password',
+ 'Character Set' => 'Character Set',
+ 'Click on login name to edit!' => 'Click on login name to edit!',
+ 'Company' => 'Company',
+ 'Connect to' => 'Connect to',
+ 'Continue' => 'Continue',
+ 'Create Chart of Accounts' => 'Create Chart of Accounts',
+ 'Create Dataset' => 'Create Dataset',
+ 'DBI not installed!' => 'DBI not installed!',
+ 'Database' => 'Database',
+ 'Database Administration' => 'Database Administration',
+ 'Database Driver not checked!' => 'Database Driver not checked!',
+ 'Database User missing!' => 'Database User missing!',
+ 'Dataset' => 'Dataset',
+ 'Dataset missing!' => 'Dataset missing!',
+ 'Dataset updated!' => 'Dataset updated!',
+ 'Date Format' => 'Date Format',
+ 'Delete' => 'Delete',
+ 'Delete Dataset' => 'Delete Dataset',
+ 'Directory' => 'Directory',
+ 'Driver' => 'Driver',
+ 'Dropdown Limit' => 'Dropdown Limit',
+ 'E-mail' => 'E-mail',
+ 'Edit User' => 'Edit User',
+ 'Existing Datasets' => 'Existing Datasets',
+ 'Fax' => 'Fax',
+ 'Host' => 'Host',
+ 'Hostname missing!' => 'Hostname missing!',
+ 'Incorrect Password!' => 'Incorrect Password!',
+ 'Language' => 'Language',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Leave host and port field empty unless you want to make a remote connection.',
+ 'Login' => 'Login',
+ 'Multibyte Encoding' => 'Multibyte Encoding',
+ 'Name' => 'Name',
+ 'New Templates' => 'New Templates',
+ 'No Database Drivers available!' => 'No Database Drivers available!',
+ 'No Dataset selected!' => 'No Dataset selected!',
+ 'Nothing to delete!' => 'Nothing to delete!',
+ 'Number Format' => 'Number Format',
+ 'Oracle Database Administration' => 'Oracle Database Administration',
+ 'Password' => 'Password',
+ 'Password changed!' => 'Password changed!',
+ 'Pg Database Administration' => 'Pg Database Administration',
+ 'Phone' => 'Phone',
+ 'Port' => 'Port',
+ 'Port missing!' => 'Port missing!',
+ 'Printer' => 'Printer',
+ 'Save' => 'Save',
+ 'Select a Dataset to delete and press "Continue"' => 'Select a Dataset to delete and press "Continue"',
+ 'Setup Templates' => 'Setup Templates',
+ 'Ship via' => 'Ship via',
+ 'Signature' => 'Signature',
+ 'Stylesheet' => 'Stylesheet',
+ 'Templates' => 'Templates',
+ 'The following Datasets are not in use and can be deleted' => 'The following Datasets are not in use and can be deleted',
+ 'The following Datasets need to be updated' => 'The following Datasets need to be updated',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.',
+ 'Update Dataset' => 'Update Dataset',
+ 'Use Templates' => 'Use Templates',
+ 'User' => 'User',
+ 'User deleted!' => 'User deleted!',
+ 'User saved!' => 'User saved!',
+ 'Version' => 'Version',
+ 'You must enter a host and port for local and remote connections!' => 'You must enter a host and port for local and remote connections!',
+ 'does not exist' => 'does not exist',
+ 'is already a member!' => 'is already a member!',
+ 'localhost' => 'localhost',
+ 'locked!' => 'locked!',
+ 'successfully created!' => 'successfully created!',
+ 'successfully deleted!' => 'successfully deleted!',
+ 'website' => 'website',
+};
+
+$self{subs} = {
+ 'add_user' => 'add_user',
+ 'adminlogin' => 'adminlogin',
+ 'change_admin_password' => 'change_admin_password',
+ 'change_password' => 'change_password',
+ 'check_password' => 'check_password',
+ 'continue' => 'continue',
+ 'create_dataset' => 'create_dataset',
+ 'dbcreate' => 'dbcreate',
+ 'dbdelete' => 'dbdelete',
+ 'dbdriver_defaults' => 'dbdriver_defaults',
+ 'dbselect_source' => 'dbselect_source',
+ 'dbupdate' => 'dbupdate',
+ 'delete' => 'delete',
+ 'delete_dataset' => 'delete_dataset',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'get_value' => 'get_value',
+ 'list_users' => 'list_users',
+ 'login' => 'login',
+ 'login_name' => 'login_name',
+ 'oracle_database_administration' => 'oracle_database_administration',
+ 'pg_database_administration' => 'pg_database_administration',
+ 'save' => 'save',
+ 'update_dataset' => 'update_dataset',
+ 'add_user' => 'add_user',
+ 'change_admin_password' => 'change_admin_password',
+ 'change_password' => 'change_password',
+ 'continue' => 'continue',
+ 'create_dataset' => 'create_dataset',
+ 'delete' => 'delete',
+ 'delete_dataset' => 'delete_dataset',
+ 'login' => 'login',
+ 'oracle_database_administration' => 'oracle_database_administration',
+ 'pg_database_administration' => 'pg_database_administration',
+ 'save' => 'save',
+ 'update_dataset' => 'update_dataset',
+};
+
+1;
--- /dev/null
+# These are all the texts to build the translations files.
+# The file has the form of 'english text' => 'foreign text',
+# you can add the translation in this file or in the 'missing' file
+# run locales.pl from this directory to rebuild the translation files
+
+$self{texts} = {
+ 'AP' => 'Purchases',
+ 'AP Aging' => 'Creditor Aging',
+ 'AP Transaction' => 'Purchase Transaction',
+ 'AP Transactions' => 'Purchase Transactions',
+ 'AR' => 'Sales',
+ 'AR Aging' => 'Debtor Aging',
+ 'AR Transaction' => 'Sales Transaction',
+ 'AR Transactions' => 'Sales Transactions',
+ 'About' => '',
+ 'Access Control' => '',
+ 'Account' => '',
+ 'Account Number' => '',
+ 'Account Number missing!' => '',
+ 'Account Type' => '',
+ 'Account Type missing!' => '',
+ 'Account deleted!' => '',
+ 'Account saved!' => '',
+ 'Accounting' => '',
+ 'Accounting Menu' => '',
+ 'Accounts' => '',
+ 'Active' => '',
+ 'Add' => '',
+ 'Add Account' => '',
+ 'Add Accounts Payables Transaction' => 'Add Purchase Transaction',
+ 'Add Accounts Receivables Transaction' => 'Add Sales Transaction',
+ 'Add Assembly' => '',
+ 'Add Customer' => '',
+ 'Add GIFI' => '',
+ 'Add General Ledger Transaction' => '',
+ 'Add Group' => '',
+ 'Add Part' => '',
+ 'Add Project' => '',
+ 'Add Purchase Order' => '',
+ 'Add Sales Invoice' => '',
+ 'Add Sales Order' => '',
+ 'Add Service' => '',
+ 'Add Transaction' => '',
+ 'Add User' => '',
+ 'Add Vendor' => '',
+ 'Add Vendor Invoice' => '',
+ 'Address' => '',
+ 'Administration' => '',
+ 'Administrator' => '',
+ 'All' => '',
+ 'All Datasets up to date!' => '',
+ 'Amount' => '',
+ 'Amount Due' => '',
+ 'Amount does not equal applied!' => '',
+ 'Amount missing!' => '',
+ 'Applied' => '',
+ 'Apr' => '',
+ 'April' => '',
+ 'Are you sure you want to delete Invoice Number' => '',
+ 'Are you sure you want to delete Order Number' => '',
+ 'Are you sure you want to delete Transaction' => '',
+ 'Assemblies' => '',
+ 'Assemblies restocked!' => '',
+ 'Assembly Number missing!' => '',
+ 'Asset' => '',
+ 'Attachment' => '',
+ 'Audit Control' => '',
+ 'Aug' => '',
+ 'August' => '',
+ 'BOM' => '',
+ 'Backup' => '',
+ 'Backup sent to' => '',
+ 'Balance' => '',
+ 'Balance Sheet' => '',
+ 'Bcc' => '',
+ 'Bin' => '',
+ 'Books are open' => '',
+ 'Bought' => '',
+ 'Business Number' => '',
+ 'C' => '',
+ 'COGS' => '',
+ 'Cannot delete account!' => '',
+ 'Cannot delete customer!' => '',
+ 'Cannot delete default account!' => '',
+ 'Cannot delete invoice!' => '',
+ 'Cannot delete item!' => '',
+ 'Cannot delete order!' => '',
+ 'Cannot delete transaction!' => '',
+ 'Cannot delete vendor!' => '',
+ 'Cannot have a value in both Debit and Credit!' => '',
+ 'Cannot post a transaction without a value!' => '',
+ 'Cannot post invoice for a closed period!' => '',
+ 'Cannot post invoice!' => '',
+ 'Cannot post payment for a closed period!' => '',
+ 'Cannot post payment!' => '',
+ 'Cannot post transaction for a closed period!' => '',
+ 'Cannot post transaction!' => '',
+ 'Cannot process payment for a closed period!' => '',
+ 'Cannot save account!' => '',
+ 'Cannot save order!' => '',
+ 'Cannot save preferences!' => '',
+ 'Cannot stock assemblies!' => '',
+ 'Cash' => '',
+ 'Cash based' => '',
+ 'Cc' => '',
+ 'Change Admin Password' => '',
+ 'Change Password' => '',
+ 'Character Set' => '',
+ 'Chart of Accounts' => '',
+ 'Check' => 'Cheque',
+ 'Check printed!' => '',
+ 'Check printing failed!' => '',
+ 'Cleared Balance' => '',
+ 'Click on login name to edit!' => '',
+ 'Close Books up to' => '',
+ 'Closed' => '',
+ 'Company' => '',
+ 'Compare to' => '',
+ 'Confirm!' => '',
+ 'Connect to' => '',
+ 'Contact' => '',
+ 'Continue' => '',
+ 'Copies' => '',
+ 'Copy to COA' => '',
+ 'Create Chart of Accounts' => '',
+ 'Create Dataset' => '',
+ 'Credit' => '',
+ 'Credit Limit' => '',
+ 'Curr' => '',
+ 'Currency' => '',
+ 'Current' => '',
+ 'Customer' => '',
+ 'Customer deleted!' => '',
+ 'Customer missing!' => '',
+ 'Customer not on file!' => '',
+ 'Customer saved!' => '',
+ 'Customers' => '',
+ 'DBI not installed!' => '',
+ 'Database' => '',
+ 'Database Administration' => '',
+ 'Database Driver not checked!' => '',
+ 'Database Host' => '',
+ 'Database User missing!' => '',
+ 'Dataset' => '',
+ 'Dataset missing!' => '',
+ 'Dataset updated!' => '',
+ 'Date' => '',
+ 'Date Format' => '',
+ 'Date Paid' => '',
+ 'Date missing!' => '',
+ 'Debit' => '',
+ 'Debit and credit out of balance!' => '',
+ 'Dec' => '',
+ 'December' => '',
+ 'Decimalplaces' => '',
+ 'Delete' => '',
+ 'Delete Account' => '',
+ 'Delete Dataset' => '',
+ 'Delivery Date' => '',
+ 'Deposit' => '',
+ 'Description' => '',
+ 'Difference' => '',
+ 'Directory' => '',
+ 'Discount' => '',
+ 'Done' => '',
+ 'Drawing' => '',
+ 'Driver' => '',
+ 'Dropdown Limit' => '',
+ 'Due' => '',
+ 'Due Date' => '',
+ 'Due Date missing!' => '',
+ 'E-mail' => '',
+ 'E-mail Statement to' => '',
+ 'E-mail address missing!' => '',
+ 'Edit' => '',
+ 'Edit Account' => '',
+ 'Edit Accounts Payables Transaction' => 'Edit Creditor Transaction',
+ 'Edit Accounts Receivables Transaction' => 'Edit Debtor Transaction',
+ 'Edit Assembly' => '',
+ 'Edit Customer' => '',
+ 'Edit GIFI' => '',
+ 'Edit General Ledger Transaction' => '',
+ 'Edit Group' => '',
+ 'Edit Part' => '',
+ 'Edit Preferences for' => '',
+ 'Edit Project' => '',
+ 'Edit Purchase Order' => '',
+ 'Edit Sales Invoice' => '',
+ 'Edit Sales Order' => '',
+ 'Edit Service' => '',
+ 'Edit Template' => '',
+ 'Edit User' => '',
+ 'Edit Vendor' => '',
+ 'Edit Vendor Invoice' => '',
+ 'Employee' => '',
+ 'Enforce transaction reversal for all dates' => '',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => '',
+ 'Equity' => '',
+ 'Exch' => '',
+ 'Exchangerate' => '',
+ 'Exchangerate Difference' => '',
+ 'Exchangerate for payment missing!' => '',
+ 'Exchangerate missing!' => '',
+ 'Existing Datasets' => '',
+ 'Expense' => '',
+ 'Expense Account' => '',
+ 'Expense/Asset' => '',
+ 'Extended' => '',
+ 'Fax' => '',
+ 'Feb' => '',
+ 'February' => '',
+ 'Foreign Exchange Gain' => '',
+ 'Foreign Exchange Loss' => '',
+ 'From' => '',
+ 'GIFI' => '',
+ 'GIFI deleted!' => '',
+ 'GIFI missing!' => '',
+ 'GIFI saved!' => '',
+ 'GL Transaction' => '',
+ 'General Ledger' => '',
+ 'Goods & Services' => '',
+ 'Group' => '',
+ 'Group Items' => '',
+ 'Group deleted!' => '',
+ 'Group missing!' => '',
+ 'Group saved!' => '',
+ 'Groups' => '',
+ 'HTML Templates' => '',
+ 'Heading' => '',
+ 'Host' => '',
+ 'Hostname missing!' => '',
+ 'ID' => '',
+ 'Image' => '',
+ 'In-line' => '',
+ 'Include in Report' => '',
+ 'Include in drop-down menus' => '',
+ 'Include this account on the customer/vendor forms to flag customer/vendor as taxable?' => 'Include this account on debtor/creditor forms to set debtor/creditor taxable?',
+ 'Income' => 'Revenue',
+ 'Income Account' => 'Revenue Account',
+ 'Income Statement' => '',
+ 'Incorrect Dataset version!' => '',
+ 'Incorrect Password!' => '',
+ 'Individual Items' => '',
+ 'Inventory' => '',
+ 'Inventory Account' => '',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => '',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => '',
+ 'Invoice' => '',
+ 'Invoice Date' => '',
+ 'Invoice Date missing!' => '',
+ 'Invoice Number' => '',
+ 'Invoice Number missing!' => '',
+ 'Invoice deleted!' => '',
+ 'Invoice posted!' => '',
+ 'Invoices' => '',
+ 'Is this a summary account to record' => '',
+ 'Item deleted!' => '',
+ 'Item not on file!' => '',
+ 'Jan' => '',
+ 'January' => '',
+ 'Jul' => '',
+ 'July' => '',
+ 'Jun' => '',
+ 'June' => '',
+ 'LaTeX Templates' => '',
+ 'Language' => '',
+ 'Last Cost' => '',
+ 'Last Invoice Number' => '',
+ 'Last Numbers & Default Accounts' => '',
+ 'Last Purchase Order Number' => '',
+ 'Last Sales Order Number' => '',
+ 'Leave host and port field empty unless you want to make a remote connection.' => '',
+ 'Liability' => '',
+ 'Licensed to' => '',
+ 'Line Total' => '',
+ 'Link' => '',
+ 'Link Accounts' => '',
+ 'List Accounts' => '',
+ 'List GIFI' => '',
+ 'List Price' => '',
+ 'List Transactions' => '',
+ 'Login' => '',
+ 'Logout' => '',
+ 'Make' => '',
+ 'Mar' => '',
+ 'March' => '',
+ 'May' => '',
+ 'May ' => '',
+ 'Message' => '',
+ 'Microfiche' => '',
+ 'Model' => '',
+ 'Multibyte Encoding' => '',
+ 'N/A' => '',
+ 'Name' => '',
+ 'Name missing!' => '',
+ 'New Templates' => '',
+ 'No' => '',
+ 'No Database Drivers available!' => '',
+ 'No Dataset selected!' => '',
+ 'No email address for' => '',
+ 'No.' => '',
+ 'Notes' => '',
+ 'Nothing applied!' => '',
+ 'Nothing selected!' => '',
+ 'Nothing to delete!' => '',
+ 'Nov' => '',
+ 'November' => '',
+ 'Number' => '',
+ 'Number Format' => '',
+ 'Number missing in Row' => '',
+ 'O' => '',
+ 'Obsolete' => '',
+ 'Oct' => '',
+ 'October' => '',
+ 'On Hand' => '',
+ 'On Order' => '',
+ 'Open' => '',
+ 'Oracle Database Administration' => '',
+ 'Order' => '',
+ 'Order Date' => '',
+ 'Order Date missing!' => '',
+ 'Order Entry' => '',
+ 'Order Number' => '',
+ 'Order Number missing!' => '',
+ 'Order deleted!' => '',
+ 'Order saved!' => '',
+ 'Ordered' => '',
+ 'Orphaned' => '',
+ 'Out of balance!' => '',
+ 'PDF' => '',
+ 'Packing List' => '',
+ 'Packing List Date missing!' => '',
+ 'Packing List Number missing!' => '',
+ 'Paid' => '',
+ 'Paid in full' => '',
+ 'Part' => '',
+ 'Part Number missing!' => '',
+ 'Parts' => '',
+ 'Parts Inventory' => '',
+ 'Password' => '',
+ 'Password changed!' => '',
+ 'Payables' => '',
+ 'Payment' => '',
+ 'Payment date missing!' => '',
+ 'Payment posted!' => '',
+ 'Payments' => '',
+ 'Pg Database Administration' => '',
+ 'Phone' => '',
+ 'Port' => '',
+ 'Port missing!' => '',
+ 'Post' => '',
+ 'Post as new' => '',
+ 'Postscript' => '',
+ 'Preferences' => '',
+ 'Preferences saved!' => '',
+ 'Price' => '',
+ 'Print' => '',
+ 'Printer' => '',
+ 'Project' => '',
+ 'Project Number' => '',
+ 'Project Number missing!' => '',
+ 'Project deleted!' => '',
+ 'Project not on file!' => '',
+ 'Project saved!' => '',
+ 'Projects' => '',
+ 'Purchase Order' => '',
+ 'Purchase Orders' => '',
+ 'Qty' => '',
+ 'ROP' => '',
+ 'Rate' => '',
+ 'Recd' => '',
+ 'Receipt' => '',
+ 'Receipt printed!' => '',
+ 'Receipt printing failed!' => '',
+ 'Receipts' => '',
+ 'Receivables' => '',
+ 'Reconciliation' => '',
+ 'Record in' => '',
+ 'Reference' => '',
+ 'Reference missing!' => '',
+ 'Remaining' => '',
+ 'Report for' => '',
+ 'Reports' => '',
+ 'Required by' => '',
+ 'Retained Earnings' => '',
+ 'Sales' => '',
+ 'Sales Invoice' => '',
+ 'Sales Order' => '',
+ 'Sales Orders' => '',
+ 'Salesperson' => '',
+ 'Save' => '',
+ 'Save as new' => '',
+ 'Save to File' => '',
+ 'Screen' => '',
+ 'Select a Dataset to delete and press "Continue"' => '',
+ 'Select all' => '',
+ 'Select from one of the items below' => '',
+ 'Select from one of the names below' => '',
+ 'Select from one of the projects below' => '',
+ 'Select postscript or PDF!' => '',
+ 'Sell Price' => '',
+ 'Send by E-Mail' => '',
+ 'Sep' => '',
+ 'September' => '',
+ 'Service' => '',
+ 'Service Items' => '',
+ 'Service Number missing!' => '',
+ 'Services' => '',
+ 'Setup Templates' => '',
+ 'Ship' => '',
+ 'Ship to' => '',
+ 'Ship via' => '',
+ 'Short' => '',
+ 'Signature' => '',
+ 'Sold' => '',
+ 'Source' => '',
+ 'Standard' => '',
+ 'Statement' => '',
+ 'Statement Balance' => '',
+ 'Statement sent to' => '',
+ 'Statements sent to printer!' => '',
+ 'Stock' => '',
+ 'Stock Assembly' => '',
+ 'Stylesheet' => '',
+ 'Subject' => '',
+ 'Subtotal' => '',
+ 'System' => '',
+ 'Tax' => '',
+ 'Tax Accounts' => '',
+ 'Tax Included' => '',
+ 'Tax collected' => '',
+ 'Tax paid' => '',
+ 'Taxable' => '',
+ 'Template saved!' => '',
+ 'Templates' => '',
+ 'Terms: Net' => '',
+ 'The following Datasets are not in use and can be deleted' => '',
+ 'The following Datasets need to be updated' => '',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => '',
+ 'To' => '',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => '',
+ 'Top Level' => '',
+ 'Total' => '',
+ 'Transaction Date missing!' => '',
+ 'Transaction deleted!' => '',
+ 'Transaction posted!' => '',
+ 'Transaction reversal enforced for all dates' => '',
+ 'Transaction reversal enforced up to' => '',
+ 'Transactions' => '',
+ 'Transactions exist, cannot delete customer!' => '',
+ 'Transactions exist, cannot delete vendor!' => '',
+ 'Transactions exist; cannot delete account!' => '',
+ 'Trial Balance' => '',
+ 'Unit' => '',
+ 'Unit of measure' => '',
+ 'Update' => '',
+ 'Update Dataset' => '',
+ 'Updated' => '',
+ 'Use Templates' => '',
+ 'User' => '',
+ 'User deleted!' => '',
+ 'User saved!' => '',
+ 'Vendor' => '',
+ 'Vendor Invoice' => '',
+ 'Vendor deleted!' => '',
+ 'Vendor missing!' => '',
+ 'Vendor not on file!' => '',
+ 'Vendor saved!' => '',
+ 'Vendors' => '',
+ 'Version' => '',
+ 'Weight' => '',
+ 'Weight Unit' => '',
+ 'What type of item is this?' => '',
+ 'Year End' => '',
+ 'Yes' => '',
+ 'You are logged out!' => '',
+ 'You did not enter a name!' => '',
+ 'You must enter a host and port for local and remote connections!' => '',
+ 'as at' => '',
+ 'collected on sales' => '',
+ 'days' => '',
+ 'does not exist' => '',
+ 'ea' => '',
+ 'emailed to' => '',
+ 'for Period' => '',
+ 'hr' => '',
+ 'is already a member!' => '',
+ 'is not a member!' => '',
+ 'localhost' => '',
+ 'locked!' => '',
+ 'paid on purchases' => '',
+ 'sent to printer' => '',
+ 'successfully created!' => '',
+ 'successfully deleted!' => '',
+ 'to' => '',
+ 'website' => '',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Purchases',
+ 'AR' => 'Sales',
+ 'Account' => 'Account',
+ 'Account Number' => 'Account Number',
+ 'Account Number missing!' => 'Account Number missing!',
+ 'Account Type' => 'Account Type',
+ 'Account Type missing!' => 'Account Type missing!',
+ 'Account deleted!' => 'Account deleted!',
+ 'Account saved!' => 'Account saved!',
+ 'Add Account' => 'Add Account',
+ 'Add GIFI' => 'Add GIFI',
+ 'Address' => 'Address',
+ 'Asset' => 'Asset',
+ 'Audit Control' => 'Audit Control',
+ 'Backup sent to' => 'Backup sent to',
+ 'Books are open' => 'Books are open',
+ 'Business Number' => 'Business Number',
+ 'COGS' => 'COGS',
+ 'Cannot delete account!' => 'Cannot delete account!',
+ 'Cannot delete default account!' => 'Cannot delete default account!',
+ 'Cannot save account!' => 'Cannot save account!',
+ 'Cannot save preferences!' => 'Cannot save preferences!',
+ 'Character Set' => 'Character Set',
+ 'Chart of Accounts' => 'Chart of Accounts',
+ 'Close Books up to' => 'Close Books up to',
+ 'Company' => 'Company',
+ 'Continue' => 'Continue',
+ 'Copy to COA' => 'Copy to COA',
+ 'Credit' => 'Credit',
+ 'Date Format' => 'Date Format',
+ 'Debit' => 'Debit',
+ 'Delete' => 'Delete',
+ 'Delete Account' => 'Delete Account',
+ 'Description' => 'Description',
+ 'Dropdown Limit' => 'Dropdown Limit',
+ 'E-mail' => 'E-mail',
+ 'Edit' => 'Edit',
+ 'Edit Account' => 'Edit Account',
+ 'Edit GIFI' => 'Edit GIFI',
+ 'Edit Preferences for' => 'Edit Preferences for',
+ 'Edit Template' => 'Edit Template',
+ 'Enforce transaction reversal for all dates' => 'Enforce transaction reversal for all dates',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies',
+ 'Equity' => 'Equity',
+ 'Expense' => 'Expense',
+ 'Expense Account' => 'Expense Account',
+ 'Expense/Asset' => 'Expense/Asset',
+ 'Fax' => 'Fax',
+ 'Foreign Exchange Gain' => 'Foreign Exchange Gain',
+ 'Foreign Exchange Loss' => 'Foreign Exchange Loss',
+ 'GIFI' => 'GIFI',
+ 'GIFI deleted!' => 'GIFI deleted!',
+ 'GIFI missing!' => 'GIFI missing!',
+ 'GIFI saved!' => 'GIFI saved!',
+ 'Heading' => 'Heading',
+ 'Include in drop-down menus' => 'Include in drop-down menus',
+ 'Include this account on the customer/vendor forms to flag customer/vendor as taxable?' => 'Include this account on debtor/creditor forms to set debtor/creditor taxable?',
+ 'Income' => 'Revenue',
+ 'Income Account' => 'Revenue Account',
+ 'Inventory' => 'Inventory',
+ 'Inventory Account' => 'Inventory Account',
+ 'Is this a summary account to record' => 'Is this a summary account to record',
+ 'Language' => 'Language',
+ 'Last Invoice Number' => 'Last Invoice Number',
+ 'Last Numbers & Default Accounts' => 'Last Numbers & Default Accounts',
+ 'Last Purchase Order Number' => 'Last Purchase Order Number',
+ 'Last Sales Order Number' => 'Last Sales Order Number',
+ 'Liability' => 'Liability',
+ 'Link' => 'Link',
+ 'Name' => 'Name',
+ 'No' => 'No',
+ 'No email address for' => 'No email address for',
+ 'Number' => 'Number',
+ 'Number Format' => 'Number Format',
+ 'Parts Inventory' => 'Parts Inventory',
+ 'Password' => 'Password',
+ 'Payables' => 'Payables',
+ 'Payment' => 'Payment',
+ 'Phone' => 'Phone',
+ 'Preferences saved!' => 'Preferences saved!',
+ 'Rate' => 'Rate',
+ 'Receivables' => 'Receivables',
+ 'Sales' => 'Sales',
+ 'Save' => 'Save',
+ 'Service Items' => 'Service Items',
+ 'Ship via' => 'Ship via',
+ 'Signature' => 'Signature',
+ 'Stylesheet' => 'Stylesheet',
+ 'Tax' => 'Tax',
+ 'Tax Accounts' => 'Tax Accounts',
+ 'Template saved!' => 'Template saved!',
+ 'Transaction reversal enforced for all dates' => 'Transaction reversal enforced for all dates',
+ 'Transaction reversal enforced up to' => 'Transaction reversal enforced up to',
+ 'Transactions exist; cannot delete account!' => 'Transactions exist; cannot delete account!',
+ 'Weight Unit' => 'Weight Unit',
+ 'Year End' => 'Year End',
+ 'Yes' => 'Yes',
+ 'does not exist' => 'does not exist',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_gifi' => 'add_gifi',
+ 'audit_control' => 'audit_control',
+ 'backup' => 'backup',
+ 'config' => 'config',
+ 'continue' => 'continue',
+ 'copy_to_coa' => 'copy_to_coa',
+ 'delete' => 'delete',
+ 'delete_account' => 'delete_account',
+ 'delete_gifi' => 'delete_gifi',
+ 'display_form' => 'display_form',
+ 'display_stylesheet' => 'display_stylesheet',
+ 'doclose' => 'doclose',
+ 'edit' => 'edit',
+ 'edit_gifi' => 'edit_gifi',
+ 'edit_template' => 'edit_template',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gifi_footer' => 'gifi_footer',
+ 'gifi_header' => 'gifi_header',
+ 'list' => 'list',
+ 'list_gifi' => 'list_gifi',
+ 'save' => 'save',
+ 'save_account' => 'save_account',
+ 'save_gifi' => 'save_gifi',
+ 'save_preferences' => 'save_preferences',
+ 'save_template' => 'save_template',
+ 'add_account' => 'add_account',
+ 'continue' => 'continue',
+ 'copy_to_coa' => 'copy_to_coa',
+ 'delete' => 'delete',
+ 'edit' => 'edit',
+ 'edit_account' => 'edit_account',
+ 'save' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Purchase Transaction',
+ 'AP Transactions' => 'Purchase Transactions',
+ 'Account' => 'Account',
+ 'Add Accounts Payables Transaction' => 'Add Purchase Transaction',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Amount Due' => 'Amount Due',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Are you sure you want to delete Transaction',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Cannot delete transaction!' => 'Cannot delete transaction!',
+ 'Cannot post payment for a closed period!' => 'Cannot post payment for a closed period!',
+ 'Cannot post transaction for a closed period!' => 'Cannot post transaction for a closed period!',
+ 'Cannot post transaction!' => 'Cannot post transaction!',
+ 'Closed' => 'Closed',
+ 'Confirm!' => 'Confirm!',
+ 'Continue' => 'Continue',
+ 'Currency' => 'Currency',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Date Paid' => 'Date Paid',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Description' => 'Description',
+ 'Due Date' => 'Due Date',
+ 'Due Date missing!' => 'Due Date missing!',
+ 'Edit Accounts Payables Transaction' => 'Edit Creditor Transaction',
+ 'Employee' => 'Employee',
+ 'Exch' => 'Exch',
+ 'Exchangerate' => 'Exchangerate',
+ 'Exchangerate for payment missing!' => 'Exchangerate for payment missing!',
+ 'Exchangerate missing!' => 'Exchangerate missing!',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Include in Report',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date' => 'Invoice Date',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number' => 'Invoice Number',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Open' => 'Open',
+ 'Order' => 'Order',
+ 'Order Number' => 'Order Number',
+ 'Paid' => 'Paid',
+ 'Payment date missing!' => 'Payment date missing!',
+ 'Payments' => 'Payments',
+ 'Post' => 'Post',
+ 'Post as new' => 'Post as new',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Subtotal',
+ 'Tax' => 'Tax',
+ 'Tax Included' => 'Tax Included',
+ 'Total' => 'Total',
+ 'Transaction deleted!' => 'Transaction deleted!',
+ 'Transaction posted!' => 'Transaction posted!',
+ 'Update' => 'Update',
+ 'Vendor' => 'Vendor',
+ 'Vendor Invoice' => 'Vendor Invoice',
+ 'Vendor missing!' => 'Vendor missing!',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'Yes' => 'Yes',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_subtotal' => 'ap_subtotal',
+ 'ap_transaction' => 'ap_transaction',
+ 'ap_transactions' => 'ap_transactions',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'purchase_transaction' => 'ap_transaction',
+ 'add_purchase_transaction' => 'add_accounts_payables_transaction',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'edit_creditor_transaction' => 'edit_accounts_payables_transaction',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AR Transaction' => 'Sales Transaction',
+ 'AR Transactions' => 'Sales Transactions',
+ 'Account' => 'Account',
+ 'Add Accounts Receivables Transaction' => 'Add Sales Transaction',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Amount Due' => 'Amount Due',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Are you sure you want to delete Transaction',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Cannot delete transaction!' => 'Cannot delete transaction!',
+ 'Cannot post payment for a closed period!' => 'Cannot post payment for a closed period!',
+ 'Cannot post transaction for a closed period!' => 'Cannot post transaction for a closed period!',
+ 'Cannot post transaction!' => 'Cannot post transaction!',
+ 'Closed' => 'Closed',
+ 'Confirm!' => 'Confirm!',
+ 'Continue' => 'Continue',
+ 'Credit Limit' => 'Credit Limit',
+ 'Currency' => 'Currency',
+ 'Customer' => 'Customer',
+ 'Customer missing!' => 'Customer missing!',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Date Paid' => 'Date Paid',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Description' => 'Description',
+ 'Due Date' => 'Due Date',
+ 'Due Date missing!' => 'Due Date missing!',
+ 'Edit Accounts Receivables Transaction' => 'Edit Debtor Transaction',
+ 'Exch' => 'Exch',
+ 'Exchangerate' => 'Exchangerate',
+ 'Exchangerate for payment missing!' => 'Exchangerate for payment missing!',
+ 'Exchangerate missing!' => 'Exchangerate missing!',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Include in Report',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date' => 'Invoice Date',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number' => 'Invoice Number',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Open' => 'Open',
+ 'Order' => 'Order',
+ 'Order Number' => 'Order Number',
+ 'Paid' => 'Paid',
+ 'Payment date missing!' => 'Payment date missing!',
+ 'Payments' => 'Payments',
+ 'Post' => 'Post',
+ 'Post as new' => 'Post as new',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Remaining' => 'Remaining',
+ 'Sales Invoice' => 'Sales Invoice',
+ 'Salesperson' => 'Salesperson',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Ship via' => 'Ship via',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Subtotal',
+ 'Tax' => 'Tax',
+ 'Tax Included' => 'Tax Included',
+ 'Total' => 'Total',
+ 'Transaction deleted!' => 'Transaction deleted!',
+ 'Transaction posted!' => 'Transaction posted!',
+ 'Update' => 'Update',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'Yes' => 'Yes',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_subtotal' => 'ar_subtotal',
+ 'ar_transaction' => 'ar_transaction',
+ 'ar_transactions' => 'ar_transactions',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'sales_transaction' => 'ar_transaction',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'sales_invoice' => 'sales_invoice',
+ 'update' => 'update',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Address' => 'Address',
+ 'Continue' => 'Continue',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Description' => 'Description',
+ 'Number' => 'Number',
+ 'Project not on file!' => 'Project not on file!',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Vendor not on file!' => 'Vendor not on file!',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'continue' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Are you sure you want to remove the marked entries from the queue?' => 'Are you sure you want to remove the marked entries from the queue?',
+ 'Cannot remove files!' => 'Cannot remove files!',
+ 'Checks' => 'Cheques',
+ 'Confirm!' => 'Confirm!',
+ 'Continue' => 'Continue',
+ 'Customer' => 'Debtor',
+ 'Date' => 'Date',
+ 'From' => 'From',
+ 'Invoice' => 'Invoice',
+ 'Invoice Number' => 'Invoice Number',
+ 'Marked entries printed!' => 'Marked entries printed!',
+ 'Order' => 'Order',
+ 'Order Number' => 'Order Number',
+ 'Packing Lists' => 'Packing Lists',
+ 'Print' => 'Print',
+ 'Printing ... ' => 'Printing ... ',
+ 'Purchase Orders' => 'Purchase Orders',
+ 'Quotation' => 'Quotation',
+ 'Quotation Number' => 'Quotation Number',
+ 'Quotations' => 'Quotations',
+ 'RFQs' => 'RFQs',
+ 'Receipts' => 'Receipts',
+ 'Reference' => 'Reference',
+ 'Remove' => 'Remove',
+ 'Removed spoolfiles!' => 'Removed spoolfiles!',
+ 'Removing marked entries from queue ...' => 'Removing marked entries from queue ...',
+ 'Sales Invoices' => 'Sales Invoices',
+ 'Sales Orders' => 'Sales Orders',
+ 'Select all' => 'Select all',
+ 'Spoolfile' => 'Spoolfile',
+ 'To' => 'To',
+ 'Vendor' => 'Creditor',
+ 'Yes' => 'Yes',
+ 'done' => 'done',
+};
+
+$self{subs} = {
+ 'continue' => 'continue',
+ 'list_spool' => 'list_spool',
+ 'print' => 'print',
+ 'remove' => 'remove',
+ 'search' => 'search',
+ 'select_all' => 'select_all',
+ 'yes' => 'yes',
+ 'continue' => 'continue',
+ 'print' => 'print',
+ 'remove' => 'remove',
+ 'select_all' => 'select_all',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Balance',
+ 'Chart of Accounts' => 'Chart of Accounts',
+ 'Credit' => 'Credit',
+ 'Date' => 'Date',
+ 'Debit' => 'Debit',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Description' => 'Description',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'GIFI' => 'GIFI',
+ 'Include in Report' => 'Include in Report',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'List Transactions' => 'List Transactions',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Reference' => 'Reference',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Subtotal' => 'Subtotal',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'ca_subtotal' => 'ca_subtotal',
+ 'chart_of_accounts' => 'chart_of_accounts',
+ 'list' => 'list',
+ 'list_transactions' => 'list_transactions',
+ 'list_transactions' => 'list_transactions',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Amount does not equal applied!' => 'Amount does not equal applied!',
+ 'Amount missing!' => 'Amount missing!',
+ 'Applied' => 'Applied',
+ 'Cannot post payment!' => 'Cannot post payment!',
+ 'Cannot process payment for a closed period!' => 'Cannot process payment for a closed period!',
+ 'Check' => 'Cheque',
+ 'Check printed!' => 'Check printed!',
+ 'Check printing failed!' => 'Check printing failed!',
+ 'Continue' => 'Continue',
+ 'Currency' => 'Currency',
+ 'Customer' => 'Customer',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Date missing!' => 'Date missing!',
+ 'Description' => 'Description',
+ 'Due' => 'Due',
+ 'Exchangerate' => 'Exchangerate',
+ 'From' => 'From',
+ 'Invoice' => 'Invoice',
+ 'Invoices' => 'Invoices',
+ 'Nothing applied!' => 'Nothing applied!',
+ 'Number' => 'Number',
+ 'Paid in full' => 'Paid in full',
+ 'Payment' => 'Payment',
+ 'Payment posted!' => 'Payment posted!',
+ 'Post' => 'Post',
+ 'Print' => 'Print',
+ 'Printer' => 'Printer',
+ 'Project not on file!' => 'Project not on file!',
+ 'Receipt' => 'Receipt',
+ 'Receipt printed!' => 'Receipt printed!',
+ 'Receipt printing failed!' => 'Receipt printing failed!',
+ 'Reference' => 'Reference',
+ 'Screen' => 'Screen',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Update' => 'Update',
+ 'Vendor' => 'Vendor',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'list_invoices' => 'list_invoices',
+ 'name_selected' => 'name_selected',
+ 'payment' => 'payment',
+ 'post' => 'post',
+ 'print' => 'print',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'continue' => 'continue',
+ 'post' => 'post',
+ 'print' => 'print',
+ 'update' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Add',
+ 'Address' => 'Address',
+ 'All' => 'All',
+ 'Bcc' => 'Bcc',
+ 'Cannot delete customer!' => 'Cannot delete customer!',
+ 'Cannot delete vendor!' => 'Cannot delete vendor!',
+ 'Cc' => 'Cc',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Credit Limit' => 'Credit Limit',
+ 'Customer deleted!' => 'Customer deleted!',
+ 'Customer saved!' => 'Customer saved!',
+ 'Customers' => 'Customers',
+ 'Delete' => 'Delete',
+ 'Discount' => 'Discount',
+ 'E-mail' => 'E-mail',
+ 'Edit Customer' => 'Edit Customer',
+ 'Edit Vendor' => 'Edit Vendor',
+ 'Fax' => 'Fax',
+ 'Include in Report' => 'Include in Report',
+ 'Invoice' => 'Invoice',
+ 'Name' => 'Name',
+ 'Name missing!' => 'Name missing!',
+ 'Notes' => 'Notes',
+ 'Number' => 'Number',
+ 'Order' => 'Order',
+ 'Orphaned' => 'Orphaned',
+ 'Phone' => 'Phone',
+ 'Save' => 'Save',
+ 'Ship to' => 'Ship to',
+ 'Tax Included' => 'Tax Included',
+ 'Taxable' => 'Taxable',
+ 'Terms: Net' => 'Terms: Net',
+ 'Transactions exist, cannot delete customer!' => 'Transactions exist, cannot delete customer!',
+ 'Transactions exist, cannot delete vendor!' => 'Transactions exist, cannot delete vendor!',
+ 'Vendor deleted!' => 'Vendor deleted!',
+ 'Vendor saved!' => 'Vendor saved!',
+ 'Vendors' => 'Vendors',
+ 'days' => 'days',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'customer_invoice' => 'customer_invoice',
+ 'customer_order' => 'customer_order',
+ 'delete' => 'delete',
+ 'delete_customer' => 'delete_customer',
+ 'delete_vendor' => 'delete_vendor',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'invoice' => 'invoice',
+ 'list_names' => 'list_names',
+ 'order' => 'order',
+ 'save' => 'save',
+ 'save_customer' => 'save_customer',
+ 'save_vendor' => 'save_vendor',
+ 'search' => 'search',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'vendor_order' => 'vendor_order',
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'invoice' => 'invoice',
+ 'order' => 'order',
+ 'save' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Purchase Transaction',
+ 'AR Transaction' => 'Sales Transaction',
+ 'Account' => 'Account',
+ 'Add General Ledger Transaction' => 'Add General Ledger Transaction',
+ 'Address' => 'Address',
+ 'All' => 'All',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Transaction' => 'Are you sure you want to delete Transaction',
+ 'Asset' => 'Asset',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Balance',
+ 'Cannot delete transaction!' => 'Cannot delete transaction!',
+ 'Cannot have a value in both Debit and Credit!' => 'Cannot have a value in both Debit and Credit!',
+ 'Cannot post a transaction without a value!' => 'Cannot post a transaction without a value!',
+ 'Cannot post transaction for a closed period!' => 'Cannot post transaction for a closed period!',
+ 'Confirm!' => 'Confirm!',
+ 'Continue' => 'Continue',
+ 'Credit' => 'Credit',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Debit' => 'Debit',
+ 'Debit and credit out of balance!' => 'Debit and credit out of balance!',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Description' => 'Description',
+ 'Edit General Ledger Transaction' => 'Edit General Ledger Transaction',
+ 'Equity' => 'Equity',
+ 'Expense' => 'Expense',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'GIFI' => 'GIFI',
+ 'GL Transaction' => 'GL Transaction',
+ 'General Ledger' => 'General Ledger',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Include in Report',
+ 'Income' => 'Revenue',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Liability' => 'Liability',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Post' => 'Post',
+ 'Post as new' => 'Post as new',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Reference' => 'Reference',
+ 'Reference missing!' => 'Reference missing!',
+ 'Reports' => 'Reports',
+ 'Sales Invoice' => 'Sales Invoice',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Subtotal',
+ 'Transaction Date missing!' => 'Transaction Date missing!',
+ 'Transaction deleted!' => 'Transaction deleted!',
+ 'Transaction posted!' => 'Transaction posted!',
+ 'Update' => 'Update',
+ 'Vendor Invoice' => 'Vendor Invoice',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'Yes' => 'Yes',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'form_row' => 'form_row',
+ 'generate_report' => 'generate_report',
+ 'gl_subtotal' => 'gl_subtotal',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'purchase_transaction' => 'ap_transaction',
+ 'sales_transaction' => 'ar_transaction',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'gl_transaction' => 'gl_transaction',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'sales_invoice' => 'sales_invoice',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Active' => 'Active',
+ 'Add' => 'Add',
+ 'Add Assembly' => 'Add Assembly',
+ 'Add Part' => 'Add Part',
+ 'Add Purchase Order' => 'Add Purchase Order',
+ 'Add Sales Order' => 'Add Sales Order',
+ 'Add Service' => 'Add Service',
+ 'Address' => 'Address',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Assemblies' => 'Assemblies',
+ 'Assemblies restocked!' => 'Assemblies restocked!',
+ 'Assembly Number missing!' => 'Assembly Number missing!',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'BOM' => 'BOM',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Bin',
+ 'Bought' => 'Bought',
+ 'COGS' => 'COGS',
+ 'Cannot delete item!' => 'Cannot delete item!',
+ 'Cannot stock assemblies!' => 'Cannot stock assemblies!',
+ 'Cc' => 'Cc',
+ 'Closed' => 'Closed',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Delivery Date' => 'Delivery Date',
+ 'Description' => 'Description',
+ 'Drawing' => 'Drawing',
+ 'E-mail' => 'E-mail',
+ 'E-mail address missing!' => 'E-mail address missing!',
+ 'Edit Assembly' => 'Edit Assembly',
+ 'Edit Part' => 'Edit Part',
+ 'Edit Service' => 'Edit Service',
+ 'Expense' => 'Expense',
+ 'Extended' => 'Extended',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'Group' => 'Group',
+ 'Group Items' => 'Group Items',
+ 'Image' => 'Image',
+ 'In-line' => 'In-line',
+ 'Include in Report' => 'Include in Report',
+ 'Income' => 'Revenue',
+ 'Individual Items' => 'Individual Items',
+ 'Inventory' => 'Inventory',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => 'Inventory quantity must be zero before you can set this assembly obsolete!',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => 'Inventory quantity must be zero before you can set this part obsolete!',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number' => 'Invoice Number',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Item deleted!' => 'Item deleted!',
+ 'Item not on file!' => 'Item not on file!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Last Cost' => 'Last Cost',
+ 'Line Total' => 'Line Total',
+ 'Link Accounts' => 'Link Accounts',
+ 'List Price' => 'List Price',
+ 'Make' => 'Make',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'Microfiche' => 'Microfiche',
+ 'Model' => 'Model',
+ 'Name' => 'Name',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Number missing in Row' => 'Number missing in Row',
+ 'Obsolete' => 'Obsolete',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'On Hand' => 'On Hand',
+ 'On Order' => 'On Order',
+ 'Order' => 'Order',
+ 'Order Date missing!' => 'Order Date missing!',
+ 'Order Number' => 'Order Number',
+ 'Order Number missing!' => 'Order Number missing!',
+ 'Ordered' => 'Ordered',
+ 'Orphaned' => 'Orphaned',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Packing List',
+ 'Packing List Date missing!' => 'Packing List Date missing!',
+ 'Packing List Number missing!' => 'Packing List Number missing!',
+ 'Part' => 'Part',
+ 'Part Number missing!' => 'Part Number missing!',
+ 'Parts' => 'Parts',
+ 'Phone' => 'Phone',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Price',
+ 'Printer' => 'Printer',
+ 'Project' => 'Project',
+ 'Purchase Order' => 'Purchase Order',
+ 'Qty' => 'Qty',
+ 'ROP' => 'ROP',
+ 'Recd' => 'Recd',
+ 'Required by' => 'Required by',
+ 'Sales' => 'Sales',
+ 'Sales Order' => 'Sales Order',
+ 'Save' => 'Save',
+ 'Save as new' => 'Save as new',
+ 'Screen' => 'Screen',
+ 'Select from one of the items below' => 'Select from one of the items below',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sell Price' => 'Sell Price',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Service' => 'Service',
+ 'Service Number missing!' => 'Service Number missing!',
+ 'Services' => 'Services',
+ 'Ship' => 'Ship',
+ 'Ship to' => 'Ship to',
+ 'Short' => 'Short',
+ 'Sold' => 'Sold',
+ 'Stock' => 'Stock',
+ 'Stock Assembly' => 'Stock Assembly',
+ 'Subject' => 'Subject',
+ 'Subtotal' => 'Subtotal',
+ 'Tax' => 'Tax',
+ 'To' => 'To',
+ 'Top Level' => 'Top Level',
+ 'Total' => 'Total',
+ 'Unit' => 'Unit',
+ 'Unit of measure' => 'Unit of measure',
+ 'Update' => 'Update',
+ 'Updated' => 'Updated',
+ 'Weight' => 'Weight',
+ 'What type of item is this?' => 'What type of item is this?',
+ 'ea' => 'ea',
+ 'emailed to' => 'emailed to',
+ 'hr' => 'hr',
+ 'sent to printer' => 'sent to printer',
+ 'to' => 'to',
+ 'soldtotal' => 'Soldtotal',
+ 'number' => 'Nr',
+ 'top100' => 'TOP 100',
+ 'addtop100' => 'addtop100',
+ 'choice' => 'choice',
+ 'list' => 'list',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'assembly_row' => 'assembly_row',
+ 'check_form' => 'check_form',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'generate_report' => 'generate_report',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'link_part' => 'link_part',
+ 'list_assemblies' => 'list_assemblies',
+ 'makemodel_row' => 'makemodel_row',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'parts_subtotal' => 'parts_subtotal',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'restock_assemblies' => 'restock_assemblies',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'stock_assembly' => 'stock_assembly',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'add' => 'add',
+ 'add_assembly' => 'add_assembly',
+ 'add_part' => 'add_part',
+ 'add_service' => 'add_service',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'edit_assembly' => 'edit_assembly',
+ 'edit_part' => 'edit_part',
+ 'edit_service' => 'edit_service',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'update' => 'update',
+ 'soldtotal' => 'soldtotal',
+ 'top100' => 'top100',
+ 'addtop100' => 'addtop100',
+ 'choice' => 'choice',
+ 'list' => 'list',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add Purchase Order' => 'Add Purchase Order',
+ 'Add Sales Order' => 'Add Sales Order',
+ 'Address' => 'Address',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Bin',
+ 'Cc' => 'Cc',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delivery Date' => 'Delivery Date',
+ 'Description' => 'Description',
+ 'E-mail' => 'E-mail',
+ 'E-mail address missing!' => 'E-mail address missing!',
+ 'Extended' => 'Extended',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'Group' => 'Group',
+ 'Group Items' => 'Group Items',
+ 'In-line' => 'In-line',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Item not on file!' => 'Item not on file!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'Name' => 'Name',
+ 'No.' => 'No.',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Number missing in Row' => 'Number missing in Row',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Order' => 'Order',
+ 'Order Date missing!' => 'Order Date missing!',
+ 'Order Number missing!' => 'Order Number missing!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Packing List',
+ 'Packing List Date missing!' => 'Packing List Date missing!',
+ 'Packing List Number missing!' => 'Packing List Number missing!',
+ 'Part' => 'Part',
+ 'Phone' => 'Phone',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Price',
+ 'Printer' => 'Printer',
+ 'Project' => 'Project',
+ 'Purchase Order' => 'Purchase Order',
+ 'Qty' => 'Qty',
+ 'Recd' => 'Recd',
+ 'Required by' => 'Required by',
+ 'Sales Order' => 'Sales Order',
+ 'Screen' => 'Screen',
+ 'Select from one of the items below' => 'Select from one of the items below',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Service' => 'Service',
+ 'Ship' => 'Ship',
+ 'Ship to' => 'Ship to',
+ 'Subject' => 'Subject',
+ 'To' => 'To',
+ 'Unit' => 'Unit',
+ 'What type of item is this?' => 'What type of item is this?',
+ 'emailed to' => 'emailed to',
+ 'sent to printer' => 'sent to printer',
+};
+
+$self{subs} = {
+ 'check_form' => 'check_form',
+ 'customer_details' => 'customer_details',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'continue' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Add Purchase Order' => 'Add Purchase Order',
+ 'Add Sales Order' => 'Add Sales Order',
+ 'Add Vendor Invoice' => 'Add Vendor Invoice',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Invoice Number' => 'Are you sure you want to delete Invoice Number',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Bin',
+ 'Cannot delete invoice!' => 'Cannot delete invoice!',
+ 'Cannot post invoice for a closed period!' => 'Cannot post invoice for a closed period!',
+ 'Cannot post invoice!' => 'Cannot post invoice!',
+ 'Cannot post payment for a closed period!' => 'Cannot post payment for a closed period!',
+ 'Cc' => 'Cc',
+ 'Confirm!' => 'Confirm!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Currency' => 'Currency',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Delivery Date' => 'Delivery Date',
+ 'Description' => 'Description',
+ 'Due Date' => 'Due Date',
+ 'E-mail' => 'E-mail',
+ 'E-mail address missing!' => 'E-mail address missing!',
+ 'Edit Vendor Invoice' => 'Edit Vendor Invoice',
+ 'Exch' => 'Exch',
+ 'Exchangerate' => 'Exchangerate',
+ 'Exchangerate for payment missing!' => 'Exchangerate for payment missing!',
+ 'Exchangerate missing!' => 'Exchangerate missing!',
+ 'Extended' => 'Extended',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'Group' => 'Group',
+ 'Group Items' => 'Group Items',
+ 'In-line' => 'In-line',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date' => 'Invoice Date',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number' => 'Invoice Number',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Invoice deleted!' => 'Invoice deleted!',
+ 'Invoice posted!' => 'Invoice posted!',
+ 'Item not on file!' => 'Item not on file!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'Name' => 'Name',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Number missing in Row' => 'Number missing in Row',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Order' => 'Order',
+ 'Order Date missing!' => 'Order Date missing!',
+ 'Order Number' => 'Order Number',
+ 'Order Number missing!' => 'Order Number missing!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Packing List',
+ 'Packing List Date missing!' => 'Packing List Date missing!',
+ 'Packing List Number missing!' => 'Packing List Number missing!',
+ 'Part' => 'Part',
+ 'Payment date missing!' => 'Payment date missing!',
+ 'Payments' => 'Payments',
+ 'Phone' => 'Phone',
+ 'Post' => 'Post',
+ 'Post as new' => 'Post as new',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Price',
+ 'Printer' => 'Printer',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Purchase Order' => 'Purchase Order',
+ 'Qty' => 'Qty',
+ 'Recd' => 'Recd',
+ 'Record in' => 'Record in',
+ 'Required by' => 'Required by',
+ 'Sales Order' => 'Sales Order',
+ 'Screen' => 'Screen',
+ 'Select from one of the items below' => 'Select from one of the items below',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Service' => 'Service',
+ 'Ship' => 'Ship',
+ 'Ship to' => 'Ship to',
+ 'Source' => 'Source',
+ 'Subject' => 'Subject',
+ 'Subtotal' => 'Subtotal',
+ 'Tax Included' => 'Tax Included',
+ 'To' => 'To',
+ 'Total' => 'Total',
+ 'Unit' => 'Unit',
+ 'Update' => 'Update',
+ 'Vendor' => 'Vendor',
+ 'Vendor missing!' => 'Vendor missing!',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'What type of item is this?' => 'What type of item is this?',
+ 'Yes' => 'Yes',
+ 'ea' => 'ea',
+ 'emailed to' => 'emailed to',
+ 'sent to printer' => 'sent to printer',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'update' => 'update',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Add Purchase Order' => 'Add Purchase Order',
+ 'Add Sales Invoice' => 'Add Sales Invoice',
+ 'Add Sales Order' => 'Add Sales Order',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Invoice Number' => 'Are you sure you want to delete Invoice Number',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Bin',
+ 'Cannot delete invoice!' => 'Cannot delete invoice!',
+ 'Cannot post invoice for a closed period!' => 'Cannot post invoice for a closed period!',
+ 'Cannot post invoice!' => 'Cannot post invoice!',
+ 'Cannot post payment for a closed period!' => 'Cannot post payment for a closed period!',
+ 'Cc' => 'Cc',
+ 'Confirm!' => 'Confirm!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Credit Limit' => 'Credit Limit',
+ 'Currency' => 'Currency',
+ 'Customer' => 'Customer',
+ 'Customer missing!' => 'Customer missing!',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Delivery Date' => 'Delivery Date',
+ 'Description' => 'Description',
+ 'Due Date' => 'Due Date',
+ 'E-mail' => 'E-mail',
+ 'E-mail address missing!' => 'E-mail address missing!',
+ 'Edit Sales Invoice' => 'Edit Sales Invoice',
+ 'Exch' => 'Exch',
+ 'Exchangerate' => 'Exchangerate',
+ 'Exchangerate for payment missing!' => 'Exchangerate for payment missing!',
+ 'Exchangerate missing!' => 'Exchangerate missing!',
+ 'Extended' => 'Extended',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'Group' => 'Group',
+ 'Group Items' => 'Group Items',
+ 'In-line' => 'In-line',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date' => 'Invoice Date',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number' => 'Invoice Number',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Invoice deleted!' => 'Invoice deleted!',
+ 'Invoice posted!' => 'Invoice posted!',
+ 'Item not on file!' => 'Item not on file!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'Name' => 'Name',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Number missing in Row' => 'Number missing in Row',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Order' => 'Order',
+ 'Order Date missing!' => 'Order Date missing!',
+ 'Order Number' => 'Order Number',
+ 'Order Number missing!' => 'Order Number missing!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Packing List',
+ 'Packing List Date missing!' => 'Packing List Date missing!',
+ 'Packing List Number missing!' => 'Packing List Number missing!',
+ 'Part' => 'Part',
+ 'Payment date missing!' => 'Payment date missing!',
+ 'Payments' => 'Payments',
+ 'Phone' => 'Phone',
+ 'Post' => 'Post',
+ 'Post as new' => 'Post as new',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Price',
+ 'Print' => 'Print',
+ 'Printer' => 'Printer',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Purchase Order' => 'Purchase Order',
+ 'Qty' => 'Qty',
+ 'Recd' => 'Recd',
+ 'Record in' => 'Record in',
+ 'Remaining' => 'Remaining',
+ 'Required by' => 'Required by',
+ 'Sales Order' => 'Sales Order',
+ 'Screen' => 'Screen',
+ 'Select from one of the items below' => 'Select from one of the items below',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Service' => 'Service',
+ 'Ship' => 'Ship',
+ 'Ship to' => 'Ship to',
+ 'Ship via' => 'Ship via',
+ 'Source' => 'Source',
+ 'Subject' => 'Subject',
+ 'Subtotal' => 'Subtotal',
+ 'Tax Included' => 'Tax Included',
+ 'To' => 'To',
+ 'Total' => 'Total',
+ 'Unit' => 'Unit',
+ 'Update' => 'Update',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'What type of item is this?' => 'What type of item is this?',
+ 'Yes' => 'Yes',
+ 'ea' => 'ea',
+ 'emailed to' => 'emailed to',
+ 'sent to printer' => 'sent to printer',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'e_mail' => 'e_mail',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'About' => 'About',
+ 'Database Host' => 'Database Host',
+ 'Dataset' => 'Dataset',
+ 'Incorrect Dataset version!' => 'Incorrect Dataset version!',
+ 'Incorrect Password!' => 'Incorrect Password!',
+ 'Licensed to' => 'Licensed to',
+ 'Login' => 'Login',
+ 'Name' => 'Name',
+ 'Password' => 'Password',
+ 'User' => 'User',
+ 'Version' => 'Version',
+ 'You are logged out!' => 'You are logged out!',
+ 'You did not enter a name!' => 'You did not enter a name!',
+ 'is not a member!' => 'is not a member!',
+ 'localhost' => 'localhost',
+};
+
+$self{subs} = {
+ 'company_logo' => 'company_logo',
+ 'login' => 'login',
+ 'login_screen' => 'login_screen',
+ 'logout' => 'logout',
+ 'login' => 'login',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Purchases',
+ 'AP Aging' => 'Creditor Aging',
+ 'AR' => 'Sales',
+ 'AR Aging' => 'Debtor Aging',
+ 'Accounting Menu' => 'Accounting Menu',
+ 'Add Account' => 'Add Account',
+ 'Add Assembly' => 'Add Assembly',
+ 'Add Customer' => 'Add Customer',
+ 'Add GIFI' => 'Add GIFI',
+ 'Add Group' => 'Add Group',
+ 'Add Part' => 'Add Part',
+ 'Add Project' => 'Add Project',
+ 'Add Service' => 'Add Service',
+ 'Add Transaction' => 'Add Transaction',
+ 'Add Vendor' => 'Add Vendor',
+ 'Assemblies' => 'Assemblies',
+ 'Audit Control' => 'Audit Control',
+ 'Backup' => 'Backup',
+ 'Balance Sheet' => 'Balance Sheet',
+ 'Cash' => 'Cash',
+ 'Chart of Accounts' => 'Chart of Accounts',
+ 'Check' => 'Cheque',
+ 'Customers' => 'Customers',
+ 'General Ledger' => 'General Ledger',
+ 'Goods & Services' => 'Goods & Services',
+ 'Groups' => 'Groups',
+ 'HTML Templates' => 'HTML Templates',
+ 'Income Statement' => 'Income Statement',
+ 'Invoice' => 'Invoice',
+ 'LaTeX Templates' => 'LaTeX Templates',
+ 'List Accounts' => 'List Accounts',
+ 'List GIFI' => 'List GIFI',
+ 'Logout' => 'Logout',
+ 'Order Entry' => 'Order Entry',
+ 'Packing List' => 'Packing List',
+ 'Parts' => 'Parts',
+ 'Payment' => 'Payment',
+ 'Payments' => 'Payments',
+ 'Preferences' => 'Preferences',
+ 'Projects' => 'Projects',
+ 'Purchase Order' => 'Purchase Order',
+ 'Purchase Orders' => 'Purchase Orders',
+ 'Receipt' => 'Receipt',
+ 'Receipts' => 'Receipts',
+ 'Reconciliation' => 'Reconciliation',
+ 'Reports' => 'Reports',
+ 'Sales Invoice' => 'Sales Invoice',
+ 'Sales Order' => 'Sales Order',
+ 'Sales Orders' => 'Sales Orders',
+ 'Save to File' => 'Save to File',
+ 'Send by E-Mail' => 'Send by E-Mail',
+ 'Services' => 'Services',
+ 'Statement' => 'Statement',
+ 'Stock Assembly' => 'Stock Assembly',
+ 'Stylesheet' => 'Stylesheet',
+ 'System' => 'System',
+ 'Tax collected' => 'Tax collected',
+ 'Tax paid' => 'Tax paid',
+ 'Transactions' => 'Transactions',
+ 'Trial Balance' => 'Trial Balance',
+ 'Vendor Invoice' => 'Vendor Invoice',
+ 'Vendors' => 'Vendors',
+ 'Version' => 'Version',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'display' => 'display',
+ 'section_menu' => 'section_menu',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Add',
+ 'Add Purchase Order' => 'Add Purchase Order',
+ 'Add Sales Invoice' => 'Add Sales Invoice',
+ 'Add Sales Order' => 'Add Sales Order',
+ 'Add Vendor Invoice' => 'Add Vendor Invoice',
+ 'Address' => 'Address',
+ 'Amount' => 'Amount',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Are you sure you want to delete Order Number' => 'Are you sure you want to delete Order Number',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Bin',
+ 'C' => 'C',
+ 'Cannot delete order!' => 'Cannot delete order!',
+ 'Cannot save order!' => 'Cannot save order!',
+ 'Cc' => 'Cc',
+ 'Closed' => 'Closed',
+ 'Confirm!' => 'Confirm!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Credit Limit' => 'Credit Limit',
+ 'Curr' => 'Curr',
+ 'Currency' => 'Currency',
+ 'Customer' => 'Customer',
+ 'Customer missing!' => 'Customer missing!',
+ 'Customer not on file!' => 'Customer not on file!',
+ 'Date' => 'Date',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Delete' => 'Delete',
+ 'Delivery Date' => 'Delivery Date',
+ 'Description' => 'Description',
+ 'E-mail' => 'E-mail',
+ 'E-mail address missing!' => 'E-mail address missing!',
+ 'Edit Purchase Order' => 'Edit Purchase Order',
+ 'Edit Sales Order' => 'Edit Sales Order',
+ 'Exchangerate' => 'Exchangerate',
+ 'Exchangerate missing!' => 'Exchangerate missing!',
+ 'Extended' => 'Extended',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'Group' => 'Group',
+ 'Group Items' => 'Group Items',
+ 'ID' => 'ID',
+ 'In-line' => 'In-line',
+ 'Include in Report' => 'Include in Report',
+ 'Invoice' => 'Invoice',
+ 'Invoice Date missing!' => 'Invoice Date missing!',
+ 'Invoice Number missing!' => 'Invoice Number missing!',
+ 'Item not on file!' => 'Item not on file!',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'Name' => 'Name',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Number',
+ 'Number missing in Row' => 'Number missing in Row',
+ 'O' => 'O',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'Open' => 'Open',
+ 'Order' => 'Order',
+ 'Order Date' => 'Order Date',
+ 'Order Date missing!' => 'Order Date missing!',
+ 'Order Number' => 'Order Number',
+ 'Order Number missing!' => 'Order Number missing!',
+ 'Order deleted!' => 'Order deleted!',
+ 'Order saved!' => 'Order saved!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Packing List',
+ 'Packing List Date missing!' => 'Packing List Date missing!',
+ 'Packing List Number missing!' => 'Packing List Number missing!',
+ 'Part' => 'Part',
+ 'Phone' => 'Phone',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Price',
+ 'Print' => 'Print',
+ 'Printer' => 'Printer',
+ 'Project' => 'Project',
+ 'Project not on file!' => 'Project not on file!',
+ 'Purchase Order' => 'Purchase Order',
+ 'Purchase Orders' => 'Purchase Orders',
+ 'Qty' => 'Qty',
+ 'Recd' => 'Recd',
+ 'Remaining' => 'Remaining',
+ 'Required by' => 'Required by',
+ 'Sales Order' => 'Sales Order',
+ 'Sales Orders' => 'Sales Orders',
+ 'Save' => 'Save',
+ 'Save as new' => 'Save as new',
+ 'Screen' => 'Screen',
+ 'Select from one of the items below' => 'Select from one of the items below',
+ 'Select from one of the names below' => 'Select from one of the names below',
+ 'Select from one of the projects below' => 'Select from one of the projects below',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Service' => 'Service',
+ 'Ship' => 'Ship',
+ 'Ship to' => 'Ship to',
+ 'Ship via' => 'Ship via',
+ 'Subject' => 'Subject',
+ 'Subtotal' => 'Subtotal',
+ 'Tax' => 'Tax',
+ 'Tax Included' => 'Tax Included',
+ 'Terms: Net' => 'Terms: Net',
+ 'To' => 'To',
+ 'Total' => 'Total',
+ 'Unit' => 'Unit',
+ 'Update' => 'Update',
+ 'Vendor' => 'Vendor',
+ 'Vendor missing!' => 'Vendor missing!',
+ 'Vendor not on file!' => 'Vendor not on file!',
+ 'What type of item is this?' => 'What type of item is this?',
+ 'Yes' => 'Yes',
+ 'days' => 'days',
+ 'ea' => 'ea',
+ 'emailed to' => 'emailed to',
+ 'sent to printer' => 'sent to printer',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_backorder' => 'create_backorder',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice' => 'invoice',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'order_links' => 'order_links',
+ 'orders' => 'orders',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_order' => 'prepare_order',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'subtotal' => 'subtotal',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'e_mail' => 'e_mail',
+ 'invoice' => 'invoice',
+ 'print' => 'print',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'yes' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Add',
+ 'Add Group' => 'Add Group',
+ 'Add Project' => 'Add Project',
+ 'All' => 'All',
+ 'Continue' => 'Continue',
+ 'Delete' => 'Delete',
+ 'Description' => 'Description',
+ 'Edit Group' => 'Edit Group',
+ 'Edit Project' => 'Edit Project',
+ 'Group' => 'Group',
+ 'Group deleted!' => 'Group deleted!',
+ 'Group missing!' => 'Group missing!',
+ 'Group saved!' => 'Group saved!',
+ 'Groups' => 'Groups',
+ 'Number' => 'Number',
+ 'Orphaned' => 'Orphaned',
+ 'Project' => 'Project',
+ 'Project Number missing!' => 'Project Number missing!',
+ 'Project deleted!' => 'Project deleted!',
+ 'Project saved!' => 'Project saved!',
+ 'Projects' => 'Projects',
+ 'Save' => 'Save',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'edit' => 'edit',
+ 'form_partsgroup_footer' => 'form_partsgroup_footer',
+ 'form_partsgroup_header' => 'form_partsgroup_header',
+ 'form_project_footer' => 'form_project_footer',
+ 'form_project_header' => 'form_project_header',
+ 'partsgroup_report' => 'partsgroup_report',
+ 'project_report' => 'project_report',
+ 'save' => 'save',
+ 'search' => 'search',
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'save' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Account',
+ 'Balance' => 'Balance',
+ 'Cleared Balance' => 'Cleared Balance',
+ 'Continue' => 'Continue',
+ 'Date' => 'Date',
+ 'Deposit' => 'Deposit',
+ 'Description' => 'Description',
+ 'Difference' => 'Difference',
+ 'Done' => 'Done',
+ 'Exchangerate Difference' => 'Exchangerate Difference',
+ 'From' => 'From',
+ 'Out of balance!' => 'Out of balance!',
+ 'Payment' => 'Payment',
+ 'Reconciliation' => 'Reconciliation',
+ 'Select all' => 'Select all',
+ 'Source' => 'Source',
+ 'Statement Balance' => 'Statement Balance',
+ 'Update' => 'Update',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'continue' => 'continue',
+ 'display_form' => 'display_form',
+ 'done' => 'done',
+ 'get_payments' => 'get_payments',
+ 'reconciliation' => 'reconciliation',
+ 'select_all' => 'select_all',
+ 'update' => 'update',
+ 'continue' => 'continue',
+ 'done' => 'done',
+ 'select_all' => 'select_all',
+ 'update' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Aging' => 'Creditor Aging',
+ 'AR Aging' => 'Debtor Aging',
+ 'Account' => 'Account',
+ 'Accounts' => 'Accounts',
+ 'Amount' => 'Amount',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'Attachment',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Balance' => 'Balance',
+ 'Balance Sheet' => 'Balance Sheet',
+ 'Bcc' => 'Bcc',
+ 'Cash based' => 'Cash based',
+ 'Cc' => 'Cc',
+ 'Compare to' => 'Compare to',
+ 'Continue' => 'Continue',
+ 'Copies' => 'Copies',
+ 'Credit' => 'Credit',
+ 'Current' => 'Current',
+ 'Customer' => 'Customer',
+ 'Date' => 'Date',
+ 'Debit' => 'Debit',
+ 'Dec' => 'Dec',
+ 'December' => 'December',
+ 'Decimalplaces' => 'Decimalplaces',
+ 'Description' => 'Description',
+ 'Due' => 'Due',
+ 'E-mail' => 'E-mail',
+ 'E-mail Statement to' => 'E-mail Statement to',
+ 'Feb' => 'Feb',
+ 'February' => 'February',
+ 'From' => 'From',
+ 'GIFI' => 'GIFI',
+ 'Heading' => 'Heading',
+ 'ID' => 'ID',
+ 'In-line' => 'In-line',
+ 'Include in Report' => 'Include in Report',
+ 'Income Statement' => 'Income Statement',
+ 'Invoice' => 'Invoice',
+ 'Jan' => 'Jan',
+ 'January' => 'January',
+ 'Jul' => 'Jul',
+ 'July' => 'July',
+ 'Jun' => 'Jun',
+ 'June' => 'June',
+ 'Mar' => 'Mar',
+ 'March' => 'March',
+ 'May' => 'May',
+ 'May ' => 'May ',
+ 'Message' => 'Message',
+ 'N/A' => 'N/A',
+ 'Nothing selected!' => 'Nothing selected!',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Oct' => 'Oct',
+ 'October' => 'October',
+ 'PDF' => 'PDF',
+ 'Payments' => 'Payments',
+ 'Postscript' => 'Postscript',
+ 'Print' => 'Print',
+ 'Printer' => 'Printer',
+ 'Project Number' => 'Project Number',
+ 'Receipts' => 'Receipts',
+ 'Report for' => 'Report for',
+ 'Retained Earnings' => 'Retained Earnings',
+ 'Screen' => 'Screen',
+ 'Select all' => 'Select all',
+ 'Select postscript or PDF!' => 'Select postscript or PDF!',
+ 'Sep' => 'Sep',
+ 'September' => 'September',
+ 'Source' => 'Source',
+ 'Standard' => 'Standard',
+ 'Statement' => 'Statement',
+ 'Statement sent to' => 'Statement sent to',
+ 'Statements sent to printer!' => 'Statements sent to printer!',
+ 'Subject' => 'Subject',
+ 'Subtotal' => 'Subtotal',
+ 'Tax' => 'Tax',
+ 'Tax collected' => 'Tax collected',
+ 'Tax paid' => 'Tax paid',
+ 'Total' => 'Total',
+ 'Trial Balance' => 'Trial Balance',
+ 'Vendor' => 'Vendor',
+ 'as at' => 'as at',
+ 'collected on sales' => 'collected on sales',
+ 'for Period' => 'for Period',
+ 'paid on purchases' => 'paid on purchases',
+ 'to' => 'to',
+};
+
+$self{subs} = {
+ 'aging' => 'aging',
+ 'continue' => 'continue',
+ 'e_mail' => 'e_mail',
+ 'generate_ap_aging' => 'generate_ap_aging',
+ 'generate_ar_aging' => 'generate_ar_aging',
+ 'generate_balance_sheet' => 'generate_balance_sheet',
+ 'generate_income_statement' => 'generate_income_statement',
+ 'generate_tax_report' => 'generate_tax_report',
+ 'generate_trial_balance' => 'generate_trial_balance',
+ 'list_accounts' => 'list_accounts',
+ 'list_payments' => 'list_payments',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'report' => 'report',
+ 'select_all' => 'select_all',
+ 'send_email' => 'send_email',
+ 'statement_details' => 'statement_details',
+ 'tax_subtotal' => 'tax_subtotal',
+ 'continue' => 'continue',
+ 'e_mail' => 'e_mail',
+ 'print' => 'print',
+ 'select_all' => 'select_all',
+};
+
+1;
--- /dev/null
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (c) 2003
+#
+# French texts:
+#
+# Author: Sèbastien Brassard <sbrassar.cgocable.ca>
+# Oscar Buijten <oscar@elbie.com>
+# Wolfgang Sourdeau <wolfgang@contre.com>
+# Aguibou KONE <aguibou.kone@rocketmail.com>
+# Jens-Ingo Brodesser <jens-ingo@all2all.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#######################################################################
+
--- /dev/null
+$self{texts} = {
+ 'Access Control' => 'Contrôle d\'accès',
+ 'Accounting' => 'Comptabilité',
+ 'Add User' => 'Ajouter utilisateur',
+ 'Address' => 'Adresse',
+ 'Administration' => 'Administration',
+ 'Administrator' => 'Administrateur',
+ 'All Datasets up to date!' => 'Tous les fichiers de données sont à jour!',
+ 'Change Admin Password' => 'Changement de mot de passe administrateur',
+ 'Change Password' => 'Changement de mot de passe',
+ 'Character Set' => 'Encodage des caractères',
+ 'Click on login name to edit!' => 'Cliquer sur votre identifiant pour editer',
+ 'Company' => 'Société',
+ 'Connect to' => 'Connecter à',
+ 'Continue' => 'Continuer',
+ 'Create Chart of Accounts' => 'Créer le Plan Comptable',
+ 'Create Dataset' => 'Créer fichier de données',
+ 'DBI not installed!' => 'DBI non installée!',
+ 'Database' => 'Base de données',
+ 'Database Administration' => 'Gérer base de données',
+ 'Database Driver not checked!' => 'Pilotes de base de données pas verifiés!',
+ 'Database User missing!' => 'Utilisateur base de données manquante!',
+ 'Dataset' => 'Fichier de données',
+ 'Dataset missing!' => 'Fichier de données manquant!',
+ 'Dataset updated!' => 'Base de données mise à jour!',
+ 'Date Format' => 'Format de Date',
+ 'Delete' => 'Supprimer',
+ 'Delete Dataset' => 'Supprimer fichier de données',
+ 'Directory' => 'Répertoire',
+ 'Driver' => 'Pilote',
+ 'Dropdown Limit' => 'Limit de déroulement',
+ 'E-mail' => 'Email',
+ 'Edit User' => 'Modifier utilisateur',
+ 'Existing Datasets' => 'Fichiers de données existants',
+ 'Fax' => 'Fax',
+ 'Host' => 'Hôte',
+ 'Hostname missing!' => 'Nom de l\'hôte manquant',
+ 'Incorrect Password!' => 'Mot de passe incorrect!',
+ 'Language' => 'Langue',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Laisser "port" et "hôte" vide, sauf si vous voulez vous connecter à distance (par réseau)',
+ 'Login' => 'Login',
+ 'Login name missing!' => 'Login name missing!',
+ 'Multibyte Encoding' => 'Encodage multibyte',
+ 'Name' => 'Nom',
+ 'New Templates' => 'Nouveaux gabarits',
+ 'No Database Drivers available!' => 'Pas de pilotes de base de données disponibles!',
+ 'No Dataset selected!' => 'Pas de fichier de données sélectioné!',
+ 'Nothing to delete!' => 'Rien à supprimer',
+ 'Number Format' => 'Format des numéros',
+ 'Oracle Database Administration' => 'Administration de base de données Oracle',
+ 'Password' => 'Mot de Passe',
+ 'Password changed!' => 'Mot de passe changé!',
+ 'Pg Database Administration' => 'Administration base de données PostgreSQL',
+ 'Phone' => 'Tél.',
+ 'Port' => 'Port',
+ 'Port missing!' => 'Port manquant!',
+ 'Printer' => 'Imprimante',
+ 'Save' => 'Enregistrer',
+ 'Select a Dataset to delete and press "Continue"' => 'Sélectionner la base de données à supprimer et cliquer sur "Continuer"',
+ 'Setup Templates' => 'Configuration des Gabarits',
+ 'Ship via' => 'Expédier via',
+ 'Signature' => 'Signature',
+ 'Stylesheet' => 'Feuille de style',
+ 'Templates' => 'Gabarits',
+ 'The following Datasets are not in use and can be deleted' => 'Les fichiers de données suivants ne sont pas utilisés et peuvent être supprimés.',
+ 'The following Datasets need to be updated' => 'Les fichiers de données suivants doivent être mis a jour',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'Ceci est un test préliminaire des sources existante. Aucune modification à ce stade!!',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => 'Pour ajouter un utilisateur à un groupe, editer un "nom", changer le "login" et enregistrer. Un nouveau utilisateur avec les mêmes données sera enregistré avec le nouveau "login".',
+ 'Update Dataset' => 'Mis à jour de la base de données',
+ 'Use Templates' => 'Utiliser les modèles',
+ 'User' => 'Utilisateur',
+ 'User deleted!' => 'Utilisateur supprimé!',
+ 'User saved!' => 'Utilisateur enregistré!',
+ 'Version' => 'Version',
+ 'You must enter a host and port for local and remote connections!' => 'Vous devez saisir un "hôte" et un "port" pour les connexions distantes!',
+ 'does not exist' => 'n\'existe pas!',
+ 'is already a member!' => 'est déjà un membre!',
+ 'localhost' => 'hôte local',
+ 'locked!' => 'verrouillé!',
+ 'successfully created!' => 'créé avec succès',
+ 'successfully deleted!' => 'supprimé avec succès',
+ 'website' => 'site web',
+};
+
+$self{subs} = {
+ 'add_user' => 'add_user',
+ 'adminlogin' => 'adminlogin',
+ 'change_admin_password' => 'change_admin_password',
+ 'change_password' => 'change_password',
+ 'check_password' => 'check_password',
+ 'continue' => 'continue',
+ 'create_dataset' => 'create_dataset',
+ 'dbcreate' => 'dbcreate',
+ 'dbdelete' => 'dbdelete',
+ 'dbdriver_defaults' => 'dbdriver_defaults',
+ 'dbselect_source' => 'dbselect_source',
+ 'dbupdate' => 'dbupdate',
+ 'delete' => 'delete',
+ 'delete_dataset' => 'delete_dataset',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'get_value' => 'get_value',
+ 'list_users' => 'list_users',
+ 'login' => 'login',
+ 'login_name' => 'login_name',
+ 'oracle_database_administration' => 'oracle_database_administration',
+ 'pg_database_administration' => 'pg_database_administration',
+ 'save' => 'save',
+ 'update_dataset' => 'update_dataset',
+ 'ajouter_utilisateur' => 'add_user',
+ 'changement_de_mot_de_passe_administrateur' => 'change_admin_password',
+ 'changement_de_mot_de_passe' => 'change_password',
+ 'continuer' => 'continue',
+ 'créer_fichier_de_données' => 'create_dataset',
+ 'supprimer' => 'delete',
+ 'supprimer_fichier_de_données' => 'delete_dataset',
+ 'login' => 'login',
+ 'administration_de_base_de_données_oracle' => 'oracle_database_administration',
+ 'administration_base_de_données_postgresql' => 'pg_database_administration',
+ 'enregistrer' => 'save',
+ 'mis_à_jour_de_la_base_de_données' => 'update_dataset',
+};
+
+1;
--- /dev/null
+# These are all the texts to build the translations files.
+# The file has the form of 'english text' => 'foreign text',
+# you can add the translation in this file or in the 'missing' file
+# run locales.pl from this directory to rebuild the translation files
+
+$self{texts} = {
+ 'AP' => 'Dépenses',
+ 'AP Aging' => 'Dépenses exigibles',
+ 'AP Transaction' => 'Ecriture Dépense',
+ 'AP Transactions' => 'Mouvements - Dépenses',
+ 'AR' => 'Recettes',
+ 'AR Aging' => 'Recettes exigibles',
+ 'AR Transaction' => 'Ecriture Recette',
+ 'AR Transactions' => 'Mouvements - Recettes',
+ 'About' => 'A propos',
+ 'Access Control' => 'Contrôle d\'accès',
+ 'Account' => 'Compte',
+ 'Account Number' => 'Numéro de compte',
+ 'Account Number missing!' => 'Numéro de compte manquant!',
+ 'Account Type' => 'Type de compte',
+ 'Account Type missing!' => 'Type de compte manquant!',
+ 'Account deleted!' => 'Compte supprimé',
+ 'Account saved!' => 'Compte enregistré',
+ 'Accounting' => 'Comptabilité',
+ 'Accounting Menu' => 'Menu de comptabilité',
+ 'Accounts' => 'Comptes',
+ 'Active' => 'Actif',
+ 'Add' => 'Ajouter',
+ 'Add Account' => 'Ajouter compte',
+ 'Add Accounts Payables Transaction' => 'Saisie d\'écriture - Dépenses',
+ 'Add Accounts Receivables Transaction' => 'Saisie d\'écriture - Recettes',
+ 'Add Assembly' => 'Ajouter produit',
+ 'Add Customer' => 'Ajouter client',
+ 'Add GIFI' => 'Ajouter Code d\'Identification Comptable ou Fiscale',
+ 'Add General Ledger Transaction' => 'Ajouter une écriture au Grand Livre',
+ 'Add Group' => 'Ajouter group',
+ 'Add Part' => 'Ajouter marchandise',
+ 'Add Project' => 'Ajouter projet',
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Invoice' => 'Etablir facture de vente',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Add Service' => 'Ajouter service',
+ 'Add Transaction' => 'Saisie d\'écriture',
+ 'Add User' => 'Ajouter utilisateur',
+ 'Add Vendor' => 'Ajouter fournisseur',
+ 'Add Vendor Invoice' => 'Etablir facture de vente',
+ 'Address' => 'Adresse',
+ 'Administration' => 'Administration',
+ 'Administrator' => 'Administrateur',
+ 'All' => 'Tous',
+ 'All Datasets up to date!' => 'Tous les fichiers de données sont à jour!',
+ 'Amount' => 'Total',
+ 'Amount Due' => 'Montant dû',
+ 'Amount does not equal applied!' => 'Le montant n\'est égal à celui appliqué!',
+ 'Amount missing!' => 'Montant manquant',
+ 'Applied' => 'Appliquer',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Invoice Number' => 'Êtes-vous sûr de vouloir supprimer la Facture N°',
+ 'Are you sure you want to delete Order Number' => 'Êtes vous sûr de vouloir supprimer Commande N°',
+ 'Are you sure you want to delete Transaction' => 'Êtes vous sûr de vouloir effacer la saisie?',
+ 'Assemblies' => 'Produits finis',
+ 'Assemblies restocked!' => 'Renvoyer produits vers stock!',
+ 'Assembly Number missing!' => 'Numéro de produit manquant',
+ 'Asset' => 'Actif',
+ 'Attachment' => 'Pièce jointe',
+ 'Audit Control' => 'Clôture périodique',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'BOM' => 'Nomenclature composantes',
+ 'Backup' => 'Sauvegarder',
+ 'Backup sent to' => 'Sauvegarde envoyée à',
+ 'Balance' => 'Solde',
+ 'Balance Sheet' => 'Bilan',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'Books are open' => 'Début exercice',
+ 'Bought' => 'Acheté',
+ 'Business Number' => 'Numéro d\'enregistrement société',
+ 'C' => 'C',
+ 'COGS' => 'CMV',
+ 'Cannot delete account!' => 'Impossible de supprimer le compte!',
+ 'Cannot delete customer!' => 'Impossible de supprimer le client!',
+ 'Cannot delete default account!' => 'Ne peut pas supprimer le compte par defaut!',
+ 'Cannot delete invoice!' => 'Impossible de supprimer la facture',
+ 'Cannot delete item!' => 'Impossible de supprimer ce poste!',
+ 'Cannot delete order!' => 'Impossible de supprimer la commande!',
+ 'Cannot delete transaction!' => 'Impossible de supprimer la saisie!',
+ 'Cannot delete vendor!' => 'Impossible de supprimer le fournisseur!',
+ 'Cannot have a value in both Debit and Credit!' => 'Impossible d\'avoir des valeurs dans Crédit et Débit en même temps!',
+ 'Cannot post a transaction without a value!' => 'Impossible d\'effectuer une écriture sans valeur!',
+ 'Cannot post invoice for a closed period!' => 'Impossible d\'enregistrer la facture sur un exercice clos!',
+ 'Cannot post invoice!' => 'Impossible d\'enregistrer la facture!',
+ 'Cannot post payment for a closed period!' => 'Impossible d\'enregistrer le paiement sur un exercice clos!',
+ 'Cannot post payment!' => 'Impossible d\'enregistrer le paiement!',
+ 'Cannot post transaction for a closed period!' => 'Impossible d\'enregistrer l\'écriture sur un exercice clos!',
+ 'Cannot post transaction!' => 'Impossible d\'enregistrer l\'écriture!',
+ 'Cannot process payment for a closed period!' => 'Impossible de faire un paiement sur un exercice clos!',
+ 'Cannot save account!' => 'Impossible d\'enregistrer le compte!',
+ 'Cannot save order!' => 'Impossible d\'enregistrer la commande!',
+ 'Cannot save preferences!' => 'Impossible d\'enregistrer les préférences',
+ 'Cannot stock assemblies!' => 'Impossible de stocker l\'assemblage!',
+ 'Cash' => 'Financier',
+ 'Cash based' => 'En liquide',
+ 'Cc' => 'Cc',
+ 'Change Admin Password' => 'Changement de mot de passe administrateur',
+ 'Change Password' => 'Changement de mot de passe',
+ 'Character Set' => 'Encodage des caractères',
+ 'Chart of Accounts' => 'Plan Comptable',
+ 'Check' => 'Chèque',
+ 'Check printed!' => 'Chèque imprimé!',
+ 'Check printing failed!' => 'Impression du chèque échoué!',
+ 'Cleared Balance' => 'Solde rapproché',
+ 'Click on login name to edit!' => 'Cliquer sur votre identifiant pour editer',
+ 'Close Books up to' => 'Clôturer l\'exercice jusqu\'au',
+ 'Closed' => 'Clôturé',
+ 'Company' => 'Société',
+ 'Compare to' => 'Comparer à',
+ 'Confirm!' => 'Confirmez!',
+ 'Connect to' => 'Connecter à',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Copy to COA' => 'Copier dans le Plan Comptable',
+ 'Create Chart of Accounts' => 'Créer le Plan Comptable',
+ 'Create Dataset' => 'Créer fichier de données',
+ 'Credit' => 'Crédit',
+ 'Credit Limit' => 'Encours autorisé',
+ 'Curr' => 'En cours',
+ 'Currency' => 'Devise',
+ 'Current' => 'En cours',
+ 'Customer' => 'Client',
+ 'Customer deleted!' => 'Client supprimé!',
+ 'Customer missing!' => 'Client manquant!',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Customer saved!' => 'Client enregistré!',
+ 'Customers' => 'Clients',
+ 'DBI not installed!' => 'DBI non installée!',
+ 'Database' => 'Base de données',
+ 'Database Administration' => 'Gérer base de données',
+ 'Database Driver not checked!' => 'Pilotes de base de données pas verifiés!',
+ 'Database Host' => 'Hôte de base de données',
+ 'Database User missing!' => 'Utilisateur base de données manquante!',
+ 'Dataset' => 'Fichier de données',
+ 'Dataset missing!' => 'Fichier de données manquant!',
+ 'Dataset updated!' => 'Base de données mise à jour!',
+ 'Date' => 'Date',
+ 'Date Format' => 'Format de Date',
+ 'Date Paid' => 'Date de paiement',
+ 'Date missing!' => 'Date manquante!',
+ 'Debit' => 'Débit',
+ 'Debit and credit out of balance!' => 'Le débit et le crédit ne sont pas équilibrés!',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Decimalplaces' => 'Décimales',
+ 'Delete' => 'Supprimer',
+ 'Delete Account' => 'Supprimer compte',
+ 'Delete Dataset' => 'Supprimer fichier de données',
+ 'Delivery Date' => 'Date de livraison',
+ 'Deposit' => 'Dépôt',
+ 'Description' => 'Description',
+ 'Difference' => 'Différence',
+ 'Directory' => 'Répertoire',
+ 'Discount' => 'Remise',
+ 'Done' => 'Fait!',
+ 'Drawing' => 'Dessin',
+ 'Driver' => 'Pilote',
+ 'Dropdown Limit' => 'Limit de déroulement',
+ 'Due' => 'Echéance',
+ 'Due Date' => 'Date d\'échéance',
+ 'Due Date missing!' => 'Date d\'échéance manquante!',
+ 'E-mail' => 'Email',
+ 'E-mail Statement to' => 'Message éléctronique à',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Edit' => 'Modifier',
+ 'Edit Account' => 'Modifier le compte',
+ 'Edit Accounts Payables Transaction' => 'Modifier Mouvements - Dépenses',
+ 'Edit Accounts Receivables Transaction' => 'Modifier Mouvements - Recettes',
+ 'Edit Assembly' => 'Modifier produit fini / transformé',
+ 'Edit Customer' => 'Modifier client',
+ 'Edit GIFI' => 'Modifier Code d\'Identification Comptable ou Fiscale',
+ 'Edit General Ledger Transaction' => 'Modifier écriture Grand Livre',
+ 'Edit Group' => 'Modifier groupe',
+ 'Edit Part' => 'Modifier marchandise',
+ 'Edit Preferences for' => 'Modifier les préférences pour',
+ 'Edit Project' => 'Modifier projet',
+ 'Edit Purchase Order' => 'Modifier commande d\'achat',
+ 'Edit Sales Invoice' => 'Modifier facture de vente',
+ 'Edit Sales Order' => 'Modifier commande de vente',
+ 'Edit Service' => 'Modifier service',
+ 'Edit Template' => 'Modifier modèle',
+ 'Edit User' => 'Modifier utilisateur',
+ 'Edit Vendor' => 'Modifier fournisseur',
+ 'Edit Vendor Invoice' => 'Modifier facture de fournisseur',
+ 'Employee' => 'Employé',
+ 'Enforce transaction reversal for all dates' => 'Appliquer l\'inversion des écritures pour toutes les dates',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Entrer le nom de la monnaie nationale et des monnaies étrangères en 3 lettres séparées par (:) (Ex: EUR:USD:CAD)',
+ 'Equity' => 'Capital',
+ 'Exch' => 'Change',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate Difference' => 'Différence de taux de change',
+ 'Exchangerate for payment missing!' => 'Taux de change manquant pour le paiement!',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Existing Datasets' => 'Fichiers de données existants',
+ 'Expense' => 'Dépense',
+ 'Expense Account' => 'Compte Dépenses',
+ 'Expense/Asset' => 'Dépense/Actif',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'Foreign Exchange Gain' => 'Produit conversion devises',
+ 'Foreign Exchange Loss' => 'Perte conversion devises',
+ 'From' => 'De',
+ 'GIFI' => 'Code d\'Identification Comptable ou Fiscale',
+ 'GIFI deleted!' => 'Code d\'Identification Comptable ou Fiscale supprimé!',
+ 'GIFI missing!' => 'Code d\'Identification Comptable ou Fiscale manquant!',
+ 'GIFI saved!' => 'Code d\'Identification Comptable ou Fiscale enregistré!',
+ 'GL Transaction' => 'Transaction Grand Livre',
+ 'General Ledger' => 'Grand Livre',
+ 'Goods & Services' => 'Articles & Services',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'Group deleted!' => 'Groupe effacé!',
+ 'Group missing!' => 'Groupe absent!',
+ 'Group saved!' => 'Groupe enregistré!',
+ 'Groups' => 'Groupes',
+ 'HTML Templates' => 'Gabarits HTML',
+ 'Heading' => 'En-tête',
+ 'Host' => 'Hôte',
+ 'Hostname missing!' => 'Nom de l\'hôte manquant',
+ 'ID' => 'ID',
+ 'Image' => 'Image',
+ 'In-line' => 'En ligne',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Include in drop-down menus' => 'Inclure dans les menus deroulants',
+ 'Include this account on the customer/vendor forms to flag customer/vendor as taxable?' => 'Afficher ce compte sur les formulaires de client/fournisseur pour le marquer comme imposable?',
+ 'Income' => 'Recettes',
+ 'Income Account' => 'Compte Recettes',
+ 'Income Statement' => 'Compte de Résultat',
+ 'Incorrect Dataset version!' => 'Fichier de données incorrect!',
+ 'Incorrect Password!' => 'Mot de passe incorrect!',
+ 'Individual Items' => 'Composition en marchandises individuelles',
+ 'Inventory' => 'Inventaire',
+ 'Inventory Account' => 'Compte d\'Inventaire',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => 'La quantité en stock doit être à zéro avant de pouvoir indiquer cet assemblage comme obsolète!',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => 'La quantité en stock devrait être zero avant de pouvoir indiquer cette pièce comme obsolète!',
+ 'Invoice' => 'Facture',
+ 'Invoice Date' => 'Date de facturation',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Invoice deleted!' => 'Facture supprimé!',
+ 'Invoice posted!' => 'Facture enregistré!',
+ 'Invoices' => 'Factures',
+ 'Is this a summary account to record' => 'Est-ce que c\'est un compte sommaire à enregistrer?',
+ 'Item deleted!' => 'Objet supprimé!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'LaTeX Templates' => 'Gabarits LaTeX',
+ 'Language' => 'Langue',
+ 'Last Cost' => 'Dernier prix',
+ 'Last Invoice Number' => 'Dernier numéro de facture',
+ 'Last Numbers & Default Accounts' => 'Derniers numéros et comptes par défauts',
+ 'Last Purchase Order Number' => 'Dernier numéro de commande d\'achat',
+ 'Last Sales Order Number' => 'Numéro de la dernière commande de vente',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Laisser "port" et "hôte" vide, sauf si vous voulez vous connecter à distance (par réseau)',
+ 'Liability' => 'Passif',
+ 'Licensed to' => 'Licence à',
+ 'Line Total' => 'Total ligne',
+ 'Link' => 'Liens',
+ 'Link Accounts' => 'Lier Comptes',
+ 'List Accounts' => 'Liste des comptes',
+ 'List GIFI' => 'Afficher la liste des Codes d\'Identification Comptable ou Fiscale',
+ 'List Price' => 'Prix de revient',
+ 'List Transactions' => 'Afficher écritures',
+ 'Login' => 'Login',
+ 'Login name missing!' => '',
+ 'Logout' => 'Déconnexion',
+ 'Make' => 'Marque',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Microfiche' => 'Microfiche',
+ 'Model' => 'Modèle',
+ 'Multibyte Encoding' => 'Encodage multibyte',
+ 'N/A' => 'Non Applicable',
+ 'Name' => 'Nom',
+ 'Name missing!' => 'Nom manquant!',
+ 'New Templates' => 'Nouveaux gabarits',
+ 'No' => 'Non',
+ 'No Database Drivers available!' => 'Pas de pilotes de base de données disponibles!',
+ 'No Dataset selected!' => 'Pas de fichier de données sélectioné!',
+ 'No email address for' => 'Pas d\'adresse email pour',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nothing applied!' => 'Rien n\'a été appliqué!',
+ 'Nothing selected!' => 'Pas de sélection!',
+ 'Nothing to delete!' => 'Rien à supprimer',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number Format' => 'Format des numéros',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'O' => 'O',
+ 'Obsolete' => 'Obsolète',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'On Hand' => 'En Stock / Disponible',
+ 'On Order' => 'Sur Commande',
+ 'Open' => 'Ouvert',
+ 'Oracle Database Administration' => 'Administration de base de données Oracle',
+ 'Order' => 'Commande',
+ 'Order Date' => 'Date commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Entry' => 'Bons de Commandes',
+ 'Order Number' => 'Numéro de commande',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'Order deleted!' => 'Commande supprimé!',
+ 'Order saved!' => 'Commande enregistré!',
+ 'Ordered' => 'Commandé',
+ 'Orphaned' => 'Orphelin',
+ 'Out of balance!' => 'Solde non équilibré!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Paid' => 'Total Payé',
+ 'Paid in full' => 'Complètement payé',
+ 'Part' => 'Marchandise',
+ 'Part Number missing!' => 'Numéro de marchandise manquant!',
+ 'Parts' => 'Marchandises',
+ 'Parts Inventory' => 'Inventaire marchandises',
+ 'Password' => 'Mot de Passe',
+ 'Password changed!' => 'Mot de passe changé!',
+ 'Payables' => 'À Payer',
+ 'Payment' => 'Paiement',
+ 'Payment date missing!' => 'Date de paiement manquant!',
+ 'Payment posted!' => 'Paiement enregistré!',
+ 'Payments' => 'Paiements',
+ 'Pg Database Administration' => 'Administration base de données PostgreSQL',
+ 'Phone' => 'Tél.',
+ 'Port' => 'Port',
+ 'Port missing!' => 'Port manquant!',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Postscript' => 'Postcript',
+ 'Preferences' => 'Préférences',
+ 'Preferences saved!' => 'Préférences enregistrées!',
+ 'Price' => 'Prix',
+ 'Print' => 'Imprimer',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Project Number' => 'Numéro de projet',
+ 'Project Number missing!' => 'Numéro du projet manquant!',
+ 'Project deleted!' => 'Projet supprimé!',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Project saved!' => 'Projet enregistré!',
+ 'Projects' => 'Projets',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Purchase Orders' => 'Commandes d\'Achats',
+ 'Qty' => 'Qté',
+ 'ROP' => 'Niveau de commande',
+ 'Rate' => 'Cadence',
+ 'Recd' => 'Reçu',
+ 'Receipt' => 'Reçu',
+ 'Receipt printed!' => 'Impression reçu!',
+ 'Receipt printing failed!' => 'Erreur lors de l\'impression du reçu!',
+ 'Receipts' => 'Reçus',
+ 'Receivables' => 'À recevoir',
+ 'Reconciliation' => 'Rapprochement',
+ 'Record in' => 'Enregistrer dans',
+ 'Reference' => 'Référence',
+ 'Reference missing!' => 'Référence manquant!',
+ 'Remaining' => 'Restant',
+ 'Report for' => 'Rapport de',
+ 'Reports' => 'Rapports',
+ 'Required by' => 'Requis pour',
+ 'Retained Earnings' => 'Éxcédents non distribués',
+ 'Sales' => 'Ventes',
+ 'Sales Invoice' => 'Facture de Vente',
+ 'Sales Order' => 'Commande de Vente',
+ 'Sales Orders' => 'Commandes de Vente',
+ 'Salesperson' => 'Vendeur',
+ 'Save' => 'Enregistrer',
+ 'Save as new' => 'Enregistrer comme nouveau',
+ 'Save to File' => 'Enregistrer comme fichier',
+ 'Screen' => 'Écran',
+ 'Select a Dataset to delete and press "Continue"' => 'Sélectionner la base de données à supprimer et cliquer sur "Continuer"',
+ 'Select all' => 'Sélectionner tout',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sell Price' => 'Prix de vente',
+ 'Send by E-Mail' => 'Envoyer par email',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Service Items' => 'Services',
+ 'Service Number missing!' => 'Numéro de service manquant!',
+ 'Services' => 'Services',
+ 'Setup Templates' => 'Configuration des Gabarits',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Ship via' => 'Expédier via',
+ 'Short' => 'Court',
+ 'Signature' => 'Signature',
+ 'Sold' => 'Vendu',
+ 'Source' => 'Source',
+ 'Standard' => 'Standard',
+ 'Statement' => 'Relevé',
+ 'Statement Balance' => 'Relevé de compte',
+ 'Statement sent to' => 'Relevé envoyé à',
+ 'Statements sent to printer!' => 'Relevés envoyés à l\'imprimante!',
+ 'Stock' => 'Stock',
+ 'Stock Assembly' => 'Stock de produits',
+ 'Stylesheet' => 'Feuille de style',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'System' => 'Système',
+ 'Tax' => 'Taxe',
+ 'Tax Accounts' => 'Comptes de taxe',
+ 'Tax Included' => 'Taxe incluse',
+ 'Tax collected' => 'Taxe collectée',
+ 'Tax paid' => 'Taxe payée',
+ 'Taxable' => 'Imposable',
+ 'Template saved!' => 'Gabarit enregistré!',
+ 'Templates' => 'Gabarits',
+ 'Terms: Net' => 'Crédit limité à',
+ 'The following Datasets are not in use and can be deleted' => 'Les fichiers de données suivants ne sont pas utilisés et peuvent être supprimés.',
+ 'The following Datasets need to be updated' => 'Les fichiers de données suivants doivent être mis a jour',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'Ceci est un test préliminaire des sources existante. Aucune modification à ce stade!!',
+ 'To' => 'à ',
+ 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' => 'Pour ajouter un utilisateur à un groupe, editer un "nom", changer le "login" et enregistrer. Un nouveau utilisateur avec les mêmes données sera enregistré avec le nouveau "login".',
+ 'Top Level' => 'Description principale',
+ 'Total' => 'Total',
+ 'Transaction Date missing!' => 'Date d\'écriture manquante!',
+ 'Transaction deleted!' => 'Ecriture supprimée!',
+ 'Transaction posted!' => 'Ecriture enregistrée!',
+ 'Transaction reversal enforced for all dates' => 'Inversion des écritures exécuté pour toutes les dates',
+ 'Transaction reversal enforced up to' => 'Inversion des écritures exécuté jusqu\'au',
+ 'Transactions' => 'Mouvements',
+ 'Transactions exist, cannot delete customer!' => 'Des écritures existent, impossible d\'effacer le client!',
+ 'Transactions exist, cannot delete vendor!' => 'Des écritures existent, impossible d\'effacer le fournisseur!',
+ 'Transactions exist; cannot delete account!' => 'Des écritures existent, impossible d\'effacer le compte!',
+ 'Trial Balance' => 'Balance Globale',
+ 'Unit' => 'Unité',
+ 'Unit of measure' => 'Unité de mesure',
+ 'Update' => 'Mettre à jour',
+ 'Update Dataset' => 'Mis à jour de la base de données',
+ 'Updated' => 'Mis à jour',
+ 'Use Templates' => 'Utiliser les modèles',
+ 'User' => 'Utilisateur',
+ 'User deleted!' => 'Utilisateur supprimé!',
+ 'User saved!' => 'Utilisateur enregistré!',
+ 'Vendor' => 'Fournisseur',
+ 'Vendor Invoice' => 'Facture d\'Achat',
+ 'Vendor deleted!' => 'Fournisseur supprimé!',
+ 'Vendor missing!' => 'Fournisseur manquant!',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'Vendor saved!' => 'Fournisseur enregistré!',
+ 'Vendors' => 'Fournisseurs',
+ 'Version' => 'Version',
+ 'Weight' => 'Poids',
+ 'Weight Unit' => 'Unité de poids',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'Year End' => 'Fin d\'année',
+ 'Yes' => 'Oui',
+ 'You are logged out!' => 'Vous êtes déconnecté!',
+ 'You did not enter a name!' => 'Vous n\'avez pas saisi de nom!',
+ 'You must enter a host and port for local and remote connections!' => 'Vous devez saisir un "hôte" et un "port" pour les connexions distantes!',
+ 'as at' => 'au',
+ 'collected on sales' => 'collectées sur les ventes',
+ 'days' => 'jours',
+ 'does not exist' => 'n\'existe pas!',
+ 'ea' => 'ch',
+ 'emailed to' => 'envoyé par email à',
+ 'for Period' => 'pour la période',
+ 'hr' => 'h',
+ 'is already a member!' => 'est déjà un membre!',
+ 'is not a member!' => 'n\'est pas un membre',
+ 'localhost' => 'hôte local',
+ 'locked!' => 'verrouillé!',
+ 'paid on purchases' => 'payées sur les achats',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+ 'successfully created!' => 'créé avec succès',
+ 'successfully deleted!' => 'supprimé avec succès',
+ 'to' => 'jusqu\'au',
+ 'website' => 'site web',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Dépenses',
+ 'AR' => 'Recettes',
+ 'Account' => 'Compte',
+ 'Account Number' => 'Numéro de compte',
+ 'Account Number missing!' => 'Numéro de compte manquant!',
+ 'Account Type' => 'Type de compte',
+ 'Account Type missing!' => 'Type de compte manquant!',
+ 'Account deleted!' => 'Compte supprimé',
+ 'Account saved!' => 'Compte enregistré',
+ 'Add Account' => 'Ajouter compte',
+ 'Add GIFI' => 'Ajouter Code d\'Identification Comptable ou Fiscale',
+ 'Address' => 'Adresse',
+ 'Asset' => 'Actif',
+ 'Audit Control' => 'Clôture périodique',
+ 'Backup sent to' => 'Sauvegarde envoyée à',
+ 'Books are open' => 'Début exercice',
+ 'Business Number' => 'Numéro d\'enregistrement société',
+ 'COGS' => 'CMV',
+ 'Cannot delete account!' => 'Impossible de supprimer le compte!',
+ 'Cannot delete default account!' => 'Ne peut pas supprimer le compte par defaut!',
+ 'Cannot save account!' => 'Impossible d\'enregistrer le compte!',
+ 'Cannot save preferences!' => 'Impossible d\'enregistrer les préférences',
+ 'Character Set' => 'Encodage des caractères',
+ 'Chart of Accounts' => 'Plan Comptable',
+ 'Close Books up to' => 'Clôturer l\'exercice jusqu\'au',
+ 'Company' => 'Société',
+ 'Continue' => 'Continuer',
+ 'Copy to COA' => 'Copier dans le Plan Comptable',
+ 'Credit' => 'Crédit',
+ 'Date Format' => 'Format de Date',
+ 'Debit' => 'Débit',
+ 'Delete' => 'Supprimer',
+ 'Delete Account' => 'Supprimer compte',
+ 'Description' => 'Description',
+ 'Dropdown Limit' => 'Limit de déroulement',
+ 'E-mail' => 'Email',
+ 'Edit' => 'Modifier',
+ 'Edit Account' => 'Modifier le compte',
+ 'Edit GIFI' => 'Modifier Code d\'Identification Comptable ou Fiscale',
+ 'Edit Preferences for' => 'Modifier les préférences pour',
+ 'Edit Template' => 'Modifier modèle',
+ 'Enforce transaction reversal for all dates' => 'Appliquer l\'inversion des écritures pour toutes les dates',
+ 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Entrer le nom de la monnaie nationale et des monnaies étrangères en 3 lettres séparées par (:) (Ex: EUR:USD:CAD)',
+ 'Equity' => 'Capital',
+ 'Expense' => 'Dépense',
+ 'Expense Account' => 'Compte Dépenses',
+ 'Expense/Asset' => 'Dépense/Actif',
+ 'Fax' => 'Fax',
+ 'Foreign Exchange Gain' => 'Produit conversion devises',
+ 'Foreign Exchange Loss' => 'Perte conversion devises',
+ 'GIFI' => 'Code d\'Identification Comptable ou Fiscale',
+ 'GIFI deleted!' => 'Code d\'Identification Comptable ou Fiscale supprimé!',
+ 'GIFI missing!' => 'Code d\'Identification Comptable ou Fiscale manquant!',
+ 'GIFI saved!' => 'Code d\'Identification Comptable ou Fiscale enregistré!',
+ 'Heading' => 'En-tête',
+ 'Include in drop-down menus' => 'Inclure dans les menus deroulants',
+ 'Include this account on the customer/vendor forms to flag customer/vendor as taxable?' => 'Afficher ce compte sur les formulaires de client/fournisseur pour le marquer comme imposable?',
+ 'Income' => 'Recettes',
+ 'Income Account' => 'Compte Recettes',
+ 'Inventory' => 'Inventaire',
+ 'Inventory Account' => 'Compte d\'Inventaire',
+ 'Is this a summary account to record' => 'Est-ce que c\'est un compte sommaire à enregistrer?',
+ 'Language' => 'Langue',
+ 'Last Invoice Number' => 'Dernier numéro de facture',
+ 'Last Numbers & Default Accounts' => 'Derniers numéros et comptes par défauts',
+ 'Last Purchase Order Number' => 'Dernier numéro de commande d\'achat',
+ 'Last Sales Order Number' => 'Numéro de la dernière commande de vente',
+ 'Liability' => 'Passif',
+ 'Link' => 'Liens',
+ 'Name' => 'Nom',
+ 'No' => 'Non',
+ 'No email address for' => 'Pas d\'adresse email pour',
+ 'Number' => 'Numéro',
+ 'Number Format' => 'Format des numéros',
+ 'Parts Inventory' => 'Inventaire marchandises',
+ 'Password' => 'Mot de Passe',
+ 'Payables' => 'À Payer',
+ 'Payment' => 'Paiement',
+ 'Phone' => 'Tél.',
+ 'Preferences saved!' => 'Préférences enregistrées!',
+ 'Rate' => 'Cadence',
+ 'Receivables' => 'À recevoir',
+ 'Sales' => 'Ventes',
+ 'Save' => 'Enregistrer',
+ 'Service Items' => 'Services',
+ 'Ship via' => 'Expédier via',
+ 'Signature' => 'Signature',
+ 'Stylesheet' => 'Feuille de style',
+ 'Tax' => 'Taxe',
+ 'Tax Accounts' => 'Comptes de taxe',
+ 'Template saved!' => 'Gabarit enregistré!',
+ 'Transaction reversal enforced for all dates' => 'Inversion des écritures exécuté pour toutes les dates',
+ 'Transaction reversal enforced up to' => 'Inversion des écritures exécuté jusqu\'au',
+ 'Transactions exist; cannot delete account!' => 'Des écritures existent, impossible d\'effacer le compte!',
+ 'Weight Unit' => 'Unité de poids',
+ 'Year End' => 'Fin d\'année',
+ 'Yes' => 'Oui',
+ 'does not exist' => 'n\'existe pas!',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_gifi' => 'add_gifi',
+ 'audit_control' => 'audit_control',
+ 'backup' => 'backup',
+ 'config' => 'config',
+ 'continue' => 'continue',
+ 'copy_to_coa' => 'copy_to_coa',
+ 'delete' => 'delete',
+ 'delete_account' => 'delete_account',
+ 'delete_gifi' => 'delete_gifi',
+ 'display_form' => 'display_form',
+ 'display_stylesheet' => 'display_stylesheet',
+ 'doclose' => 'doclose',
+ 'edit' => 'edit',
+ 'edit_gifi' => 'edit_gifi',
+ 'edit_template' => 'edit_template',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gifi_footer' => 'gifi_footer',
+ 'gifi_header' => 'gifi_header',
+ 'list' => 'list',
+ 'list_gifi' => 'list_gifi',
+ 'save' => 'save',
+ 'save_account' => 'save_account',
+ 'save_gifi' => 'save_gifi',
+ 'save_preferences' => 'save_preferences',
+ 'save_template' => 'save_template',
+ 'ajouter_compte' => 'add_account',
+ 'continuer' => 'continue',
+ 'copier_dans_le_plan_comptable' => 'copy_to_coa',
+ 'supprimer' => 'delete',
+ 'modifier' => 'edit',
+ 'modifier_le_compte' => 'edit_account',
+ 'enregistrer' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Ecriture Dépense',
+ 'AP Transactions' => 'Mouvements - Dépenses',
+ 'Account' => 'Compte',
+ 'Add Accounts Payables Transaction' => 'Saisie d\'écriture - Dépenses',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Amount Due' => 'Montant dû',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Transaction' => 'Êtes vous sûr de vouloir effacer la saisie?',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Cannot delete transaction!' => 'Impossible de supprimer la saisie!',
+ 'Cannot post payment for a closed period!' => 'Impossible d\'enregistrer le paiement sur un exercice clos!',
+ 'Cannot post transaction for a closed period!' => 'Impossible d\'enregistrer l\'écriture sur un exercice clos!',
+ 'Cannot post transaction!' => 'Impossible d\'enregistrer l\'écriture!',
+ 'Closed' => 'Clôturé',
+ 'Confirm!' => 'Confirmez!',
+ 'Continue' => 'Continuer',
+ 'Currency' => 'Devise',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Date Paid' => 'Date de paiement',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Description' => 'Description',
+ 'Due Date' => 'Date d\'échéance',
+ 'Due Date missing!' => 'Date d\'échéance manquante!',
+ 'Edit Accounts Payables Transaction' => 'Modifier Mouvements - Dépenses',
+ 'Employee' => 'Employé',
+ 'Exch' => 'Change',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate for payment missing!' => 'Taux de change manquant pour le paiement!',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Invoice' => 'Facture',
+ 'Invoice Date' => 'Date de facturation',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Open' => 'Ouvert',
+ 'Order' => 'Commande',
+ 'Order Number' => 'Numéro de commande',
+ 'Paid' => 'Total Payé',
+ 'Payment date missing!' => 'Date de paiement manquant!',
+ 'Payments' => 'Paiements',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Sous Total',
+ 'Tax' => 'Taxe',
+ 'Tax Included' => 'Taxe incluse',
+ 'Total' => 'Total',
+ 'Transaction deleted!' => 'Ecriture supprimée!',
+ 'Transaction posted!' => 'Ecriture enregistrée!',
+ 'Update' => 'Mettre à jour',
+ 'Vendor' => 'Fournisseur',
+ 'Vendor Invoice' => 'Facture d\'Achat',
+ 'Vendor missing!' => 'Fournisseur manquant!',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'Yes' => 'Oui',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_subtotal' => 'ap_subtotal',
+ 'ap_transaction' => 'ap_transaction',
+ 'ap_transactions' => 'ap_transactions',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'ecriture_dépense' => 'ap_transaction',
+ 'saisie_d\'écriture___dépenses' => 'add_accounts_payables_transaction',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'modifier_mouvements___dépenses' => 'edit_accounts_payables_transaction',
+ 'enregistrer' => 'post',
+ 'enregistrer_comme_nouveau' => 'post_as_new',
+ 'mettre_à_jour' => 'update',
+ 'facture_d\'achat' => 'vendor_invoice',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AR Transaction' => 'Ecriture Recette',
+ 'AR Transactions' => 'Mouvements - Recettes',
+ 'Account' => 'Compte',
+ 'Add Accounts Receivables Transaction' => 'Saisie d\'écriture - Recettes',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Amount Due' => 'Montant dû',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Transaction' => 'Êtes vous sûr de vouloir effacer la saisie?',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Cannot delete transaction!' => 'Impossible de supprimer la saisie!',
+ 'Cannot post payment for a closed period!' => 'Impossible d\'enregistrer le paiement sur un exercice clos!',
+ 'Cannot post transaction for a closed period!' => 'Impossible d\'enregistrer l\'écriture sur un exercice clos!',
+ 'Cannot post transaction!' => 'Impossible d\'enregistrer l\'écriture!',
+ 'Closed' => 'Clôturé',
+ 'Confirm!' => 'Confirmez!',
+ 'Continue' => 'Continuer',
+ 'Credit Limit' => 'Encours autorisé',
+ 'Currency' => 'Devise',
+ 'Customer' => 'Client',
+ 'Customer missing!' => 'Client manquant!',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Date Paid' => 'Date de paiement',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Description' => 'Description',
+ 'Due Date' => 'Date d\'échéance',
+ 'Due Date missing!' => 'Date d\'échéance manquante!',
+ 'Edit Accounts Receivables Transaction' => 'Modifier Mouvements - Recettes',
+ 'Exch' => 'Change',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate for payment missing!' => 'Taux de change manquant pour le paiement!',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Invoice' => 'Facture',
+ 'Invoice Date' => 'Date de facturation',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Open' => 'Ouvert',
+ 'Order' => 'Commande',
+ 'Order Number' => 'Numéro de commande',
+ 'Paid' => 'Total Payé',
+ 'Payment date missing!' => 'Date de paiement manquant!',
+ 'Payments' => 'Paiements',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Remaining' => 'Restant',
+ 'Sales Invoice' => 'Facture de Vente',
+ 'Salesperson' => 'Vendeur',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Ship via' => 'Expédier via',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Sous Total',
+ 'Tax' => 'Taxe',
+ 'Tax Included' => 'Taxe incluse',
+ 'Total' => 'Total',
+ 'Transaction deleted!' => 'Ecriture supprimée!',
+ 'Transaction posted!' => 'Ecriture enregistrée!',
+ 'Update' => 'Mettre à jour',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'Yes' => 'Oui',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_subtotal' => 'ar_subtotal',
+ 'ar_transaction' => 'ar_transaction',
+ 'ar_transactions' => 'ar_transactions',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_links' => 'create_links',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'ecriture_recette' => 'ar_transaction',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'enregistrer' => 'post',
+ 'enregistrer_comme_nouveau' => 'post_as_new',
+ 'facture_de_vente' => 'sales_invoice',
+ 'mettre_à_jour' => 'update',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Address' => 'Adresse',
+ 'Continue' => 'Continuer',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Description' => 'Description',
+ 'Number' => 'Numéro',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'continuer' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Compte',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Balance' => 'Solde',
+ 'Chart of Accounts' => 'Plan Comptable',
+ 'Credit' => 'Crédit',
+ 'Date' => 'Date',
+ 'Debit' => 'Débit',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Description' => 'Description',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'GIFI' => 'Code d\'Identification Comptable ou Fiscale',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'List Transactions' => 'Afficher écritures',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Reference' => 'Référence',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Subtotal' => 'Sous Total',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'ca_subtotal' => 'ca_subtotal',
+ 'chart_of_accounts' => 'chart_of_accounts',
+ 'list' => 'list',
+ 'list_transactions' => 'list_transactions',
+ 'afficher_écritures' => 'list_transactions',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Compte',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Amount does not equal applied!' => 'Le montant n\'est égal à celui appliqué!',
+ 'Amount missing!' => 'Montant manquant',
+ 'Applied' => 'Appliquer',
+ 'Cannot post payment!' => 'Impossible d\'enregistrer le paiement!',
+ 'Cannot process payment for a closed period!' => 'Impossible de faire un paiement sur un exercice clos!',
+ 'Check' => 'Chèque',
+ 'Check printed!' => 'Chèque imprimé!',
+ 'Check printing failed!' => 'Impression du chèque échoué!',
+ 'Continue' => 'Continuer',
+ 'Currency' => 'Devise',
+ 'Customer' => 'Client',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Date missing!' => 'Date manquante!',
+ 'Description' => 'Description',
+ 'Due' => 'Echéance',
+ 'Exchangerate' => 'Taux de change',
+ 'From' => 'De',
+ 'Invoice' => 'Facture',
+ 'Invoices' => 'Factures',
+ 'Nothing applied!' => 'Rien n\'a été appliqué!',
+ 'Number' => 'Numéro',
+ 'Paid in full' => 'Complètement payé',
+ 'Payment' => 'Paiement',
+ 'Payment posted!' => 'Paiement enregistré!',
+ 'Post' => 'Enregistrer',
+ 'Print' => 'Imprimer',
+ 'Printer' => 'Imprimante',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Receipt' => 'Reçu',
+ 'Receipt printed!' => 'Impression reçu!',
+ 'Receipt printing failed!' => 'Erreur lors de l\'impression du reçu!',
+ 'Reference' => 'Référence',
+ 'Screen' => 'Écran',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Update' => 'Mettre à jour',
+ 'Vendor' => 'Fournisseur',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'list_invoices' => 'list_invoices',
+ 'name_selected' => 'name_selected',
+ 'payment' => 'payment',
+ 'post' => 'post',
+ 'print' => 'print',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'continuer' => 'continue',
+ 'enregistrer' => 'post',
+ 'imprimer' => 'print',
+ 'mettre_à_jour' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Ajouter',
+ 'Address' => 'Adresse',
+ 'All' => 'Tous',
+ 'Bcc' => 'Bcc',
+ 'Cannot delete customer!' => 'Impossible de supprimer le client!',
+ 'Cannot delete vendor!' => 'Impossible de supprimer le fournisseur!',
+ 'Cc' => 'Cc',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Credit Limit' => 'Encours autorisé',
+ 'Customer deleted!' => 'Client supprimé!',
+ 'Customer saved!' => 'Client enregistré!',
+ 'Customers' => 'Clients',
+ 'Delete' => 'Supprimer',
+ 'Discount' => 'Remise',
+ 'E-mail' => 'Email',
+ 'Edit Customer' => 'Modifier client',
+ 'Edit Vendor' => 'Modifier fournisseur',
+ 'Fax' => 'Fax',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Invoice' => 'Facture',
+ 'Name' => 'Nom',
+ 'Name missing!' => 'Nom manquant!',
+ 'Notes' => 'Notes',
+ 'Number' => 'Numéro',
+ 'Order' => 'Commande',
+ 'Orphaned' => 'Orphelin',
+ 'Phone' => 'Tél.',
+ 'Save' => 'Enregistrer',
+ 'Ship to' => 'Expédier à',
+ 'Tax Included' => 'Taxe incluse',
+ 'Taxable' => 'Imposable',
+ 'Terms: Net' => 'Crédit limité à',
+ 'Transactions exist, cannot delete customer!' => 'Des écritures existent, impossible d\'effacer le client!',
+ 'Transactions exist, cannot delete vendor!' => 'Des écritures existent, impossible d\'effacer le fournisseur!',
+ 'Vendor deleted!' => 'Fournisseur supprimé!',
+ 'Vendor saved!' => 'Fournisseur enregistré!',
+ 'Vendors' => 'Fournisseurs',
+ 'days' => 'jours',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'customer_invoice' => 'customer_invoice',
+ 'customer_order' => 'customer_order',
+ 'delete' => 'delete',
+ 'delete_customer' => 'delete_customer',
+ 'delete_vendor' => 'delete_vendor',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'invoice' => 'invoice',
+ 'list_names' => 'list_names',
+ 'order' => 'order',
+ 'save' => 'save',
+ 'save_customer' => 'save_customer',
+ 'save_vendor' => 'save_vendor',
+ 'search' => 'search',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'vendor_order' => 'vendor_order',
+ 'ajouter' => 'add',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'facture' => 'invoice',
+ 'commande' => 'order',
+ 'enregistrer' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Transaction' => 'Ecriture Dépense',
+ 'AR Transaction' => 'Ecriture Recette',
+ 'Account' => 'Compte',
+ 'Add General Ledger Transaction' => 'Ajouter une écriture au Grand Livre',
+ 'Address' => 'Adresse',
+ 'All' => 'Tous',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Transaction' => 'Êtes vous sûr de vouloir effacer la saisie?',
+ 'Asset' => 'Actif',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Balance' => 'Solde',
+ 'Cannot delete transaction!' => 'Impossible de supprimer la saisie!',
+ 'Cannot have a value in both Debit and Credit!' => 'Impossible d\'avoir des valeurs dans Crédit et Débit en même temps!',
+ 'Cannot post a transaction without a value!' => 'Impossible d\'effectuer une écriture sans valeur!',
+ 'Cannot post transaction for a closed period!' => 'Impossible d\'enregistrer l\'écriture sur un exercice clos!',
+ 'Confirm!' => 'Confirmez!',
+ 'Continue' => 'Continuer',
+ 'Credit' => 'Crédit',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Debit' => 'Débit',
+ 'Debit and credit out of balance!' => 'Le débit et le crédit ne sont pas équilibrés!',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Description' => 'Description',
+ 'Edit General Ledger Transaction' => 'Modifier écriture Grand Livre',
+ 'Equity' => 'Capital',
+ 'Expense' => 'Dépense',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'GIFI' => 'Code d\'Identification Comptable ou Fiscale',
+ 'GL Transaction' => 'Transaction Grand Livre',
+ 'General Ledger' => 'Grand Livre',
+ 'ID' => 'ID',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Income' => 'Recettes',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Liability' => 'Passif',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Reference' => 'Référence',
+ 'Reference missing!' => 'Référence manquant!',
+ 'Reports' => 'Rapports',
+ 'Sales Invoice' => 'Facture de Vente',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Source' => 'Source',
+ 'Subtotal' => 'Sous Total',
+ 'Transaction Date missing!' => 'Date d\'écriture manquante!',
+ 'Transaction deleted!' => 'Ecriture supprimée!',
+ 'Transaction posted!' => 'Ecriture enregistrée!',
+ 'Update' => 'Mettre à jour',
+ 'Vendor Invoice' => 'Facture d\'Achat',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'Yes' => 'Oui',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'form_row' => 'form_row',
+ 'generate_report' => 'generate_report',
+ 'gl_subtotal' => 'gl_subtotal',
+ 'gl_transaction' => 'gl_transaction',
+ 'name_selected' => 'name_selected',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'search' => 'search',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'update' => 'update',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'ecriture_dépense' => 'ap_transaction',
+ 'ecriture_recette' => 'ar_transaction',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'transaction_grand_livre' => 'gl_transaction',
+ 'enregistrer' => 'post',
+ 'enregistrer_comme_nouveau' => 'post_as_new',
+ 'facture_de_vente' => 'sales_invoice',
+ 'mettre_à_jour' => 'update',
+ 'facture_d\'achat' => 'vendor_invoice',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Active' => 'Actif',
+ 'Add' => 'Ajouter',
+ 'Add Assembly' => 'Ajouter produit',
+ 'Add Part' => 'Ajouter marchandise',
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Add Service' => 'Ajouter service',
+ 'Address' => 'Adresse',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Assemblies' => 'Produits finis',
+ 'Assemblies restocked!' => 'Renvoyer produits vers stock!',
+ 'Assembly Number missing!' => 'Numéro de produit manquant',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'BOM' => 'Nomenclature composantes',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'Bought' => 'Acheté',
+ 'COGS' => 'CMV',
+ 'Cannot delete item!' => 'Impossible de supprimer ce poste!',
+ 'Cannot stock assemblies!' => 'Impossible de stocker l\'assemblage!',
+ 'Cc' => 'Cc',
+ 'Closed' => 'Clôturé',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Delivery Date' => 'Date de livraison',
+ 'Description' => 'Description',
+ 'Drawing' => 'Dessin',
+ 'E-mail' => 'Email',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Edit Assembly' => 'Modifier produit fini / transformé',
+ 'Edit Part' => 'Modifier marchandise',
+ 'Edit Service' => 'Modifier service',
+ 'Expense' => 'Dépense',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'Image' => 'Image',
+ 'In-line' => 'En ligne',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Income' => 'Recettes',
+ 'Individual Items' => 'Composition en marchandises individuelles',
+ 'Inventory' => 'Inventaire',
+ 'Inventory quantity must be zero before you can set this assembly obsolete!' => 'La quantité en stock doit être à zéro avant de pouvoir indiquer cet assemblage comme obsolète!',
+ 'Inventory quantity must be zero before you can set this part obsolete!' => 'La quantité en stock devrait être zero avant de pouvoir indiquer cette pièce comme obsolète!',
+ 'Invoice' => 'Facture',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Item deleted!' => 'Objet supprimé!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Last Cost' => 'Dernier prix',
+ 'Line Total' => 'Total ligne',
+ 'Link Accounts' => 'Lier Comptes',
+ 'List Price' => 'Prix de revient',
+ 'Make' => 'Marque',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Microfiche' => 'Microfiche',
+ 'Model' => 'Modèle',
+ 'Name' => 'Nom',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'Obsolete' => 'Obsolète',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'On Hand' => 'En Stock / Disponible',
+ 'On Order' => 'Sur Commande',
+ 'Order' => 'Commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Number' => 'Numéro de commande',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'Ordered' => 'Commandé',
+ 'Orphaned' => 'Orphelin',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Part' => 'Marchandise',
+ 'Part Number missing!' => 'Numéro de marchandise manquant!',
+ 'Parts' => 'Marchandises',
+ 'Phone' => 'Tél.',
+ 'Postscript' => 'Postcript',
+ 'Price' => 'Prix',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Qty' => 'Qté',
+ 'ROP' => 'Niveau de commande',
+ 'Recd' => 'Reçu',
+ 'Required by' => 'Requis pour',
+ 'Sales' => 'Ventes',
+ 'Sales Order' => 'Commande de Vente',
+ 'Save' => 'Enregistrer',
+ 'Save as new' => 'Enregistrer comme nouveau',
+ 'Screen' => 'Écran',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sell Price' => 'Prix de vente',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Service Number missing!' => 'Numéro de service manquant!',
+ 'Services' => 'Services',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Short' => 'Court',
+ 'Sold' => 'Vendu',
+ 'Stock' => 'Stock',
+ 'Stock Assembly' => 'Stock de produits',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'Tax' => 'Taxe',
+ 'To' => 'à ',
+ 'Top Level' => 'Description principale',
+ 'Total' => 'Total',
+ 'Unit' => 'Unité',
+ 'Unit of measure' => 'Unité de mesure',
+ 'Update' => 'Mettre à jour',
+ 'Updated' => 'Mis à jour',
+ 'Weight' => 'Poids',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'ea' => 'ch',
+ 'emailed to' => 'envoyé par email à',
+ 'hr' => 'h',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'assembly_row' => 'assembly_row',
+ 'check_form' => 'check_form',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'generate_report' => 'generate_report',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'link_part' => 'link_part',
+ 'list_assemblies' => 'list_assemblies',
+ 'makemodel_row' => 'makemodel_row',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'parts_subtotal' => 'parts_subtotal',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'restock_assemblies' => 'restock_assemblies',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'stock_assembly' => 'stock_assembly',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'ajouter' => 'add',
+ 'ajouter_produit' => 'add_assembly',
+ 'ajouter_marchandise' => 'add_part',
+ 'ajouter_service' => 'add_service',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'modifier_produit_fini_/_transformé' => 'edit_assembly',
+ 'modifier_marchandise' => 'edit_part',
+ 'modifier_service' => 'edit_service',
+ 'enregistrer' => 'save',
+ 'enregistrer_comme_nouveau' => 'save_as_new',
+ 'mettre_à_jour' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Address' => 'Adresse',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'Cc' => 'Cc',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delivery Date' => 'Date de livraison',
+ 'Description' => 'Description',
+ 'E-mail' => 'Email',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'In-line' => 'En ligne',
+ 'Invoice' => 'Facture',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Name' => 'Nom',
+ 'No.' => 'No.',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Order' => 'Commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Part' => 'Marchandise',
+ 'Phone' => 'Tél.',
+ 'Postscript' => 'Postcript',
+ 'Price' => 'Prix',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Qty' => 'Qté',
+ 'Recd' => 'Reçu',
+ 'Required by' => 'Requis pour',
+ 'Sales Order' => 'Commande de Vente',
+ 'Screen' => 'Écran',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Subject' => 'Objet',
+ 'To' => 'à ',
+ 'Unit' => 'Unité',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'emailed to' => 'envoyé par email à',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+};
+
+$self{subs} = {
+ 'check_form' => 'check_form',
+ 'customer_details' => 'customer_details',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post_as_new' => 'post_as_new',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'select_item' => 'select_item',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'continuer' => 'continue',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Compte',
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Add Vendor Invoice' => 'Etablir facture de vente',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Invoice Number' => 'Êtes-vous sûr de vouloir supprimer la Facture N°',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'Cannot delete invoice!' => 'Impossible de supprimer la facture',
+ 'Cannot post invoice for a closed period!' => 'Impossible d\'enregistrer la facture sur un exercice clos!',
+ 'Cannot post invoice!' => 'Impossible d\'enregistrer la facture!',
+ 'Cannot post payment for a closed period!' => 'Impossible d\'enregistrer le paiement sur un exercice clos!',
+ 'Cc' => 'Cc',
+ 'Confirm!' => 'Confirmez!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Currency' => 'Devise',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Delivery Date' => 'Date de livraison',
+ 'Description' => 'Description',
+ 'Due Date' => 'Date d\'échéance',
+ 'E-mail' => 'Email',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Edit Vendor Invoice' => 'Modifier facture de fournisseur',
+ 'Exch' => 'Change',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate for payment missing!' => 'Taux de change manquant pour le paiement!',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'In-line' => 'En ligne',
+ 'Invoice' => 'Facture',
+ 'Invoice Date' => 'Date de facturation',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Invoice deleted!' => 'Facture supprimé!',
+ 'Invoice posted!' => 'Facture enregistré!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Name' => 'Nom',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Order' => 'Commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Number' => 'Numéro de commande',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Part' => 'Marchandise',
+ 'Payment date missing!' => 'Date de paiement manquant!',
+ 'Payments' => 'Paiements',
+ 'Phone' => 'Tél.',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Postscript' => 'Postcript',
+ 'Price' => 'Prix',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Qty' => 'Qté',
+ 'Recd' => 'Reçu',
+ 'Record in' => 'Enregistrer dans',
+ 'Required by' => 'Requis pour',
+ 'Sales Order' => 'Commande de Vente',
+ 'Screen' => 'Écran',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Source' => 'Source',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'Tax Included' => 'Taxe incluse',
+ 'To' => 'à ',
+ 'Total' => 'Total',
+ 'Unit' => 'Unité',
+ 'Update' => 'Mettre à jour',
+ 'Vendor' => 'Fournisseur',
+ 'Vendor missing!' => 'Fournisseur manquant!',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'Yes' => 'Oui',
+ 'ea' => 'ch',
+ 'emailed to' => 'envoyé par email à',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'commande' => 'order',
+ 'enregistrer' => 'post',
+ 'enregistrer_comme_nouveau' => 'post_as_new',
+ 'mettre_à_jour' => 'update',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Compte',
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Invoice' => 'Etablir facture de vente',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Invoice Number' => 'Êtes-vous sûr de vouloir supprimer la Facture N°',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'Cannot delete invoice!' => 'Impossible de supprimer la facture',
+ 'Cannot post invoice for a closed period!' => 'Impossible d\'enregistrer la facture sur un exercice clos!',
+ 'Cannot post invoice!' => 'Impossible d\'enregistrer la facture!',
+ 'Cannot post payment for a closed period!' => 'Impossible d\'enregistrer le paiement sur un exercice clos!',
+ 'Cc' => 'Cc',
+ 'Confirm!' => 'Confirmez!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Credit Limit' => 'Encours autorisé',
+ 'Currency' => 'Devise',
+ 'Customer' => 'Client',
+ 'Customer missing!' => 'Client manquant!',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Delivery Date' => 'Date de livraison',
+ 'Description' => 'Description',
+ 'Due Date' => 'Date d\'échéance',
+ 'E-mail' => 'Email',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Edit Sales Invoice' => 'Modifier facture de vente',
+ 'Exch' => 'Change',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate for payment missing!' => 'Taux de change manquant pour le paiement!',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'In-line' => 'En ligne',
+ 'Invoice' => 'Facture',
+ 'Invoice Date' => 'Date de facturation',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number' => 'Numéro de facture',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Invoice deleted!' => 'Facture supprimé!',
+ 'Invoice posted!' => 'Facture enregistré!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Name' => 'Nom',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Order' => 'Commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Number' => 'Numéro de commande',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Part' => 'Marchandise',
+ 'Payment date missing!' => 'Date de paiement manquant!',
+ 'Payments' => 'Paiements',
+ 'Phone' => 'Tél.',
+ 'Post' => 'Enregistrer',
+ 'Post as new' => 'Enregistrer comme nouveau',
+ 'Postscript' => 'Postcript',
+ 'Price' => 'Prix',
+ 'Print' => 'Imprimer',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Qty' => 'Qté',
+ 'Recd' => 'Reçu',
+ 'Record in' => 'Enregistrer dans',
+ 'Remaining' => 'Restant',
+ 'Required by' => 'Requis pour',
+ 'Sales Order' => 'Commande de Vente',
+ 'Screen' => 'Écran',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Ship via' => 'Expédier via',
+ 'Source' => 'Source',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'Tax Included' => 'Taxe incluse',
+ 'To' => 'à ',
+ 'Total' => 'Total',
+ 'Unit' => 'Unité',
+ 'Update' => 'Mettre à jour',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'Yes' => 'Oui',
+ 'ea' => 'ch',
+ 'emailed to' => 'envoyé par email à',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice_links' => 'invoice_links',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'post' => 'post',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_invoice' => 'prepare_invoice',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'email' => 'e_mail',
+ 'commande' => 'order',
+ 'enregistrer' => 'post',
+ 'enregistrer_comme_nouveau' => 'post_as_new',
+ 'imprimer' => 'print',
+ 'expédier_à' => 'ship_to',
+ 'mettre_à_jour' => 'update',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'About' => 'A propos',
+ 'Database Host' => 'Hôte de base de données',
+ 'Dataset' => 'Fichier de données',
+ 'Incorrect Dataset version!' => 'Fichier de données incorrect!',
+ 'Incorrect Password!' => 'Mot de passe incorrect!',
+ 'Licensed to' => 'Licence à',
+ 'Login' => 'Login',
+ 'Name' => 'Nom',
+ 'Password' => 'Mot de Passe',
+ 'User' => 'Utilisateur',
+ 'Version' => 'Version',
+ 'You are logged out!' => 'Vous êtes déconnecté!',
+ 'You did not enter a name!' => 'Vous n\'avez pas saisi de nom!',
+ 'is not a member!' => 'n\'est pas un membre',
+ 'localhost' => 'hôte local',
+};
+
+$self{subs} = {
+ 'company_logo' => 'company_logo',
+ 'login' => 'login',
+ 'login_screen' => 'login_screen',
+ 'logout' => 'logout',
+ 'login' => 'login',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP' => 'Dépenses',
+ 'AP Aging' => 'Dépenses exigibles',
+ 'AR' => 'Recettes',
+ 'AR Aging' => 'Recettes exigibles',
+ 'Accounting Menu' => 'Menu de comptabilité',
+ 'Add Account' => 'Ajouter compte',
+ 'Add Assembly' => 'Ajouter produit',
+ 'Add Customer' => 'Ajouter client',
+ 'Add GIFI' => 'Ajouter Code d\'Identification Comptable ou Fiscale',
+ 'Add Group' => 'Ajouter group',
+ 'Add Part' => 'Ajouter marchandise',
+ 'Add Project' => 'Ajouter projet',
+ 'Add Service' => 'Ajouter service',
+ 'Add Transaction' => 'Saisie d\'écriture',
+ 'Add Vendor' => 'Ajouter fournisseur',
+ 'Assemblies' => 'Produits finis',
+ 'Audit Control' => 'Clôture périodique',
+ 'Backup' => 'Sauvegarder',
+ 'Balance Sheet' => 'Bilan',
+ 'Cash' => 'Financier',
+ 'Chart of Accounts' => 'Plan Comptable',
+ 'Check' => 'Chèque',
+ 'Customers' => 'Clients',
+ 'General Ledger' => 'Grand Livre',
+ 'Goods & Services' => 'Articles & Services',
+ 'Groups' => 'Groupes',
+ 'HTML Templates' => 'Gabarits HTML',
+ 'Income Statement' => 'Compte de Résultat',
+ 'Invoice' => 'Facture',
+ 'LaTeX Templates' => 'Gabarits LaTeX',
+ 'List Accounts' => 'Liste des comptes',
+ 'List GIFI' => 'Afficher la liste des Codes d\'Identification Comptable ou Fiscale',
+ 'Logout' => 'Déconnexion',
+ 'Order Entry' => 'Bons de Commandes',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Parts' => 'Marchandises',
+ 'Payment' => 'Paiement',
+ 'Payments' => 'Paiements',
+ 'Preferences' => 'Préférences',
+ 'Projects' => 'Projets',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Purchase Orders' => 'Commandes d\'Achats',
+ 'Receipt' => 'Reçu',
+ 'Receipts' => 'Reçus',
+ 'Reconciliation' => 'Rapprochement',
+ 'Reports' => 'Rapports',
+ 'Sales Invoice' => 'Facture de Vente',
+ 'Sales Order' => 'Commande de Vente',
+ 'Sales Orders' => 'Commandes de Vente',
+ 'Save to File' => 'Enregistrer comme fichier',
+ 'Send by E-Mail' => 'Envoyer par email',
+ 'Services' => 'Services',
+ 'Statement' => 'Relevé',
+ 'Stock Assembly' => 'Stock de produits',
+ 'Stylesheet' => 'Feuille de style',
+ 'System' => 'Système',
+ 'Tax collected' => 'Taxe collectée',
+ 'Tax paid' => 'Taxe payée',
+ 'Transactions' => 'Mouvements',
+ 'Trial Balance' => 'Balance Globale',
+ 'Vendor Invoice' => 'Facture d\'Achat',
+ 'Vendors' => 'Fournisseurs',
+ 'Version' => 'Version',
+};
+
+$self{subs} = {
+ 'acc_menu' => 'acc_menu',
+ 'display' => 'display',
+ 'section_menu' => 'section_menu',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Ajouter',
+ 'Add Purchase Order' => 'Etablir commande d\'achat',
+ 'Add Sales Invoice' => 'Etablir facture de vente',
+ 'Add Sales Order' => 'Etablir commande de vente',
+ 'Add Vendor Invoice' => 'Etablir facture de vente',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Total',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Are you sure you want to delete Order Number' => 'Êtes vous sûr de vouloir supprimer Commande N°',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Bcc' => 'Bcc',
+ 'Bin' => 'Localisation',
+ 'C' => 'C',
+ 'Cannot delete order!' => 'Impossible de supprimer la commande!',
+ 'Cannot save order!' => 'Impossible d\'enregistrer la commande!',
+ 'Cc' => 'Cc',
+ 'Closed' => 'Clôturé',
+ 'Confirm!' => 'Confirmez!',
+ 'Contact' => 'Contact',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Credit Limit' => 'Encours autorisé',
+ 'Curr' => 'En cours',
+ 'Currency' => 'Devise',
+ 'Customer' => 'Client',
+ 'Customer missing!' => 'Client manquant!',
+ 'Customer not on file!' => 'Client absent du fichier!',
+ 'Date' => 'Date',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Delete' => 'Supprimer',
+ 'Delivery Date' => 'Date de livraison',
+ 'Description' => 'Description',
+ 'E-mail' => 'Email',
+ 'E-mail address missing!' => 'Adresse email manquante!',
+ 'Edit Purchase Order' => 'Modifier commande d\'achat',
+ 'Edit Sales Order' => 'Modifier commande de vente',
+ 'Exchangerate' => 'Taux de change',
+ 'Exchangerate missing!' => 'Taux de change manquant!',
+ 'Extended' => 'Prix Total',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'Group' => 'Groupe',
+ 'Group Items' => 'Grouper objets',
+ 'ID' => 'ID',
+ 'In-line' => 'En ligne',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Invoice' => 'Facture',
+ 'Invoice Date missing!' => 'Date de facture manquante!',
+ 'Invoice Number missing!' => 'Numéro de facture manquant!',
+ 'Item not on file!' => 'Objet non-listé!',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'Name' => 'Nom',
+ 'No.' => 'No.',
+ 'Notes' => 'Notes',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Number' => 'Numéro',
+ 'Number missing in Row' => 'Numéro manquant dans ligne',
+ 'O' => 'O',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'Open' => 'Ouvert',
+ 'Order' => 'Commande',
+ 'Order Date' => 'Date commande',
+ 'Order Date missing!' => 'Date de commande manquante!',
+ 'Order Number' => 'Numéro de commande',
+ 'Order Number missing!' => 'Numéro de commande manquant!',
+ 'Order deleted!' => 'Commande supprimé!',
+ 'Order saved!' => 'Commande enregistré!',
+ 'PDF' => 'PDF',
+ 'Packing List' => 'Liste d\'envoi',
+ 'Packing List Date missing!' => 'La date est manquante sur la liste d\'envoi!',
+ 'Packing List Number missing!' => 'Le numéro de liste d\'envoi est manquant!',
+ 'Part' => 'Marchandise',
+ 'Phone' => 'Tél.',
+ 'Postscript' => 'Postcript',
+ 'Price' => 'Prix',
+ 'Print' => 'Imprimer',
+ 'Printer' => 'Imprimante',
+ 'Project' => 'Projet',
+ 'Project not on file!' => 'Projet absent du fichier!',
+ 'Purchase Order' => 'Commande d\'Achat',
+ 'Purchase Orders' => 'Commandes d\'Achats',
+ 'Qty' => 'Qté',
+ 'Recd' => 'Reçu',
+ 'Remaining' => 'Restant',
+ 'Required by' => 'Requis pour',
+ 'Sales Order' => 'Commande de Vente',
+ 'Sales Orders' => 'Commandes de Vente',
+ 'Save' => 'Enregistrer',
+ 'Save as new' => 'Enregistrer comme nouveau',
+ 'Screen' => 'Écran',
+ 'Select from one of the items below' => 'Sélectionner un des postes ci-dessous',
+ 'Select from one of the names below' => 'Sélectionner un des noms ci-dessous',
+ 'Select from one of the projects below' => 'Sélectionner un des projets ci-dessous',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Service' => 'Service',
+ 'Ship' => 'Expédier',
+ 'Ship to' => 'Expédier à',
+ 'Ship via' => 'Expédier via',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'Tax' => 'Taxe',
+ 'Tax Included' => 'Taxe incluse',
+ 'Terms: Net' => 'Crédit limité à',
+ 'To' => 'à ',
+ 'Total' => 'Total',
+ 'Unit' => 'Unité',
+ 'Update' => 'Mettre à jour',
+ 'Vendor' => 'Fournisseur',
+ 'Vendor missing!' => 'Fournisseur manquant!',
+ 'Vendor not on file!' => 'Fournisseur absent du fichier!',
+ 'What type of item is this?' => 'De quel type est ce poste?',
+ 'Yes' => 'Oui',
+ 'days' => 'jours',
+ 'ea' => 'ch',
+ 'emailed to' => 'envoyé par email à',
+ 'sent to printer' => 'envoyé à l\'imprimante',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'add_transaction' => 'add_transaction',
+ 'ap_transaction' => 'ap_transaction',
+ 'ar_transaction' => 'ar_transaction',
+ 'check_form' => 'check_form',
+ 'check_name' => 'check_name',
+ 'check_project' => 'check_project',
+ 'continue' => 'continue',
+ 'create_backorder' => 'create_backorder',
+ 'customer_details' => 'customer_details',
+ 'delete' => 'delete',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit' => 'edit',
+ 'form_footer' => 'form_footer',
+ 'form_header' => 'form_header',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoice' => 'invoice',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_selected',
+ 'new_item' => 'new_item',
+ 'order' => 'order',
+ 'order_links' => 'order_links',
+ 'orders' => 'orders',
+ 'post_as_new' => 'post_as_new',
+ 'prepare_order' => 'prepare_order',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'project_selected' => 'project_selected',
+ 'sales_invoice' => 'sales_invoice',
+ 'save' => 'save',
+ 'save_as_new' => 'save_as_new',
+ 'search' => 'search',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'ship_to' => 'ship_to',
+ 'subtotal' => 'subtotal',
+ 'update' => 'update',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'yes' => 'yes',
+ 'ajouter' => 'add',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'email' => 'e_mail',
+ 'facture' => 'invoice',
+ 'imprimer' => 'print',
+ 'enregistrer' => 'save',
+ 'enregistrer_comme_nouveau' => 'save_as_new',
+ 'expédier_à' => 'ship_to',
+ 'mettre_à_jour' => 'update',
+ 'oui' => 'yes',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Add' => 'Ajouter',
+ 'Add Group' => 'Ajouter group',
+ 'Add Project' => 'Ajouter projet',
+ 'All' => 'Tous',
+ 'Continue' => 'Continuer',
+ 'Delete' => 'Supprimer',
+ 'Description' => 'Description',
+ 'Edit Group' => 'Modifier groupe',
+ 'Edit Project' => 'Modifier projet',
+ 'Group' => 'Groupe',
+ 'Group deleted!' => 'Groupe effacé!',
+ 'Group missing!' => 'Groupe absent!',
+ 'Group saved!' => 'Groupe enregistré!',
+ 'Groups' => 'Groupes',
+ 'Number' => 'Numéro',
+ 'Orphaned' => 'Orphelin',
+ 'Project' => 'Projet',
+ 'Project Number missing!' => 'Numéro du projet manquant!',
+ 'Project deleted!' => 'Projet supprimé!',
+ 'Project saved!' => 'Projet enregistré!',
+ 'Projects' => 'Projets',
+ 'Save' => 'Enregistrer',
+};
+
+$self{subs} = {
+ 'add' => 'add',
+ 'continue' => 'continue',
+ 'delete' => 'delete',
+ 'edit' => 'edit',
+ 'form_partsgroup_footer' => 'form_partsgroup_footer',
+ 'form_partsgroup_header' => 'form_partsgroup_header',
+ 'form_project_footer' => 'form_project_footer',
+ 'form_project_header' => 'form_project_header',
+ 'partsgroup_report' => 'partsgroup_report',
+ 'project_report' => 'project_report',
+ 'save' => 'save',
+ 'search' => 'search',
+ 'ajouter' => 'add',
+ 'continuer' => 'continue',
+ 'supprimer' => 'delete',
+ 'enregistrer' => 'save',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'Account' => 'Compte',
+ 'Balance' => 'Solde',
+ 'Cleared Balance' => 'Solde rapproché',
+ 'Continue' => 'Continuer',
+ 'Date' => 'Date',
+ 'Deposit' => 'Dépôt',
+ 'Description' => 'Description',
+ 'Difference' => 'Différence',
+ 'Done' => 'Fait!',
+ 'Exchangerate Difference' => 'Différence de taux de change',
+ 'From' => 'De',
+ 'Out of balance!' => 'Solde non équilibré!',
+ 'Payment' => 'Paiement',
+ 'Reconciliation' => 'Rapprochement',
+ 'Select all' => 'Sélectionner tout',
+ 'Source' => 'Source',
+ 'Statement Balance' => 'Relevé de compte',
+ 'Update' => 'Mettre à jour',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'continue' => 'continue',
+ 'display_form' => 'display_form',
+ 'done' => 'done',
+ 'get_payments' => 'get_payments',
+ 'reconciliation' => 'reconciliation',
+ 'select_all' => 'select_all',
+ 'update' => 'update',
+ 'continuer' => 'continue',
+ 'fait!' => 'done',
+ 'sélectionner_tout' => 'select_all',
+ 'mettre_à_jour' => 'update',
+};
+
+1;
--- /dev/null
+$self{texts} = {
+ 'AP Aging' => 'Dépenses exigibles',
+ 'AR Aging' => 'Recettes exigibles',
+ 'Account' => 'Compte',
+ 'Accounts' => 'Comptes',
+ 'Amount' => 'Total',
+ 'Apr' => 'Avril',
+ 'April' => 'Avril',
+ 'Attachment' => 'Pièce jointe',
+ 'Aug' => 'Août',
+ 'August' => 'Août',
+ 'Balance' => 'Solde',
+ 'Balance Sheet' => 'Bilan',
+ 'Bcc' => 'Bcc',
+ 'Cash based' => 'En liquide',
+ 'Cc' => 'Cc',
+ 'Compare to' => 'Comparer à',
+ 'Continue' => 'Continuer',
+ 'Copies' => 'Copies',
+ 'Credit' => 'Crédit',
+ 'Current' => 'En cours',
+ 'Customer' => 'Client',
+ 'Date' => 'Date',
+ 'Debit' => 'Débit',
+ 'Dec' => 'Déc.',
+ 'December' => 'Décembre',
+ 'Decimalplaces' => 'Décimales',
+ 'Description' => 'Description',
+ 'Due' => 'Echéance',
+ 'E-mail' => 'Email',
+ 'E-mail Statement to' => 'Message éléctronique à',
+ 'Feb' => 'Fév.',
+ 'February' => 'Février',
+ 'From' => 'De',
+ 'GIFI' => 'Code d\'Identification Comptable ou Fiscale',
+ 'Heading' => 'En-tête',
+ 'ID' => 'ID',
+ 'In-line' => 'En ligne',
+ 'Include in Report' => 'Inclure dans l\'état',
+ 'Income Statement' => 'Compte de Résultat',
+ 'Invoice' => 'Facture',
+ 'Jan' => 'Jan.',
+ 'January' => 'Janvier',
+ 'Jul' => 'Juil.',
+ 'July' => 'Juillet',
+ 'Jun' => 'Juin',
+ 'June' => 'Juin',
+ 'Mar' => 'Mars',
+ 'March' => 'Mars',
+ 'May' => 'Mai',
+ 'May ' => 'Mai ',
+ 'Message' => 'Message',
+ 'N/A' => 'Non Applicable',
+ 'Nothing selected!' => 'Pas de sélection!',
+ 'Nov' => 'Nov.',
+ 'November' => 'Novembre',
+ 'Oct' => 'Oct.',
+ 'October' => 'Octobre',
+ 'PDF' => 'PDF',
+ 'Payments' => 'Paiements',
+ 'Postscript' => 'Postcript',
+ 'Print' => 'Imprimer',
+ 'Printer' => 'Imprimante',
+ 'Project Number' => 'Numéro de projet',
+ 'Receipts' => 'Reçus',
+ 'Report for' => 'Rapport de',
+ 'Retained Earnings' => 'Éxcédents non distribués',
+ 'Screen' => 'Écran',
+ 'Select all' => 'Sélectionner tout',
+ 'Select postscript or PDF!' => 'Sélectionner Postscript ou PDF',
+ 'Sep' => 'Sept.',
+ 'September' => 'Septembre',
+ 'Source' => 'Source',
+ 'Standard' => 'Standard',
+ 'Statement' => 'Relevé',
+ 'Statement sent to' => 'Relevé envoyé à',
+ 'Statements sent to printer!' => 'Relevés envoyés à l\'imprimante!',
+ 'Subject' => 'Objet',
+ 'Subtotal' => 'Sous Total',
+ 'Tax' => 'Taxe',
+ 'Tax collected' => 'Taxe collectée',
+ 'Tax paid' => 'Taxe payée',
+ 'Total' => 'Total',
+ 'Trial Balance' => 'Balance Globale',
+ 'Vendor' => 'Fournisseur',
+ 'as at' => 'au',
+ 'collected on sales' => 'collectées sur les ventes',
+ 'for Period' => 'pour la période',
+ 'paid on purchases' => 'payées sur les achats',
+ 'to' => 'jusqu\'au',
+};
+
+$self{subs} = {
+ 'aging' => 'aging',
+ 'continue' => 'continue',
+ 'e_mail' => 'e_mail',
+ 'generate_ap_aging' => 'generate_ap_aging',
+ 'generate_ar_aging' => 'generate_ar_aging',
+ 'generate_balance_sheet' => 'generate_balance_sheet',
+ 'generate_income_statement' => 'generate_income_statement',
+ 'generate_tax_report' => 'generate_tax_report',
+ 'generate_trial_balance' => 'generate_trial_balance',
+ 'list_accounts' => 'list_accounts',
+ 'list_payments' => 'list_payments',
+ 'print' => 'print',
+ 'print_form' => 'print_form',
+ 'print_options' => 'print_options',
+ 'report' => 'report',
+ 'select_all' => 'select_all',
+ 'send_email' => 'send_email',
+ 'statement_details' => 'statement_details',
+ 'tax_subtotal' => 'tax_subtotal',
+ 'continuer' => 'continue',
+ 'email' => 'e_mail',
+ 'imprimer' => 'print',
+ 'sélectionner_tout' => 'select_all',
+};
+
+1;
--- /dev/null
+#!/usr/bin/perl
+#
+######################################################################
+# SQL-Ledger Accounting
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#######################################################################
+#
+# this script sets up the terminal and runs the scripts
+# in bin/$terminal directory
+# admin.pl is linked to this script
+#
+#######################################################################
+
+# setup defaults, DO NOT CHANGE
+$userspath = "users";
+$templates = "templates";
+$memberfile = "users/members";
+$sendmail = "| /usr/sbin/sendmail -t";
+########## end ###########################################
+
+$| = 1;
+
+use SL::LXDebug;
+$lxdebug = LXDebug->new();
+
+eval { require "lx-erp.conf"; };
+
+if ($ENV{CONTENT_LENGTH}) {
+ read(STDIN, $_, $ENV{CONTENT_LENGTH});
+}
+
+if ($ENV{QUERY_STRING}) {
+ $_ = $ENV{QUERY_STRING};
+}
+
+if ($ARGV[0]) {
+ $_ = $ARGV[0];
+}
+
+%form = split /[&=]/;
+
+# fix for apache 2.0 bug
+map { $form{$_} =~ s/\\$// } keys %form;
+
+# name of this script
+$0 =~ tr/\\/\//;
+$pos = rindex $0, '/';
+$script = substr($0, $pos + 1);
+
+if (-e "$userspath/nologin" && $script ne 'admin.pl') {
+ print "content-type: text/plain
+
+Login disabled!\n";
+
+ exit;
+}
+
+if ($form{path}) {
+ $form{path} =~ s/%2f/\//gi;
+ $form{path} =~ s/\.\.\///g;
+
+ if ($form{path} !~ /^bin\//) {
+ print "content-type: text/plain
+
+Invalid path!\n";
+ die;
+ }
+
+ $ARGV[0] = "$_&script=$script";
+ require "$form{path}/$script";
+} else {
+
+ if (!$form{terminal}) {
+ if ($ENV{HTTP_USER_AGENT}) {
+
+ # web browser
+ if ($ENV{HTTP_USER_AGENT} =~ /(mozilla|links|opera|w3m)/i) {
+ $form{terminal} = "mozilla";
+ }
+
+ if ($ENV{HTTP_USER_AGENT} =~ /lynx/i) {
+ $form{terminal} = "lynx";
+ }
+ } else {
+ if ($ENV{TERM} =~ /xterm/) {
+ $form{terminal} = "xterm";
+ }
+ if ($ENV{TERM} =~ /(console|linux|vt.*)/i) {
+ $form{terminal} = "console";
+ }
+ }
+ }
+
+ if ($form{terminal}) {
+
+ $ARGV[0] = "path=bin/$form{terminal}&script=$script";
+ map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form;
+
+ require "bin/$form{terminal}/$script";
+
+ } else {
+
+ print qq|
+ Unknown terminal
+ |;
+ }
+
+}
+
+# end of main
+
--- /dev/null
+use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $jscalendar);
+
+# path to user configuration files
+$userspath = "users";
+
+# spool directory for batch printing
+$spool = "spool";
+
+# templates base directory
+$templates = "templates";
+
+# member file
+$memberfile = "users/members";
+
+# Wenn nicht Bilanzierung dann auf 1 setzen
+$eur= 1;
+
+# location of sendmail
+$sendmail = "| /usr/sbin/sendmail -t";
+
+# set language for login and admin
+$language = "de";
+
+# Oracle
+$sid = "T80509";
+$ENV{"ORACLE_HOME"} = "/usr/local/oracle";
+
+# if you have latex installed set to 1
+$latex = 1;
+
+# if the server can't find gzip, latex, dvips or pdflatex, add the path
+$ENV{PATH} .= ":/usr/local/bin";
+
+# on mac os X using Fink's Perl libs, add the path
+$ENV{PERL5LIB} .= ":/sw/lib/perl5";
+
+# Aktivierung der verschiedenen Spezialmodule
+$webdav = 0;
+$lizenzen = 1;
+
+# Jscalendar an/aus
+$jscalendar = 1;
+
+# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
+# LXDebug::NONE, LXDebug::INFO, LXDebug::DEBUG1 und LXDebug::DEBUG2
+$LXDebug::global_level = LXDebug::NONE;
+$LXDebug::global_trace_subs = 0;
+
+1;
+
--- /dev/null
+use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $jscalendar);
+
+# path to user configuration files
+$userspath = "users";
+
+# spool directory for batch printing
+$spool = "spool";
+
+# templates base directory
+$templates = "templates";
+
+# member file
+$memberfile = "users/members";
+
+# Wenn nicht Bilanzierung dann auf 1 setzen
+$eur= 1;
+
+# location of sendmail
+$sendmail = "| /usr/sbin/sendmail -t";
+
+# set language for login and admin
+$language = "de";
+
+# Oracle
+$sid = "T80509";
+$ENV{"ORACLE_HOME"} = "/usr/local/oracle";
+
+# if you have latex installed set to 1
+$latex = 1;
+
+# if the server can't find gzip, latex, dvips or pdflatex, add the path
+$ENV{PATH} .= ":/usr/local/bin";
+
+# on mac os X using Fink's Perl libs, add the path
+$ENV{PERL5LIB} .= ":/sw/lib/perl5";
+
+# Aktivierung der verschiedenen Spezialmodule
+$webdav = 0;
+$lizenzen = 0;
+$vertreter = 0;
+
+# Jscalendar an/aus
+$jscalendar = 1;
+
+1;
+
--- /dev/null
+#!/bin/sh
+
+# Erstellt die benotigten Symlinks
+
+ln -vsf login.pl admin.pl
+for i in ap ar bp ca cp ct gl ic ir is menu oe pe rc rp datev licenses fa ustva; do
+ ln -vsf am.pl $i.pl
+done
+
+cd bin/lynx
+for i in admin am ap ar arap bp ca cp ct gl ic io ir is login oe pe rc rp datev licenses fa ustva; do
+ ln -vsf ../mozilla/$i.pl $i.pl
+done
--- /dev/null
+# Lx-Office ERP - Benutzerverwaltung
+
+[root login]
+password=
+
--- /dev/null
+[Master Data]
+
+[Master Data--Add Customer]
+module=ct.pl
+action=add
+db=customer
+
+[Master Data--Add Vendor]
+module=ct.pl
+action=add
+db=vendor
+
+[Master Data--Add Part]
+module=ic.pl
+action=add
+item=part
+
+[Master Data--Add Service]
+module=ic.pl
+action=add
+item=service
+
+[Master Data--Add Assembly]
+module=ic.pl
+action=add
+item=assembly
+
+[Master Data--Add Group]
+module=pe.pl
+action=add
+type=partsgroup
+
+[Master Data--Add Project]
+module=pe.pl
+action=add
+type=project
+
+[Master Data--Add License]
+module=licenses.pl
+action=add
+
+
+[Master Data--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[Master Data--Reports--Customers]
+module=ct.pl
+action=search
+db=customer
+
+[Master Data--Reports--Vendors]
+module=ct.pl
+action=search
+db=vendor
+
+[Master Data--Reports--Parts]
+module=ic.pl
+action=search
+searchitems=part
+
+[Master Data--Reports--Services]
+module=ic.pl
+action=search
+searchitems=service
+
+[Master Data--Reports--Assemblies]
+module=ic.pl
+action=search
+searchitems=assembly
+
+[Master Data--Reports--Groups]
+module=pe.pl
+action=search
+type=partsgroup
+
+
+[Master Data--Reports--Projects]
+module=pe.pl
+action=search
+type=project
+
+[Master Data--Reports--Projecttransactions]
+module=rp.pl
+action=report
+report=projects
+
+[Master Data--Reports--Licenses]
+module=licenses.pl
+action=search
+
+
+[AR]
+
+[AR--Add Sales Invoice]
+module=is.pl
+action=add
+type=invoice
+
+[AR--Add Sales Order]
+module=oe.pl
+action=add
+type=sales_order
+
+[AR--Add Quotation]
+module=oe.pl
+action=add
+type=sales_quotation
+
+[AR--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[AR--Reports--Invoices]
+module=ar.pl
+action=search
+nextsub=ar_transactions
+
+[AR--Reports--Sales Orders]
+module=oe.pl
+action=search
+type=sales_order
+
+
+[AR--Reports--Quotations]
+module=oe.pl
+action=search
+type=sales_quotation
+
+
+
+[AP]
+
+[AP--Add Vendor Invoice]
+module=ir.pl
+action=add
+type=invoice
+
+[AP--Add Purchase Order]
+module=oe.pl
+action=add
+type=purchase_order
+
+[AP--Add RFQ]
+module=oe.pl
+action=add
+type=request_quotation
+
+
+[AP--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[AP--Reports--Vendor Invoices]
+module=ap.pl
+action=search
+nextsub=ap_transactions
+
+[AP--Reports--Purchase Orders]
+module=oe.pl
+action=search
+type=purchase_order
+
+
+[AP--Reports--RFQs]
+module=oe.pl
+action=search
+type=request_quotation
+
+# Mehrlagerfähigkeit noch nicht implementiert
+# [Shipping]
+#
+# [Shipping--Stock Assembly]
+# module=ic.pl
+# action=stock_assembly
+#
+# [Shipping--Ship]
+# module=oe.pl
+# action=search
+# type=ship_order
+#
+# [Shipping--Receive]
+# module=oe.pl
+# action=search
+# type=receive_order
+#
+# [Shipping--Transfer]
+# module=oe.pl
+# action=search_transfer
+
+
+
+[General Ledger]
+
+[General Ledger--Add Transaction]
+module=gl.pl
+action=add
+
+[General Ledger--Add AR Transaction]
+module=ar.pl
+action=add
+
+[General Ledger--Add AP Transaction]
+module=ap.pl
+action=add
+
+[General Ledger--DATEV - Export Assistent]
+module=datev.pl
+action=export
+
+
+# Wird selten eingesetzt und ist Fehlerbehaftet !!!
+# [General Ledger--Reconciliation]
+# module=rc.pl
+# action=reconciliation
+
+[General Ledger--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+
+[General Ledger--Reports--AR Aging]
+module=rp.pl
+action=report
+report=ar_aging
+
+
+[General Ledger--Reports--AP Aging]
+module=rp.pl
+action=report
+report=ap_aging
+
+[General Ledger--Reports--Journal]
+module=gl.pl
+action=search
+
+
+
+[Cash]
+
+[Cash--Receipt]
+module=cp.pl
+action=payment
+type=receipt
+vc=customer
+
+[Cash--Payment]
+module=cp.pl
+action=payment
+type=check
+vc=vendor
+
+[Cash--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[Cash--Reports--Receipts]
+module=rp.pl
+action=report
+report=receipts
+
+[Cash--Reports--Payments]
+module=rp.pl
+action=report
+report=payments
+
+
+[Reports]
+
+[Reports--Chart of Accounts]
+module=ca.pl
+action=chart_of_accounts
+
+[Reports--Trial Balance]
+module=rp.pl
+action=report
+report=trial_balance
+
+[Reports--Income Statement]
+module=rp.pl
+action=report
+report=income_statement
+
+[Reports--BWA]
+module=rp.pl
+action=report
+report=bwa
+
+[Reports--Balance Sheet]
+module=rp.pl
+action=report
+report=balance_sheet
+
+[Reports--UStVa]
+module=ustva.pl
+action=report
+
+[Batch Printing]
+
+
+[Batch Printing--Sales Invoices]
+module=bp.pl
+action=search
+vc=customer
+type=invoice
+
+[Batch Printing--Sales Orders]
+module=bp.pl
+action=search
+vc=customer
+type=sales_order
+
+[Batch Printing--Quotations]
+module=bp.pl
+action=search
+vc=customer
+type=sales_quotation
+
+[Batch Printing--Packing Lists]
+module=bp.pl
+action=search
+vc=customer
+type=packing_list
+
+[Batch Printing--Purchase Orders]
+module=bp.pl
+action=search
+vc=vendor
+type=purchase_order
+
+[Batch Printing--RFQs]
+module=bp.pl
+action=search
+vc=vendor
+type=request_quotation
+
+[Batch Printing--Checks]
+module=bp.pl
+action=search
+vc=vendor
+type=check
+
+[Batch Printing--Receipts]
+module=bp.pl
+action=search
+vc=customer
+type=receipt
+
+
+[Programm]
+
+[Programm--Preferences]
+module=am.pl
+action=config
+
+[Programm--UStVa Einstellungen]
+module=ustva.pl
+action=edit
+
+[Programm--Version]
+module=login.pl
+action=company_logo
+
+[Programm--Logout]
+module=login.pl
+action=logout
+target=_top
+
+[Backup]
+
+
+[Backup--Send by E-Mail]
+module=am.pl
+action=backup
+media=email
+
+[Backup--Save to File]
+module=am.pl
+action=backup
+media=file
+
+
+
+[System]
+
+[System--Chart of Accounts]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Chart of Accounts--Add Account]
+module=am.pl
+action=add_account
+
+[System--Chart of Accounts--List Accounts]
+module=am.pl
+action=list_account
+
+#[System--Warehouses]
+#module=menu.pl
+#action=acc_menu
+#target=acc_menu
+#submenu=1
+
+#[System--Warehouses--Add Warehouse]
+#module=am.pl
+#action=add_warehouse
+#
+#[System--Warehouses--List Warehouses]
+#module=am.pl
+#action=list_warehouse
+
+[System--Departments]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Departments--Add Department]
+module=am.pl
+action=add_department
+
+[System--Departments--List Departments]
+module=am.pl
+action=list_department
+
+[System--Type of Business]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Type of Business--Add Business]
+module=am.pl
+action=add_business
+
+[System--Type of Business--List Businesses]
+module=am.pl
+action=list_business
+
+[System--SIC]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--SIC--Add SIC]
+module=am.pl
+action=add_sic
+
+[System--SIC--List SIC]
+module=am.pl
+action=list_sic
+
+[System--HTML Templates]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--HTML Templates--Income Statement]
+module=am.pl
+action=display_form
+file=templates=income_statement.html
+
+[System--HTML Templates--Balance Sheet]
+module=am.pl
+action=display_form
+file=templates=balance_sheet.html
+
+[System--HTML Templates--Invoice]
+module=am.pl
+action=display_form
+file=templates=invoice.html
+
+[System--HTML Templates--Packing List]
+module=am.pl
+action=display_form
+file=templates=packing_list.html
+
+[System--HTML Templates--Sales Order]
+module=am.pl
+action=display_form
+file=templates=sales_order.html
+
+[System--HTML Templates--Purchase Order]
+module=am.pl
+action=display_form
+file=templates=purchase_order.html
+
+[System--HTML Templates--Statement]
+module=am.pl
+action=display_form
+file=templates=statement.html
+
+[System--HTML Templates--Quotation]
+module=am.pl
+action=display_form
+file=templates=sales_quotation.html
+
+[System--HTML Templates--RFQ]
+module=am.pl
+action=display_form
+file=templates=request_quotation.html
+
+[System--LaTeX Templates]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--LaTeX Templates--Invoice]
+module=am.pl
+action=display_form
+file=templates=invoice.tex
+
+[System--LaTeX Templates--Packing List]
+module=am.pl
+action=display_form
+file=templates=packing_list.tex
+
+[System--LaTeX Templates--Sales Order]
+module=am.pl
+action=display_form
+file=templates=sales_order.tex
+
+[System--LaTeX Templates--Purchase Order]
+module=am.pl
+action=display_form
+file=templates=purchase_order.tex
+
+[System--LaTeX Templates--Statement]
+module=am.pl
+action=display_form
+file=templates=statement.tex
+
+[System--LaTeX Templates--Check]
+module=am.pl
+action=display_form
+file=templates=check.tex
+
+[System--LaTeX Templates--Receipt]
+module=am.pl
+action=display_form
+file=templates=receipt.tex
+
+[System--LaTeX Templates--Quotation]
+module=am.pl
+action=display_form
+file=templates=sales_quotation.tex
+
+[System--LaTeX Templates--RFQ]
+module=am.pl
+action=display_form
+file=templates=request_quotation.tex
+
+[System--Stylesheet]
+module=am.pl
+action=display_stylesheet
+
+[System--Audit Control]
+module=am.pl
+action=audit_control
+
+------------------------------------------
+#################################
+# WEIß NOCH NICHT WAS DAMIT IST #
+#################################
+
+
+#[AR--Add Transaction]
+#module=ar.pl
+#action=add
+
+#[AR--Reports--Tax collected]
+#module=rp.pl
+#action=report
+#report=tax_collected
+
+#[AR--Reports--Non-taxable]
+#module=rp.pl
+#action=report
+#report=nontaxable_sales
+
+#[AP--Add Transaction]
+#module=menu.pl
+#action=acc_menu
+#target=acc_menu
+#submenu=1
+#module=ap.pl
+#action=add
+
+#[AP--Reports--Tax paid]
+#module=rp.pl
+#action=report
+#report=tax_paid
+
+#[AP--Reports--Non-taxable]
+#module=rp.pl
+#action=report
+#report=nontaxable_purchases
--- /dev/null
+-- Kontoplan für Österreich
+-- Ferdinand Gassauer, Tue, 5 Feb 2002
+-- checked and completed, Thu, 7 Feb 2002, Dieter Simader
+--
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0000','AUFWENDUNGEN FÜR INGANGSETZEN UND ERWEITERN DES BETRIEBES','H','00','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0010','Firmenwert','A','015','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0100','IMMATERIELLE VERMÖGENSGEGENSTÄNDE','H','01','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0110','Rechte','A','011','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0200','GRUNDSTÜCKE','H','02-03','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0210','unbebaute Grundstücke','A','020','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0220','bebaute Grundstücke','A','021','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0229','kum. Abschreibung bebaute Grundstücke','A','039','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0400','MASCHINEN','H','04-05','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0410','Maschinen','A','041','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0419','kum. Abschreibung Maschinen','A','069','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0500','FAHRZEUGE','H','06','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0510','Fahrzeuge','A','063','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0519','kum. Abschreibung Fahrzeuge','A','069','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0600','BETRIEBS- UND GESCHÄFTSAUSSTATTUNG','H','06','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0620','Büroeinrichtungen','A','066','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0625','kum. Abschreibung Betriebs- und Geschäftsausstattung','A','069','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0700','GELEISTETE ANZAHLUNGEN','H','07','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0800','FINANZANLAGEN','H','08-09','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0810','Beteiligungen','A','081','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('0820','Wertpapiere','A','080','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1100','ROHSTOFFE','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1120','Vorräte - Rohstoffe','A','110-119','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','BEZOGENE TEILE','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1220','Vorräte - bezogene Teile','A','120-129','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1300','HILFS- UND BETRIEBSSTOFFE','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1320','Hilfsstoffe','A','130-134','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1350','Betriebssstoffe','A','135-139','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1400','UNFERTIGE ERZEUGNISSE','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1420','Vorräte - unfertige Erzeugnisse','A','140-149','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','FERTIGE ERZEUGNISSE','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1520','Vorräte - Hardware','A','150-159','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1530','Vorräte - Software','A','150-159','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1540','Vorräte - Ersatzteile','A','150-159','A','IC');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1600','WAREN','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1700','NOCH NICHT ABGERECHNETE LEISTUNGEN','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','GELEISTETE ANZAHLUNGEN','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1900','WERTBERICHTIGUNGEN','H','1','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','FORDEUNGEN AUS LIEFERUNGEN UND LEISTUNGEN','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2010','Forderungen Lieferung & Leistung','A','200-207','A','AR');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2019','Wertberichtigung uneinbringliche Forderungen','A','20-21','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2300','SONSTIGE FORDERUNGEN','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2320','sonstige Forderungen','A','23-24','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2500','FORDERUNGEN AUS ABGABENVERRECHNUNG','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2520','sonstige Forderungen aus Abgebenverrechnung','A','25','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','WERTPAPIERE UND ANTEILE','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','Wertpapiere Umlaufvermögen','A','26','A','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2700','KASSABESTAND','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2701','Kassa','A','27-28','A','AR_paid:AP_paid');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2800','SCHECKS, GUTHABEN BEI KREDITINSTITUTEN','H','2','A','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2810','Schecks','A','27-28','A','AR_paid:AP_paid');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2820','Bankguthaben','A','280-288','A','AR_paid:AP_paid');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3100','LANGFRISTIGE VERBINDLICHKEITEN','H','3','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3110','Bank Verbindlichkeiten','A','31','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3120','Kredite von Eigentümern','A','310','L','AP_paid');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','VERBINDLICHKEITEN AUS LIEFERUNGEN UND LEISTUNGEN','H','33','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3310','Verbindlichkeiten aus Lieferungen und Leistungen','A','330-335','L','AP');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','VERBINDLICHKEITEN FINANZAMT','H','35','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3510','Finanzamt Verrechnung Körperschaftssteuer','A','350-359','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3520','Finanzamt Verrechnung Umsatzsteuer','A','350-359','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3530','Mehrwertsteuer 0%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3531','Mehrwertsteuer 10%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3532','Mehrwertsteuer 20%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3540','Vorsteuer 0%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3541','Vorsteuer 10%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3542','Vorsteuer 20%','A','350-359','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','UMSATZ','H','4','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4020','Verkauf - Hardware','A','40-44','I','AR_amount:IC_sale');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4030','Verkauf - Software ','A','40-44','I','AR_amount:IC_sale');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4040','Verkauf - Ersatzteile','A','40-44','I','AR_amount:IC_sale');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4300','UMSATZ BERATUNG','H','4','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4320','Erlöse Beratung','A','40-44','I','AR_amount:IC_income');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4330','Erlöse Programmierung','A','40-44','I','AR_amount:IC_income');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4600','SONSTIGE ERLÖSE','H','4','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4630','Frachterlöse','A','46-49','I','IC_income');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','WARENEINSATZ','H','5','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5020','Wareneinsatz / Hardware','A','500-509','E','AP_amount:IC_cogs');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5030','Wareneinsatz / Software','A','500-509','E','AP_amount:IC_cogs');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5040','Wareneinsatz / Ersatzteile','A','520-529','E','AP_amount:IC_cogs');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','VERBRAUCH BRENN- UND TREIBSTOFFEN, ENERGIE UND WASSER','H','5','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','Energie, Wasser','A','560-569','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6000','LOHNAUFWAND','H','6','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6010','Lohn ','A','600-619','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6200','GEAHLTSAUFWAND','H','6','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6210','Gehalt ','A','620-639','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6500','GESETZLICHER SOZIALAUFWAND','H','6','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6510','Dienstgeberanteile','A','645-649','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6700','FREIWILLIGER SOZIALAUFWAND','H','6','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('6710','freiwilliger Sozialaufwand','A','660-665','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7000','ABSCHREIBUNGEN','H','7','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7010','Abschreibungen','A','700','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7020','geringwertige Wirtschaftsgüter','A','701-708','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7100','SONSTIGE STEUERN','H','71','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7110','Ertragssteuern','A','710-719','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7120','Grundsteuern','A','710-719','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7200','INSTANDHALTUNGSAUFWAND','H','7','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7210','Reparatur und Instandhaltung','A','720-729','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7300','TRANSPORTKOSTEN','H','73','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7310','Frachtaufwand','A','730-731','E','AP_amount:IC_expense');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7400','MIET-,PACHT-,LEASING-, LIZENZAUFWAND','H','74','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7410','Miete','A','740-743','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7411','Lizenzen','A','748-749','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7600','VERWALTUNGSKOSTEN','H','76','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7610','Beratungsaufwand','A','775-776','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7611','Büromaterialien','A','760','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7615','Werbung und Marketing','A','765-768','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7620','uneinbringliche Forderungen','A','799','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7630','Telephonkosten','A','738-739','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7631','Internetkosten','A','738-739','E','AP_amount:IC_expense');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7632','Reise- und Repräsentationsaufwand','A','734-735','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7634','Registrierungsgebühren','A','748-749','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7700','VERSICHERUNGEN','H','77-78','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('7710','Versicherung','A','770-774','E','AP_amount');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8000','FINANZERTRÄGE UND FINANZAUFWENDUNGEN','H','8','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8020','Bankzinsen und Gebühren','A','80-83','E','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8100','BETEILIGUNGSERTRÄGE','H','8','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8110','Erträge aus Beteiligungen','A','800-804','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9000','KAPITAL','H','9','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9010','Aktien, Geschäftsanteile','A','900-918','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9020','nicht einbezahltes Kapital','A','919','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9200','KAPITALRÜCKLAGEN','H','9','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9210','freie Rücklage','A','920-929','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9300','GEWINN','H','939','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9310','Gewinnvortrag Vorjahr','A','980','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9320','Jahresgewinn','A','985','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9400','RÜCKSTELLUNGEN','H','3','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9420','Abfertigungsrückstellung','A','300','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9430','Urlaubsrückstellung','A','304-309','L','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9700','EINLAGEN STILLER GESELLSCHAFTER','H','9','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('9800','EB,SB,G+V KONTEN','H','9','Q','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4640','Devisengewinne','A','80-83','I','');
+insert into chart (accno,description,charttype,gifi_accno,category,link) values ('8050','Devisenverluste','A','80-83','E','');
+--
+insert into tax (chart_id,rate) values ((select id from chart where accno = '3530'),0.00);
+insert into tax (chart_id,rate) values ((select id from chart where accno = '3531'),0.10);
+insert into tax (chart_id,rate) values ((select id from chart where accno = '3532'),0.20);
+--
+update defaults set inventory_accno_id = (select id from chart where accno = '1520'), income_accno_id = (select id from chart where accno = '4020'), expense_accno_id = (select id from chart where accno = '7610'), fxgain_accno_id = (select id from chart where accno = '4640'), fxloss_accno_id = (select id from chart where accno = '8050'), invnumber = '1000', sonumber = '1000', ponumber = '1000', curr = 'EUR:USD', weightunit = 'kg';
+--
--- /dev/null
+-- Österreichischer Einheitskontenrahmen / Kontenplan (ÖSV Österreichischer Steuerverein)
+--
+INSERT INTO gifi (accno, description) VALUES ('0', 'Anlagevermögen und Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes');
+--
+INSERT INTO gifi (accno, description) VALUES ('00', 'Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes');
+INSERT INTO gifi (accno, description) VALUES ('001', 'Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes');
+INSERT INTO gifi (accno, description) VALUES ('009', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('01', 'Immaterielle Vermögensgegenstände');
+INSERT INTO gifi (accno, description) VALUES ('010', 'Konzessionen');
+INSERT INTO gifi (accno, description) VALUES ('011', 'Patentrechte und Lizenzen');
+INSERT INTO gifi (accno, description) VALUES ('012', 'Datenverarbeitungsprogramme');
+INSERT INTO gifi (accno, description) VALUES ('013', 'Marken, Warenzeichen und Musterschutzrechte, sonstige Urheberrechte');
+INSERT INTO gifi (accno, description) VALUES ('014', 'Pacht- und Mietrechte');
+INSERT INTO gifi (accno, description) VALUES ('015', 'Geschäfts(Firmen)wert');
+INSERT INTO gifi (accno, description) VALUES ('018', 'Geleistete Anzahlungen');
+INSERT INTO gifi (accno, description) VALUES ('019', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('02-03', 'Grundstücke, grundstücksgleiche Rechte und Bauten, einschließlich der Bauten auf fremden Grund');
+INSERT INTO gifi (accno, description) VALUES ('020', 'Unbebaute Grundstücke');
+INSERT INTO gifi (accno, description) VALUES ('021', 'Bebaute Grundstücke (Grundwert)');
+INSERT INTO gifi (accno, description) VALUES ('022', 'Grundstücksgleiche Rechte');
+INSERT INTO gifi (accno, description) VALUES ('030', 'Betriebs- und Geschäftsgebäude auf eigenem Grund');
+INSERT INTO gifi (accno, description) VALUES ('031', 'Wohn- und Sozialgebäude auf eigenem Grund');
+INSERT INTO gifi (accno, description) VALUES ('032', 'Betriebs- und Geschäftsgebäude auf fremdem Grund');
+INSERT INTO gifi (accno, description) VALUES ('033', 'Wohn- und Sozialgebäude auf fremdem Grund');
+INSERT INTO gifi (accno, description) VALUES ('034', 'Grundstückseinrichtungen auf eigenem Grund');
+INSERT INTO gifi (accno, description) VALUES ('035', 'Grundstückseinrichtungen auf fremdem Grund');
+INSERT INTO gifi (accno, description) VALUES ('036', 'Bauliche Investitionen in fremden (gepachteten) Betriebs- und Geschäftsgebäuden');
+INSERT INTO gifi (accno, description) VALUES ('037', 'Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgebäuden');
+INSERT INTO gifi (accno, description) VALUES ('039', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('04-05', 'Technische Anlagen und Maschinen');
+INSERT INTO gifi (accno, description) VALUES ('040', 'Fertigungsmaschinen');
+INSERT INTO gifi (accno, description) VALUES ('041', 'Antriebsmaschinen');
+INSERT INTO gifi (accno, description) VALUES ('042', 'Energieversorgungsanlagen');
+INSERT INTO gifi (accno, description) VALUES ('043', 'Transportanlagen');
+INSERT INTO gifi (accno, description) VALUES ('044-049', 'Sonstige Maschinen und maschinelle Anlagen');
+INSERT INTO gifi (accno, description) VALUES ('050', 'Maschinenwerkzeuge');
+INSERT INTO gifi (accno, description) VALUES ('051', 'Allgemeine Werkzeuge und Handwerkzeuge');
+INSERT INTO gifi (accno, description) VALUES ('052', 'Vorrichtungen, Formen und Modelle');
+INSERT INTO gifi (accno, description) VALUES ('053', 'Andere Erzeugungshilfsmittel');
+INSERT INTO gifi (accno, description) VALUES ('054', 'Hebezeuge und Montageanlagen');
+INSERT INTO gifi (accno, description) VALUES ('055', 'Geringwertige Vermögensgegenstände, soweit im Erzeugungsprozeß verwendet');
+--
+INSERT INTO gifi (accno, description) VALUES ('06', 'Andere Anlagen, Betriebs- und Geschäftsausstattung');
+INSERT INTO gifi (accno, description) VALUES ('060', 'Beheizungs- und Beleuchtungsanlagen');
+INSERT INTO gifi (accno, description) VALUES ('061', 'Nachrichten- und Kontrollanlagen');
+INSERT INTO gifi (accno, description) VALUES ('062', 'Büromaschinen, EDV-Anlagen');
+INSERT INTO gifi (accno, description) VALUES ('063', 'PKW');
+INSERT INTO gifi (accno, description) VALUES ('064', 'LKW');
+INSERT INTO gifi (accno, description) VALUES ('065', 'Andere Beförderungsmittel');
+INSERT INTO gifi (accno, description) VALUES ('066', 'Andere Betriebs- und Geschäftsausstattung');
+INSERT INTO gifi (accno, description) VALUES ('067', 'Gebinde');
+INSERT INTO gifi (accno, description) VALUES ('068', 'Geringwertige Vermögensgegenstände, soweit nicht im Erzeugungsprozeß verwendet');
+INSERT INTO gifi (accno, description) VALUES ('069', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('07', 'Geleistete Anzahlungen und Anlagen in Bau');
+INSERT INTO gifi (accno, description) VALUES ('070', 'Geleistete Anzahlungen');
+INSERT INTO gifi (accno, description) VALUES ('071', 'Anlagen in Bau');
+INSERT INTO gifi (accno, description) VALUES ('079', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('08-09', 'Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('080', 'Anteile an verbundenen Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('081', 'Beteiligungen an Gemeinschaftsunternehmen');
+INSERT INTO gifi (accno, description) VALUES ('082', 'Beteiligungen an angeschlossenen (assoziierten) Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('083', 'Sonstige Beteiligungen');
+INSERT INTO gifi (accno, description) VALUES ('084', 'Ausleihungen an verbundene Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('085', 'Ausleihungen an Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+INSERT INTO gifi (accno, description) VALUES ('086', 'Sonstige Ausleihungen');
+INSERT INTO gifi (accno, description) VALUES ('087', 'Anteile an Kapitalgesellschaften ohne Beteiligungscharakter');
+INSERT INTO gifi (accno, description) VALUES ('088', 'Anteile an Personengesellschaften ohne Beteiligungscharakter');
+INSERT INTO gifi (accno, description) VALUES ('090', 'Genossenschaftsanteile ohne Beteiligungscharakter');
+INSERT INTO gifi (accno, description) VALUES ('091', 'Anteile an Investmentfonds');
+INSERT INTO gifi (accno, description) VALUES ('092-093', 'Festverzinsliche Wertpapiere des Anlagevermögens');
+INSERT INTO gifi (accno, description) VALUES ('094-097', 'Sonstige Finanzanlagen, Wertrechte');
+INSERT INTO gifi (accno, description) VALUES ('098', 'Geleistete Anzahlungen');
+INSERT INTO gifi (accno, description) VALUES ('099', 'Kumulierte Abschreibungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('1', 'Vorräte');
+INSERT INTO gifi (accno, description) VALUES ('100-109', 'Bezugsverrechnung');
+INSERT INTO gifi (accno, description) VALUES ('110-119', 'Rohstoffe');
+INSERT INTO gifi (accno, description) VALUES ('120-129', 'Bezogene Teile');
+INSERT INTO gifi (accno, description) VALUES ('130-134', 'Hilfsstoffe');
+INSERT INTO gifi (accno, description) VALUES ('135-139', 'Betriebsstoffe');
+INSERT INTO gifi (accno, description) VALUES ('140-149', 'Unfertige Erzeugnisse');
+INSERT INTO gifi (accno, description) VALUES ('150-159', 'Fertige Erzeugnisse');
+INSERT INTO gifi (accno, description) VALUES ('160-169', 'Waren');
+INSERT INTO gifi (accno, description) VALUES ('170-179', 'Noch nicht abrechenbare Leistungen');
+INSERT INTO gifi (accno, description) VALUES ('180', 'Geleistete Anzahlungen');
+INSERT INTO gifi (accno, description) VALUES ('190-199', 'Wertberichtigungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('2', 'Sonstiges Umlaufvermögen, Rechnungsabgrenzungsposten');
+INSERT INTO gifi (accno, description) VALUES ('20-21', 'Forderungen aus Lieferungen und Leistungen');
+INSERT INTO gifi (accno, description) VALUES ('200-207', 'Forderungen aus Lieferungen und Leistungen Inland');
+INSERT INTO gifi (accno, description) VALUES ('208', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Inland');
+INSERT INTO gifi (accno, description) VALUES ('209', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Inland');
+INSERT INTO gifi (accno, description) VALUES ('210-212', 'Forderungen aus Lieferungen und Leistungen Währungsunion');
+INSERT INTO gifi (accno, description) VALUES ('213', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Währungsunion');
+INSERT INTO gifi (accno, description) VALUES ('214', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen Währungsunion');
+INSERT INTO gifi (accno, description) VALUES ('215-217', 'Forderungen aus Lieferungen und Leistungen sonstiges Ausland');
+INSERT INTO gifi (accno, description) VALUES ('218', 'Einzelwertberichtigungen zu Forderungen aus Lieferungen und Leistungen sonstiges Ausland');
+INSERT INTO gifi (accno, description) VALUES ('219', 'Pauschalwertberichtigungen zu Forderungen aus Lieferungen und Leistungen sonstiges Ausland');
+--
+INSERT INTO gifi (accno, description) VALUES ('22', 'Forderungen gegenüber verbundenen Unternehmen und Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+INSERT INTO gifi (accno, description) VALUES ('220-222', 'Forderungen gegenüber verbundenen Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('223', 'Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('224', 'Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('225-227', 'Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+INSERT INTO gifi (accno, description) VALUES ('228', 'Einzelwertberichtigungen zu Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+INSERT INTO gifi (accno, description) VALUES ('229', 'Pauschalwertberichtigungen zu Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+--
+INSERT INTO gifi (accno, description) VALUES ('23-24', 'Sonstige Forderungen und Vermögensgegenstände');
+INSERT INTO gifi (accno, description) VALUES ('230-246', 'Sonstige Forderungen und Vermögensgegenstände');
+INSERT INTO gifi (accno, description) VALUES ('247', 'Eingeforderte, aber noch nicht eingezahlte Einlagen');
+INSERT INTO gifi (accno, description) VALUES ('248', 'Einzelwertberichtigungen zu sonstigen Forderungen und Vermögensgegenständen');
+INSERT INTO gifi (accno, description) VALUES ('249', 'Pauschalwertberichtigungen zu sonstigen Forderungen und Vermögensgegenständen');
+--
+INSERT INTO gifi (accno, description) VALUES ('25', 'Forderungen aus der Abgabenverrechnung');
+INSERT INTO gifi (accno, description) VALUES ('250-259', 'Forderungen aus der Abgabenverrechnung');
+--
+INSERT INTO gifi (accno, description) VALUES ('26', 'Wertpapiere und Anteile');
+INSERT INTO gifi (accno, description) VALUES ('260', 'Eigene Anteile');
+INSERT INTO gifi (accno, description) VALUES ('261', 'Anteile an verbundenen Unternehmen');
+INSERT INTO gifi (accno, description) VALUES ('262', 'Sonstige Anteile');
+INSERT INTO gifi (accno, description) VALUES ('263-267', 'Sonstige Wertpapiere');
+INSERT INTO gifi (accno, description) VALUES ('268', 'Besitzwechsel, soweit dem Unternehmen nicht die der Ausstellung zugrundeliegenden Forderungen zustehen');
+INSERT INTO gifi (accno, description) VALUES ('269', 'Wertberichtigungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('27-28', 'Kassenbestand, Schecks, Guthaben bei Kreditinstituten');
+INSERT INTO gifi (accno, description) VALUES ('270-272', 'Kassenbestände in Inlandswährung');
+INSERT INTO gifi (accno, description) VALUES ('273', 'Postwertzeichen');
+INSERT INTO gifi (accno, description) VALUES ('274', 'Stempelmarken');
+INSERT INTO gifi (accno, description) VALUES ('275-277', 'Kassenbestände in Fremdwährung');
+INSERT INTO gifi (accno, description) VALUES ('278', 'Schecks in Inlandswährung');
+INSERT INTO gifi (accno, description) VALUES ('280-288', 'Guthaben bei Kreditinstituten');
+INSERT INTO gifi (accno, description) VALUES ('289', 'Wertberichtigungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('29', 'Rechnungsabgrenzungsposten');
+INSERT INTO gifi (accno, description) VALUES ('290', 'Aktive Rechnungsabgrenzungsposten');
+INSERT INTO gifi (accno, description) VALUES ('295', 'Disagio');
+INSERT INTO gifi (accno, description) VALUES ('296', 'Unterschiedsbetrag zur gebotenen Pensionsrückstellung');
+INSERT INTO gifi (accno, description) VALUES ('297', 'Unterschiedsbetrag gem. Abschnitt XII Pensionskassengesetz');
+INSERT INTO gifi (accno, description) VALUES ('298', 'Steuerabgrenzung');
+--
+INSERT INTO gifi (accno, description) VALUES ('3', 'Rückstellungen, Verbindlichkeiten und Rechnungsabgrenzungsposten');
+--
+INSERT INTO gifi (accno, description) VALUES ('30', 'Rückstellungen');
+INSERT INTO gifi (accno, description) VALUES ('300', 'Rückstellungen für Abfertigungen');
+INSERT INTO gifi (accno, description) VALUES ('301', 'Rückstellungen für Pensionen');
+INSERT INTO gifi (accno, description) VALUES ('302-303', 'Steuerrückstellungen');
+INSERT INTO gifi (accno, description) VALUES ('304-309', 'Sonstige Rückstellungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('31', 'Anleihen, Verbindlichkeiten gegenüber Kreditinstituten und Finanzinstituten');
+INSERT INTO gifi (accno, description) VALUES ('310', 'Anleihen (einschließlich konvertibler)');
+INSERT INTO gifi (accno, description) VALUES ('311-317', 'Verbindlichkeiten gegenüber Kreditinstituten');
+INSERT INTO gifi (accno, description) VALUES ('318-319', 'Verbindlichkeiten gegenüber Finanzinstituten');
+--
+INSERT INTO gifi (accno, description) VALUES ('32', 'Erhaltene Anzahlungen auf Bestellungen');
+INSERT INTO gifi (accno, description) VALUES ('320', 'Erhaltene Anzahlungen auf Bestellungen');
+INSERT INTO gifi (accno, description) VALUES ('321', 'Umsatzsteuer-Evidenzkonto für erhaltene Anzahlungen auf Bestellungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('33', 'Verbindlichkeiten aus Lieferungen und Leistungen, Verbindlichkeiten aus der Annahme gezogener und der Ausstellung eigener Wechsel');
+INSERT INTO gifi (accno, description) VALUES ('330-335', 'Verbindlichkeiten aus Lieferungen und Leistungen Inland');
+INSERT INTO gifi (accno, description) VALUES ('336', 'Verbindlichkeiten aus Lieferungen und Leistungen Währungsunion');
+INSERT INTO gifi (accno, description) VALUES ('337', 'Verbindlichkeiten aus Lieferungen und Leistungen sonstiges Ausland');
+INSERT INTO gifi (accno, description) VALUES ('338-339', 'Verbindlichkeiten aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel');
+--
+INSERT INTO gifi (accno, description) VALUES ('34', 'Verbindlichkeiten gegenüber verbundenen Unternehmen, gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht und gegenüber Gesellschaftern');
+INSERT INTO gifi (accno, description) VALUES ('340-347', 'Verbindlichkeiten gegenüber verbundenen Unternehmen, Verbindlichkeiten gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht');
+INSERT INTO gifi (accno, description) VALUES ('348', 'Verbindlichkeiten gegenüber Gesellschaftern');
+--
+INSERT INTO gifi (accno, description) VALUES ('35', 'Verbindlichkeiten aus Steuern');
+INSERT INTO gifi (accno, description) VALUES ('350-359', 'Verbindlichkeiten aus Steuern');
+--
+INSERT INTO gifi (accno, description) VALUES ('36', 'Verbindlichkeiten im Rahmen der sozialen Sicherheit');
+INSERT INTO gifi (accno, description) VALUES ('360-369', 'Verbindlichkeiten im Rahmen der sozialen Sicherheit');
+--
+INSERT INTO gifi (accno, description) VALUES ('37-38', 'Übrige sonstige Verbindlichkeiten');
+INSERT INTO gifi (accno, description) VALUES ('370-389', 'Übrige sonstige Verbindlichkeiten');
+--
+INSERT INTO gifi (accno, description) VALUES ('39', 'Rechnungsabgrenzungsposten');
+INSERT INTO gifi (accno, description) VALUES ('390-399', 'Passive Rechnungsabgrenzungsposten');
+--
+INSERT INTO gifi (accno, description) VALUES ('4', 'Betriebliche Erträge');
+--
+INSERT INTO gifi (accno, description) VALUES ('40-44', 'Brutto-Umsatzerlöse und Erlösschmälerungen');
+INSERT INTO gifi (accno, description) VALUES ('400-439', 'Brutto-Umsatzerlöse');
+INSERT INTO gifi (accno, description) VALUES ('440-449', 'Erlösschmälerungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('45', 'Bestandsveränderungen und aktivierte Eigenleistungen');
+INSERT INTO gifi (accno, description) VALUES ('450-457', 'Veränderungen des Bestandes an fertigen und unfertigen Erzeugnissen sowie an noch nicht abrechenbaren Leistungen');
+INSERT INTO gifi (accno, description) VALUES ('458-459', 'andere aktivierte Eigenleistungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('46-49', 'Sonstige betriebliche Erträge');
+INSERT INTO gifi (accno, description) VALUES ('460-462', 'Erlöse aus dem Abgang vom Anlagevermögen, ausgenommen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('463-465', 'Erträge aus dem Abgang vom Anlagevermögen, ausgenommen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('466-467', 'Erträge aus der Zuschreibung zum Anlagevermögen, ausgenommen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('470-479', 'Erträge aus der Auflösung von Rückstellungen');
+INSERT INTO gifi (accno, description) VALUES ('480-499', 'Übrige betriebliche Erträge');
+--
+INSERT INTO gifi (accno, description) VALUES ('5', 'Materialaufwand und sonstige bezogene Herstellungsleistungen');
+INSERT INTO gifi (accno, description) VALUES ('500-509', 'Wareneinsatz');
+INSERT INTO gifi (accno, description) VALUES ('510-519', 'Verbrauch von Rohstoffen');
+INSERT INTO gifi (accno, description) VALUES ('520-529', 'Verbrauch von bezogenen Fertig- und Einzelteilen');
+INSERT INTO gifi (accno, description) VALUES ('530-539', 'Verbrauch von Hilfsstoffen');
+INSERT INTO gifi (accno, description) VALUES ('540-549', 'Verbrauch von Betriebsstoffen');
+INSERT INTO gifi (accno, description) VALUES ('550-559', 'Verbrauch von Werkzeugen und anderen Erzeugungshilfsmitteln');
+INSERT INTO gifi (accno, description) VALUES ('560-569', 'Verbrauch von Brenn- und Treibstoffen, Energie und Wasser');
+INSERT INTO gifi (accno, description) VALUES ('570-579', 'Sonstige bezogene Herstellungsleistungen');
+INSERT INTO gifi (accno, description) VALUES ('580', 'Skontoerträge auf Materialaufwand');
+INSERT INTO gifi (accno, description) VALUES ('581', 'Skontoerträge auf sonstige bezogene Herstellungsleistungen');
+INSERT INTO gifi (accno, description) VALUES ('590', 'Aufwandsstellenrechnung');
+--
+INSERT INTO gifi (accno, description) VALUES ('6', 'Personalaufwand');
+INSERT INTO gifi (accno, description) VALUES ('600-619', 'Löhne');
+INSERT INTO gifi (accno, description) VALUES ('620-639', 'Gehälter');
+INSERT INTO gifi (accno, description) VALUES ('640-644', 'Aufwendungen für Abfertigungen');
+INSERT INTO gifi (accno, description) VALUES ('645-649', 'Aufwendungen für Altersversorgung');
+INSERT INTO gifi (accno, description) VALUES ('650-655', 'Gesetzlicher Sozialaufwand Arbeiter');
+INSERT INTO gifi (accno, description) VALUES ('656-659', 'Gesetzlicher Sozialaufwand Angestellte');
+INSERT INTO gifi (accno, description) VALUES ('660-665', 'Lohnabhängige Abgaben und Pflichtbeiträge');
+INSERT INTO gifi (accno, description) VALUES ('666-669', 'Gehaltsabhängige Abgaben und Pflichtbeiträge');
+INSERT INTO gifi (accno, description) VALUES ('670-689', 'Sonstige Sozialaufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('690', 'Aufwandsstellenrechnung');
+--
+INSERT INTO gifi (accno, description) VALUES ('7', 'Abschreibungen und sonstige betriebliche Aufwendunge');
+--
+INSERT INTO gifi (accno, description) VALUES ('70', 'Abschreibungen');
+INSERT INTO gifi (accno, description) VALUES ('700', 'Abschreibungen auf aktivierte Aufwendungen für das Ingangsetzen und Erweitern eines Betriebes');
+INSERT INTO gifi (accno, description) VALUES ('701-708', 'Abschreibungen auf das Anlagevermögen (ausgenommen Finanzanlagen)');
+INSERT INTO gifi (accno, description) VALUES ('709', 'Abschreibungen vom Umlaufvermögen, soweit diese die im Unternehmen üblichen Abschreibungen übersteigen');
+--
+INSERT INTO gifi (accno, description) VALUES ('71', 'Sonstige Steuern');
+INSERT INTO gifi (accno, description) VALUES ('710-719', 'Sonstige Steuern');
+--
+INSERT INTO gifi (accno, description) VALUES ('72-78', 'Übrige betriebliche Aufwendungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('72', 'Instandhaltung und Reinigung durch Dritte, Entsorgung, Beleuchtung');
+INSERT INTO gifi (accno, description) VALUES ('720-729', 'Instandhaltung und Reinigung durch Dritte, Entsorgung, Beleuchtung');
+--
+INSERT INTO gifi (accno, description) VALUES ('73', 'Transport-, Reise- und Fahrtaufwand, Nachrichtenaufwand');
+INSERT INTO gifi (accno, description) VALUES ('730-731', 'Transporte durch Dritte');
+INSERT INTO gifi (accno, description) VALUES ('732-733', 'Kfz-Aufwand');
+INSERT INTO gifi (accno, description) VALUES ('734-735', 'Reise- und Fahrtaufwand');
+INSERT INTO gifi (accno, description) VALUES ('736-737', 'Tag- und Nächtigungsgelder');
+INSERT INTO gifi (accno, description) VALUES ('738-739', 'Nachrichtenaufwand');
+--
+INSERT INTO gifi (accno, description) VALUES ('74', 'Miet-, Pacht-, Leasing- und Lizenzaufwand');
+INSERT INTO gifi (accno, description) VALUES ('740-743', 'Miet- und Pachtaufwand');
+INSERT INTO gifi (accno, description) VALUES ('744-747', 'Leasingaufwand');
+INSERT INTO gifi (accno, description) VALUES ('748-749', 'Lizenzaufwand');
+--
+INSERT INTO gifi (accno, description) VALUES ('75', 'Aufwand für beigestelltes Personal, Provisionen an Dritte, Aufsichtsratsvergütungen');
+INSERT INTO gifi (accno, description) VALUES ('750-753', 'Aufwand für beigestelltes Personal');
+INSERT INTO gifi (accno, description) VALUES ('754-757', 'Provisionen an Dritte');
+INSERT INTO gifi (accno, description) VALUES ('758-759', 'Aufsichtsratsvergütungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('76', 'Büro-, Werbe- und Repräsentationsaufwand');
+INSERT INTO gifi (accno, description) VALUES ('760', 'Büromaterial und Drucksorten');
+INSERT INTO gifi (accno, description) VALUES ('761-762', 'Druckerzeugnisse und Vervielfältigungen');
+INSERT INTO gifi (accno, description) VALUES ('763', 'Fachliteratur und Zeitungen');
+INSERT INTO gifi (accno, description) VALUES ('765-768', 'Werbung und Repräsentation');
+INSERT INTO gifi (accno, description) VALUES ('769', 'Spenden und Trinkgelder');
+--
+INSERT INTO gifi (accno, description) VALUES ('77-78', 'Versicherungen, Übrige Aufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('770-774', 'Versicherungen');
+INSERT INTO gifi (accno, description) VALUES ('775-776', 'Beratungs- und Prüfungsaufwand');
+INSERT INTO gifi (accno, description) VALUES ('777', 'Aus- und Fortbildung');
+INSERT INTO gifi (accno, description) VALUES ('778', 'Mitgliedsbeiträge');
+INSERT INTO gifi (accno, description) VALUES ('779', 'Spesen des Geldverkehrs');
+INSERT INTO gifi (accno, description) VALUES ('780-781', 'Schadensfälle');
+INSERT INTO gifi (accno, description) VALUES ('782', 'Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('783', 'Verluste aus dem Abgang vom Anlagevermögen, ausgenommen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('784-788', 'Verschiedene betriebliche Aufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('789', 'Skontoerträge auf sonstige betriebliche Aufwendungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('79', 'Konten für das Umsatzkostenverfahren');
+INSERT INTO gifi (accno, description) VALUES ('790', 'Aufwandsstellenrechnung');
+INSERT INTO gifi (accno, description) VALUES ('791-799', 'Aufwandsstellen im Rahmen des Umsatzkostenverfahrens');
+INSERT INTO gifi (accno, description) VALUES ('791-795', 'Aufwandsstellen der Herstellung');
+INSERT INTO gifi (accno, description) VALUES ('796', 'Herstellungskosten der zur Erzielung der Umsatzerlöse erbrachten Leistungen');
+INSERT INTO gifi (accno, description) VALUES ('797', 'Vertriebskosten');
+INSERT INTO gifi (accno, description) VALUES ('798', 'Verwaltungskosten');
+INSERT INTO gifi (accno, description) VALUES ('799', 'Sonstige betriebliche Aufwendungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('8', 'Finanzerträge und Finanzaufwendungen, a.o. Erträge und a.o. Aufwendungen, Steuern vom Einkommen und vom Ertrag, Rücklagenbewegung');
+--
+INSERT INTO gifi (accno, description) VALUES ('80-83', 'Finanzerträge und Finanzaufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('800-804', 'Erträge aus Beteiligungen');
+INSERT INTO gifi (accno, description) VALUES ('805-809', 'Erträge aus anderen Wertpapieren und Ausleihungen des Finanzanlagevermögens');
+INSERT INTO gifi (accno, description) VALUES ('810-813', 'Sonstige Zinsen und ähnliche Erträge');
+INSERT INTO gifi (accno, description) VALUES ('814', 'Erlöse aus dem Abgang von Beteiligungen');
+INSERT INTO gifi (accno, description) VALUES ('815', 'Erlöse aus dem Abgang von sonstigen Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('816', 'Erlöse aus dem Abgang von Wertpapieren des Umlaufvermögens');
+INSERT INTO gifi (accno, description) VALUES ('817', 'Buchwert abgegangener Beteiligungen');
+INSERT INTO gifi (accno, description) VALUES ('818', 'Buchwert abgegangener sonstiger Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('819', 'Buchwert abgegangener Wertpapiere des Umlaufvermögens');
+INSERT INTO gifi (accno, description) VALUES ('820', 'Erträge aus dem Abgang von und der Zuschreibung zu Finanzanlagen');
+INSERT INTO gifi (accno, description) VALUES ('821', 'Erträge aus dem Abgang von und der Zuschreibung zu Wertpapieren des Umlaufvermögens');
+INSERT INTO gifi (accno, description) VALUES ('822-825', 'Aufwendungen aus Beteiligungen');
+INSERT INTO gifi (accno, description) VALUES ('826-827', 'Aufwendungen aus sonstigen Finanzanlagen und aus Wertpapieren des Umlaufvermögens');
+INSERT INTO gifi (accno, description) VALUES ('828-834', 'Zinsen und ähnliche Aufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('835', 'Nicht ausgenützte Lieferantenskonti');
+--
+INSERT INTO gifi (accno, description) VALUES ('84', 'Außerordentliche Erträge und außerordentliche Aufwendungen');
+INSERT INTO gifi (accno, description) VALUES ('840-844', 'Außerordentliche Erträge');
+INSERT INTO gifi (accno, description) VALUES ('845-849', 'Außerordentliche Aufwendungen');
+--
+INSERT INTO gifi (accno, description) VALUES ('85', 'Steuern vom Einkommen und vom Ertrag');
+INSERT INTO gifi (accno, description) VALUES ('850-859', 'Steuern vom Einkommen und vom Ertrag');
+--
+INSERT INTO gifi (accno, description) VALUES ('86-89', 'Rücklagenbewegung, Ergebnisüberrechnung');
+INSERT INTO gifi (accno, description) VALUES ('860-869', 'Auflösung unversteuerter Rücklagen');
+INSERT INTO gifi (accno, description) VALUES ('870-874', 'Auflösung von Kapitalrücklagen');
+INSERT INTO gifi (accno, description) VALUES ('875-879', 'Auflösung von Gewinnrücklagen');
+INSERT INTO gifi (accno, description) VALUES ('880-889', 'Zuweisung zu unversteuerten Rücklagen');
+INSERT INTO gifi (accno, description) VALUES ('890-895', 'Zuweisung zu Gewinnrücklagen');
+INSERT INTO gifi (accno, description) VALUES ('899', 'Gewinnabfuhr bzw. Verlustüberrechnung aus Ergebnisabführungsverträgen');
+--
+INSERT INTO gifi (accno, description) VALUES ('9', 'Eigenkapital, unversteuerte Rücklagen, Einlagen Stiller Gesellschafter, Abschluß- und Evidenzkonten');
+--
+INSERT INTO gifi (accno, description) VALUES ('900-918', 'Gezeichnetes bzw. gewidmetes Kapital');
+INSERT INTO gifi (accno, description) VALUES ('919', 'Nicht eingeforderte ausstehende Einlagen');
+INSERT INTO gifi (accno, description) VALUES ('920-929', 'Kapitalrücklagen');
+INSERT INTO gifi (accno, description) VALUES ('930-938', 'Gewinnrücklagen');
+INSERT INTO gifi (accno, description) VALUES ('939', 'Bilanzgewinn (-verlust)');
+INSERT INTO gifi (accno, description) VALUES ('940-959', 'Bewertungsreserven und sonstige unversteuerte Rücklagen');
+INSERT INTO gifi (accno, description) VALUES ('960-969', 'Privat- und Verrechnungskonten bei Einzelunternehmen und Personengesellschaften');
+INSERT INTO gifi (accno, description) VALUES ('970-979', 'Einlagen Stiller Gesellschafter');
+INSERT INTO gifi (accno, description) VALUES ('980', 'Eröffnungsbilanz');
+INSERT INTO gifi (accno, description) VALUES ('985', 'Schlußbilanz');
+INSERT INTO gifi (accno, description) VALUES ('989', 'Gewinn- und Verlustrechnung');
+INSERT INTO gifi (accno, description) VALUES ('990-999', 'Evidenzkonten');
--- /dev/null
+-- contribué par Jens-Ingo Brodesser, jens-ingo@all2all.org, Moving Art Studio ASBL, ALL2ALL The Independent Network
+-- le 15/07/2003
+
+INSERT INTO "gifi" ("accno","description") VALUES ('10','Capital');
+INSERT INTO "gifi" ("accno","description") VALUES ('30','Approvisionnements - Matières premières');
+INSERT INTO "gifi" ("accno","description") VALUES ('11','Primes d''émission');
+INSERT INTO "gifi" ("accno","description") VALUES ('12','Plus-values de réévaluation');
+INSERT INTO "gifi" ("accno","description") VALUES ('13','Réserves');
+INSERT INTO "gifi" ("accno","description") VALUES ('14','Bénéfice reporté [ou Perte reportée (-)]');
+INSERT INTO "gifi" ("accno","description") VALUES ('15','Subsides en capital');
+INSERT INTO "gifi" ("accno","description") VALUES ('16','Provisions pour risques et charges et impôts différés');
+INSERT INTO "gifi" ("accno","description") VALUES ('17','Dettes à plus d''un an');
+INSERT INTO "gifi" ("accno","description") VALUES ('40','Créances commerciales');
+INSERT INTO "gifi" ("accno","description") VALUES ('20','Frais d''établissement');
+INSERT INTO "gifi" ("accno","description") VALUES ('21','Immobilisations incorporelles');
+INSERT INTO "gifi" ("accno","description") VALUES ('22','Terrains et constructions');
+INSERT INTO "gifi" ("accno","description") VALUES ('23','Installations, machines et outillage');
+INSERT INTO "gifi" ("accno","description") VALUES ('24','Mobilier et matériel roulant');
+INSERT INTO "gifi" ("accno","description") VALUES ('25','Immobilisations détenues en location-finac. et droits similaires');
+INSERT INTO "gifi" ("accno","description") VALUES ('31','Approvis. - Fournitures');
+INSERT INTO "gifi" ("accno","description") VALUES ('27','Autres immobilisations corporelles en cours et acompts versés');
+INSERT INTO "gifi" ("accno","description") VALUES ('26','Autres immobilisations corporelles');
+INSERT INTO "gifi" ("accno","description") VALUES ('28','Immobilisations financières');
+INSERT INTO "gifi" ("accno","description") VALUES ('29','Créances à plus d''un an');
+INSERT INTO "gifi" ("accno","description") VALUES ('4115','TVA DUE TOTAL');
+INSERT INTO "gifi" ("accno","description") VALUES ('33','Produits finis');
+INSERT INTO "gifi" ("accno","description") VALUES ('32','Encours fabrication');
+INSERT INTO "gifi" ("accno","description") VALUES ('34','Marchandises');
+INSERT INTO "gifi" ("accno","description") VALUES ('35','Immeubles déstinés à la vente');
+INSERT INTO "gifi" ("accno","description") VALUES ('36','Acomptes s/achats stocks');
+INSERT INTO "gifi" ("accno","description") VALUES ('37','Commandes en cours d''exécution');
+INSERT INTO "gifi" ("accno","description") VALUES ('41','Autres créances');
+INSERT INTO "gifi" ("accno","description") VALUES ('42','Dettes à plus d''un an échéant dans l''année');
+INSERT INTO "gifi" ("accno","description") VALUES ('43','Dettes financières');
+INSERT INTO "gifi" ("accno","description") VALUES ('44','Dettes commerciales');
+INSERT INTO "gifi" ("accno","description") VALUES ('45','Dettes fiscales, salariales et sociales');
+INSERT INTO "gifi" ("accno","description") VALUES ('46','Acomptes réçus s/commandes');
+INSERT INTO "gifi" ("accno","description") VALUES ('48','Dettes diverses');
+INSERT INTO "gifi" ("accno","description") VALUES ('47','Dettes découlants de l''affectation du résultat');
+INSERT INTO "gifi" ("accno","description") VALUES ('49','Comptes de régularisation et comptes d''attente');
+INSERT INTO "gifi" ("accno","description") VALUES ('50','Actions propres');
+INSERT INTO "gifi" ("accno","description") VALUES ('51','Actions et parts');
+INSERT INTO "gifi" ("accno","description") VALUES ('52','Titres à revenu fixe');
+INSERT INTO "gifi" ("accno","description") VALUES ('53','Dépôts à terme');
+INSERT INTO "gifi" ("accno","description") VALUES ('54','Valeurs échues à l''encaissement');
+INSERT INTO "gifi" ("accno","description") VALUES ('55','Etablissements de crédit');
+INSERT INTO "gifi" ("accno","description") VALUES ('56','Office des chèques postaux');
+INSERT INTO "gifi" ("accno","description") VALUES ('57','Caisses');
+INSERT INTO "gifi" ("accno","description") VALUES ('58','Virements internes');
+INSERT INTO "gifi" ("accno","description") VALUES ('60','Approvis. et marchandises');
+INSERT INTO "gifi" ("accno","description") VALUES ('61','Services et biens divers');
+INSERT INTO "gifi" ("accno","description") VALUES ('62','Rémunérations, charges sociales, pensions');
+INSERT INTO "gifi" ("accno","description") VALUES ('63','Amortissements, réductions valeur, provisions risques et charges');
+INSERT INTO "gifi" ("accno","description") VALUES ('64','Autres charges d''exploitation');
+INSERT INTO "gifi" ("accno","description") VALUES ('65','Charges financières');
+INSERT INTO "gifi" ("accno","description") VALUES ('66','Charges exceptionnelles');
+INSERT INTO "gifi" ("accno","description") VALUES ('67','Impôts sur le résultat');
+INSERT INTO "gifi" ("accno","description") VALUES ('68','Transferts aux réserves immunisées et aux impôts différés');
+INSERT INTO "gifi" ("accno","description") VALUES ('69','Affectations et prélèvements');
+INSERT INTO "gifi" ("accno","description") VALUES ('70','Chiffre d''affaires');
+INSERT INTO "gifi" ("accno","description") VALUES ('71','Variation de stock et des commandes en cours d''éxécution');
+INSERT INTO "gifi" ("accno","description") VALUES ('72','Production immobilisée');
+INSERT INTO "gifi" ("accno","description") VALUES ('74','Autres produits d''exploitation');
+INSERT INTO "gifi" ("accno","description") VALUES ('75','Produits financiers');
+INSERT INTO "gifi" ("accno","description") VALUES ('76','Produits exceptionnels');
+INSERT INTO "gifi" ("accno","description") VALUES ('77','Régularisations d''impôts et reprises provisions fiscales');
+INSERT INTO "gifi" ("accno","description") VALUES ('78','Prélèvements s/réserves immunisées et impôts différés');
+INSERT INTO "gifi" ("accno","description") VALUES ('79','Affectations et prélèvements');
--- /dev/null
+-- GIFI codes as set by the Canadian Government
+-- It's a dirty job, but it seems somebody allready did it
+-- PDF Tammes, Tue , 02 Apr 2002
+-- remarks or questions to finance@bermuda-holding.com
+--
+-- From the GIFI documentation:
+--
+-- The GIFI information has to balance. We use the following rules to verify the information you provide.
+-- total assets = total liabilities + total shareholder equity
+-- total revenue - total expenses = net non-farming income
+-- total farm revenue - total farm expenses = net farm income
+--
+-- You have to provide certain line items so that we can verify the above equations. Each GIFI must include:
+-- balance sheet
+-- Item 2599 Total assets
+-- Item 3499 Total liabilities
+-- Item 3620 Total shareholder equity
+-- non-farming income and expenses
+-- Item 8299 Total revenue
+-- Item 9368 Total expenses
+-- and/or
+-- farming income and expenses
+-- Item 9659 Total farm revenue
+-- Item 9898 Total farm expenses
+-- when reporting a breakdown of retained earnings
+-- Item 3849 Retained earnings/deficit end
+-- extraordinary items and income taxes
+-- Item 9999 Net income/loss after taxes and extraordinary items
+-- If the amount of a required item is NIL, you have to enter 0.
+--
+INSERT INTO gifi (accno,description) VALUES ('1000', 'Cash & Deposits');
+INSERT INTO gifi (accno,description) VALUES ('1001', 'Cash');
+INSERT INTO gifi (accno,description) VALUES ('1002', 'Deposits In Canadian Banks And Institutions - Canadian Currency');
+INSERT INTO gifi (accno,description) VALUES ('1003', 'Deposits In Canadian Banks And Institutions - Foreign Currency');
+INSERT INTO gifi (accno,description) VALUES ('1004', 'Deposits In Foreign Banks - Canadian Currency');
+INSERT INTO gifi (accno,description) VALUES ('1005', 'Deposits In Foreign Banks - Foreign Currency');
+INSERT INTO gifi (accno,description) VALUES ('1006', 'Credit Union Central Deposits');
+INSERT INTO gifi (accno,description) VALUES ('1007', 'Other Cash Like Instruments - Gold Bullion, Silver Bullion');
+INSERT INTO gifi (accno,description) VALUES ('1060', 'Accounts Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1061', 'Allowance For Doubtfull Accounts Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1062', 'Trade Accounts Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1063', 'Allowance For Doubtfull Trade Accounts Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1064', 'Trade Accounts Receivable Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1065', 'Allowance For Doubtfull Trade Accounts Receivable Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1066', 'Taxes Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1067', 'Intrest Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1068', 'Holdbacks Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1069', 'Leases Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1070', 'Allowance For Doubtfull Leases Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1071', 'Accounts Receivable Employees');
+INSERT INTO gifi (accno,description) VALUES ('1072', 'Allowance For Doubtfull Accounts Receivable Employees');
+INSERT INTO gifi (accno,description) VALUES ('1073', 'Accounts Receivable From Members Of NPO');
+INSERT INTO gifi (accno,description) VALUES ('1120', 'Inventories');
+INSERT INTO gifi (accno,description) VALUES ('1121', 'Inventory Of Goods For Sale/Finished Goods');
+INSERT INTO gifi (accno,description) VALUES ('1122', 'Inventory Of Parts And Supplies');
+INSERT INTO gifi (accno,description) VALUES ('1125', 'Work In Progress');
+INSERT INTO gifi (accno,description) VALUES ('1126', 'Raw Materials');
+INSERT INTO gifi (accno,description) VALUES ('1180', 'Short Term Investments');
+INSERT INTO gifi (accno,description) VALUES ('1181', 'Canadian Term Deposits');
+INSERT INTO gifi (accno,description) VALUES ('1182', 'Canadian Shares');
+INSERT INTO gifi (accno,description) VALUES ('1183', 'Canadian Bonds');
+INSERT INTO gifi (accno,description) VALUES ('1184', 'Canadian Treasury Bills');
+INSERT INTO gifi (accno,description) VALUES ('1185', 'Securities Purchased Under Resale Agreement');
+INSERT INTO gifi (accno,description) VALUES ('1186', 'Other Short Term Canadian Investments');
+INSERT INTO gifi (accno,description) VALUES ('1187', 'Short Term Foreign Investments');
+INSERT INTO gifi (accno,description) VALUES ('1240', 'Loans & Notes Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1241', 'Demand Loans Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1242', 'Other Loans Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1243', 'Notes Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1244', 'Mortgages Receivable');
+INSERT INTO gifi (accno,description) VALUES ('1300', 'Due From Shareholder(s)/Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('1301', 'Due From Individual Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('1302', 'Due From Corporate Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('1303', 'Due From Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('1360', 'Investment In Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('1380', 'Due From Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('1400', 'Due From/Investment In Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1401', 'Demand Notes From Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1402', 'Interest Receivable From Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1403', 'Loans/Advances Due From Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('1480', 'Other Current Assets');
+INSERT INTO gifi (accno,description) VALUES ('1481', 'Deferred Income Taxes');
+INSERT INTO gifi (accno,description) VALUES ('1482', 'Accrued Investment Income');
+INSERT INTO gifi (accno,description) VALUES ('1483', 'Taxes Recoverable/Refundable');
+INSERT INTO gifi (accno,description) VALUES ('1484', 'Prepaid Expenses');
+INSERT INTO gifi (accno,description) VALUES ('1485', 'Drilling Advances');
+INSERT INTO gifi (accno,description) VALUES ('1486', 'Security Deposits');
+INSERT INTO gifi (accno,description) VALUES ('1599', 'Total Current Assets');
+INSERT INTO gifi (accno,description) VALUES ('1600', 'Land');
+INSERT INTO gifi (accno,description) VALUES ('1601', 'Land Improvement');
+INSERT INTO gifi (accno,description) VALUES ('1602', 'Accumulated Amortization Of Land & Land Improvement');
+INSERT INTO gifi (accno,description) VALUES ('1620', 'Depletable Assets');
+INSERT INTO gifi (accno,description) VALUES ('1621', 'Accumulated Amortization Of Depletable Assets');
+INSERT INTO gifi (accno,description) VALUES ('1622', 'Petroleum & Natural Gas Properties');
+INSERT INTO gifi (accno,description) VALUES ('1623', 'Accumulated Amortization Of Petroleum & Natural Gas Properties');
+INSERT INTO gifi (accno,description) VALUES ('1624', 'Mining Properties');
+INSERT INTO gifi (accno,description) VALUES ('1625', 'Accumulated Amortization Of Mining Properties');
+INSERT INTO gifi (accno,description) VALUES ('1626', 'Deferred Exporation & Development charges');
+INSERT INTO gifi (accno,description) VALUES ('1627', 'Accumulated Amortization Of Petroleum & Deferred Exporation & Development charges');
+INSERT INTO gifi (accno,description) VALUES ('1628', 'Quarries');
+INSERT INTO gifi (accno,description) VALUES ('1629', 'Accumulated Amortization Of Quarries');
+INSERT INTO gifi (accno,description) VALUES ('1630', 'Gravel Pits');
+INSERT INTO gifi (accno,description) VALUES ('1631', 'Accumulated Amortization Of Gravel Pits');
+INSERT INTO gifi (accno,description) VALUES ('1632', 'Timber Limits');
+INSERT INTO gifi (accno,description) VALUES ('1633', 'Accumulated Amortization Of Timber Limits');
+INSERT INTO gifi (accno,description) VALUES ('1680', 'Buildings');
+INSERT INTO gifi (accno,description) VALUES ('1681', 'Accumulated Amortization Of Buildings');
+INSERT INTO gifi (accno,description) VALUES ('1682', 'Manufacturing And Processing Plant');
+INSERT INTO gifi (accno,description) VALUES ('1683', 'Accumulated Amortization Of Manufacturing and Processing Plant');
+INSERT INTO gifi (accno,description) VALUES ('1684', 'Buildings Under Construction');
+INSERT INTO gifi (accno,description) VALUES ('1740', 'Machinery, Equipment, furniture & fixtures');
+INSERT INTO gifi (accno,description) VALUES ('1741', 'Accumulated Amortization Of Machinery, Equipment, furniture & fixtures');
+INSERT INTO gifi (accno,description) VALUES ('1742', 'Motor Vehicles');
+INSERT INTO gifi (accno,description) VALUES ('1743', 'Accumulated Amortization Of Motor Vehicles');
+INSERT INTO gifi (accno,description) VALUES ('1744', 'Tools and Dies');
+INSERT INTO gifi (accno,description) VALUES ('1745', 'Accumulated Amortization Of Tools and Dies');
+INSERT INTO gifi (accno,description) VALUES ('1746', 'Construction & Excavating Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1747', 'Accumulated Amortization Of Construction & Excavating Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1748', 'Forestry & Logging Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1749', 'Accumulated Amortization Of Forestry & Logging Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1750', 'Fishing Gear & Nets');
+INSERT INTO gifi (accno,description) VALUES ('1751', 'Accumulated Amortization Of Fishing Gear & Nets');
+INSERT INTO gifi (accno,description) VALUES ('1752', 'Mining Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1753', 'Accumulated Amortization Of Mining Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1754', 'Oil & Gas Systems');
+INSERT INTO gifi (accno,description) VALUES ('1755', 'Accumulated Amortization Of Oil & Gas Systems');
+INSERT INTO gifi (accno,description) VALUES ('1756', 'Production Equipment for resource industries');
+INSERT INTO gifi (accno,description) VALUES ('1757', 'Accumulated Amortization Of Production Equipment for resource industries');
+INSERT INTO gifi (accno,description) VALUES ('1758', 'Production Equipment for other industries');
+INSERT INTO gifi (accno,description) VALUES ('1759', 'Accumulated Amortization Of Production Equipment for other industries');
+INSERT INTO gifi (accno,description) VALUES ('1760', 'Exploration Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1761', 'Accumulated Amortization Of Exploration Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1762', 'Shipping Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1763', 'Accumulated Amortization Of Shipping Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1764', 'Ships & Boats');
+INSERT INTO gifi (accno,description) VALUES ('1765', 'Accumulated Amortization Of Ships & Boats');
+INSERT INTO gifi (accno,description) VALUES ('1766', 'Aircraft');
+INSERT INTO gifi (accno,description) VALUES ('1767', 'Accumulated Amortization Of Aircraft');
+INSERT INTO gifi (accno,description) VALUES ('1768', 'Signs');
+INSERT INTO gifi (accno,description) VALUES ('1769', 'Accumulated Amortization Of Signs');
+INSERT INTO gifi (accno,description) VALUES ('1770', 'Small Tools');
+INSERT INTO gifi (accno,description) VALUES ('1771', 'Accumulated Amortization Of Small Tools');
+INSERT INTO gifi (accno,description) VALUES ('1772', 'Radio & Communication Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1773', 'Accumulated Amortization Of Radio & Communication Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1774', 'Computer Equipment/Software');
+INSERT INTO gifi (accno,description) VALUES ('1775', 'Accumulated Amortization Of Computer Equipment/software');
+INSERT INTO gifi (accno,description) VALUES ('1776', 'Musical Instruments');
+INSERT INTO gifi (accno,description) VALUES ('1777', 'Accumulated Amortization Of Musical Instruments');
+INSERT INTO gifi (accno,description) VALUES ('1778', 'Satellites');
+INSERT INTO gifi (accno,description) VALUES ('1779', 'Accumulated Amortization Of Satellites');
+INSERT INTO gifi (accno,description) VALUES ('1780', 'Earth Stations');
+INSERT INTO gifi (accno,description) VALUES ('1781', 'Accumulated Amortization Of Earth Stations');
+INSERT INTO gifi (accno,description) VALUES ('1782', 'Machinery & Equipment Under Construction');
+INSERT INTO gifi (accno,description) VALUES ('1783', 'Transportation Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1784', 'Accumulated Amortization Of Transportation Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1785', 'Other Machinery & Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1786', 'Accumulated Amortization Of Other Machinery & Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1787', 'Furniture & Fixtures');
+INSERT INTO gifi (accno,description) VALUES ('1788', 'Accumulated Amortization Of Furniture & Fixtures');
+INSERT INTO gifi (accno,description) VALUES ('1900', 'Other Tangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('1901', 'Accumulated Amortization Of Other Tangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('1902', 'Logging Roads');
+INSERT INTO gifi (accno,description) VALUES ('1903', 'Accumulated Amortization Of Logging Roads');
+INSERT INTO gifi (accno,description) VALUES ('1904', 'Asphalt & Parking Areas');
+INSERT INTO gifi (accno,description) VALUES ('1905', 'Accumulated Amortization Of Asphalt & Parking Areas');
+INSERT INTO gifi (accno,description) VALUES ('1906', 'Wharves, Docks & Marinas');
+INSERT INTO gifi (accno,description) VALUES ('1907', 'Accumulated Amortization Of Wharves, Docks & Marinas');
+INSERT INTO gifi (accno,description) VALUES ('1908', 'Fences');
+INSERT INTO gifi (accno,description) VALUES ('1909', 'Accumulated Amortization Of Fences');
+INSERT INTO gifi (accno,description) VALUES ('1910', 'Capital Leases - Buildings');
+INSERT INTO gifi (accno,description) VALUES ('1911', 'Accumulated Amortization Of Capital Leases - Buildings');
+INSERT INTO gifi (accno,description) VALUES ('1912', 'Capital Leases - Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1913', 'Accumulated Amortization Of Capital Leases - Equipment');
+INSERT INTO gifi (accno,description) VALUES ('1914', 'Capital Leases - Vehicles');
+INSERT INTO gifi (accno,description) VALUES ('1915', 'Accumulated Amortization Of Capital Leases - Vehicles');
+INSERT INTO gifi (accno,description) VALUES ('1916', 'Capital Leases - Other');
+INSERT INTO gifi (accno,description) VALUES ('1917', 'Accumulated Amortization Of Capital Leases - Other');
+INSERT INTO gifi (accno,description) VALUES ('1918', 'Leasehold Improvements');
+INSERT INTO gifi (accno,description) VALUES ('1919', 'Accumulated Amortization Of Leasehold Improvements');
+INSERT INTO gifi (accno,description) VALUES ('1920', 'Other Capital Assets Under Construction');
+INSERT INTO gifi (accno,description) VALUES ('1921', 'Campsites');
+INSERT INTO gifi (accno,description) VALUES ('1922', 'Accumulated Amortization Of Campsites');
+INSERT INTO gifi (accno,description) VALUES ('2008', 'Total Tangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('2009', 'Total Accumulated Amortization Of Tangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('2010', 'Intangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('2011', 'Accumulated Amortization Of Intangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('2012', 'Goodwill');
+INSERT INTO gifi (accno,description) VALUES ('2013', 'Accumulated Amortization Of Goodwill');
+INSERT INTO gifi (accno,description) VALUES ('2014', 'Quota');
+INSERT INTO gifi (accno,description) VALUES ('2015', 'Accumulated Amortization Of Quota');
+INSERT INTO gifi (accno,description) VALUES ('2016', 'Licences');
+INSERT INTO gifi (accno,description) VALUES ('2017', 'Accumulated Amortization Of Licences');
+INSERT INTO gifi (accno,description) VALUES ('2018', 'Incorporation Costs');
+INSERT INTO gifi (accno,description) VALUES ('2019', 'Accumulated Amortization Of Incorporation Costs');
+INSERT INTO gifi (accno,description) VALUES ('2020', 'Trademarks & Patents');
+INSERT INTO gifi (accno,description) VALUES ('2021', 'Accumulated Amortization Of Trademarks & Patents');
+INSERT INTO gifi (accno,description) VALUES ('2022', 'Customer Lists');
+INSERT INTO gifi (accno,description) VALUES ('2023', 'Accumulated Amortization Of Customer Lists');
+INSERT INTO gifi (accno,description) VALUES ('2024', 'Rights');
+INSERT INTO gifi (accno,description) VALUES ('2025', 'Accumulated Amortization Of Rights');
+INSERT INTO gifi (accno,description) VALUES ('2026', 'Research & Development');
+INSERT INTO gifi (accno,description) VALUES ('2027', 'Accumulated Amortization Of Research & Development');
+INSERT INTO gifi (accno,description) VALUES ('2070', 'Resource Rights');
+INSERT INTO gifi (accno,description) VALUES ('2071', 'Accumulated Amortization Of Resource Rights');
+INSERT INTO gifi (accno,description) VALUES ('2072', 'Timber Rights');
+INSERT INTO gifi (accno,description) VALUES ('2073', 'Accumulated Amortization Of Timber Rights');
+INSERT INTO gifi (accno,description) VALUES ('2074', 'Mining Rights');
+INSERT INTO gifi (accno,description) VALUES ('2075', 'Accumulated Amortization Of Mining Rights');
+INSERT INTO gifi (accno,description) VALUES ('2076', 'Oil & Gas Rights');
+INSERT INTO gifi (accno,description) VALUES ('2077', 'Accumulated Amortization Of Oil & Gas Rights');
+INSERT INTO gifi (accno,description) VALUES ('2078', 'Total Intangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('2079', 'Total Accumulated Amortization Of Intangible Capital Assets');
+INSERT INTO gifi (accno,description) VALUES ('2180', 'Long Term Due From Shareholder(s)/Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('2181', 'Long Term Due From Individual Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('2182', 'Long Term Due From Corporate Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('2183', 'Long Term Due From Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('2200', 'Long Term Investment In Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('2220', 'Long Term Due From Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('2240', 'Long Term Due From/Investment In Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2241', 'Due From/Investment In Canadian Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2242', 'Shares In Canadian Related Corporations');
+INSERT INTO gifi (accno,description) VALUES ('2243', 'Loans/Advances To Canadian Related Corporations');
+INSERT INTO gifi (accno,description) VALUES ('2244', 'Investment In Canadian Related Corporations At Cost');
+INSERT INTO gifi (accno,description) VALUES ('2245', 'Investment In Canadian Related Corporations At Equity');
+INSERT INTO gifi (accno,description) VALUES ('2246', 'Due From/Investment In Foreign Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2247', 'Shares In Foreign Related Corporations');
+INSERT INTO gifi (accno,description) VALUES ('2248', 'Loans/Advances To Foreign Related Corporations');
+INSERT INTO gifi (accno,description) VALUES ('2249', 'Investment In Foreign Related Corporations At Cost');
+INSERT INTO gifi (accno,description) VALUES ('2250', 'Investment In Foreign Related Corporations At Equity');
+INSERT INTO gifi (accno,description) VALUES ('2280', 'Investment In Co-Tenancy');
+INSERT INTO gifi (accno,description) VALUES ('2300', 'Long Term Investments');
+INSERT INTO gifi (accno,description) VALUES ('2301', 'Foreign Shares');
+INSERT INTO gifi (accno,description) VALUES ('2302', 'Other Type Of Foreign Investments');
+INSERT INTO gifi (accno,description) VALUES ('2303', 'Canadian Shares');
+INSERT INTO gifi (accno,description) VALUES ('2304', 'Government Of Canada Debt');
+INSERT INTO gifi (accno,description) VALUES ('2305', 'Canadian Provinvial & Municipal Government Debt');
+INSERT INTO gifi (accno,description) VALUES ('2306', 'Canadian Corporate Bonds & Debentures');
+INSERT INTO gifi (accno,description) VALUES ('2307', 'Debt Securities');
+INSERT INTO gifi (accno,description) VALUES ('2308', 'Equity Securities');
+INSERT INTO gifi (accno,description) VALUES ('2309', 'Securities Purchased Under Resale Agreements');
+INSERT INTO gifi (accno,description) VALUES ('2310', 'Central Credit Union Shares');
+INSERT INTO gifi (accno,description) VALUES ('2311', 'Other Long Term Canadian Investments');
+INSERT INTO gifi (accno,description) VALUES ('2360', 'Long Term Loans');
+INSERT INTO gifi (accno,description) VALUES ('2361', 'Mortgages');
+INSERT INTO gifi (accno,description) VALUES ('2362', 'Personal & Credit Card Loans');
+INSERT INTO gifi (accno,description) VALUES ('2363', 'Business & Government Loans');
+INSERT INTO gifi (accno,description) VALUES ('2364', 'Line Of Credit');
+INSERT INTO gifi (accno,description) VALUES ('2420', 'Other Long Term Assets');
+INSERT INTO gifi (accno,description) VALUES ('2421', 'Deferred Income Taxes / Tax Reserves');
+INSERT INTO gifi (accno,description) VALUES ('2422', 'Deferred Pension Charges');
+INSERT INTO gifi (accno,description) VALUES ('2423', 'Deferred Unrealized Exchange Losses');
+INSERT INTO gifi (accno,description) VALUES ('2424', 'Other Deferred Items/Charges');
+INSERT INTO gifi (accno,description) VALUES ('2425', 'Accumulated Amortization Of Deferred Charges');
+INSERT INTO gifi (accno,description) VALUES ('2426', 'Reserve Fund');
+INSERT INTO gifi (accno,description) VALUES ('2427', 'Cash Surrender Value Of Life Insurance');
+INSERT INTO gifi (accno,description) VALUES ('2589', 'Total Long Term Assets');
+INSERT INTO gifi (accno,description) VALUES ('2590', 'Assets Held In Trust');
+INSERT INTO gifi (accno,description) VALUES ('2599', 'Total Assets');
+INSERT INTO gifi (accno,description) VALUES ('2600', 'Bank Overdraft');
+INSERT INTO gifi (accno,description) VALUES ('2620', 'Amounts Payable & Accrued Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('2621', 'Accounts Payable Trade');
+INSERT INTO gifi (accno,description) VALUES ('2622', 'Accounts Payable To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2623', 'Holdbacks Payable');
+INSERT INTO gifi (accno,description) VALUES ('2624', 'Wages Payable');
+INSERT INTO gifi (accno,description) VALUES ('2625', 'Management Fees Payable');
+INSERT INTO gifi (accno,description) VALUES ('2626', 'Bonuses Payable');
+INSERT INTO gifi (accno,description) VALUES ('2627', 'Employee Deductions Payable');
+INSERT INTO gifi (accno,description) VALUES ('2628', 'Withholding Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2629', 'Intrest Payable');
+INSERT INTO gifi (accno,description) VALUES ('2680', 'Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2681', 'Capital Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2682', 'Foreign Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2683', 'Federal Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2684', 'Provincial Taxes Payable');
+INSERT INTO gifi (accno,description) VALUES ('2685', 'GST Payable');
+INSERT INTO gifi (accno,description) VALUES ('2686', 'PST Payable');
+INSERT INTO gifi (accno,description) VALUES ('2700', 'Short Term Debt');
+INSERT INTO gifi (accno,description) VALUES ('2701', 'Loans From Canadian Banks');
+INSERT INTO gifi (accno,description) VALUES ('2702', 'Liability For Securities Sold Short');
+INSERT INTO gifi (accno,description) VALUES ('2703', 'Liability For Securities Sold Under Repurchase Agreements');
+INSERT INTO gifi (accno,description) VALUES ('2704', 'Gold & Silver Certificates');
+INSERT INTO gifi (accno,description) VALUES ('2705', 'Cheques & Other Items In Transit');
+INSERT INTO gifi (accno,description) VALUES ('2706', 'Lien Notes');
+INSERT INTO gifi (accno,description) VALUES ('2770', 'Deferred Income');
+INSERT INTO gifi (accno,description) VALUES ('2780', 'Due To Shareholder(s)/Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('2781', 'Due To Individual Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('2782', 'Due To Corporate Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('2783', 'Due To Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('2840', 'Due To Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('2860', 'Due To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2861', 'Demand Notes Due To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2862', 'Interest Payable To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2863', 'Advances Due To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('2920', 'Current Portion Of Long Term Liability');
+INSERT INTO gifi (accno,description) VALUES ('2960', 'Other Current Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('2961', 'Deposits Received');
+INSERT INTO gifi (accno,description) VALUES ('2962', 'Dividends Payable');
+INSERT INTO gifi (accno,description) VALUES ('2963', 'Deferred Income Taxes');
+INSERT INTO gifi (accno,description) VALUES ('2964', 'Reserves For Guarantees, Warranties Or Indemnities');
+INSERT INTO gifi (accno,description) VALUES ('2965', 'General Reserves / Provisions');
+INSERT INTO gifi (accno,description) VALUES ('2966', 'Crew Shares');
+INSERT INTO gifi (accno,description) VALUES ('3139', 'Total Current Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('3140', 'Long Term Debt');
+INSERT INTO gifi (accno,description) VALUES ('3141', 'Mortgages');
+INSERT INTO gifi (accno,description) VALUES ('3142', 'Farm Credit Corporation Loan');
+INSERT INTO gifi (accno,description) VALUES ('3143', 'Chartered Bank Loan');
+INSERT INTO gifi (accno,description) VALUES ('3144', 'Credit Union/Caisse Populaire Loan');
+INSERT INTO gifi (accno,description) VALUES ('3145', 'Provincial Government Loan');
+INSERT INTO gifi (accno,description) VALUES ('3146', 'Supply Company Loan');
+INSERT INTO gifi (accno,description) VALUES ('3147', 'Private Loan');
+INSERT INTO gifi (accno,description) VALUES ('3148', 'Central, Leagues And Federation Loans');
+INSERT INTO gifi (accno,description) VALUES ('3149', 'Line Of Credit');
+INSERT INTO gifi (accno,description) VALUES ('3150', 'Liability For Securities Sold Short');
+INSERT INTO gifi (accno,description) VALUES ('3151', 'Liability For Securities Sold Under Repurchase Agreements');
+INSERT INTO gifi (accno,description) VALUES ('3152', 'Lien Notes');
+INSERT INTO gifi (accno,description) VALUES ('3210', 'Bonds And Debentures');
+INSERT INTO gifi (accno,description) VALUES ('3220', 'Deferred Income');
+INSERT INTO gifi (accno,description) VALUES ('3240', 'Deferred Income Taxes');
+INSERT INTO gifi (accno,description) VALUES ('3260', 'Long Term Due To Shareholder(s)/Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('3261', 'Long Term Due To Individual Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('3262', 'Long Term Due To Corporate Shareholder(s)');
+INSERT INTO gifi (accno,description) VALUES ('3263', 'Long Term Due To Director(s)');
+INSERT INTO gifi (accno,description) VALUES ('3280', 'Long Term Due To Joint Venture(s)/Partnership(s)');
+INSERT INTO gifi (accno,description) VALUES ('3300', 'Long Term Due To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('3301', 'Amounts Owing To Related Canadian Parties');
+INSERT INTO gifi (accno,description) VALUES ('3302', 'Amounts Owing To Related Foreign Parties');
+INSERT INTO gifi (accno,description) VALUES ('3320', 'Other Long Term Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('3321', 'Long Term Obligations/Commitments/Leases');
+INSERT INTO gifi (accno,description) VALUES ('3322', 'Reserves For Guarantees, Warranties Or Indemnities');
+INSERT INTO gifi (accno,description) VALUES ('3323', 'Provision For Site Restoration');
+INSERT INTO gifi (accno,description) VALUES ('3324', 'Contributions To Qualifying Environmental Trust');
+INSERT INTO gifi (accno,description) VALUES ('3325', 'General Provisions / Reserves');
+INSERT INTO gifi (accno,description) VALUES ('3326', 'Preference Shares Restated');
+INSERT INTO gifi (accno,description) VALUES ('3327', 'Member Allocations');
+INSERT INTO gifi (accno,description) VALUES ('3328', 'Deferred Income From Incomplete Contracts');
+INSERT INTO gifi (accno,description) VALUES ('3450', 'Total Long Term Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('3460', 'Subordinated Debt');
+INSERT INTO gifi (accno,description) VALUES ('3470', 'Amounts Held In Trust');
+INSERT INTO gifi (accno,description) VALUES ('3499', 'Total Liabilities');
+INSERT INTO gifi (accno,description) VALUES ('3500', 'Common Shares');
+INSERT INTO gifi (accno,description) VALUES ('3520', 'Preferred Shares');
+INSERT INTO gifi (accno,description) VALUES ('3540', 'Contributed & Other Surplus');
+INSERT INTO gifi (accno,description) VALUES ('3541', 'Contributed Surplus');
+INSERT INTO gifi (accno,description) VALUES ('3542', 'Appraisal Surplus');
+INSERT INTO gifi (accno,description) VALUES ('3543', 'General Reserve');
+INSERT INTO gifi (accno,description) VALUES ('3570', 'Head Office Account');
+INSERT INTO gifi (accno,description) VALUES ('3600', 'Retained Earnings/Deficit');
+INSERT INTO gifi (accno,description) VALUES ('3620', 'Total Shareholder Equity');
+INSERT INTO gifi (accno,description) VALUES ('3640', 'Total Liabilities & Shareholder Equity');
+INSERT INTO gifi (accno,description) VALUES ('3660', 'Retained Earnings/Deficit Start');
+INSERT INTO gifi (accno,description) VALUES ('3680', 'Net Income/Loss');
+INSERT INTO gifi (accno,description) VALUES ('3700', 'Dividend Declared');
+INSERT INTO gifi (accno,description) VALUES ('3701', 'Cash Dividend');
+INSERT INTO gifi (accno,description) VALUES ('3702', 'Patronage Dividend');
+INSERT INTO gifi (accno,description) VALUES ('3720', 'Prior Year Adjustments');
+INSERT INTO gifi (accno,description) VALUES ('3740', 'Other Items Affecting Retained Earnings');
+INSERT INTO gifi (accno,description) VALUES ('3741', 'Share Redemptions');
+INSERT INTO gifi (accno,description) VALUES ('3742', 'Special Reserves');
+INSERT INTO gifi (accno,description) VALUES ('3743', 'Currency Adjustments');
+INSERT INTO gifi (accno,description) VALUES ('3744', 'Unusual Revenue Items');
+INSERT INTO gifi (accno,description) VALUES ('3745', 'Interfund Transfers (NPO)');
+INSERT INTO gifi (accno,description) VALUES ('3849', 'Retained Earnings/Deficit End');
+INSERT INTO gifi (accno,description) VALUES ('8000', 'Trade Sales of Goods and Services');
+INSERT INTO gifi (accno,description) VALUES ('8020', 'Sales To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('8030', 'Interdivisional Sales');
+INSERT INTO gifi (accno,description) VALUES ('8040', 'Sales From Resource Properties');
+INSERT INTO gifi (accno,description) VALUES ('8041', 'Petroleum & Natural Gas Sales');
+INSERT INTO gifi (accno,description) VALUES ('8042', 'Petroleum & Natural Gas Sales To Related Parties');
+INSERT INTO gifi (accno,description) VALUES ('8043', 'Gas Marketing');
+INSERT INTO gifi (accno,description) VALUES ('8044', 'Processing Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8045', 'Pipeline Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8046', 'Seismic Sales');
+INSERT INTO gifi (accno,description) VALUES ('8047', 'Mining Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8048', 'Coal Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8049', 'Oil Sands Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8050', 'Royalty Income');
+INSERT INTO gifi (accno,description) VALUES ('8051', 'Oil & Gas Partnership/Joint Venture Income/Loss');
+INSERT INTO gifi (accno,description) VALUES ('8052', 'Mining Partnership/Joint Venture Income/Loss');
+INSERT INTO gifi (accno,description) VALUES ('8053', 'Other Production Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8089', 'Total Sales Of Goods And Services');
+INSERT INTO gifi (accno,description) VALUES ('8090', 'Investment Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8091', 'Interest From Foreign Sources');
+INSERT INTO gifi (accno,description) VALUES ('8092', 'Interest From Canadian Bonds And Debentures');
+INSERT INTO gifi (accno,description) VALUES ('8093', 'Interest From Canadian Mortgage Loans');
+INSERT INTO gifi (accno,description) VALUES ('8094', 'Interest From Other Canadian Sources');
+INSERT INTO gifi (accno,description) VALUES ('8095', 'Dividend Income');
+INSERT INTO gifi (accno,description) VALUES ('8096', 'Dividend From Canadian Sources');
+INSERT INTO gifi (accno,description) VALUES ('8097', 'Interest From Foreign Sources');
+INSERT INTO gifi (accno,description) VALUES ('8120', 'Commission Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8121', 'Commission Income On Real Estate Transactions');
+INSERT INTO gifi (accno,description) VALUES ('8140', 'Rental Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8141', 'Real Estate Rental Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8150', 'Vehicle Leasing');
+INSERT INTO gifi (accno,description) VALUES ('8160', 'Fishing Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8161', 'Fish Products');
+INSERT INTO gifi (accno,description) VALUES ('8162', 'Other Marine Products');
+INSERT INTO gifi (accno,description) VALUES ('8163', 'Fishing Grants, Credits & Rebates');
+INSERT INTO gifi (accno,description) VALUES ('8164', 'Fishing Subsidies');
+INSERT INTO gifi (accno,description) VALUES ('8165', 'Compensation For Loss Of Fishing Income/Property');
+INSERT INTO gifi (accno,description) VALUES ('8166', 'Sharesman Income');
+INSERT INTO gifi (accno,description) VALUES ('8210', 'Realized Gains/Losses On Disposal Of Assets');
+INSERT INTO gifi (accno,description) VALUES ('8211', 'Realized Gains/Losses On Sale Of Investments');
+INSERT INTO gifi (accno,description) VALUES ('8212', 'Realized Gains/Losses On Sale Of Resource Properties');
+INSERT INTO gifi (accno,description) VALUES ('8220', 'NPO Amounts Received');
+INSERT INTO gifi (accno,description) VALUES ('8221', 'Membership Fees');
+INSERT INTO gifi (accno,description) VALUES ('8222', 'Assessments');
+INSERT INTO gifi (accno,description) VALUES ('8223', 'Gifts');
+INSERT INTO gifi (accno,description) VALUES ('8224', 'Gross Sales And Revenues From Organizational Activities');
+INSERT INTO gifi (accno,description) VALUES ('8230', 'Other Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8231', 'Foreign Exchange Gains/Losses');
+INSERT INTO gifi (accno,description) VALUES ('8232', 'Income/Loss Of Subsidiaries/Affiliates');
+INSERT INTO gifi (accno,description) VALUES ('8233', 'Income/Loss Of Other Divisions');
+INSERT INTO gifi (accno,description) VALUES ('8234', 'Income/Loss Of Joint Ventures');
+INSERT INTO gifi (accno,description) VALUES ('8235', 'Income/Loss Of Partnerships');
+INSERT INTO gifi (accno,description) VALUES ('8236', 'RealizaTion Of Deferred Revenues');
+INSERT INTO gifi (accno,description) VALUES ('8237', 'Royalty Income Other Than Resource');
+INSERT INTO gifi (accno,description) VALUES ('8238', 'Alberta Royalty Tax Credits');
+INSERT INTO gifi (accno,description) VALUES ('8239', 'Management & Administration Fees');
+INSERT INTO gifi (accno,description) VALUES ('8240', 'Telecommunications Revenues');
+INSERT INTO gifi (accno,description) VALUES ('8241', 'Consulting Fees');
+INSERT INTO gifi (accno,description) VALUES ('8242', 'Subsidies & Grants');
+INSERT INTO gifi (accno,description) VALUES ('8243', 'Sale Of By-Products');
+INSERT INTO gifi (accno,description) VALUES ('8244', 'Deposit Services');
+INSERT INTO gifi (accno,description) VALUES ('8245', 'Credit Services');
+INSERT INTO gifi (accno,description) VALUES ('8246', 'Card Services');
+INSERT INTO gifi (accno,description) VALUES ('8247', 'Patronage Dividends');
+INSERT INTO gifi (accno,description) VALUES ('8248', 'Insurance Recoveries');
+INSERT INTO gifi (accno,description) VALUES ('8249', 'Expense Recoveries');
+INSERT INTO gifi (accno,description) VALUES ('8250', 'Bad Debt Recoveries');
+INSERT INTO gifi (accno,description) VALUES ('8299', 'Total Revenue');
+INSERT INTO gifi (accno,description) VALUES ('8300', 'Opening Inventory');
+INSERT INTO gifi (accno,description) VALUES ('8301', 'Opening Inventory - finished goods');
+INSERT INTO gifi (accno,description) VALUES ('8302', 'Opening Inventory - raw materials');
+INSERT INTO gifi (accno,description) VALUES ('8303', 'Opening Inventory - goods in process');
+INSERT INTO gifi (accno,description) VALUES ('8304', 'Opening Inventory - work in process');
+INSERT INTO gifi (accno,description) VALUES ('8320', 'Purchases / Cost of Materials');
+INSERT INTO gifi (accno,description) VALUES ('8321', 'Purchases Product A');
+INSERT INTO gifi (accno,description) VALUES ('8322', 'Purchases Product B');
+INSERT INTO gifi (accno,description) VALUES ('8331', 'Price Differences & Discounts On Purchases');
+INSERT INTO gifi (accno,description) VALUES ('8340', 'Direct Wages');
+INSERT INTO gifi (accno,description) VALUES ('8350', 'Benefits On Direct Wages');
+INSERT INTO gifi (accno,description) VALUES ('8360', 'Trades & Sub-contracts');
+INSERT INTO gifi (accno,description) VALUES ('8370', 'Production Costs Other Than Resource');
+INSERT INTO gifi (accno,description) VALUES ('8400', 'Resource Production Costs');
+INSERT INTO gifi (accno,description) VALUES ('8401', 'Pipeline Operations');
+INSERT INTO gifi (accno,description) VALUES ('8402', 'Drilling');
+INSERT INTO gifi (accno,description) VALUES ('8403', 'Site Restoration Costs');
+INSERT INTO gifi (accno,description) VALUES ('8404', 'Gross Overriding Royalty');
+INSERT INTO gifi (accno,description) VALUES ('8405', 'Freehold Royalties');
+INSERT INTO gifi (accno,description) VALUES ('8406', 'Other Producing Properties Rental');
+INSERT INTO gifi (accno,description) VALUES ('8407', 'Prospect & Geological');
+INSERT INTO gifi (accno,description) VALUES ('8408', 'Well Operating, Fuel & Equipment');
+INSERT INTO gifi (accno,description) VALUES ('8409', 'Well Abandonment & Dry Holes');
+INSERT INTO gifi (accno,description) VALUES ('8410', 'Other Lease Rentals');
+INSERT INTO gifi (accno,description) VALUES ('8411', 'Exploration Expenses, Aerial Surveys');
+INSERT INTO gifi (accno,description) VALUES ('8412', 'Development Expenses, stripping costs');
+INSERT INTO gifi (accno,description) VALUES ('8435', 'Crown Charges');
+INSERT INTO gifi (accno,description) VALUES ('8436', 'Crown royalties');
+INSERT INTO gifi (accno,description) VALUES ('8437', 'Crown lease rentals');
+INSERT INTO gifi (accno,description) VALUES ('8438', 'Freehold mineral tax');
+INSERT INTO gifi (accno,description) VALUES ('8439', 'Mining taxes');
+INSERT INTO gifi (accno,description) VALUES ('8440', 'Oil and Sand leases');
+INSERT INTO gifi (accno,description) VALUES ('8441', 'Saskatchewan resource surcharge');
+INSERT INTO gifi (accno,description) VALUES ('8450', 'Other Direct Costs');
+INSERT INTO gifi (accno,description) VALUES ('8451', 'Equipment Hire & Operation');
+INSERT INTO gifi (accno,description) VALUES ('8452', 'Log Yard');
+INSERT INTO gifi (accno,description) VALUES ('8453', 'Forestry costs');
+INSERT INTO gifi (accno,description) VALUES ('8454', 'Logging Road costs');
+INSERT INTO gifi (accno,description) VALUES ('8455', 'Stumpage costs');
+INSERT INTO gifi (accno,description) VALUES ('8456', 'Royalty costs');
+INSERT INTO gifi (accno,description) VALUES ('8457', 'Freight In & Customs Duty');
+INSERT INTO gifi (accno,description) VALUES ('8458', 'Inventory Write Down');
+INSERT INTO gifi (accno,description) VALUES ('8459', 'Direct cost amortization of tangible assets');
+INSERT INTO gifi (accno,description) VALUES ('8460', 'Direct cost amortization of natural resource assets');
+INSERT INTO gifi (accno,description) VALUES ('8461', 'Overhead expenses allocated to cost of sales');
+INSERT INTO gifi (accno,description) VALUES ('8500', 'Closing Inventory');
+INSERT INTO gifi (accno,description) VALUES ('8501', 'Closing Inventory - Finished Goods');
+INSERT INTO gifi (accno,description) VALUES ('8502', 'Closing Inventory - Raw Materials');
+INSERT INTO gifi (accno,description) VALUES ('8503', 'Closing Inventory - Goods In Process');
+INSERT INTO gifi (accno,description) VALUES ('8504', 'Closing Inventory - Work In Process');
+INSERT INTO gifi (accno,description) VALUES ('8518', 'Cost Of Sales');
+INSERT INTO gifi (accno,description) VALUES ('8519', 'Gross Profit/Loss');
+INSERT INTO gifi (accno,description) VALUES ('8520', 'Advertising & Promotion');
+INSERT INTO gifi (accno,description) VALUES ('8521', 'Advertising');
+INSERT INTO gifi (accno,description) VALUES ('8522', 'Donations');
+INSERT INTO gifi (accno,description) VALUES ('8523', 'Meals & Entertainment');
+INSERT INTO gifi (accno,description) VALUES ('8524', 'Promotion');
+INSERT INTO gifi (accno,description) VALUES ('8570', 'Amortization Of Intangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('8590', 'Bad Debt Expense');
+INSERT INTO gifi (accno,description) VALUES ('8610', 'Loan Losses');
+INSERT INTO gifi (accno,description) VALUES ('8611', 'Provision for Loan Losses');
+INSERT INTO gifi (accno,description) VALUES ('8620', 'Employee Benefits');
+INSERT INTO gifi (accno,description) VALUES ('8621', 'Group Insurance Benefits');
+INSERT INTO gifi (accno,description) VALUES ('8622', 'Employers Portion Of Employee Benefits');
+INSERT INTO gifi (accno,description) VALUES ('8623', 'Contributions To Deferred Income Plans');
+INSERT INTO gifi (accno,description) VALUES ('8650', 'Amortization Of Natural Resource Assets');
+INSERT INTO gifi (accno,description) VALUES ('8670', 'Amortization Of Tangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('8690', 'Insurance');
+INSERT INTO gifi (accno,description) VALUES ('8691', 'Life Insurance On Executives');
+INSERT INTO gifi (accno,description) VALUES ('8710', 'Interest & Bank Charges');
+INSERT INTO gifi (accno,description) VALUES ('8711', 'Interest On Short Term Debt');
+INSERT INTO gifi (accno,description) VALUES ('8712', 'Interest On Bonds And Debentures');
+INSERT INTO gifi (accno,description) VALUES ('8713', 'Interest On Mortgages');
+INSERT INTO gifi (accno,description) VALUES ('8714', 'Interest On Long Term Debt');
+INSERT INTO gifi (accno,description) VALUES ('8715', 'Bank Charges');
+INSERT INTO gifi (accno,description) VALUES ('8716', 'Credit Card Charges');
+INSERT INTO gifi (accno,description) VALUES ('8717', 'Collection & Credit costs');
+INSERT INTO gifi (accno,description) VALUES ('8760', 'Business Taxes, Licences & Memberships');
+INSERT INTO gifi (accno,description) VALUES ('8761', 'Memberships');
+INSERT INTO gifi (accno,description) VALUES ('8762', 'Business Taxes');
+INSERT INTO gifi (accno,description) VALUES ('8763', 'Franchise Fees');
+INSERT INTO gifi (accno,description) VALUES ('8764', 'Government Fees');
+INSERT INTO gifi (accno,description) VALUES ('8780', 'New Brunswick Tax On Large Corporations');
+INSERT INTO gifi (accno,description) VALUES ('8790', 'Nova Scotia Tax On Large Corporations');
+INSERT INTO gifi (accno,description) VALUES ('8810', 'Office Expenses');
+INSERT INTO gifi (accno,description) VALUES ('8811', 'Office Stationary And Supplies');
+INSERT INTO gifi (accno,description) VALUES ('8812', 'Office Utilities');
+INSERT INTO gifi (accno,description) VALUES ('8813', 'Data Processing');
+INSERT INTO gifi (accno,description) VALUES ('8860', 'Professional Fees');
+INSERT INTO gifi (accno,description) VALUES ('8861', 'Legal Fees');
+INSERT INTO gifi (accno,description) VALUES ('8862', 'Accounting Fees');
+INSERT INTO gifi (accno,description) VALUES ('8863', 'Consulting Fees');
+INSERT INTO gifi (accno,description) VALUES ('8864', 'Architect Fees');
+INSERT INTO gifi (accno,description) VALUES ('8865', 'Appraisal Fees');
+INSERT INTO gifi (accno,description) VALUES ('8866', 'Laboratory Fees');
+INSERT INTO gifi (accno,description) VALUES ('8867', 'Medical Fees');
+INSERT INTO gifi (accno,description) VALUES ('8868', 'Veterinary Fees');
+INSERT INTO gifi (accno,description) VALUES ('8869', 'Brokerage Fees');
+INSERT INTO gifi (accno,description) VALUES ('8870', 'Transfer Fees');
+INSERT INTO gifi (accno,description) VALUES ('8871', 'Management & Administration Fees');
+INSERT INTO gifi (accno,description) VALUES ('8872', 'Refining & Assay');
+INSERT INTO gifi (accno,description) VALUES ('8873', 'Registrar & Transfer Agent Fees');
+INSERT INTO gifi (accno,description) VALUES ('8874', 'Restructuring Costs');
+INSERT INTO gifi (accno,description) VALUES ('8875', 'Security & Exchange Commission Fees');
+INSERT INTO gifi (accno,description) VALUES ('8876', 'Training Expense');
+INSERT INTO gifi (accno,description) VALUES ('8877', 'Studio & Recording');
+INSERT INTO gifi (accno,description) VALUES ('8910', 'Rental');
+INSERT INTO gifi (accno,description) VALUES ('8911', 'Real Estate Rental');
+INSERT INTO gifi (accno,description) VALUES ('8912', 'Occupancy Costs');
+INSERT INTO gifi (accno,description) VALUES ('8913', 'Condominium Fees');
+INSERT INTO gifi (accno,description) VALUES ('8914', 'Equipment Rental');
+INSERT INTO gifi (accno,description) VALUES ('8915', 'Motor Vehicle Rental');
+INSERT INTO gifi (accno,description) VALUES ('8916', 'Moorage (Boat)');
+INSERT INTO gifi (accno,description) VALUES ('8917', 'Storage');
+INSERT INTO gifi (accno,description) VALUES ('8918', 'Quota Rental');
+INSERT INTO gifi (accno,description) VALUES ('8960', 'Repairs & Maintenance - Aircraft');
+INSERT INTO gifi (accno,description) VALUES ('8961', 'Repairs & Maintenance - Buildings');
+INSERT INTO gifi (accno,description) VALUES ('8962', 'Repairs & Maintenance - Vehicles');
+INSERT INTO gifi (accno,description) VALUES ('8963', 'Repairs & Maintenance - Boats');
+INSERT INTO gifi (accno,description) VALUES ('8964', 'Repairs & Maintenance - Machinery & Equipment');
+INSERT INTO gifi (accno,description) VALUES ('9010', 'Other Repairs & Maintenance - Janitor & Yard');
+INSERT INTO gifi (accno,description) VALUES ('9011', 'Machine Shop Expense');
+INSERT INTO gifi (accno,description) VALUES ('9012', 'Road Costs');
+INSERT INTO gifi (accno,description) VALUES ('9013', 'Security');
+INSERT INTO gifi (accno,description) VALUES ('9014', 'Garbage Removal');
+INSERT INTO gifi (accno,description) VALUES ('9060', 'Salaries & Wages');
+INSERT INTO gifi (accno,description) VALUES ('9061', 'Commissions');
+INSERT INTO gifi (accno,description) VALUES ('9062', 'Crew Share');
+INSERT INTO gifi (accno,description) VALUES ('9063', 'Bonuses');
+INSERT INTO gifi (accno,description) VALUES ('9064', 'Director\'s Fees');
+INSERT INTO gifi (accno,description) VALUES ('9065', 'Management Salaries');
+INSERT INTO gifi (accno,description) VALUES ('9066', 'Employee Salaries');
+INSERT INTO gifi (accno,description) VALUES ('9110', 'Sub-Contracts');
+INSERT INTO gifi (accno,description) VALUES ('9130', 'Supplies');
+INSERT INTO gifi (accno,description) VALUES ('9131', 'Small Tools');
+INSERT INTO gifi (accno,description) VALUES ('9132', 'Shop Expense');
+INSERT INTO gifi (accno,description) VALUES ('9133', 'Uniforms');
+INSERT INTO gifi (accno,description) VALUES ('9134', 'Laundry');
+INSERT INTO gifi (accno,description) VALUES ('9135', 'Food & Catering');
+INSERT INTO gifi (accno,description) VALUES ('9136', 'Fishing Gear');
+INSERT INTO gifi (accno,description) VALUES ('9137', 'Nets & Traps');
+INSERT INTO gifi (accno,description) VALUES ('9138', 'Salt, Bait & Ice');
+INSERT INTO gifi (accno,description) VALUES ('9139', 'Camp Supplies');
+INSERT INTO gifi (accno,description) VALUES ('9150', 'Computer Related Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9151', 'Upgrade');
+INSERT INTO gifi (accno,description) VALUES ('9152', 'Internet');
+INSERT INTO gifi (accno,description) VALUES ('9180', 'Property Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9200', 'Travel Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9201', 'Meetings & Conventions');
+INSERT INTO gifi (accno,description) VALUES ('9220', 'Utilities');
+INSERT INTO gifi (accno,description) VALUES ('9221', 'Electricity');
+INSERT INTO gifi (accno,description) VALUES ('9222', 'Water');
+INSERT INTO gifi (accno,description) VALUES ('9223', 'Heat');
+INSERT INTO gifi (accno,description) VALUES ('9224', 'Fuel Costs');
+INSERT INTO gifi (accno,description) VALUES ('9225', 'Telephone & Communications');
+INSERT INTO gifi (accno,description) VALUES ('9270', 'Other Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9271', 'Cash Over/Short');
+INSERT INTO gifi (accno,description) VALUES ('9272', 'Reimbursement Of Parent Company Expense');
+INSERT INTO gifi (accno,description) VALUES ('9273', 'Selling Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9274', 'Shipping & Warehouse Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9275', 'Delivery, Freight & Express');
+INSERT INTO gifi (accno,description) VALUES ('9276', 'Warranty Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9277', 'Royalty Expenses - Resident');
+INSERT INTO gifi (accno,description) VALUES ('9278', 'Royalty Expenses - Non-Resident');
+INSERT INTO gifi (accno,description) VALUES ('9279', 'Dumping Charges');
+INSERT INTO gifi (accno,description) VALUES ('9280', 'Land Fill Fees');
+INSERT INTO gifi (accno,description) VALUES ('9281', 'Vehicle Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9282', 'Research & Development');
+INSERT INTO gifi (accno,description) VALUES ('9283', 'Withholding Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9284', 'General & Administrative Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9285', 'Interdivisional Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9286', 'Interfund Transfer (NPO)');
+INSERT INTO gifi (accno,description) VALUES ('9367', 'Total Operating Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9368', 'Total Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9369', 'Net Non-Farming Income');
+INSERT INTO gifi (accno,description) VALUES ('9370', 'Grains And Oilseeds');
+INSERT INTO gifi (accno,description) VALUES ('9371', 'Wheat');
+INSERT INTO gifi (accno,description) VALUES ('9372', 'Oats');
+INSERT INTO gifi (accno,description) VALUES ('9373', 'Barley');
+INSERT INTO gifi (accno,description) VALUES ('9374', 'Mixed Grains');
+INSERT INTO gifi (accno,description) VALUES ('9375', 'Corn');
+INSERT INTO gifi (accno,description) VALUES ('9376', 'Canola');
+INSERT INTO gifi (accno,description) VALUES ('9377', 'Flaxseed');
+INSERT INTO gifi (accno,description) VALUES ('9378', 'Soya Beans');
+INSERT INTO gifi (accno,description) VALUES ('9379', 'Wheat Board Payments');
+INSERT INTO gifi (accno,description) VALUES ('9420', 'Other Crop Revenues');
+INSERT INTO gifi (accno,description) VALUES ('9321', 'Fruit');
+INSERT INTO gifi (accno,description) VALUES ('9322', 'Potatoes');
+INSERT INTO gifi (accno,description) VALUES ('9323', 'Vegetables');
+INSERT INTO gifi (accno,description) VALUES ('9324', 'Tobacco');
+INSERT INTO gifi (accno,description) VALUES ('9325', 'Greenhouse & Nursery Products');
+INSERT INTO gifi (accno,description) VALUES ('9326', 'Forage Crops');
+INSERT INTO gifi (accno,description) VALUES ('9470', 'Livestock & Animal Products Revenue');
+INSERT INTO gifi (accno,description) VALUES ('9471', 'Cattle');
+INSERT INTO gifi (accno,description) VALUES ('9472', 'Swine');
+INSERT INTO gifi (accno,description) VALUES ('9473', 'Poultry');
+INSERT INTO gifi (accno,description) VALUES ('9474', 'Sheep & Lambs');
+INSERT INTO gifi (accno,description) VALUES ('9475', 'Pregnant Mare Urine (PMU)');
+INSERT INTO gifi (accno,description) VALUES ('9476', 'Milk & Cream - Excluding Dairy Subsidies');
+INSERT INTO gifi (accno,description) VALUES ('9477', 'Eggs For Consumption');
+INSERT INTO gifi (accno,description) VALUES ('9478', 'Hatching Eggs');
+INSERT INTO gifi (accno,description) VALUES ('9479', 'Aquaculture');
+INSERT INTO gifi (accno,description) VALUES ('9480', 'Horses - Breeding & Meat');
+INSERT INTO gifi (accno,description) VALUES ('9520', 'Other Commodities');
+INSERT INTO gifi (accno,description) VALUES ('9521', 'Maple Products');
+INSERT INTO gifi (accno,description) VALUES ('9522', 'Artificial Insemination (AI)');
+INSERT INTO gifi (accno,description) VALUES ('9523', 'Semen Production');
+INSERT INTO gifi (accno,description) VALUES ('9524', 'Embryo Production');
+INSERT INTO gifi (accno,description) VALUES ('9540', 'Program Payment Revenues');
+INSERT INTO gifi (accno,description) VALUES ('9541', 'Dairy Subsidies');
+INSERT INTO gifi (accno,description) VALUES ('9542', 'Crop Insurance');
+INSERT INTO gifi (accno,description) VALUES ('9543', 'NISA Payments');
+INSERT INTO gifi (accno,description) VALUES ('9544', 'Disaster Assistance Program Payments');
+INSERT INTO gifi (accno,description) VALUES ('9570', 'Rebates');
+INSERT INTO gifi (accno,description) VALUES ('9571', 'Rebates - Fuel');
+INSERT INTO gifi (accno,description) VALUES ('9572', 'Rebates - Interest');
+INSERT INTO gifi (accno,description) VALUES ('9573', 'Rebates - Property Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9574', 'Resales, Rebates, GST For NISA Eligible Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9575', 'Rebates, GST For NISA Non-Eligible Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9600', 'Other Farm Revenues/Losses');
+INSERT INTO gifi (accno,description) VALUES ('9601', 'Custom Or Contract Work');
+INSERT INTO gifi (accno,description) VALUES ('9602', 'Wood Sales');
+INSERT INTO gifi (accno,description) VALUES ('9603', 'Horse Racing');
+INSERT INTO gifi (accno,description) VALUES ('9604', 'Insurance Proceeds');
+INSERT INTO gifi (accno,description) VALUES ('9605', 'Patronage Dividends');
+INSERT INTO gifi (accno,description) VALUES ('9606', 'Rental Income');
+INSERT INTO gifi (accno,description) VALUES ('9607', 'Interest Income');
+INSERT INTO gifi (accno,description) VALUES ('9608', 'Dividend Income');
+INSERT INTO gifi (accno,description) VALUES ('9609', 'Gains/Losses On Disposal Of Assets');
+INSERT INTO gifi (accno,description) VALUES ('9610', 'Gravel');
+INSERT INTO gifi (accno,description) VALUES ('9611', 'Trucking');
+INSERT INTO gifi (accno,description) VALUES ('9612', 'Resale Of Commodities Purchased');
+INSERT INTO gifi (accno,description) VALUES ('9613', 'Leases');
+INSERT INTO gifi (accno,description) VALUES ('9614', 'Machine Rentals');
+INSERT INTO gifi (accno,description) VALUES ('9615', 'Farming Partnership Income/Loss');
+INSERT INTO gifi (accno,description) VALUES ('9616', 'Farming Joint Venture Income/Loss');
+INSERT INTO gifi (accno,description) VALUES ('9650', 'Non-Farming Income');
+INSERT INTO gifi (accno,description) VALUES ('9659', 'Total Farm Revenue');
+INSERT INTO gifi (accno,description) VALUES ('9660', 'Crop Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9661', 'Containers, Twine And Baling Wire');
+INSERT INTO gifi (accno,description) VALUES ('9662', 'Fertilizers And Lime');
+INSERT INTO gifi (accno,description) VALUES ('9663', 'Pesticides');
+INSERT INTO gifi (accno,description) VALUES ('9664', 'Seeds & Plants');
+INSERT INTO gifi (accno,description) VALUES ('9665', 'Insurance Premiums (Crop) NISA ACS');
+INSERT INTO gifi (accno,description) VALUES ('9710', 'Livestock Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9711', 'Feed, Supplements, Straw & Bedding');
+INSERT INTO gifi (accno,description) VALUES ('9712', 'Livestock Purchases');
+INSERT INTO gifi (accno,description) VALUES ('9713', 'Veterinary Fees, Medicine & Breeding Fees');
+INSERT INTO gifi (accno,description) VALUES ('9760', 'Machinery Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9761', 'Machinery Insurance');
+INSERT INTO gifi (accno,description) VALUES ('9762', 'Machinery Licences');
+INSERT INTO gifi (accno,description) VALUES ('9763', 'Machinery Repairs');
+INSERT INTO gifi (accno,description) VALUES ('9764', 'Machinery Fuel');
+INSERT INTO gifi (accno,description) VALUES ('9765', 'Machinery Lease');
+INSERT INTO gifi (accno,description) VALUES ('9790', 'General Farm Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9791', 'Amortization Of Tangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('9792', 'Advertising, Marketing Costs & Promotion');
+INSERT INTO gifi (accno,description) VALUES ('9793', 'Bad Debt');
+INSERT INTO gifi (accno,description) VALUES ('9794', 'Benefits Related To Employee Salaries');
+INSERT INTO gifi (accno,description) VALUES ('9795', 'Building Repairs & Maintenance');
+INSERT INTO gifi (accno,description) VALUES ('9796', 'Clearing, Levelling & Draining Land');
+INSERT INTO gifi (accno,description) VALUES ('9797', 'Crop Insurance, GRIP and Stabilization Premiums');
+INSERT INTO gifi (accno,description) VALUES ('9798', 'Custom Or Contract Work');
+INSERT INTO gifi (accno,description) VALUES ('9799', 'Electricity');
+INSERT INTO gifi (accno,description) VALUES ('9800', 'Fence Repairs & Maintenance');
+INSERT INTO gifi (accno,description) VALUES ('9801', 'Freight & Trucking');
+INSERT INTO gifi (accno,description) VALUES ('9802', 'Heating Fuel & Curing Fuel');
+INSERT INTO gifi (accno,description) VALUES ('9803', 'Insurance Program Overpayment Recapture');
+INSERT INTO gifi (accno,description) VALUES ('9804', 'Other Insurance Premiums');
+INSERT INTO gifi (accno,description) VALUES ('9805', 'Interest & Bank Charges');
+INSERT INTO gifi (accno,description) VALUES ('9806', 'Marketing Board Fees');
+INSERT INTO gifi (accno,description) VALUES ('9807', 'Membership/Subscription Fees');
+INSERT INTO gifi (accno,description) VALUES ('9808', 'Office Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9809', 'Professional Fees');
+INSERT INTO gifi (accno,description) VALUES ('9810', 'Property Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9811', 'Rent - Land & Buildings');
+INSERT INTO gifi (accno,description) VALUES ('9812', 'Rent - Machinery');
+INSERT INTO gifi (accno,description) VALUES ('9813', 'Other Rental Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9814', 'Salaries & Wages');
+INSERT INTO gifi (accno,description) VALUES ('9815', 'Salaries & Wages Other Than Spouse Or Dependants');
+INSERT INTO gifi (accno,description) VALUES ('9816', 'Salaries & Wages Paid To Dependants');
+INSERT INTO gifi (accno,description) VALUES ('9817', 'Selling Costs');
+INSERT INTO gifi (accno,description) VALUES ('9818', 'Supplies');
+INSERT INTO gifi (accno,description) VALUES ('9819', 'Motor Vehicle Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9820', 'Small Tools');
+INSERT INTO gifi (accno,description) VALUES ('9821', 'Soil Testing');
+INSERT INTO gifi (accno,description) VALUES ('9822', 'Storage/Drying');
+INSERT INTO gifi (accno,description) VALUES ('9823', 'Licences/Permits');
+INSERT INTO gifi (accno,description) VALUES ('9824', 'Telephone');
+INSERT INTO gifi (accno,description) VALUES ('9825', 'Quota Rental');
+INSERT INTO gifi (accno,description) VALUES ('9826', 'Gravel');
+INSERT INTO gifi (accno,description) VALUES ('9827', 'Purchases Of Commodities Resold');
+INSERT INTO gifi (accno,description) VALUES ('9828', 'Salaries & Wages Paid To Spouse');
+INSERT INTO gifi (accno,description) VALUES ('9829', 'Motor Vehicle Interest And Leasing Costs');
+INSERT INTO gifi (accno,description) VALUES ('9830', 'Prepared Feed');
+INSERT INTO gifi (accno,description) VALUES ('9831', 'Custom Feed');
+INSERT INTO gifi (accno,description) VALUES ('9832', 'Amortization Of Intangible Assets');
+INSERT INTO gifi (accno,description) VALUES ('9833', 'Amortization Of Milk Quota');
+INSERT INTO gifi (accno,description) VALUES ('9834', 'Travel Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9835', 'Capital/Business Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9850', 'Non-Farming Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9870', 'Net Inventory Adjustment');
+INSERT INTO gifi (accno,description) VALUES ('9898', 'Total Farm Expenses');
+INSERT INTO gifi (accno,description) VALUES ('9899', 'Net Farm Income');
+INSERT INTO gifi (accno,description) VALUES ('9970', 'Net Income/Loss Before Taxes And Extraordinary Items');
+INSERT INTO gifi (accno,description) VALUES ('9975', 'Extraordinary Items');
+INSERT INTO gifi (accno,description) VALUES ('9976', 'Legal Settlements');
+INSERT INTO gifi (accno,description) VALUES ('9980', 'Unrealized Gains/Losses');
+INSERT INTO gifi (accno,description) VALUES ('9985', 'Unusual Items');
+INSERT INTO gifi (accno,description) VALUES ('9990', 'Current Income Taxes');
+INSERT INTO gifi (accno,description) VALUES ('9995', 'Deferred Income Tax Provision');
+INSERT INTO gifi (accno,description) VALUES ('9999', 'Net Income/Loss After Taxes And Extraordinary Items');
+-- This item represents the net amount of:
+-- Item 9970 - Net income/loss before taxes and extraordinary items minus
+-- Item 9975 - Extraordinary item(s) minus
+-- Item 9976 - Legal settlements plus
+-- Item 9980 - Unrealized gains/losses minus
+-- Item 9985 - Unusual items minus
+-- Item 9990 - Current income taxes minus
+-- Item 9995 - Deferred income tax provision
+-- and must be reported.
+-- Any amount reported in this item should be equal to the amount reported at Item 3680 - Net income/loss,
+-- in the retained earnings section.
+--
--- /dev/null
+-- Chart of Accounts for France
+-- From: Oscar Buijten <oscar@elbie.com>
+-- Mon, 6 Aug 2001
+--
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101000', 'CAPITAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101100', 'CAPITAL SOUSCRIT NON APPELE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101200', 'CAPITAL SOUSCRIT APPELE NON VERSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101300', 'CAPITAL SOUSCRIT APPELE VERSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101310', 'CAPITAL NON AMORTI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101320', 'CAPITAL AMORTI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('101800', 'CAPITAL SOUSCR. A REGLEM. PART.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104000', 'PRIMES LIEES AU CAPITAL SOCIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104100', 'PRIMES D\'EMISSION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104200', 'PRIMES DE FUSION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104300', 'PRIMES D\'APPORT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104400', 'PRIMES CONVERS. OBLIGAT. ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('104500', 'BONS DE SOUSCRIPTION D\'ACTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105000', 'ECARTS DE REEVALUATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105100', 'RESERVE SPECIALE DE REEVALUATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105200', 'ECART DE REEVALUATION LIBRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105300', 'RESERVE DE REEVALUATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105500', 'ECARTS REEVAL. (AUT. OPER. LEG.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105700', 'AUT. ECARTS REEVAL. EN FRANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('105800', 'AUT. ECARTS REEVAL. A L\'ETRANGER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106000', 'RESERVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106100', 'RESERVE LEGALE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106110', 'RESERVE LEGALE PROPREMENT DITE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106120', 'PLUS-VALUES NETTES A LONG TERME', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106200', 'RESERVES INDISPONIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106300', 'RESERVES STATUT. OU CONTRACTUELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106400', 'RESERVES REGLEMENTEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106410', 'PLUS-VALUES NETTES A LONG TERME', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106430', 'RESER. CONSEC. OCTROI SUBV. INVEST', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106480', 'AUTRES RESERVES REGLEMENTEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106800', 'AUTRES RESERVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106810', 'RESERVE DE PROPRE ASSUREUR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('106880', 'RESERVES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('107000', 'ECART D\'EQUIVALENCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('109000', 'ACTIONN. CAPITAL SOUSC. NON APPELE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('110000', 'REPORT A NOUVEAU (SOLDE CREDITEUR)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('119000', 'REPORT A NOUVEAU (SOLDE DEBITEUR)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('120000', 'RESULTAT DE L\'EXERCICE (BENEFICE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('129000', 'RESULTAT DE L\'EXERCICE (PERTE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131000', 'SUBVENTIONS D\'EQUIPEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131100', 'ETAT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131200', 'REGIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131300', 'DEPARTEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131400', 'COMMUNES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131500', 'COLLECTIVITES PUBLIQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131600', 'ENTREPRISES PUBLIQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131700', 'ENTREPRISES ET ORGANISMES PRIVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('131800', 'AUTRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('138000', 'AUTRES SUBVENTIONS D\'INVESTIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139000', 'SUBV. INVES. INSC. AU CPTE RESULT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139100', 'SUBVENTIONS D\'EQUIPEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139110', 'ETAT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139120', 'REGIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139130', 'DEPARTEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139140', 'COMMUNES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139150', 'COLLECTIVITES PUBLIQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139160', 'ENTREPRISES PUBLIQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139170', 'ENTREPRISES ET ORGANISMES PRIVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139180', 'AUTRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('139800', 'AUTRES SUBVENTIONS D\'INVESTIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('142000', 'PROVIS. REGLEM. RELATIV. AUX IMMO.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('142300', 'PROVIS. POUR RECONSTITUTION GIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('142400', 'PROVIS. INVESTIS. (PARTIC. SALAR.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('143000', 'PROVIS. REGLEMENT. RELATIV. STOCKS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('143100', 'HAUSSE DES PRIX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('143200', 'FLUCTUATION DES COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('144000', 'PROVIS. REGLEM. RELAT. ELEM. ACTIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('145000', 'AMORTISSEMENTS DEROGATOIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('146000', 'PROVISION SPECIALE DE REEVALUATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('147000', 'PLUS-VALUES REINVESTIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('148000', 'AUTRES PROVISIONS REGLEMENTEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151000', 'PROVISIONS POUR RISQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151100', 'PROVISIONS POUR LITIGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151200', 'PROV. GARANT. DONNEES AUX CLIENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151300', 'PROV. PERTES SUR MARCHES A TERME.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151400', 'PROVIS. POUR AMENDES ET PENALITES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151500', 'PROVIS. POUR PERTES DE CHANGE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('151800', 'AUTRES PROVISIONS POUR RISQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('153000', 'PROVIS. PENSIONS ET OBLIG. SIMIL.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('155000', 'PROVISIONS POUR IMPOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('156000', 'PROVIS. RENOUV. IMMO (ETS CONCESS)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('157000', 'PROV. CHARG. A REPART. SUR EXERC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('157200', 'PROVIS. POUR GROSSES REPARATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('158000', 'AUTRES PROVISIONS POUR CHARGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('158200', 'PROVIS. CHARG. SOCIA. FISC. SUR CP', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('161000', 'EMPRUNTS OBLIGATOIRES CONVERTIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('163000', 'AUTRES EMPRUNTS OBLIGATAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('164000', 'EMPRUNTS AUPRES ETABLIS. DE CREDIT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('165000', 'DEPOTS ET CAUTIONNEMENTS RECUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('165100', 'DEPOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('165500', 'CAUTIONNEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('166000', 'PARTICIP. SALARIES AUX RESULTAS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('166100', 'COMPTES BLOQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('166200', 'FONDS DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('167000', 'EMPR. DETTES ASSORT. CONDIT. PART.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('167100', 'EMISSION DE TITRES PARTICIPATIFS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('167400', 'AVANCES CONDITIONNEES DE L\'ETAT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('167500', 'EMPRUNTS PARTICIPATIFS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168000', 'AUTRES EMPR. ET DETTES ASSIMILEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168100', 'AUTRES EMPRUNTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168500', 'RENTES VIAGERES CAPITALISEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168700', 'AUTRES DETTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168810', 'SUR EMPR. OBLIGATAIR. CONVERTIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168830', 'SUR AUTRES EMPRUNTS OBLIGATAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168840', 'SUR EMPRUNTS AUPRES ETABLI. CREDIT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168850', 'SUR DEPOTS ET CAUTIONNEMENTS RECUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168860', 'SUR PARTICIP. SALAR. RESULTATS ETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168870', 'SUR EMPR. DETTES ASSOR. COND. PART', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('168880', 'SUR AUTRES EMPR. DETTES ASSIMILEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('169000', 'PRIMES REMBOURSEMENT OBLIGATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('171000', 'DETTES RATTACH. A PARTIC. (GROUPE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('174000', 'DETTES RATT. A PART. (HORS GROUPE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('178000', 'DETTES RATTACH. A STES EN PARTIC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('178100', 'PRINCIPAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('178800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('181000', 'COMPTE DE LIAISON ETABLISSEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('186000', 'BIENS PREST. SERV. ECH. (CHARGES)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('187000', 'BIENS PREST. SERV. ECH. (PRODUITS)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('188000', 'COMPTES DE LIAISON STES EN PARTIC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201100', 'FRAIS DE CONSTITUTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201200', 'FRAIS DE PREMIER ETABLISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201210', 'FRAIS DE PROSPECTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201220', 'FRAIS DE PUBLICITE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201300', 'FRAIS AUGMEN. CAPIT. OPER. DIVERS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('203000', 'FRAIS RECHERCHE ET DEVELOPPEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('205000', 'CONCESSIONS ET DROITS SIMILAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('206000', 'DROIT AU BAIL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('207000', 'FONDS COMMERCIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('208000', 'AUTRES IMMOBILISATIONS INCORPOR.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211000', 'TERRAINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211100', 'TERRAINS NUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211200', 'TERRAINS AMENAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211300', 'SOUS-SOLS ET SUR-SOLS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211400', 'TERRAINS DE GISEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211410', 'CARRIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211500', 'TERRAINS BATIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211510', 'ENSEMBLES IMMOBILIERS INDUSTRIELS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211550', 'ENSEMBLES IMMOB. ADM. ET COMMERC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211580', 'AUTRES ENSEMBLES IMMOBILIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211581', 'AFFECTES AUX OPERAT. PROFESSION.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211588', 'AFFECTES AUX OPERAT. NON PROF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('211600', 'COMPTE D\'ORDRE SUR IMMOBILISATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('212000', 'AGENCEMENTS AMENAGEMENTS TERRAINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213000', 'CONSTRUCTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213100', 'BATIMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213110', 'ENSEMBLES IMMOB. INDUSTRIELS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213150', 'ENSEMBLES IMMOB. ADM. ET COMMERC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213180', 'AUTRES ENSEMBLES IMMOBILIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213181', 'AFFECTES AUX OPERAT. PROFESSION.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213188', 'AFFECTES AUX OPERAT. NON PROF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213500', 'INSTALLATIONS GENERALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213800', 'OUVRAGES D\'INFRASTRUCTURE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213810', 'VOIES DE TERRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213820', 'VOIES DE FER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213830', 'VOIES D\'EAU', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213840', 'BARRAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('213850', 'PISTES D\'AERODROMES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('214000', 'CONSTRUCTIONS SUR SOL D\'AUTRUI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215000', 'INSTALL. TECH. MAT. OUTIL. INDUS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215100', 'INSTALL. COMPLEXES SPECIALISEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215110', 'SUR SOL PROPRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215140', 'SUR SOL D\'AUTRUI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215300', 'INSTALL. A CARACTERE SPECIFIQUE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215310', 'SUR SOL PROPRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215340', 'SUR SOL D\'AUTRUI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215400', 'MATERIEL INDUSTRIEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215500', 'OUTILLAGE INDUSTRIEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('215700', 'AGENCEM. AMENAG. MAT. OUTIL. INDUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218000', 'AUTRES IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218100', 'INSTALL. GENE. AGENC. AMENAG. DIV.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218200', 'MATERIEL DE TRANSPORT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218300', 'MATERIEL DE BUREAU ET INFORMATIQUE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218400', 'MOBILIER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218500', 'CHEPTEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('218600', 'EMBALLAGES RECUPERABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('231000', 'IMMOBILISAT. CORPORELLES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('231200', 'TERRAINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('231300', 'CONSTRUCTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('231500', 'INSTALL. TECH. MAT. OUTIL. INDUST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('231800', 'AUTRES IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('232000', 'IMMO. INCORPORELLES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('237000', 'AVANC. ACOMPT. VERSES SUR IMM. INC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('238000', 'AVANC. ACOMP. VERSES CDES IMM. COR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('238200', 'TERRAINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('238300', 'CONSTRUCTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('238500', 'INSTALL. TECH. MAT. OUTIL. INDUST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('238800', 'AUTRES IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('261000', 'TITRES DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('261100', 'ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('261800', 'AUTRES TITRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('266000', 'AUTRES FORMES DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267000', 'CREANCES RATTACHEES A PARTICIPAT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267100', 'CREANCES RATT. A PART. (GROUPE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267400', 'CREANC. RATT. PART. (HORS GROUPE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267500', 'VERSEM. D\'APPORTS NON CAPITALISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267600', 'AVANCES CONSOLIDABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267700', 'AUTRES CREANCES RATT. A PART.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('267800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('268000', 'CREANCES RATT. A STE EN PART.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('268100', 'PRINCIPAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('268800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('269000', 'VERS. REST. A EFFECT. SUR T.P.N.L.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('271000', 'TITRES IMMOBILISES (DROIT PROP.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('271100', 'ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('271800', 'AUTRES TITRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('272000', 'TITRES IMMOBILISES (DROIT CREANCE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('272100', 'OBLIGATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('272200', 'BONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('273000', 'TITRES IMMOBILISES DE L\'ACT. DE PORTEF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('274000', 'PRETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('274100', 'PRETS PARTICIPATIFS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('274200', 'PRETS AUX ASSOCIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('274300', 'PRETS AU PERSONNEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('274800', 'AUTRES PRETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('275000', 'DEPOTS ET CAUTIONNEMENTS VERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('275100', 'DEPOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('275500', 'CAUTIONNEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276000', 'AUTRES CREANCES IMMOBILISEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276100', 'CREANCES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276820', 'SUR TITRES IMMOB. (DROIT CREANCE)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276840', 'SUR PRETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276850', 'SUR DEPOTS ET CAUTIONNEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('276880', 'SUR CREANCES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('277100', 'ACTIONS PROPRES OU PARTS PROPRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('277200', 'ACT. PRO. OU PARTS PRO. VOIE D\'ANNUL.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('279000', 'VERSEM. A EFFECT. SUR T.I.N.L.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280000', 'AMORTISS. IMMOBILISATIONS INCORP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280100', 'FRAIS D\'ETABLISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280300', 'FRAIS DE RECHERCHE ET DEVELOPP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280500', 'CONCESSIONS ET DROITS SIMILAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280700', 'FONDS COMMERCIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('280800', 'AUTRES IMMOBILISATIONS INCORPOR.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281000', 'AMORTISS. IMMOBILISATIONS CORPOR.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281100', 'TERRAINS DE GISEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281200', 'AGENCEMENTS AMENAGEMENTS TERRAINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281300', 'CONSTRUCTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281400', 'CONSTRUCTIONS SUR SOL D\'AUTRUI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281500', 'INSTALL TECH. MAT. OUTIL. INDUST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('281800', 'AUTRES IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('282000', 'AMORTISS. IMMOBIL. EN CONCESSION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('290000', 'PROVIS. DEPRECIATION IMMOB. INCORP', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('290500', 'MARQUES PROCEDES DROITS ET VALEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('290600', 'DROIT AU BAIL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('290700', 'FONDS COMMERCIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('290800', 'AUTRES IMMOB. INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('291000', 'PROVIS. DEPRECIATION IMMOB. CORPOR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('291100', 'TERRAINS (AUTRES QUE GISEMENT)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('292000', 'PROVIS. DEPRECIAT. IMMOB. CONCESS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('293000', 'PROVIS. DEPRECIAT. IMMOB. EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('293100', 'IMMOBILISATIONS CORPOR. EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('293200', 'IMMO. INCORPORELLES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('296000', 'PROV. DEPREC. PART ET CREANC. PART', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('296100', 'TITRES DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('296600', 'AUTRES FORMES DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('296700', 'CREANCES RATT. A PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('296800', 'CREANCES RATT. A STE EN PARTICIP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297000', 'PROVIS. DEPRECIATION AUTRES IMMOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297100', 'TITRES IMMOBILISES DROIT PROPRIETE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297200', 'TITRES IMMOBILISES DROIT CREANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297300', 'TITRES IMMO. DE L\'ACT. DE PORTEF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297400', 'PRETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297500', 'DEPOTS ET CAUTIONNEMENTS VERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('297600', 'AUTRES CREANCES IMMOBILISEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('311000', 'MATIERE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('312000', 'MATIERE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('317000', 'FOURNITURES A, B, C...', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('321000', 'MATIERES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('321100', 'MATIERE (OU GROUPE) C', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('321200', 'MATIERE (OU GROUPE) D', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322000', 'FOURNITURES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322100', 'COMBUSTIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322200', 'PRODUITS D\'ENTRETIEN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322300', 'FOURNITURES D\'ATELIER ET D\'USINE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322400', 'FOURNITURES DE MAGASIN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('322500', 'FOURNITURES DE BUREAU', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('326000', 'EMBALLAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('326100', 'EMBALLAGES PERDUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('326500', 'EMBAL. RECUPER. NON IDENTIFIABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('326700', 'EMBALLAGES A USAGE MIXTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('331000', 'PRODUITS EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('331100', 'PRODUITS EN COURS P1', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('331200', 'PRODUITS EN COURS P2', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('335000', 'TRAVAUX EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('335100', 'TRAVAUX EN COURS T1', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('335200', 'TRAVAUX EN COURS T2', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('341000', 'ETUDES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('341100', 'ETUDE EN COURS E1', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('341200', 'ETUDE EN COURS E2', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('345000', 'PRESTATIONS DE SERVICES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('345100', 'PRESTATION DE SERVICES S1', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('345200', 'PRESTATION DE SERVICES S2', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('351000', 'PRODUITS INTERMEDIAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('351100', 'PRODUIT INTERMEDIAIRE (OU GRPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('351200', 'PRODUIT INTERMEDIAIRE (OU GRPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('355000', 'PRODUITS FINIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('355100', 'PRODUIT FINI (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('355200', 'PRODUIT FINI (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('358000', 'PROD. RESIDUELS (OU MAT. RECUP.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('358100', 'DECHETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('358500', 'REBUTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('358600', 'MATIERES DE RECUPERATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('371000', 'MARCHANDISE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('372000', 'MARCHANDISE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('391000', 'PROVIS. POUR DEPRECIAT. MAT. PREM.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('391100', 'MATIERE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('391200', 'MATIERE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('391700', 'FOURNITURE A, B, C...', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('392000', 'PROVIS. POUR DEPRECIAT. AUT. APPRO', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('392100', 'MATIERES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('392200', 'FOURNITURES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('392600', 'EMBALLAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('393000', 'PROV. DEPREC. EN-COURS PROD. BIENS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('393100', 'PRODUITS EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('393500', 'TRAVAUX EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('394000', 'PROV. DEPREC. EN-COURS PROD. SERV.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('394100', 'ETUDES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('394500', 'PRESTATIONS DE SERVICES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('395000', 'PROV. POUR DEPREC. STOCKS DE PROD.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('395100', 'PRODUITS INTERMEDIAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('395500', 'PRODUITS FINIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('397000', 'PROV. POUR DEPREC. STOCKS MARCHAN.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('397100', 'MARCHANDISE OU GROUPE A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('397200', 'MARCHANDISE OU GROUPE B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('401000', 'FOURNISSEURS DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('403000', 'FOURNISSEURS - EFFETS A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('404000', 'FOURNISSEURS D\'IMMOBILISATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('404100', 'FOURNISSEURS ACHATS D\'IMMOBILISAT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('404700', 'FOURNIS. D\'IMMOB. RETENUES DE GAR.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('405000', 'FOURNIS. D\'IMMOB. EFFETS A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('408000', 'FOURNIS. FACTURES NON PARVENUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('408100', 'FOURNISSEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('408400', 'FOURNISSEURS D\'IMMOBILISATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('408800', 'FOURNISSEURS INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409000', 'FOURNISSEURS DEBITEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409100', 'FOURNIS. AVANC. & ACOMPT. SUR CDES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409600', 'FOURN. CREAN. EMB. & MAT. A RENDRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409700', 'FOURNISSEURS AUTRES AVOIRS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409710', 'FOURNISSEURS D\'EXPLOITATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409740', 'FOURNISSEURS D\'IMMOBILISATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('409800', 'RABAIS REMISES RISTOUR. A OBTENIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('410000', 'CLIENTS ET COMPTES RATTACHES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('411000', 'CLIENTS DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('413000', 'CLIENTS EFFETS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('416000', 'CLIENTS DOUTEUX OU LITIGIEUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('417000', 'CREANC. SUR TRAV. NON ENCORE FACT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('418000', 'CLIENTS PRODUITS NON ENCORE FACT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('418100', 'CLIENTS FACTURES A ETABLIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('418800', 'CLIENTS INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('419000', 'CLIENTS CREDITEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('419100', 'CLTS AVANC. & ACOMP. RECUS SUR CDE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('419600', 'CLTS DETT. POUR EMB. & MAT. CONSIG', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('419700', 'CLIENTS - AUTRES AVOIRS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('419800', 'RABAIS REMISES RIST. A ACCORDER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('421000', 'PERSONNEL REMUNERATIONS DUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('422000', 'COMITES D\'ENTREPRISE, D\'ETABLIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('424000', 'PARTICIP. DES SALAR. AUX RESULTATS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('424600', 'RESERVE SPECIALE (ART L442.2)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('424800', 'COMPTES COURANTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('425000', 'PERSONNEL AVANCES ET ACOMPTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('426000', 'PERSONNEL DEPOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('427000', 'PERSONNEL OPPOSITIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('428000', 'PERS. CHARG. A PAY. & PROD. A REC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('428200', 'DETTES PROVISIO. POUR CONGES PAYES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('428400', 'DETT. PROV. PART. SAL. AUX RESULT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('428600', 'AUTRES CHARGES A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('428700', 'PRODUITS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('438000', 'ORG. SOC. CHARG. A PAY. & PROD.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('438200', 'CHARGES SOCIALES SUR CONGES PAYES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('438700', 'PRODUITS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('441000', 'ETATS SUBVENTIONS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('441100', 'SUBVENTIONS D\'INVESTISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('441700', 'SUBVENTIONS D\'EXPLOITATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('441800', 'SUBVENTIONS D\'EQUILIBRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('441900', 'AVANCES SUR SUBVENTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('442000', 'ETAT IMP. & TAX. RECOUV. SUR TIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('442400', 'OBLIGATAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('442500', 'ASSOCIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('443000', 'OPERATIONS PART. AVEC L\'ETAT,...', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('443100', 'CREANCES ETAT SUPPR. DECAL. TVA', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('443800', 'INTERES COURUS CREANCES CPTE 443100', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('444000', 'ETAT IMPOTS SUR LES BENEFICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('444500', 'ETAT TAXES SUR LE CHIFFRE D\'AFF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445200', 'TVA DUE INTRACOMMUNAUTAIRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445510', 'TVA A DECAISSER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445580', 'TAXES ASSIMILEES A TVA', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445600', 'TAXES SUR LE CA DEDUCTIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445621', 'TVA SUR IMMO. 5.5%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445622', 'TVA SUR IMMO. 20.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445623', 'TVA SUR IMMO. 19.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445630', 'TVA TRANSFEREE PAR D\'AUTRES ETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445662', 'TVA DEDUCTIBLE 20.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445670', 'CREDIT DE TVA A REPORTER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445680', 'TAXES ASSIMILEES A LA TVA', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445700', 'TAXE SUR LE C.A. COLLECT. ENTREPR.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445712', 'TVA COLLECTEE 20.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445800', 'TAXES SUR CA A REGULAR. OU EN ATT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445810', 'ACOMPTES REGIME SIMPLIFIE D\'IMPOS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445820', 'ACOMPTES REGIME DU FORFAIT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445830', 'REMBOURS. TAXES SUR CA DEMANDE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445840', 'TVA RECUPEREE D\'AVANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445861', 'TVA EN ATTENTE DEDUCTIBLE 5.5%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445862', 'TVA EN ATTENTE DEDUCTIBLE 20.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445863', 'TVA EN ATTENTE DEDUCTIBLE 19.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445871', 'TVA EN ATTENTE COLLECTEE 5.5%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445872', 'TVA EN ATTENTE COLLECTEE 20.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445873', 'TVA EN ATTENTE COLLECTEE 19.6%', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('446000', 'TITRES SUR TVA', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('446100', 'OBLIGATIONS CAUTIONNEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('446900', 'CREANCE TVA DECALAGE D\'UN MOIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('447000', 'AUTRES IMPOTS, TAX. ET VERS. ASSIM', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('448000', 'ETAT CHARG. A PAY. & PROD. A RECEV', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('448200', 'CHARGES FISCALES SUR CONG. A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('448600', 'AUTRES CHARGES A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('448700', 'PRODUITS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('451000', 'GROUPE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('455000', 'ASSOCIES COMPTES COURANTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('455100', 'PRINCIPAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('455780', 'TAXES ASSIMILEES A LA TVA', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('455800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456000', 'ASSOCIES OPERATIONS SUR LE CAPITAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456100', 'ASSOCIES COMPTES D\'APPORT EN STE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456110', 'APPORTS EN NATURE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456150', 'APPORTS EN NUMERAIRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456200', 'APPORTEURS CAPIT. APPELE NON VERSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456210', 'ACTION. CAP. SOUSC. APP. NON VERSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456250', 'ASSOCIES CAPITAL APPELE NON VERSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456300', 'ASSOC. VERS. RECUS SUR AUGM. CAPIT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456400', 'ASSOCIES VERSEMENTS ANTICIPES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456600', 'ACTIONNAIRES DEFAILLANTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('456700', 'ASSOCIES CAPITAL A REMBOURSER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('457000', 'ASSOCIES DIVIDENDES A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('458000', 'ASSOC. OPERAT. EN COMMUN ET EN GIE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('458100', 'OPERATIONS COURANTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('458800', 'INTERETS COURUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('462000', 'CREANCES SUR CESSIONS D\'IMMOBILIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('464000', 'DETTES SUR ACQUIS. VALEURS MOBI.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('465000', 'CREANC. SUR CESSIONS VALEURS MOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('467000', 'AUTRES COMPTES DEBIT. OU CREDIT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('467200', 'DEBOURS PAYES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('468000', 'DIVERS CHARG. A PAY. & PROD. A REC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('468600', 'CHARGES A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('468700', 'PRODUITS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('471000', 'COMPTES D\'ATTENTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('471100', 'REIMPUTATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('476000', 'DIFFERENCES DE CONVERSION ACTIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('476100', 'DIMINUTION DES CREANCES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('476200', 'AUGMENTATION DES DETTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('476800', 'DIFFER. COMPENS. PAR COUV. CHANGE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('477000', 'DIFFERENCES DE CONVERSION PASSIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('477100', 'AUGMENTATION DES CREANCES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('477200', 'DIMINUTION DES DETTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('477800', 'DIFFER. COMPENS. PAR COUV. CHANGE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('478000', 'AUTRES COMPTES TRANSITOIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('481000', 'CHARG. A REPART. SUR PLUS. EXERC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('481100', 'CHARGES DIFFEREES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('481200', 'FRAIS D\'ACQUISITION DES IMMOBILIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('481600', 'FRAIS D\'EMISSION DES EMPRUNTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('481800', 'CHARGES A ETALER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('486000', 'CHARGES CONSTATEES D\'AVANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('487000', 'PRODUITS CONSTATES D\'AVANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('488000', 'CPTES REPART. PERIO. CHARG. & PROD', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('488600', 'CHARGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('488700', 'PRODUITS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('491000', 'PROVIS. POUR DEPREC. CPTES CLIENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('495000', 'PROV. POUR DEPREC. CPTES GRPE ASS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('495100', 'COMPTES DU GROUPE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('495500', 'COMPTES COURANTS DES ASSOCIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('495800', 'OPERAT. FAITES EN COMMUN & EN GIE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('496000', 'PROVIS. POUR DEPREC. CPTES DEBIT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('496200', 'CREANCES SUR CESSIONS D\'IMMOBILIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('496500', 'CREANC. SUR CESSIONS VALEURS MOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('496700', 'AUTRES COMPTES DEBITEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('501000', 'PARTS DANS DES ENTREPRISES LIEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('502000', 'ACTIONS PROPRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('503000', 'ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('503100', 'TITRES COTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('503500', 'TITRES NON COTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('504000', 'AUTRES TITRES CONFERANT DROIT PROP', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('505000', 'OBLIG. & BONS EMIS PAR LA SOCIETE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('506000', 'OBLIGATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('506100', 'TITRES COTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('506500', 'TITRES NON COTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('507000', 'BONS TRESOR & BONS CAISSE A CT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('508000', 'AUTRES VALEURS MOB. ET CREANC. ASS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('508100', 'AUTRES VALEURS MOBILIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('508200', 'BONS DE SOUSCRIPTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('508800', 'INTER. COURUS SUR OBLIGATIONS BONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('509000', 'VERS. A EFFECT. SUR VALEURS MOBIL.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('511000', 'VALEURS A L\'ENCAISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('511100', 'COUPONS ECHUS A L\'ENCAISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('511200', 'CHEQUES A ENCAISSER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('511300', 'EFFETS A L\'ENCAISSEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('511400', 'EFFETS A L\'ESCOMPTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512100', 'COMPTES EN MONNAIE NATIONALE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512400', 'COMPTES EN DEVISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('514000', 'CHEQUES POSTAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('515000', 'CAISSES DU TRESOR ET ETS PUBLICS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('516000', 'SOCIETE DE BOURSE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('517000', 'AUTRES ORGANISMES FINANCIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('518000', 'INTERETS EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('518600', 'INTERETS COURUS A PAYER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('518700', 'INTERETS COURUS A RECEVOIR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('519000', 'CONCOURS BANCAIRES COURANTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('519100', 'CREDIT MOBIL. CREANC. CCIALES CMCC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('519300', 'MOBIL. CREANCES NEES A L\'ETRANGER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('519800', 'INT. COURUS SUR CONCOURS BANCAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('520000', 'INSTRUMENTS DE TRESORERIE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('531000', 'CAISSE SIEGE SOCIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('531100', 'CAISSE EN MONNAIE NATIONALE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('531400', 'CAISSE EN DEVISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('532000', 'CAISSE SUCCURSALE (OU USINE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('533000', 'CAISSE SUCCURSALE (OU USINE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('580100', 'VIREMENT DE TRESORERIE A TRESORERIE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('590000', 'PROVIS. POUR DEPREC. VALEURS MOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('590300', 'ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('590400', 'AUTRES TIT. CONFERANT DROIT PROP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('590600', 'OBLIGATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('590800', 'AUTRES VALEURS MOB. & CREANC. ASS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('601100', 'MATIERE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('601200', 'MATIERE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('601700', 'FOURNITURES A, B, C...', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602000', 'ACHATS STOCKES AUTRES APPROV.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602100', 'MATIERES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602110', 'MATIERE (OU GROUPE) C', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602120', 'MATIERE (OU GROUPE) D', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602200', 'FOURNITURES CONSOMMABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602210', 'COMBUSTIBLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602220', 'PRODUITS D\'ENTRETIEN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602230', 'FOURNITURES D\'ATELIER / USINES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602240', 'FOURNITURES DE MAGASINS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602250', 'FOURNITURES DE BUREAU', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602600', 'EMBALLAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602610', 'EMBALLAGES PERDUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602650', 'EMBALL. RECUPERA. NON IDENTIF.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('602670', 'EMBALLAGES A USAGE MIXTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('603000', 'VARIATION DES STOCKS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('603100', 'VARIAT. STOCKS MAT. PREM. ET FOURN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('603200', 'VARIAT. STOCKS AUTRES APPROVISION.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('603700', 'VARIATION STOCKS DE MARCHANDISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('604000', 'ACHATS ETUDES ET PRESTAT. SERVICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('605000', 'ACHATS MATERIEL EQUIPEM. TRAVAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606000', 'ACHATS NON STOCKES DE MAT. PREM.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606400', 'FOURNITURES ADMINISTRATIVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606500', 'ACHATS SPECIAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606800', 'AUTRES MATIERES ET FOURNITURES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('607100', 'MARCHANDISE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('607200', 'MARCHANDISE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('608000', 'FRAIS ACCESSOIRES D\'ACHAT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609000', 'RABAIS REMISES RIST. SUR ACHATS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609100', 'DE MATIERES PREMIERES (ET FOURN.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609200', 'D\'AUTRES APPROVISIONN. STOCKES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609500', 'DE MATERIEL EQUIPEMENTS DE TRAVAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609600', 'D\'APPROVISIONNEMENTS NON STOCKES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609700', 'DE MARCHANDISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609800', 'RABAIS REMISES RIST. NON AFFECTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('612000', 'REDEVANCES DE CREDIT-BAIL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('612200', 'CREDIT-BAIL MOBILIER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('612500', 'CREDIT-BAIL IMMOBILIER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('613000', 'LOCATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('613600', 'MALIS SUR EMBALLAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('614000', 'CHARGES LOCATIVES & DE COPROPRIETE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('615200', 'SUR BIENS IMMOBILIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('615500', 'SUR BIENS MOBILIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('615600', 'MAINTENANCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616100', 'MULTIRISQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616200', 'ASSUR. OBLIGAT. DOMMAGE-CONSTRUCT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616300', 'ASSURANCE-TRANSPORT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616360', 'SUR ACHATS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616370', 'SUR VENTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616380', 'SUR AUTRES BIENS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616400', 'RISQUES D\'EXPLOITATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616500', 'INSOLVABILITE CLIENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('618000', 'DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('618100', 'DOCUMENTATION GENERALE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('618500', 'FRAIS DE COLLOQUES, SEMIN., CONFER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('619000', 'RABAIS REMISES RIST. SUR SERV. EXT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('621000', 'PERSONNEL EXTERIEUR A L\'ENTREPRISE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('621400', 'PERSONNEL DETACHE OU PRETE A L\'ETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622000', 'REMUNERAT. D\'INTERM. ET HONORAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622100', 'COMMISSIONS & COURTAGES SUR ACHATS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622200', 'COMMISSIONS & COURTAGES SUR VENTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622400', 'REMUNERATIONS DES TRANSITAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622500', 'REMUNERATIONS D\'AFFACTURAGE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622800', 'DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623000', 'PUBLICITE PUBLICAT. RELAT. PUBLIQ.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623100', 'ANNONCES ET INSERTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623200', 'ECHANTILLONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623300', 'FOIRES ET EXPOSITIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623500', 'PRIMES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623600', 'CATALOGUES ET IMPRIMES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623700', 'PUBLICATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623800', 'DIVERS (POURBOIRES, DONS COURANTS)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624000', 'TRANSP. BIENS & TRANSP. COLL. PERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624100', 'TRANSPORTS SUR ACHATS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624200', 'TRANSPORTS SUR VENTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624300', 'TRANSPORTS ENTRE ETS OU CHANTIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624400', 'TRANSPORTS ADMINISTRATIFS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624700', 'TRANSPORTS COLLECTIFS DU PERSONNEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('624800', 'DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625000', 'DEPLACEM. MISSIONS ET RECEPTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625500', 'FRAIS DE DEMENAGEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625700', 'RECEPTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627000', 'SERVICES BANCAIRES ET ASSIMILES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627100', 'FRAIS SUR TITRES (ACHAT, VENTE,.).', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627200', 'COMMISSIONS & FRAIS SUR EMPRUNTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627500', 'FRAIS SUR EFFETS (COMM. D\'ENDOS,.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627600', 'LOCATION DE COFFRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('627800', 'AUTRES FRAIS & COMM. PREST. SERV.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('628000', 'DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('628400', 'FRAIS DE RECRUTEMENT DU PERSONNEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('629000', 'RABAIS REMISES RIST. SUR SERV. EXT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631000', 'IMPOTS TAXES & VERS. SUR REMUNER.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631100', 'TAXE SUR LES SALAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631200', 'TAXE D\'APPRENTISSAGE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631300', 'PART. EMPLOY. A FORM. PROF. CONT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631400', 'COTIS. DEFAUT INVEST. DANS CONST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('631800', 'AUTRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633000', 'IMPOTS TAXES & VERS. SUR REMUNER.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633100', 'VERSEMENT SUR LE TRANSPORT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633200', 'ALLOCATION LOGEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633300', 'PART. EMPLOY. A FORM. PROF. CONT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633400', 'PART. EMPLOY. A EFFORT CONSTRUCT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633500', 'VERS. LIBERAT. A EXONER. TAXE APP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635000', 'AUTRES IMPOTS TAXES & VERS. ASS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635100', 'IMPOTS DIRECTS (SAUF IMPOT BENEF.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635120', 'TAXES FONCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635130', 'AUTRES IMPOTS LOCAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635140', 'TAXE SUR LES VEHICULES SOCIETES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635200', 'TAXES SUR CA NON RECUPERABLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635300', 'IMPOTS INDIRECTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635400', 'DROITS D\'ENREGISTREMENT ET TIMBRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635410', 'DROIT DE MUTATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635800', 'AUTRES DROITS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('637000', 'AUTRES IMPOTS TAXES ET VERS. ASS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('637100', 'CONTRIB. SOC. SOLID. A CHARGE STES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('637200', 'TAXES PERCUES PAR ORG. PUBLICS INT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('637400', 'IMPOTS & TAXES EXIGIB. A L\'ETRANG.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('637800', 'TAXES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641100', 'SALAIRES APPOINT. COMMIS. DE BASE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641200', 'CONGES PAYES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641300', 'PRIMES ET GRATIFICATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641400', 'SALAIRES, APPOINTEMENTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641500', 'SUPPLEMENT FAMILIAL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('644000', 'REMUNERATION TRAVAIL DE L\'EXPLOIT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647000', 'AUTRES CHARGES SOCIALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647100', 'PRESTATIONS DIRECTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647200', 'VERS. AUX COMITES D\'ETS & D\'ETAB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647300', 'VERS. AUX COMITES HYGIENE ET SECUR', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647400', 'VERSEMENTS AUX OEUVRES SOCIALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('647500', 'MEDECINE DU TRAVAIL, PHARMACIE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('648000', 'AUTRES CHARGES DE PERSONNEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('651000', 'REDEVANC. CONCESS. BREV. LICENC,..', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('651100', 'REDEV. CONCESS. BREV, LIC, MARQ,..', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('651600', 'DROITS D\'AUTEUR ET DE REPRODUCT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('651800', 'AUTRES DROITS & VALEURS SIMILAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('653000', 'JETONS DE PRESENCE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('654000', 'PERTES SUR CREANCES IRRECOUVRAB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('654100', 'CREANCES DE L\'EXERCICE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('654400', 'CREANCES DES EXERCICES ANTERIEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('655000', 'QUOTE-PARTS RESULT. OPER. EN COMM.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('655100', 'Q-P BENEF. TRANSF. (CPTA GERANT)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('655500', 'QUOTE-PART PERTE SUPP. (CPTA ASS)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('658000', 'CHARGES DIVERSES GESTION COURANTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661000', 'CHARGES D\'INTERETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661100', 'INTERETS DES EMPRUNTS ET DETTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661160', 'DES EMPRUNTS ET DETTES ASSIMILEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661170', 'DES DETTES RATT. A PARTICIPATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661500', 'INTERETS CPTES COUR. & DEP. CREDIT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661600', 'INTERETS BANC. & SUR OPER. FINANC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661700', 'INTERETS OBLIGATIONS CAUTIONNEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661800', 'INTERETS DES AUTRES DETTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661810', 'DES DETTES COMMERCIALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('661880', 'DES DETTES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('664000', 'PERTES CREANCES LIEES A PARTICIP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('665000', 'ESCOMPTES ACCORDES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('667000', 'CHARG. NETTES SUR CESS. VAL. MOBIL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('668000', 'AUTRES CHARGES FINANCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('668800', 'ECART DE CONVERSION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671000', 'CHARG. EXCEPT. SUR OPERAT. GESTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671100', 'PENALITES SUR MARCHES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671200', 'PENALITES AMENDES FISC. & PENALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671300', 'DONS, LIBERALITES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671400', 'CREANC. DEVEN. IRRECOUV. SUR BENEF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671500', 'SUBVENTIONS ACCORDEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671700', 'RAPPEL D\'IMPOTS (AUTRE QUE BENEF)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('671800', 'AUT. CHARG. EXCEP. SUR OPER. GEST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('672000', 'CHARGES SUR EXERCICES ANTERIEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('675000', 'VAL. COMPT. DES ELEM. ACTIF CEDES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('675100', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('675200', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('675600', 'IMMOBILISATIONS FINANCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('675800', 'AUTRES ELEMENTS D\'ACTIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('678000', 'AUTRES CHARGES EXCEPTIONNELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('678100', 'MALIS PROVENANT DE CLAUSES INDEXAT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('678200', 'LOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('678300', 'MALIS DU RACHAT PAR ETS D\'ACTIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('678800', 'CHARGES EXCEPTIONNELLES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681100', 'DOTAT. AUX AMORT. DES IMMOB. CORPO', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681110', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681120', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681200', 'DOTAT. AUX AMORT. CHARG. EXPLOIT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681500', 'DOTAT. AUX PROV. RISQ. & CHARG. EX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681600', 'DOTAT. AUX PROV. DEPREC. IMMOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681610', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681620', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681700', 'DOTAT. AUX PROV. DEPREC. ACTIFS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681740', 'CREANCES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686000', 'DOTAT. AUX AMORT. ET AUX PROVIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686100', 'DOT. AUX AMORT. PRIME REMB. OBLIG.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686500', 'DOT. AUX PROV. RISQ. & CHARG. FIN.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686600', 'DOT. AUX PROV. DEPREC. ELEM. FINAN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686620', 'IMMOBILISATIONS FINANCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686650', 'VALEURS MOBILIERES DE PLACEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('686800', 'AUTRES DOTATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687000', 'DOTAT. AUX AMORT. ET PROVISIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687100', 'DOTAT. AUX AMORT. EXCEPT. IMMOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687200', 'DOTAT. AUX PROV. REGLEM. (IMMOB)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687250', 'AMORTISSEMENTS DEROGATOIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687300', 'DOTAT. AUX PROV. REGLEM. (STOCKS)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687400', 'DOTAT. AUX AUTRES PROV. REGLEMENT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687500', 'DOTAT. PROV. RISQ. & CHARG. EXCEP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('691000', 'PARTICIPATIONS DES SALARIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('695200', 'CONTRIB. ADDITIO. IMPOT BENEFICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('695400', 'IMPOTS DUS A L\'ETRANGER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('696000', 'SUPPLEMENT D\'IMPOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('697000', 'IMPOSITION FORF. ANUELLE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('698000', 'INTEGRATION FISCALE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('698100', 'INTEGRATION FISCALE - CHARGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('698900', 'INTEGRATION FISCALE - PRODUITS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('699000', 'PRODUITS REP. EN ARR. DES DEFICITS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('701000', 'VENTES DE PRODUITS FINIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('701100', 'PRODUIT FINI (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('701200', 'PRODUIT FINI (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('702000', 'VENTES DE PRODUITS INTERMEDIAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('703000', 'VENTES DE PRODUITS RESIDUELS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('704000', 'TRAVAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('704100', 'TRAVAUX DE CATEG. (OU ACTIV.) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('704200', 'TRAVAUX DE CATEG. (OU ACTIV.) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('705000', 'ETUDES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('707100', 'MARCHANDISE (OU GROUPE) A', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('707200', 'MARCHANDISE (OU GROUPE) B', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708000', 'PRODUITS DES ACTIVITES ANNEXES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708100', 'PROD. SERV. EXPLOIT. INTER. PERSON', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708200', 'COMMISSIONS ET COURTAGES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708300', 'LOCATIONS DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708400', 'MISE A DISPOS. PERSONNEL FACTUREE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708500', 'PORTS ET FRAIS ACCESSOIRES FACT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708600', 'BONIS SUR REPRISES EMBALL. CONSIG.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708700', 'BONIFICAT. CLTS & PRIMES VENTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('708800', 'AUTRES PRODUITS ACTIVITES ANNEXES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709000', 'RABAIS REMISES RIST. ACCORD. A ETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709100', 'SUR VENTES DE PRODUITS FINIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709200', 'SUR VENTES PRODUITS INTERMEDIAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709400', 'SUR TRAVAUX', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709500', 'SUR ETUDES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709600', 'SUR PRESTATIONS DE SERVICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709700', 'SUR VENTES MARCHANDISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('709800', 'SUR PRODUITS ACTIVITES ANNEXES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713000', 'VARIAT. STOCKS (EN-COURS PRODUCT.)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713300', 'VARIATION EN-COURS PRODUC. BIENS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713310', 'PRODUITS EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713350', 'TRAVAUX EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713400', 'VARIATION EN-COURS PROD. SERVICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713410', 'ETUDES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713450', 'PRESTATIONS SERVICES EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713500', 'VARIATION STOCKS DE PRODUITS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713510', 'PRODUITS INTERMEDIAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713550', 'PRODUITS FINIS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('713580', 'PRODUITS RESIDUELS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('721000', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('722000', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('731000', 'PROD. NETS PART. SUR OP. EN COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('739000', 'PROD. NETS PART. SUR OP. TERMINEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('751000', 'REDEV. POUR CONCES. BREV. LIC....', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('751100', 'REDEV. POUR CONCES. BREV. LIC...', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('751600', 'DROITS D\'AUTEUR ET DE REPRODUCTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('751800', 'AUTRES DROITS & VALEURS SIMILAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('752000', 'REV. IMMEUB. NON AFFECT. ACT. PROF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('753000', 'JETONS PRESENCE ET REMUN. ADMINIST', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('754000', 'RISTOURNES PERCUES COOPERATIVES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('755000', 'QUOTES-PARTS RESULT. OP. EN COMMUN', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('755100', 'QUOTE-PART PERTE TRANSFEREE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('755500', 'QUOTE-PART BENEFICE ATTRIBUEE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('758000', 'PRODUITS DIVERS GESTION COURANTE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('761000', 'PRODUITS DE PARTICIPATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('761100', 'REVENUS TITRES DE PARTICIPATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('761600', 'REVENUS AUTRES FORMES PARTICIP.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('762000', 'PRODUITS AUTRES IMMOB. FINANC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('762100', 'REVENUS DES TITRES IMMOBILISES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('762400', 'REVENUS DES PRETS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('762700', 'REVENUS CREANCES IMMOBILISEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('763000', 'REVENUS DES AUTRES CREANCES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('763100', 'REVENUS CREANCES COMMERCIALES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('763800', 'REVENUS DES CREANCES DIVERSES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('764000', 'REVENUS VALEURS MOBIL. PLACEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('765000', 'ESCOMPTES OBTENUS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('767000', 'PROD. NETS SUR CESS. VALEURS MOB.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('767100', 'REVENUS CRE. RATT. PARTICIPATIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('768000', 'AUTRES PRODUITS FINANCIERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771000', 'PRODUITS EXCEPT. SUR OPER. GESTION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771100', 'DEDITS PENAL. SUR ACHATS & VENTES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771300', 'LIBERALITES PERCUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771400', 'RENTREES SUR CREANCES AMORTIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771500', 'SUBVENTIONS D\'EQUILIBRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771700', 'DEGREVEM. IMPOTS (AUT. IMP. BENEF)', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('771800', 'AUTRES PROD. EXCEPT. SUR OP. GEST.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('772000', 'PRODUITS SUR EXERCICES ANTERIEURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('775000', 'PRODUITS CESSIONS ELEMENTS D\'ACTIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('775100', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('775200', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('775600', 'IMMOBILISATIONS FINANCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('775800', 'AUTRES ELEMENTS D\'ACTIF', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('777000', 'Q-P SUBV. INVEST. AU RESULT. EXERC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('778000', 'AUTRES PRODUITS EXCEPTIONNELS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('778100', 'BONIS PROVENANT CLAUSES D\'INDEXAT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('778200', 'LOTS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('778300', 'BONIS RACHAT PAR ETS ACT. & OBLIG.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('778800', 'PRODUITS EXCEPTIONNELS DIVERS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781000', 'REPRISES SUR AMORTISS. & PROVIS.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781100', 'REPRIS. AMORT. IMMOB. CORP. & INC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781110', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781120', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781500', 'REPRIS. PROVIS. RISQ. & CH. EXPLOI', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781600', 'REP. PROV. DEPREC. IMM. CORP & INC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781610', 'IMMOBILISATIONS INCORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781620', 'IMMOBILISATIONS CORPORELLES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781700', 'REPRIS. PROV. DEPREC. ACT. CIRCUL.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781730', 'STOCKS ET EN-COURS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('781740', 'CREANCES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('786000', 'REPRISES SUR PROVIS. POUR RISQUES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('786500', 'REP. PROV. RISQ. & CHARG. FINANC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('786600', 'REPRIS. PROV. DEPREC. ELEM. FINANC', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('786620', 'IMMOBILISATIONS FINANCIERES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('786650', 'VALEURS MOBILIERES DE PLACEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787000', 'REPRISES SUR PROVISIONS', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787200', 'REPRISES SUR PROV. REGLEMENTEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787250', 'AMORTISSEMENTS DEROGATOIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787260', 'PROVISION SPECIALE DE REEVALUATION', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787270', 'PLUS-VALUES REINVESTIES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787300', 'REPRISES SUR PROV. REGLEMENTEES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787400', 'REPRIS. SUR AUTRES PROV. REGLEMENT', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787500', 'REPRIS. PROV. RISQ. & CHARG. EXPL.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('787600', 'REPRIS. PROV. POUR DEPREC. EXCEPT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('791000', 'TRANSFERTS DE CHARGES D\'EXPLOIT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('796000', 'TRANSFERTS DE CHARGES FINANC.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('797000', 'TRANSFERTS DE CHARGES EXCEPT.', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('201000', 'FRAIS D\'ETABLISSEMENT', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('209000', 'SORTIE D\'IMMOBILISATION', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('474100', 'DIVERS A REINTEGRER', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('474200', 'BENEFICE SCM', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('475000', 'PLUS VALUES A COURT TERME', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('530000', 'CAISSE', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('760000', 'PRODUITS FINANCIERS', 'A', '', 'I', 'AR_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('770000', 'PRODUITS EXCEPTIONNELS', 'A', '', 'I', 'AR_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('530010', 'CAISSE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('607000', 'ACHATS DE MARCHANDISES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622700', 'FRAIS D\'ACTES ET DE CONTENTIEUX', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('438600', 'AUTRES CHARGES A PAYER', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('473000', 'DIVERS A DEDUIRE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('613200', 'LOCATIONS IMMOBILIERES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('616000', 'PRIMES D\'ASSURANCE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('633800', 'AUTRES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('695000', 'IMPOTS SUR LES BENEFICES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('108100', 'COMPTE DE LEXPLOITANT', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512030', 'EPARGNE', 'A', '', 'A', 'AR_paid:AP_paid');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('100000', 'CLASSE 1', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('300000', 'CLASSE 3', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('500000', 'CLASSE 5', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('600000', 'CLASSE 6', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('700000', 'CLASSE 7', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('108000', 'COMPTE DE LEXPLOITANT', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('200001', 'IMMOBILISATION', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('200000', 'CLASSE 2', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('400001', 'FOURNISSEURS ET COMPTES RATTACHES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('400000', 'CLASSE 4', 'H', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('695100', 'IMPOTS DUS EN FRANCE', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('646000', 'COTIS. SOCIAL. PERSON. EXPLOITANT', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645000', 'CHARGES DE SECUR. SOC. ET PREVOY.', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('617000', 'ETUDES ET RECHERCHES', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('615000', 'ENTRETIEN ET REPARATIONS', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('613500', 'LOCATIONS MOBILIERES', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('611000', 'SOUS-TRAITANCE GENERALE', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('695500', 'DEBOURS PAYES POUR LE COMPTE', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('690000', 'PARTICIP. SAL. / IMPOTS SUR BEN.', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('687600', 'DOTAT. AUX PROV. DEPREC. EXCEPT.', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681000', 'DOTATIONS AUX AMORT. & AUX PROVIS.', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('628100', 'CONCOURS DIVERS (COTISATIONS,...)', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625600', 'MISSIONS', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645800', 'COTISATIONS AUX AUTRES ORG. SOC.', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('641000', 'REMUNERATIONS DU PERSONNEL', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625020', 'DEPLACEMENTS MOTO', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('622600', 'HONORAIRES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('621100', 'PERSONNEL INTERIMAIRE', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445500', 'TAXES SUR CA A DECAISSER', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('706000', 'PRESTATIONS DE SERVICES', 'A', '', 'I', 'IC_income');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('707000', 'VENTES DE MARCHANDISES', 'A', '', 'I', 'IC_sale');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445713', 'TVA COLLECTEE 19.6%', 'A', '', 'I', 'AR_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512020', 'BANQUE DEBIT', 'A', '', 'E', 'AP');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445711', 'TVA COLLECTEE 5.5%', 'A', '', 'I', 'AR_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445661', 'TVA DEDUCTIBLE 5.5%', 'A', '', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512010', 'BANQUE CREDIT', 'A', '', 'I', 'AR:AR_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('681730', 'STOCKS ET EN-COURS', 'A', '', 'A', 'IC');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('580010', 'VIREMENT INTERNE', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('580000', 'VIREMENT INTERNE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('766000', 'GAINS DE CHANGE', 'A', '', 'I', 'AR_amount:IC_income');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('472000', 'MOINS VALUES A COURT TERME', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('474000', 'DEFICIT SCM', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('670000', 'CHARGES FINANCIERES', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645100', 'COTISATIONS A L\'URSSAF', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645200', 'COTISATIONS AUX MUTUELES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645300', 'COTISATIONS AUX CAISSES RETR.', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('646400', 'COTISATIONS AUX ASSEDIC', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('623400', 'CADEAUX A LA CLIENTELE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('437000', 'AUTRES ORGANISMES SOCIAUX', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606100', 'FOURNITURES NON STOCK. EAU ENERG.', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('606300', 'FOURNIT. ENTRETIEN & PETIT EQUIP.', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625010', 'DEPLACEMENTS AUTO', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('635110', 'TAXE PROFESSIONNELLE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('645001', 'CSG', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('660000', 'CHARGES FINANCIERES', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('666000', 'PERTES DE CHANGE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512040', 'EXPLOITANT', 'A', '', 'E', 'AP_paid');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('431000', 'SECURITE SOCIALE', 'A', '', 'E', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('609400', 'D\'ETUDES & PRESTATIONS DE SERVICES', 'A', '', '', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('625100', 'VOYAGES ET DEPLACEMENTS', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('618300', 'DOCUMENTATION TECHNIQUE', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('445663', 'TVA DEDUCTIBLE 19.6%', 'A', '', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('601000', 'ACHATS STOCKES MAT. PREM. (FOURN.)', 'A', '', 'E', 'AP_amount:IC_cogs');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('626000', 'FRAIS POSTAUX ET TELECOMMUNIC.', 'A', '', 'E', 'AP_amount');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('512000', 'BANQUE', 'A', '', 'A', 'AR_paid:AP_paid');
+--
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('999000', 'Foreign Exchange Gain', 'A', '', 'I', '');
+INSERT INTO "chart" ("accno", "description", "charttype", "gifi_accno", "category", "link") VALUES ('999010', 'Foreign Exchange Loss', 'A', '', 'E', '');
+--
+-- insert taxes
+--
+INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '445661'), 0.055);
+INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '445663'), 0.196);
+INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '445711'), 0.055);
+INSERT INTO "tax" ("chart_id", "rate") VALUES ((SELECT id FROM chart WHERE accno = '445713'), 0.196);
+--
+-- update defaults
+--
+update defaults set inventory_accno_id = (select id from chart where accno = '681730'), income_accno_id = (select id from chart where accno = '707000'), expense_accno_id = (select id from chart where accno = '601000'), fxgain_accno_id = (select id from chart where accno = '999000'), fxloss_accno_id = (select id from chart where accno = '999010'), invnumber = '1000', sonumber = '1000', ponumber = '1000', curr = 'EUR', weightunit = 'kg';
+--
--- /dev/null
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0027', 'EDV-Software', 'A', 'A', 'AP_amount', '0027', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0090', 'Geschäftsbauten', 'A', 'A', 'AP_amount', '0090', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0200', 'Techn.Anlagen und Maschinen', 'A', 'A', 'AP_amount', '0200', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0210', 'Maschinen', 'A', 'A', 'AP_amount', '0210', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0380', 'Sonst.Transportmittel', 'A', 'A', 'AP_amount', '0380', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0400', 'Betriebsausstattung', 'A', 'A', 'AP_amount', '0400', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0410', 'Geschäftsausstattung', 'A', 'A', 'AP_amount', '0410', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0420', 'Büroeinrichtung', 'A', 'A', 'AP_amount', '0420', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0430', 'Ladeneinrichtung', 'A', 'A', 'AP_amount', '0430', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0440', 'Werkzeuge', 'A', 'A', 'AP_amount', '0440', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0480', 'Geringwertige Wirtschaftsg.b.410EUR', 'A', 'A', 'AP_amount', '0480', 9, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1200', 'Bank', 'A', 'A', 'AR_paid:AP_paid', '1200', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1360', 'Geldtransit', 'A', 'A', '', '1360', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1400', 'Ford. a.Lieferungen und Leistungen', 'A', 'A', 'AR', '1400', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1590', 'Durchlaufende Posten', 'A', 'A', '', '1590', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1600', 'Verbindlichkeiten aus Lief.u.Leist.', 'A', 'L', 'AP', '1600', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1780', 'Umsatzsteuer-Vorauszahlungen', 'A', 'E', '', '1780', 0, NULL, NULL, NULL, 28, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1790', 'Umsatzsteuer Vorjahr', 'A', 'E', '', '1790', 0, NULL, NULL, NULL, 28, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1791', 'Umsatzsteuer frühere Jahre', 'A', 'E', '', '1791', 0, NULL, NULL, NULL, 28, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1800', 'Privatentnahme allgemein', 'A', 'Q', '', '1800', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1810', 'Privatsteuern', 'A', 'Q', '', '1810', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1820', 'Sonderausgaben beschränkt abzugsfähig', 'A', 'Q', '', '1820', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1830', 'Sonderausgaben unbeschr.anzugsfähig', 'A', 'Q', '', '1830', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1840', 'Zuwendungen, Spenden', 'A', 'Q', '', '1840', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1890', 'Privateinlagen', 'A', 'Q', '', '1890', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2110', 'Zinsaufwendung f.kurzf.Verbindlichk', 'A', 'E', '', '2110', 0, NULL, 30, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2120', 'Zinsaufwendung f.langf.Verbindlichk', 'A', 'E', '', '2120', 0, NULL, 30, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2130', 'Diskontaufwendung', 'A', 'E', '', '2130', 0, NULL, 30, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2310', 'Anlagenabgänge Sachanlagen Restbuchw.b.Buchverlust', 'A', 'E', '', '2310', 0, NULL, 31, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2315', 'Anlagenabgänge Sachanlagen Restbuchw.b.Buchgewinn', 'A', 'I', '', '2315', 0, NULL, 31, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2320', 'Verluste Abgang Gegenst.d.Anlagever', 'A', 'E', '', '2320', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2650', 'Sonstige Zinsen und änliche Erträge', 'A', 'I', '', '2650', 0, NULL, 32, NULL, 4, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2720', 'Ertr.a.d.Abgang v.Gegens.d.Anlageve', 'A', 'I', '', '2720', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2742', 'Versicherungsentschädigungen', 'A', 'I', '', '2742', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3000', 'Roh,-Hilfs,-und Betriebsstoffe', 'A', 'E', 'IC', '3000', 9, NULL, 4, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3300', 'Wareneingang 7% Vorsteuer', 'A', 'E', 'AP_amount:IC_cogs', '3300', 8, NULL, 4, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3400', 'Wareneingang 16% Vorsteuer', 'A', 'E', 'AP_amount:IC_cogs', '3400', 9, NULL, 4, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3420', 'Innergemein.Erwerb 7% VorSt u. Ust', 'A', 'E', 'AP_amount:IC_cogs', '3420', 0, 93, 4, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3425', 'Innergem.Erwerb 16% VorSt u. Ust', 'A', 'E', 'AP_amount:IC_cogs', '3425', 0, 97, 4, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3440', 'Innergem.Erwerb v.Neufahrz.v.Lief.o.USt.Identnr.16%VSt.u.16%USt.', 'A', 'E', 'AP_amount:IC_cogs', '3440', 19, 94, NULL, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3550', 'Steuerfreier innergem.Erwerb', 'A', 'E', 'AP_amount:IC_cogs', '3550', 0, 91, NULL, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3731', 'Erhaltene Skonti 7% Vorsteuer', 'A', 'I', 'AP_paid', '3731', 8, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3735', 'Erhaltene Skonti 16% Vorsteuer', 'A', 'I', 'AP_paid', '3735', 9, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3750', 'Erhaltene Boni 7% Vorsteuer', 'A', 'I', 'AP_paid', '3750', 8, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3760', 'Erhaltene Boni 16% Vorsteuer', 'A', 'I', 'AP_paid', '3760', 9, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3780', 'Erhaltene Rabatte 7% Vorsteuer', 'A', 'I', 'AP_paid', '3780', 8, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3790', 'Erhaltene Rabatte 16% Vorsteuer', 'A', 'I', 'AP_paid', '3790', 9, NULL, 4, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3800', 'Bezugsnebenkosten', 'A', 'E', 'AP_amount:IC_cogs:IC_expense', '3800', 0, NULL, 4, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3830', 'Leergut', 'A', 'E', 'AP_amount:IC_cogs', '3830', 0, NULL, 4, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3850', 'Zölle und Einfuhrabgaben', 'A', 'E', 'AP_amount:IC_cogs', '3850', 0, NULL, 4, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3960', 'Bestandsver.Roh-,Hilfs-.Betriebs.sow.bez.Waren', 'A', 'E', '', '3960', 0, NULL, 2, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3970', 'Bestand Roh-,Hilfs-,u.Betriebsstoff', 'A', 'A', 'IC', '3970', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3980', 'Bestand Waren', 'A', 'A', 'IC', '3980', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4000', 'Material-und Stoffverbrauch', 'A', 'E', 'IC_cogs', '4000', 0, NULL, 20, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4110', 'Löhne', 'A', 'E', '', '4110', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3990', 'Verrechnete Stoffkosten', 'A', 'E', 'IC_cogs', '3990', 0, NULL, 4, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4120', 'Gehälter', 'A', 'E', '', '4120', 0, NULL, 10, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4125', 'Ehegattengehalt', 'A', 'E', '', '4125', 0, NULL, 10, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4138', 'Beiträge zur Berufsgenossenschaft', 'A', 'E', '', '4138', 0, NULL, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4139', 'Ausgleichsabgabe i.S.d.Schwerbehinterdengesetzes', 'A', 'E', '', '4139', 0, NULL, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4140', 'Freiwillig soziale Aufwendungen lohnsteuerfrei', 'A', 'E', '', '4140', 0, NULL, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4145', 'Freiwillige sozi.Aufw.lohnsteuerpflichtig.', 'A', 'E', '', '4145', 0, NULL, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4149', 'Pauschale Lohnsteuera.sons.Bezüge (z.B.Fahrtkostenzu)', 'A', 'E', '', '4149', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4150', 'Krankengeldzuschüsse', 'A', 'E', '', '4150', 0, NULL, 10, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4175', 'Fahrtkostenerst.Wohnung/Arbeitsstät', 'A', 'E', '', '4175', 0, NULL, 10, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4190', 'Aushilfslöhne', 'A', 'E', '', '4190', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4199', 'Lohnsteuer für Aushilfe', 'A', 'E', '', '4199', 0, NULL, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4200', 'Raumkosten', 'A', 'E', 'AP_amount', '4200', 9, NULL, 11, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4210', 'Miete', 'A', 'E', 'AP_amount', '4210', 9, NULL, 11, NULL, 11, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4220', 'Pacht', 'A', 'E', 'AP_amount', '4220', 0, NULL, NULL, NULL, 11, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4230', 'Heizung', 'A', 'E', 'AP_amount', '4230', 9, NULL, 11, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4240', 'Gas,Strom, Wasser', 'A', 'E', 'AP_amount', '4240', 9, NULL, 11, NULL, 12, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4250', 'Reinigung', 'A', 'E', 'AP_amount', '4250', 9, NULL, NULL, 11, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4260', 'Instandhaltung betrieb.Räume', 'A', 'E', 'AP_amount', '4260', 9, NULL, 11, NULL, 13, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4280', 'Sonstige Raumkosten', 'A', 'E', 'AP_amount', '4280', 9, NULL, 11, NULL, 13, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4301', 'Nicht abziehbare Vorsteuer 7%', 'A', 'E', 'AP_paid', '4301', 0, NULL, 20, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4305', 'Nicht abziehbare Vorsteuer 16%', 'A', 'E', 'AP_paid', '4305', 0, NULL, 20, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4320', 'Gewerbesteuer', 'A', 'E', '', '4320', 0, NULL, 12, NULL, 31, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4340', 'Sonstige Betriebssteuern', 'A', 'E', '', '4340', 0, NULL, 12, NULL, 31, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4350', 'Verbrauchssteuer', 'A', 'E', '', '4350', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4355', 'Ökosteuer', 'A', 'E', '', '4355', 0, NULL, 12, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4396', 'Steuerl.abzugs.Verspätungszuschl.u.Zwangsgelder', 'A', 'E', '', '4396', 0, NULL, NULL, NULL, 31, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4397', 'Steuerl.n.abzugsf.Verspätungszuschläge u.Zwangsgelder', 'A', 'E', '', '4397', 0, NULL, NULL, NULL, 31, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4500', 'Fahrzugkosten', 'A', 'E', 'AP_amount', '4500', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4530', 'Laufende Kfz-Betriebskosten', 'A', 'E', 'AP_amount', '4530', 9, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8100', 'Steuerfreie Umsätze §4Nr.8ff UstG', 'A', 'I', 'AR_amount', '8100', 0, 0, 1, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8110', 'Sonstige steuerfreie Umsätze Inland', 'A', 'I', 'AR_amount', '8110', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8300', 'Erlöse 7%USt', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8300', 2, 86, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4540', 'Kfz-Reparaturen', 'A', 'E', 'AP_amount', '4540', 9, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4550', 'Garagenmiete', 'A', 'E', 'AP_amount', '4550', 0, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4570', 'Leasingfahrzeugkosten', 'A', 'E', 'AP_amount', '4570', 0, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4580', 'Sonstige Kfz-Kosten', 'A', 'E', 'AP_amount', '4580', 9, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4600', 'Werbe-und Reisekosten', 'A', 'E', 'AP_amount', '4600', 9, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4610', 'Werbekosten', 'A', 'E', 'AP_amount', '4610', 9, NULL, NULL, 15, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4638', 'Geschenke ausschließl.betrieb.genut', 'A', 'E', 'AP_amount', '4638', 9, NULL, NULL, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4640', 'Repräsentationskosten', 'A', 'E', 'AP_amount', '4640', 9, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4650', 'Bewirtungskosten', 'A', 'E', 'AP_amount', '4650', 9, NULL, 20, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4653', 'Aufmerksamkeiten', 'A', 'E', 'AP_amount', '4653', 9, NULL, NULL, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4654', 'Nicht abzugsfähige Bewirtungskosten', 'A', 'E', 'AP_amount', '4654', 0, NULL, NULL, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4660', 'Reisekosten Arbeitnehmer', 'A', 'E', 'AP_amount', '4660', 9, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4663', 'Reisekosten Arbeitn.m.Vorsteuerabzu f.öffentl.Verkehrsm.', 'A', 'E', 'AP_amount', '4663', 8, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4664', 'Reisekosten Arbeitn.Verpflegungmehr', 'A', 'E', 'AP_amount', '4664', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4666', 'Reisekosten Arbeitn.Übernachtungsaufwand', 'A', 'E', 'AP_amount', '4666', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4668', 'Kilometerentgelderstattung Arbeitnehmer', 'A', 'E', 'AP_amount', '4668', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4670', 'Reisekosten Unternehmer', 'A', 'E', 'AP_amount', '4670', 9, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4673', 'Reisek.Untern.m.Vorsteuerabzug (öffentl.Verkehrsm.', 'A', 'E', 'AP_amount', '4673', 8, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4674', 'Reisekosten Untern.Verpflegungsmehr', 'A', 'E', 'AP_amount', '4674', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4676', 'Reisekosten Untern.Übernachtungsauf', 'A', 'E', 'AP_amount', '4676', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4700', 'Kosten der Warenabgabe', 'A', 'E', 'AP_amount:IC_cogs', '4700', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4710', 'Verpackungsmaterial', 'A', 'E', 'AP_amount:IC_cogs', '4710', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4730', 'Ausgangsfracht', 'A', 'E', 'AP_amount:IC_cogs', '4730', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4750', 'Transportversicherung', 'A', 'E', 'AP_amount:IC_cogs:IC_expense', '4750', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4760', 'Verkaufsprovision', 'A', 'E', 'AP_amount:IC_expense', '4760', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4780', 'Fremdarbeiten', 'A', 'E', 'AP_amount:IC_expense', '4780', 16, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4790', 'Aufwand für Gewährleistungen', 'A', 'E', 'AP_amount:IC_expense', '4790', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4800', 'Rep.u.Instandhaltungen v.techn.Anlagen u.Maschinen', 'A', 'E', 'AP_amount', '4800', 9, NULL, 18, NULL, 19, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4806', 'Wartungskosten für Hard-u.Software', 'A', 'E', 'AP_amount:IC_expense', '4806', 9, NULL, 18, NULL, 19, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4809', 'Sonstige Reparaturen u.Instandhalt.', 'A', 'E', 'AP_amount', '4809', 9, NULL, NULL, NULL, 19, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4810', 'Mietleasing', 'A', 'E', 'AP_amount', '4810', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4815', 'Kaufleasing', 'A', 'E', 'AP_amount', '4815', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4822', 'Abschreibungen a.immat.Vermögensgeg', 'A', 'E', '', '4822', 17, NULL, NULL, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4824', 'Abschreibung a.d.Geschäft-o.Firmenw', 'A', 'E', '', '4824', 17, NULL, NULL, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4840', 'Außerplanmäßig Abschr.a.Sachanlagen', 'A', 'E', '', '4840', 17, NULL, NULL, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4855', 'Sofortabschreibung GWG', 'A', 'E', 'AP_amount', '4855', 17, NULL, NULL, NULL, 26, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4860', 'Abschreibungen auf aktivierte GWG', 'A', 'E', '', '4860', 17, NULL, NULL, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4900', 'Sonstige betriebliche Aufwendungen', 'A', 'E', 'AP_amount', '4900', 9, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4905', 'Sons.Aufw.betriebl. und regelmäßig', 'A', 'E', 'AP_amount', '4905', 9, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4909', 'Fremdleistungen', 'A', 'E', 'AP_amount', '4909', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4910', 'Porto', 'A', 'E', 'AP_amount', '4910', 0, NULL, 20, NULL, 23, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4920', 'Telefon', 'A', 'E', 'AP_amount', '4920', 9, NULL, 20, NULL, 23, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4925', 'Telefax', 'A', 'E', 'AP_amount', '4925', 9, NULL, 20, NULL, 23, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4930', 'Bürobedarf', 'A', 'E', 'AP_amount', '4930', 9, NULL, 20, NULL, 23, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4940', 'Zeitschriften, Bücher', 'A', 'E', 'AP_amount', '4940', 8, NULL, 20, NULL, 20, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4945', 'Fortbildungskosten', 'A', 'E', 'AP_amount', '4945', 9, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4946', 'Freiwillige Sozialleistungen', 'A', 'E', 'AP_amount', '4946', 0, NULL, NULL, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4950', 'Rechts- und Beratungskosten', 'A', 'E', 'AP_amount', '4950', 9, NULL, 20, NULL, 22, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4955', 'Buchführungskosten', 'A', 'E', 'AP_amount', '4955', 9, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4957', 'Abschluß- und Prüfungskosten', 'A', 'E', 'AP_amount', '4957', 9, NULL, 20, NULL, 22, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4960', 'Mieten für Einrichtungen', 'A', 'E', 'AP_amount', '4960', 9, NULL, 20, NULL, 21, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4969', 'Aufwend.f.Abraum-u.Abfallbeseitigung', 'A', 'E', 'AP_amount', '4969', 9, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4970', 'Nebenkosten des Geldverkehrs', 'A', 'E', '', '4970', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4980', 'Betriebsbedarf', 'A', 'E', 'AP_amount', '4980', 9, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4985', 'Werkzeuge und Kleingeräte', 'A', 'E', 'AP_amount', '4985', 9, NULL, NULL, NULL, 19, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8120', 'Steuerfreie Umsätze §4Nr.1a UstG', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8120', 0, 48, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8125', 'Steuerfrei innergem. Lieferungen §41bUStG', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8125', 0, 41, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8130', 'Liefe.d.1.Abnehm.bei innergem.Dreiecksg §25b2UStG', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8130', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8135', 'Steuerfr.innergem.Lief.v.Neufahrz.an Abn.o.USt-Ident-Nr.', 'A', 'I', 'AR_amount:IC_sale', '8135', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8150', 'Sonstige steuerfreie Umsätze §42-7UStG', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8150', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8200', 'Erlöse', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8200', 0, NULL, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8310', 'Erlöse Inland stpfl. EG-Lieferung7%', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8310', 12, 86, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8315', 'Erlös Inland stpfl.EG-Lieferung 16%', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8315', 13, 51, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8320', 'Erlöse aus im and.EG-Land steuerpfl.Lieferungen', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8320', 10, NULL, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8500', 'Provisionserlöse', 'A', 'I', 'AR_amount:IC_income', '8500', 3, 51, 5, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8506', 'Provisionserlöse 7% USt.', 'A', 'I', 'AR_amount:IC_income', '8506', 2, 86, NULL, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8508', 'Provisionserlöse 16% USt.', 'A', 'I', 'AR_amount:IC_income', '8508', 3, 51, NULL, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8520', 'Erlöse Abfallverwertung', 'A', 'I', 'AR_amount:IC_sale', '8520', 3, NULL, NULL, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8540', 'Erlös Leergut', 'A', 'I', 'AR_amount:IC_sale', '8540', 3, 51, 5, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8591', 'Sachbezüge 7% Ust (Waren)', 'A', 'I', 'AR_amount', '8591', 2, 86, 5, NULL, 2, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8595', 'Sachbezüge 16% Ust (Waren)', 'A', 'I', 'AR_amount', '8595', 3, 51, 5, NULL, 2, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8600', 'Sonstige Erlöse betriebl.u.regelmäß', 'A', 'I', 'AR_amount', '8600', 3, 51, 5, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8731', 'Gewährte Skonti 7% USt', 'A', 'E', 'AR_paid', '8731', 2, 86, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8735', 'Gewährte Skonti 16% USt.', 'A', 'E', 'AR_paid', '8735', 3, 51, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8750', 'Gewährte Boni 7% USt.', 'A', 'E', 'AR_paid', '8750', 2, 86, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8760', 'Gewährte Boni 16% USt.', 'A', 'E', 'AR_paid', '8760', 3, 51, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8780', 'Gewährte Rabatte 7% USt.', 'A', 'E', 'AR_paid', '8780', 2, 86, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8790', 'Gewährte Rabatte 16% Ust.', 'A', 'E', 'AR_paid', '8790', 3, 51, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8820', 'Erlöse aus Anlageverkäufen Sachanl.verm.b.Buchgewinn16%Ust', 'A', 'I', 'AR_amount', '8820', 3, 51, 5, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8829', 'Erl.a.Anlagenverk.bei Buchgewinn', 'A', 'I', 'AR_amount', '8829', 3, NULL, NULL, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8900', 'Unentgeldliche Wertabgaben', 'A', 'I', 'AR_amount', '8900', 0, NULL, NULL, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8905', 'Entnahme v. Gegenst.o.USt.', 'A', 'I', '', '8905', 0, NULL, 5, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8910', 'Entnahme des Untern.f.Zwecke ausserh.d.Untern 16%(Waren)', 'A', 'I', 'AR_amount', '8910', 3, 51, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8915', 'Entnah.d.Untern.f.Zwecke ausserh.d.Untern.7%USt', 'A', 'I', 'AR_amount', '8915', 2, 86, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8919', 'Entnahme durch den Untern.f.Zwecke außerhalb d.Untern.(Waren)o.USt', 'A', 'I', '', '8919', 0, NULL, 5, NULL, 3, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8924', 'Verwendung v.Gegenständen f.Zwecke außerhalb d.Untern.o.USt.', 'A', 'I', '', '8924', 0, NULL, NULL, NULL, 3, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8925', 'Unentgeldl.Erbring.sons.Leis.16%USt', 'A', 'I', 'AR_amount', '8925', 3, 51, NULL, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8930', 'Verwendung v.Gegenst.f.Zwecke außerhalb d.Unternehmens 7% USt.', 'A', 'I', 'AR_amount', '8930', 2, 86, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8935', 'Unentgeltl.Zuwend.v.Gegens. 16% Ust', 'A', 'I', 'AR_amount', '8935', 3, 51, NULL, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8950', 'Nicht steuerbare Umsätze', 'A', 'I', '', '8950', 0, NULL, 5, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8955', 'Umsatzsteuervergütungen', 'A', 'I', '', '8955', 0, NULL, NULL, NULL, 7, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('9000', 'Saldenverträge,Sachkonten', 'A', 'A', '', '9000', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('9008', 'Saldenverträge,Debitoren', 'A', 'A', '', '9008', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('9009', 'Saldenverträge,Kreditoren', 'A', 'L', '', '9009', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('9090', 'Summenvortragskonto', 'A', 'A', '', '9090', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8400', 'Erlöse 16% USt.', 'A', 'I', 'AR_amount:IC_sale:IC_income', '8400', 3, 51, 1, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8800', 'Erlöse aus Anlagenverkäufen', 'A', 'I', 'AR_amount', '8800', 3, 51, NULL, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4380', 'Beiträge', 'A', 'E', 'AP_amount', '4380', 0, NULL, NULL, NULL, 14, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4360', 'Versicherungen', 'A', 'E', 'AP_amount', '4360', 0, NULL, 13, NULL, 14, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4390', 'Sonstige Abgaben', 'A', 'E', 'AP_amount', '4390', 0, NULL, NULL, NULL, 14, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0631', 'Vblk.geg.Kreditinst.- Restlaufzeit b.1 Jahr', 'A', 'A', '', '0631', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0640', 'Vblk.geg.Kreditinst.- Restlaufzeit 1 bis 5 Jahre', 'A', 'A', '', '0640', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0650', 'Vblk.geg.Kreditinst.- Restlaufzeit grösser als 5 Jahre', 'A', 'A', '', '0650', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4510', 'Kfz-Steuer', 'A', 'E', 'AP_amount', '4510', 0, NULL, 19, NULL, 15, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4520', 'Kfz-Versicherungen', 'A', 'E', 'AP_amount', '4520', 0, NULL, 14, NULL, 16, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1771', 'Umsatzsteuer 7%', 'A', 'I', 'AR_tax:IC_taxpart:IC_taxservice:CT_tax', '1771', 0, NULL, NULL, NULL, 5, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1775', 'Umsatzsteuer 16%', 'A', 'I', 'AR_tax:IC_taxpart:IC_taxservice:CT_tax', '1775', 0, NULL, NULL, NULL, 6, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1767', 'Im anderen EG-Staat steuerpfl. Lieferung', 'A', ' ', '', '1767', 10, NULL, 0, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('0853', 'Satzungsm.Rücklagen 0% Vorbelast.(st.Einlagekto.)', 'A', 'Q', '', '0853', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1607', 'Vblk.a.LuL ohne Vorsteuer (EÜR)', 'A', 'L', 'AP', '1607', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1609', 'Gegenkonto 1605-1607 b.Aufteilung d.Vblk.n.Steuers.(EÜR)', 'A', 'L', '', '1609', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2125', 'Zinsaufwend.f.Gebäude,die z.Betriebsvermögen gehören', 'A', 'E', '', '2125', 0, NULL, NULL, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1445', 'Ford.a.LuL z.allg.USt-Satz o.eines Kleinuntern.(EÜR)', 'A', 'A', 'AR', '1445', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1446', 'Ford.aLuL z.erm.USt.-Satz (EÜR)', 'A', 'A', 'AR', '1446', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1447', 'Ford.a.steuerfr.od.nicht steuerb.LuL (EÜR)', 'A', 'A', 'AR', '1447', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1448', 'Ford.a.LuL n.Durchschnittss.gem.§24UStG(EÜR)', 'A', 'A', 'AR', '1448', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1449', 'Gegenkto. 1445-1448 bei Aufteil.d.Ford.n.Steuers.(EÜR)', 'A', 'A', '', '1449', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1605', 'Vblk.a.LuL z.allg.Umsatzsteuersatz (EÜR)', 'A', 'L', 'AP', '1605', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1606', 'Vblk.a.LuL zum erm.Umsatzsteuersatz (EÜR)', 'A', 'L', 'AP', '1606', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2212', 'Kapitalertragssteuer 20%', 'A', 'E', '', '2212', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2342', 'Einst.in SoPo m.Rücklageanteil (Existenzgründungsrücklage)', 'A', 'E', '', '2342', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2351', 'Gründstücksaufwend.f.Gebäude,die nicht z.Betriebsverm.gehören', 'A', 'E', '', '2351', 0, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2376', 'Grundsteuer f.Gebäude,die nicht z.Betriebsvermögen geh.', 'A', 'E', '', '2376', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2733', 'Erträge a.d.Auflösung v.SoPo m.Rücklageant.(Exitenzgründungszusch.)', 'A', 'I', '', '2733', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2746', 'Steuerfr.Erträge a.d.Auflös.v.SoPo m.Rücklageanteil', 'A', 'I', '', '2746', 0, NULL, NULL, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2747', 'Sonst.steuerfreie Betriebseinnahmen', 'A', 'I', '', '2747', 0, NULL, NULL, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2797', 'Entnahmen a.satzungsmäßigen Rücklagen', 'A', 'E', '', '2797', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3559', 'Steuerfreie Einfuhren', 'A', 'E', '', '3559', 0, NULL, NULL, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3580', 'Wareneinkauf z.allg.Umsatzsteuersatz (EÜR)', 'A', 'E', '', '3580', 0, 0, 4, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3581', 'Wareneinkauf z.erm.Umsatzsteuersatz(EÜR)', 'A', 'E', '', '3581', 0, 0, 4, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3582', 'Wareneinkauf ohne Vorsteuerabzug(EÜR)', 'A', 'E', '', '3582', 0, 0, 4, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3589', 'Gegenkto.3580-3582 b.Aufteilung d.WE n.Steuersätzen(EüR)', 'A', 'E', '', '3589', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4261', 'Instandhlt.betriebl.Räume in Geb.die nicht z.BV gehören', 'A', 'E', '', '4261', 0, NULL, NULL, NULL, 11, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4271', 'Abgaben f.betriebl.genutzten Grundbesitz,d.nicht z.BV gehört', 'A', 'E', '', '4271', 0, NULL, NULL, NULL, 11, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4288', 'Aufwend.f.ein häusliches Arbeitszimmer(abziehb.Anteil)', 'A', 'E', '', '4288', 0, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4289', 'Aufwend.f.ein häusliches Arbeitszimmer(nicht abziehb.Anteil)', 'A', 'E', '', '4289', 0, 0, 11, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4361', 'Versicherungen f.Gebäude,die zum BV gehören', 'A', 'E', '', '4361', 0, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4505', 'Fahrzeugkosten f.Kfz,die nicht zum BV gehören', 'A', 'E', '', '4505', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4515', 'Kfz-Steuer f.Kfz,die nicht zum BV gehören', 'A', 'E', '', '4515', 0, NULL, NULL, NULL, 15, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4525', 'Kfz-Versicherung f.Kfz,die nicht zum BV gehören', 'A', 'E', '', '4525', 0, NULL, NULL, NULL, 16, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4535', 'Lfd.Kfz-Betriebskosten f.Kfz,die nicht zum BV gehören', 'A', 'E', '', '4535', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4545', 'Kfz-Rep.für Kfz,die nicht zum BV gehören', 'A', 'E', '', '4545', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4555', 'Garagenmiete f.Kfz,die nicht zum BV gehören', 'A', 'E', '', '4555', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4560', 'Mautgebühren', 'A', 'E', '', '4560', 0, 0, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4565', 'Mautgebühren f. Kfz,die nicht zum BV gehören', 'A', 'E', '', '4565', 0, NULL, NULL, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4651', 'Sonst.eingeschr.abziehb.Betriebsausgaben (abziehb.Anteil)', 'A', 'E', '', '4651', 0, NULL, 20, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4652', 'Sonst.eingeschr.abziehb.Betriebsausgaben(nicht abziehb.Teil)', 'A', 'E', '', '4652', 0, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4678', 'Kilometergelderstatt.(Wohn.-Arbeitsst.abziehb.Teil)', 'A', 'E', '', '4678', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4679', 'Fahrten zw.Wohn.und Arbeitsstätte (nicht abziehb.Teil)', 'A', 'E', '', '4679', 0, NULL, NULL, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4680', 'Fahrten zw.Wohn.-und Arbeitsstätte (Haben)', 'A', 'E', '', '4680', 0, NULL, NULL, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4831', 'Abschreibung auf Gebäude', 'A', 'E', '', '4831', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4830', 'Abschreibungen auf Sachanlagen (o.Kfz u.Geb.)', 'A', 'E', '', '4830', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4832', 'Abschreibungen auf Kfz', 'A', 'E', '', '4832', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4841', 'Absetzung f.außergew.techn.u.wirtschaftl.AfA bei Gebäuden', 'A', 'E', '', '4841', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4842', 'Absetzung f.außergew.techn.u.wirtschaftl.AfA des Kfz', 'A', 'E', '', '4842', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4843', 'Absetzung f.außergew.techn.u.wirtschaftl.AfA sonst.WG', 'A', 'E', '', '4843', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4851', 'Sonderabschreibung nach §7g(1)u.(2)EStG (ohne Kfz)', 'A', 'E', '', '4851', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4852', 'Sonderabschreibung n.§7g(1)u.(2)EStG (für Kfz)', 'A', 'E', '', '4852', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4965', 'Mietleasing', 'A', 'E', '', '4965', 9, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4966', 'Gewerbest.zu berücksicht.Mietleasing §8 GewStG', 'A', 'E', '', '4966', 0, NULL, NULL, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8580', 'Erlöse zum allg.Umsatzsteuersatz (EÜR)', 'A', 'I', '', '8580', 0, 0, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8581', 'Erlöse zum ermä.Umsatzsteuersatz (EÜR)', 'A', 'I', '', '8581', 0, 0, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8582', 'Erlöse steuerfrei u.nicht steuerbar (EÜR)', 'A', 'I', '', '8582', 0, 0, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8589', 'Gegenkonto 8580-8582 b.Aufteilung d.Erlöse n.Steuersätzen(EÜR)', 'A', 'C', '', '8589', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8827', 'Erlöse a.Verk.Sachanlagen steuerfr.§4Nr.1aUStG(bei Buchgewinn)', 'A', 'I', '', '8827', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8828', 'Erlöse a.Verk.Sachanlagen steuerfr.§4Nr.1bUStG(b.Buchgewinn)', 'A', 'I', '', '8828', 0, NULL, NULL, NULL, 2, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8921', 'Verwend.v.Gegenst.f.Zwecke außerh.d.Untern.16%USt(Kfz-Nutzung)', 'A', 'I', '', '8921', 0, 0, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8922', 'Verwend.f.Gegenst.f.Zwecke außerh.d.Untern.16%USt(Telefonnutzung)', 'A', 'I', '', '8922', 0, 0, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1000', 'Kasse', 'A', 'A', 'AR_paid:AP_paid', '1000', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1572', 'Steuerpflicht. EG-Erwerb 7%', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice', '1572', 0, 61, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1571', 'Abziebare Vorsteuer 7%', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax', '1570', 0, 66, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1573', 'Steuerpflicht. EG-Erwerb 16%', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice', '1573', 0, 61, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1575', 'Abziehbare Vorsteuer 16%', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax', '1570', 0, 66, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1772', 'Steuerpflicht. EG-Lieferungen 7%', 'A', 'I', 'AR_tax:IC_taxpart:IC_taxservice', '1772', 0, NULL, NULL, NULL, 6, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1773', 'Steuerpflicht. EG-Lieferungen 16%', 'A', 'I', 'AR_tax:IC_taxpart:IC_taxservice', '1773', 0, NULL, NULL, NULL, 28, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2501', 'Ausserordentliche Erträge finanzwirksam', 'A', 'I', '', '2501', 0, NULL, NULL, NULL, 5, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2505', 'Ausserordentliche Erträge nicht finanzwirksam', 'A', 'I', '', '2505', 0, NULL, NULL, NULL, 5, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4130', 'Gesetzlich soziale Aufwendungen', 'A', 'E', '', '4130', 0, 0, 10, NULL, 10, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4630', 'Geschenke bis 35 EUR abzugsfähig', 'A', 'E', 'AP_amount', '4630', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4635', 'Geschenke über 35EUR nicht abzugsf.', 'A', 'E', 'AP_amount', '4635', 0, NULL, 15, NULL, 18, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4655', 'Nicht abzugsf.Betriebsausg.a.Werbe-Repräsentatisonk.etc.', 'A', 'E', 'AP_amount', '4655', 9, NULL, 15, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4805', 'Rep.u.Instandhalt.v.and.Anlagen u.Betriebs-u.Geschäftsausst.', 'A', 'E', 'AP_amount', '4805', 9, NULL, 18, NULL, 19, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8190', 'Erlöse,die mit den Durchschnittssätzen d.§24UStG vers.werd.', 'A', 'I', 'AR_amount', '8190', NULL, NULL, NULL, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8195', 'Erlöse als Kleinunternehmer i.S.d.§19(1)UStG', 'A', 'I', 'AR_amount', '8195', NULL, NULL, 1, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8807', 'Erlöse a.Verk.Sachanlagen steuerfrei§4Nr.1aUStG(b.Buchverlust)', 'A', 'E', '', '8807', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8808', 'Erlöse a.Verk.Sachanlagen steuerfrei§4Nr.1bUStG(b.Buchverlust)', 'A', 'E', '', '8808', 0, NULL, NULL, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8809', 'Erlöse aus Verk.Sachanlagevermögen16% USt (bei Buchverlust)', 'A', 'E', '', '8809', 0, NULL, NULL, NULL, 2, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8801', 'Erlöse aus Anlagenverkäufen Sachanl.verm.b.Buchverl.16%USt.', 'A', 'E', '', '8801', 3, 51, 5, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8960', 'Bestandsveränderung unf.Erz.', 'A', 'E', '', '8960', 0, 0, 2, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8970', 'Bestandsveränd.unf.Leist.', 'A', 'E', '', '8970', 0, 0, 2, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8980', 'Bestandsveränd.fert..Leist.', 'A', 'E', '', '8980', 0, 0, 2, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8990', 'And.aktiv.Eigenleistungen', 'A', 'E', '', '8990', 0, 0, 3, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3090', 'Energiestoffe (Fert.).', 'A', 'E', 'IC', '3090', 9, 0, 4, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4595', 'Fremdfahrzeuge', 'A', 'E', 'AP_amount', '4570', 0, NULL, 14, NULL, 17, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1450', 'Ford.a.LuL n.Durchschnittss.gem.§24UStG(EÜR)', 'A', 'A', 'AR', '1448', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1577', 'Abzieb.Vorst.n.allg.Durchschnittss.UStVA Kz.63', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax', '1577', 0, NULL, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1578', 'Abzieb.Vorst.n.§13b', 'A', 'E', 'AP_tax:IC_taxpart:IC_taxservice:CT_tax', '1578', 0, NULL, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1580', 'Gegenkonto Vorsteuer §4/3 EStG', 'A', 'A', '', '1580', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1581', 'Auflösung Vorst.a.Vorjahr §4/3 EStG', 'A', 'A', '', '1581', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1582', 'Vorst.aus Investitionen §4/3 EStG', 'A', 'E', '', '1582', 0, NULL, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1584', 'abziehb.VorSt IG Erwerb Neufzg.b.Lief. o. USt.Ident.Nr', 'A', 'E', 'AR_tax', '1584', 0, NULL, NULL, NULL, 27, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1588', 'Bezahlte Einfuhrumsatzsteuer', 'A', 'E', '', '1588', 0, 62, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1592', 'Fremdgeld', 'A', 'A', '', '1592', 0, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3100', 'Fremdleistungen', 'A', 'E', 'AP_amount', '3100', 9, NULL, 5, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3110', 'Leist.v.ausländ.Untern. 7% VSt.u.7%USt.', 'A', 'E', 'AP_amount', '3110', 8, NULL, 5, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3120', 'Leist.v.ausländ.Untern. 16% VSt.u.16%USt.', 'A', 'E', 'AP_amount', '3120', 9, NULL, 5, NULL, 8, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3600', 'Nicht abziehbare Vorsteuer', 'A', 'E', '', '3600', 0, NULL, 5, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3610', 'Nicht abziehb.Vorsteuer 7%', 'A', 'E', '', '3610', 0, NULL, 5, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('3650', 'Nicht abziehb.Vorsteuer 16%', 'A', 'E', '', '3650', 0, NULL, 5, NULL, 8, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2739', 'Erträge Aufl. Sopo m.R.(Ansparafa)', 'A', 'I', '', '2739', 0, NULL, 5, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8590', 'Verrechnete sons. Sachbezüge keine Waren', 'A', 'I', 'AR_amount', '8590', 0, 0, 5, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8920', 'Verw.v.Gegens.f.Zwecke ausserh.d.Untern.16%USt.', 'A', 'I', '', '8920', 3, 51, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8939', 'Unentgeldl.Zuw.v.Gegens.ohne Ust', 'A', 'I', '', '8939', 0, NULL, 5, NULL, 3, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8940', 'Unentgeltl.Zuw.v Waren 16% Ust', 'A', 'I', '', '8940', 3, 51, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8945', 'Unentgeltl.Zuw.von Waren 7% Ust', 'A', 'I', '', '8945', 2, 86, 5, NULL, 3, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8949', 'Unentgeltl.Zuwendung v.Waren o.USt.', 'A', 'I', '', '8949', 0, NULL, 5, NULL, 3, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4126', 'Tantiemen', 'A', 'E', '', '4126', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4127', 'Geschäftsführergehälter', 'A', 'E', '', '4127', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4167', 'Pauschale Lohnsteuer auf sonst.Bezüge(z.B.Direktversicherung', 'A', 'E', '', '4167', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4170', 'Vermögenswirksame Leistungen', 'A', 'E', '', '4170', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4180', 'Bedienungsgelder', 'A', 'E', '', '4180', 0, NULL, 10, NULL, 9, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4826', 'Außerplan.AfA a.immat.Vermögensgeg.', 'A', 'E', '', '4826', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4850', 'Abschr.a.Sachanl.aufgr.steuerl.Sondervorschriften', 'A', 'E', '', '4850', 0, NULL, 17, NULL, 25, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4870', 'Abschreibungen auf Finanzanlagen', 'A', 'E', '', '4870', NULL, NULL, NULL, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4875', 'Abschr.a.Wertp.d.Umlaufvermögens', 'A', 'E', '', '4875', 0, NULL, 17, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4880', 'Abschreibungen auf Umlaufverm. o.Wertpapiere (soweit unübl.Höhe', 'A', 'E', '', '4880', 0, NULL, 17, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2208', 'Solidaritätszuschlag', 'A', 'E', '', '2208', 0, NULL, 35, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2209', 'Solidaritätszuschlag für Vorjahr', 'A', 'E', '', '2209', 0, NULL, 19, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2375', 'Grundsteuer', 'A', 'E', '', '2375', 0, NULL, 19, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2400', 'Forderungsverlust-übliche Höhe', 'A', 'E', '', '2400', 0, NULL, 20, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2401', 'Forderungsverluste 7% USt.(übliche Höhe', 'A', 'E', '', '2401', 2, 86, 20, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2405', 'Forderungsverluste 16% USt.(übliche Höhe', 'A', 'E', '', '2405', 3, 51, 20, NULL, NULL, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2341', 'Einstellungen in SoPo m.Rücklageanteil (Ansparabschreibung', 'A', 'E', '', '2341', 0, NULL, 20, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2100', 'Zinsen und ähnl.Aufwendungen', 'A', 'E', '', '2100', 0, NULL, 30, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2107', 'Zinsaufwendung-betriebliche Steuern §223aAO', 'A', 'E', '', '2107', 0, NULL, 30, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2140', 'Zinsähnliche Aufwendungen', 'A', 'E', '', '2140', 0, NULL, 30, NULL, 29, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2000', 'Außerordentliche Aufwendung', 'A', 'E', '', '2000', 0, NULL, 31, NULL, 30, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2010', 'Betriebsfremde Aufwendungen soweit n.außerord.', 'A', 'E', '', '2010', 0, NULL, 31, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2020', 'Periodenfremde Aufwend.(soweit n.außerordentlich', 'A', 'E', '', '2020', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2150', 'Aufwendungen aus Kursdifferenzen', 'A', 'E', '', '2150', 0, NULL, 31, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2170', 'Nicht abziehbare Vorsteuer', 'A', 'E', '', '2170', 0, NULL, 31, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2171', 'Nicht abziehbare Vorsteuer 7%', 'A', 'E', '', '2171', 0, NULL, 31, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2175', 'Nicht abziehbare Vorsteuer 16%', 'A', 'E', '', '2175', 0, NULL, 31, NULL, 24, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2280', 'Stnachzahl.Vorj.v.Einkomm u.Ertrag', 'A', 'E', '', '2280', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2285', 'Steuernachzahlung Vorj.f.sons.Steue', 'A', 'E', '', '2285', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2289', 'Erträge a.d.Aufl.v. Rück.f.sons.Ste', 'A', 'E', '', '2289', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2350', 'Grundstücksaufwendungen', 'A', 'E', '', '2350', 9, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2380', 'Zuwend.,Spenden,steuerlich n.abziehbar', 'A', 'E', '', '2380', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2450', 'Einstell.i.d.Pauschalwertbe.z.Forde', 'A', 'E', '', '2450', 0, NULL, 31, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2657', 'Zinserträge-betriebliche Steuern', 'A', 'I', '', '2657', 0, NULL, 32, NULL, 4, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2670', 'Diskonterträge', 'A', 'I', '', '2670', 0, NULL, 32, NULL, 4, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2680', 'Zinsähnliche Erträge', 'A', 'I', '', '2680', 0, NULL, 32, NULL, 4, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8650', 'Erlöse Zinsen und Diskotspesen', 'A', 'I', '', '8650', 0, NULL, 32, NULL, 4, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8700', 'Erlösschmälerungen', 'A', 'I', '', '8700', 0, NULL, 32, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8710', 'Erlösschmälerung 7% USt.', 'A', 'I', '', '8710', 2, 86, 32, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8720', 'Erlösschmälerung 16% USt.', 'A', 'I', '', '8720', 3, 51, 32, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8725', 'Erlösschmä.Inl.stpfl.EG-Lief. 7%USt', 'A', 'I', '', '8725', 12, 86, 32, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8726', 'Erlösschmä.Inl.stpfl.EG-Lief.16%USt', 'A', 'I', '', '8726', 13, 51, 32, NULL, 1, TRUE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('8727', 'Erlösschmä.and.EG Land stpfl.Liefer', 'A', 'I', '', '8727', 0, NULL, 32, NULL, 1, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2500', 'Außerordentliche Erträge', 'A', 'I', '', '2500', 0, NULL, 33, NULL, 5, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2510', 'Betriebsfremde Erträge nichtaußerorden', 'A', 'I', '', '2510', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2520', 'Periodenfremde Erträge nicht außero', 'A', 'I', '', '2520', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2600', 'Erträge aus Beteiligungen', 'A', 'I', '', '2600', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2660', 'Erträge aus Kursdifferenzen', 'A', 'I', '', '2660', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2700', 'Sonstige Erträge', 'A', 'I', '', '2700', 3, 51, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2710', 'Ertrag a.d.Zuschreib.d.Anlagevermög', 'A', 'I', '', '2710', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2715', 'Ertr.a.Zuschreib.d.Umlaufvermögens', 'A', 'I', '', '2715', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2725', 'Ertr.a.d.Abg.v.Gegenst.d.Umlaufverm', 'A', 'I', '', '2725', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2730', 'Ertr.a.Herabsetzung d.PWB zu Forderungen', 'A', 'I', '', '2730', 0, NULL, 33, NULL, 2, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2732', 'Ertr. aus abgeschriebenen Forderung', 'A', 'I', '', '2732', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2735', 'Ertr.a.d.Auflösung v.Rückstellungen', 'A', 'I', '', '2735', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2743', 'Investitionszuschüsse-steuerpflicht', 'A', 'I', '', '2743', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2744', 'Investitionszulage-steuerfrei', 'A', 'I', '', '2744', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2750', 'Grundstückserträge', 'A', 'I', '', '2750', 3, 51, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2284', 'Ertr.a.d.Aufl.v.Rücks.f.St.v.Ein.Er', 'A', 'I', '', '2284', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2287', 'Steuererstattung Vorj.f.sons.Steuer', 'A', 'I', '', '2287', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2282', 'Sterstat.Vorj.Steuer v.Eink.u.Ertrag', 'A', 'I', '', '2282', 0, NULL, 33, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('1785', 'Umsatzsteuer n.§13b UStG', 'A', 'I', '', '1785', 0, NULL, 33, NULL, 7, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4990', 'Kalkulatorischer Unternehmerlohn', 'A', 'E', '', '4990', 0, NULL, 34, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4992', 'Kalkulatorische Zinsen', 'A', 'E', '', '4992', 0, NULL, 34, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4993', 'Kalkulatorische Aschreibungen', 'A', 'E', '', '4993', 0, NULL, 34, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4994', 'Kalkulatorische Wagnisse', 'A', 'E', '', '4994', 0, NULL, 34, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('4995', 'Kalkulatorischer Lohn f.unentgeltl.Mitarbeiter', 'A', 'E', '', '4995', 0, NULL, 34, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2200', 'Körperschaftssteuer', 'A', 'E', '', '2200', 0, NULL, 35, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2214', 'Anrechenb.Soli auf Kapitalertragssteuer 20%', 'A', 'E', '', '2214', 0, NULL, 35, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2215', 'Zinsabschlagsteuer', 'A', 'E', '', '2215', 0, NULL, 35, NULL, NULL, FALSE);
+INSERT INTO chart (accno, description, charttype, category, link, gifi_accno, taxkey_id, pos_ustva, pos_bwa, pos_bilanz, pos_eur, datevautomatik) VALUES ('2218', 'Anrechb.Solidari.zuschlag a.Zinsabschlagst.', 'A', 'E', '', '2218', 0, NULL, 35, NULL, NULL, FALSE);
+
+INSERT INTO tax (rate, taxkey, taxdescription) values ('0','0','Keine Steuer');
+INSERT INTO tax (rate, taxkey, taxdescription) values ('0','1','Umsatzsteuerfrei');
+insert into tax VALUES ((select id from chart where accno = '1771'),'0.07','1771','2','Umsatzsteuer 7%');
+INSERT INTO tax VALUES ((select id from chart where accno = '1775'),'0.16','1775','3','Umsatzsteuer 16%');
+INSERT INTO tax VALUES ((select id from chart where accno = '1571'),'0.07','1571','8','Vorsteuer 7%');
+insert into tax VALUES ((select id from chart where accno = '1575'),'0.16','1575','9','Vorsteuer 16%');
+insert into tax (taxkey, taxdescription) values ('10','Im anderen EG-Staat steuerpfl. Lieferung');
+insert into tax (taxkey, taxdescription) values ('11','Steuerfreie EG-Lief. an Abn. mit UStIdNr');
+insert into tax (chart_id,rate,taxnumber, taxkey, taxdescription) values ((select id from chart where accno = '1772'),'0.07','1772','12','Steuerpflicht. EG-Lieferungen 7%');
+insert into tax (chart_id,rate,taxnumber, taxkey, taxdescription) values ((select id from chart where accno = '1772'),'0.16','1773','13','Steuerpflicht. EG-Lieferungen 16%');
+insert into tax (chart_id,rate,taxnumber, taxkey, taxdescription) values ((select id from chart where accno = '1572'),'0.07','1572','18','Steuerpflicht. EG-Erwerb 7%');
+insert into tax (chart_id,rate,taxnumber, taxkey, taxdescription) values ((select id from chart where accno = '1572'),'0.16','1573','19','Steuerpflicht. EG-Erwerb 16%');
\ No newline at end of file
--- /dev/null
+-- DATEV SKR03
+-- Office-Service http://www.officeservice-einberger.de
+--
+INSERT INTO gifi (accno,description) VALUES ('0001', 'Aufwand Geschäftsbetrieb');
+INSERT INTO gifi (accno,description) VALUES ('0002', 'Aufwendungen Umstellung a.d.Euro');
+INSERT INTO gifi (accno,description) VALUES ('0010', 'Konzession,gewerb.Schutzre.u.Werten');
+INSERT INTO gifi (accno,description) VALUES ('0015', 'Konzessionen');
+INSERT INTO gifi (accno,description) VALUES ('0020', 'Gewerbl.Schutzrechte');
+INSERT INTO gifi (accno,description) VALUES ('0025', 'Ähnl.Rechte und Werte');
+INSERT INTO gifi (accno,description) VALUES ('0027', 'EDV-Software');
+INSERT INTO gifi (accno,description) VALUES ('0030', 'Liz.a.gewerbl.Schutzre.u.ähnl.Re.u.Wert.');
+INSERT INTO gifi (accno,description) VALUES ('0035', 'Geschäfts-oder Firmenwert');
+INSERT INTO gifi (accno,description) VALUES ('0038', 'Anzahlungen a.Geschäft-o.Firmenwert');
+INSERT INTO gifi (accno,description) VALUES ('0039', 'Anz.a.immaterielle Vermögsgegenstän');
+INSERT INTO gifi (accno,description) VALUES ('0040', 'Verschmelzungsmehrwert');
+INSERT INTO gifi (accno,description) VALUES ('0050', 'Grundstücke,grundstücksgl.Rechte..');
+INSERT INTO gifi (accno,description) VALUES ('0060', 'Grundstücke u.grundstgl.Rech.o.Baut');
+INSERT INTO gifi (accno,description) VALUES ('0065', 'Unbebaute Grundstücke');
+INSERT INTO gifi (accno,description) VALUES ('0070', 'Grundstücksgl.Re.(Erbau-,Dauerwohnre.)');
+INSERT INTO gifi (accno,description) VALUES ('0075', 'Grundstücke m.Substanzverzehr');
+INSERT INTO gifi (accno,description) VALUES ('0079', 'Anz.a.Grundst.u.grundstücksgl.Re.ohne Bauten');
+INSERT INTO gifi (accno,description) VALUES ('0080', 'Bauten a.eig. Grundstücken,Grgl.Rec');
+INSERT INTO gifi (accno,description) VALUES ('0085', 'Grundstückswert eige.bebau.Grundst.');
+INSERT INTO gifi (accno,description) VALUES ('0090', 'Geschäftsbauten');
+INSERT INTO gifi (accno,description) VALUES ('0100', 'Fabrikbauten');
+INSERT INTO gifi (accno,description) VALUES ('0110', 'Garagen');
+INSERT INTO gifi (accno,description) VALUES ('0111', 'Außenanlagen');
+INSERT INTO gifi (accno,description) VALUES ('0112', 'Hof-und Wegebefestigung');
+INSERT INTO gifi (accno,description) VALUES ('0113', 'Einr.f.Geschäfts-u.Fabrikbauten');
+INSERT INTO gifi (accno,description) VALUES ('0115', 'Andere Bauten');
+INSERT INTO gifi (accno,description) VALUES ('0120', 'Geschäfts-,Fabrik-,andere Bau.imBau');
+INSERT INTO gifi (accno,description) VALUES ('0129', 'Anz.Geschäfts-,Fabrik u. and.Bauten');
+INSERT INTO gifi (accno,description) VALUES ('0140', 'Wohnbauten');
+INSERT INTO gifi (accno,description) VALUES ('0145', 'Garagen');
+INSERT INTO gifi (accno,description) VALUES ('0146', 'Aussenanlagen');
+INSERT INTO gifi (accno,description) VALUES ('0147', 'Hof-u.Wegebefestigungen');
+INSERT INTO gifi (accno,description) VALUES ('0148', 'Einr.f.Wohnbauten');
+INSERT INTO gifi (accno,description) VALUES ('0150', 'Wohnbauten im Bau');
+INSERT INTO gifi (accno,description) VALUES ('0159', 'Anz.a.Wohnb.a.eig.Grundst.u.grundstgl.Re.');
+INSERT INTO gifi (accno,description) VALUES ('0160', 'Bauten auf fremden Grundstücken');
+INSERT INTO gifi (accno,description) VALUES ('0165', 'Geschäftsbauten');
+INSERT INTO gifi (accno,description) VALUES ('0170', 'Fabrikbauten');
+INSERT INTO gifi (accno,description) VALUES ('0175', 'Garagen');
+INSERT INTO gifi (accno,description) VALUES ('0176', 'Außenanlage');
+INSERT INTO gifi (accno,description) VALUES ('0177', 'Hof-u.Wegebefestigungen');
+INSERT INTO gifi (accno,description) VALUES ('0178', 'Einr.f.Geschäfts-u.Fabrikbauten');
+INSERT INTO gifi (accno,description) VALUES ('0179', 'Andere Bauten');
+INSERT INTO gifi (accno,description) VALUES ('0180', 'Geschäfts,-Farbik-u.and.Bauten i.Bau');
+INSERT INTO gifi (accno,description) VALUES ('0189', 'Anz.a.Geschäfts-,Fabr.-u.and.Bauten a.fremd.Grundst.');
+INSERT INTO gifi (accno,description) VALUES ('0190', 'Wohnbauten');
+INSERT INTO gifi (accno,description) VALUES ('0191', 'Garagen');
+INSERT INTO gifi (accno,description) VALUES ('0192', 'Aussenanlagen');
+INSERT INTO gifi (accno,description) VALUES ('0193', 'Hof-u.Wegebefestigung');
+INSERT INTO gifi (accno,description) VALUES ('0194', 'Einr.für Wohnbauten');
+INSERT INTO gifi (accno,description) VALUES ('0195', 'Wohnbauten i.Bau');
+INSERT INTO gifi (accno,description) VALUES ('0199', 'Anz.a.Wohnb.a.fremd.Grundst.');
+INSERT INTO gifi (accno,description) VALUES ('0200', 'Techn.Anlagen und Maschinen');
+INSERT INTO gifi (accno,description) VALUES ('0210', 'Maschinen');
+INSERT INTO gifi (accno,description) VALUES ('0220', 'Maschinengebundene Werkzeuge');
+INSERT INTO gifi (accno,description) VALUES ('0240', 'Maschinelle Anlagen');
+INSERT INTO gifi (accno,description) VALUES ('0260', 'Transportanlagen u.ähnl.');
+INSERT INTO gifi (accno,description) VALUES ('0280', 'Betriebsvorrichtung');
+INSERT INTO gifi (accno,description) VALUES ('0290', 'Techn.Anlagen u.Maschinen im Bau');
+INSERT INTO gifi (accno,description) VALUES ('0299', 'Anz.a.techn.Anlagen und Maschinen');
+INSERT INTO gifi (accno,description) VALUES ('0300', 'Andere Anlagen,Betrieb-Geschäftsaus');
+INSERT INTO gifi (accno,description) VALUES ('0310', 'Andere Anlagen');
+INSERT INTO gifi (accno,description) VALUES ('0320', 'PKW');
+INSERT INTO gifi (accno,description) VALUES ('0350', 'LKW');
+INSERT INTO gifi (accno,description) VALUES ('0380', 'Sonst.Transportmittel');
+INSERT INTO gifi (accno,description) VALUES ('0400', 'Betriebsausstattung');
+INSERT INTO gifi (accno,description) VALUES ('0410', 'Geschäftsausstattung');
+INSERT INTO gifi (accno,description) VALUES ('0420', 'Büroeinrichtung');
+INSERT INTO gifi (accno,description) VALUES ('0430', 'Ladeneinrichtung');
+INSERT INTO gifi (accno,description) VALUES ('0440', 'Werkzeuge');
+INSERT INTO gifi (accno,description) VALUES ('0450', 'Einbauten');
+INSERT INTO gifi (accno,description) VALUES ('0460', 'Gerüst-u.Schalungsmaterial');
+INSERT INTO gifi (accno,description) VALUES ('0480', 'Geringwertige Wirtschaftsg.b.800DM');
+INSERT INTO gifi (accno,description) VALUES ('0490', 'Sons.Betriebs- Geschäftsausstattung');
+INSERT INTO gifi (accno,description) VALUES ('0498', 'And. Anlagen,Betrieb/Geschäf.im Bau');
+INSERT INTO gifi (accno,description) VALUES ('0499', 'Anz.and.Anlagen,Betrieb.Geschäftsau');
+INSERT INTO gifi (accno,description) VALUES ('0500', 'Anteile a.verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('0504', 'Ant.a.herr.o.m.Mehrh.bet.Ges.schaft');
+INSERT INTO gifi (accno,description) VALUES ('0505', 'Ausleihung an verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('0510', 'Beteiligungen');
+INSERT INTO gifi (accno,description) VALUES ('0513', 'Typisch stille Beteiligungen');
+INSERT INTO gifi (accno,description) VALUES ('0516', 'Atypische stille Beteiligungen');
+INSERT INTO gifi (accno,description) VALUES ('0517', 'And.Beteilig.an Kapitalgesellsch.');
+INSERT INTO gifi (accno,description) VALUES ('0518', 'And.Beteilig.an Personengesellsch.');
+INSERT INTO gifi (accno,description) VALUES ('0519', 'Beteilig.einer GmbH&Co.KGa.ein.Kompl.GmbH');
+INSERT INTO gifi (accno,description) VALUES ('0520', 'Ausl.a.Untern.m.Beteiligungsverhält');
+INSERT INTO gifi (accno,description) VALUES ('0525', 'Wertpapiere des Anlagevermögens');
+INSERT INTO gifi (accno,description) VALUES ('0530', 'Wertpap.m.Gewinnbeteiligungsanspr.');
+INSERT INTO gifi (accno,description) VALUES ('0535', 'Festverzinsliche Wertpapiere');
+INSERT INTO gifi (accno,description) VALUES ('0540', 'Sonstige Ausleihungen');
+INSERT INTO gifi (accno,description) VALUES ('0550', 'Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('0570', 'Genossenschaftsant.z.langfr.Verbleib');
+INSERT INTO gifi (accno,description) VALUES ('0580', 'Ausleihungen an Gesellschafter');
+INSERT INTO gifi (accno,description) VALUES ('0590', 'Ausleihungen an nahe stehende Personen');
+INSERT INTO gifi (accno,description) VALUES ('0595', 'Rückdeckansp.Lebensvers.langf.Verbl');
+INSERT INTO gifi (accno,description) VALUES ('0600', 'Anleihen-nicht konvertibel');
+INSERT INTO gifi (accno,description) VALUES ('0601', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0605', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0610', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0615', 'Anleihen konvertibel');
+INSERT INTO gifi (accno,description) VALUES ('0616', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0620', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0625', '- Restlaufzeit gösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0630', 'Verbindl.gegenüber Kreditinstituten');
+INSERT INTO gifi (accno,description) VALUES ('0631', '- Restlaufzeit b.1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0640', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0650', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0660', 'Vblk.geg.Kreditinst.aus TZ-Verträgen');
+INSERT INTO gifi (accno,description) VALUES ('0661', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0670', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0680', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0690', '(fr.i.Bilanz k.Restlaufzeitvermerk');
+INSERT INTO gifi (accno,description) VALUES ('0699', 'Gegenkonto 630-689 b.Auft.d.Konten 690-698');
+INSERT INTO gifi (accno,description) VALUES ('0700', 'Verbind.gegenüber verb.Unternehmern');
+INSERT INTO gifi (accno,description) VALUES ('0701', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0705', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0710', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0715', 'Vblk.geg.Untern.m.denen ein Beteiligungsverh.best.');
+INSERT INTO gifi (accno,description) VALUES ('0716', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0720', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0725', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0730', 'Vblk.geg.Gesellschaftern');
+INSERT INTO gifi (accno,description) VALUES ('0731', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0740', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0750', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0755', 'Vblk.geg.Gesellsch.f.offene Ausschüttungen');
+INSERT INTO gifi (accno,description) VALUES ('0760', 'Darl.typ.stiller Gesellschafter');
+INSERT INTO gifi (accno,description) VALUES ('0761', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0764', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0767', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0770', 'Darlehen atyp.stiller Gesellsch.');
+INSERT INTO gifi (accno,description) VALUES ('0771', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0774', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0777', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0780', 'Partiarische Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('0781', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0784', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0787', '- Restlaufzeit über 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('0790', 'fr.in Bilanz k.Restlaufzeitvermerk');
+INSERT INTO gifi (accno,description) VALUES ('0799', 'Gegenk.730-789 b.Auft.d.Konten 790-798');
+INSERT INTO gifi (accno,description) VALUES ('0800', 'Gezeichnetes Kapital');
+INSERT INTO gifi (accno,description) VALUES ('0801', 'Ausst.Einl.a.gez.Kapital n.eingef.(Aktivausw.)');
+INSERT INTO gifi (accno,description) VALUES ('0810', '');
+INSERT INTO gifi (accno,description) VALUES ('0840', 'Kapitalrücklage');
+INSERT INTO gifi (accno,description) VALUES ('0846', 'Gesetzliche Rücklage');
+INSERT INTO gifi (accno,description) VALUES ('0850', 'Rücklage für eigene Anteile');
+INSERT INTO gifi (accno,description) VALUES ('0851', 'Satzungsmäßige Rücklagen');
+INSERT INTO gifi (accno,description) VALUES ('0860', 'Gewinnvortrag vor Verwendung');
+INSERT INTO gifi (accno,description) VALUES ('0868', 'Verlustvortrag vor Verwendung');
+INSERT INTO gifi (accno,description) VALUES ('0869', 'Vortrag auf neue Rechnungen (Bilanz)');
+INSERT INTO gifi (accno,description) VALUES ('0870', 'Festkapital');
+INSERT INTO gifi (accno,description) VALUES ('0880', 'Variables Kapital');
+INSERT INTO gifi (accno,description) VALUES ('0890', 'Gesellschafter-Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('0900', 'Kommandit-Kapital');
+INSERT INTO gifi (accno,description) VALUES ('0910', 'Verlustausgleichskonto');
+INSERT INTO gifi (accno,description) VALUES ('0920', 'Gesellschafter-Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('0930', 'Sonderposten mit Rücklagenanteil stfr.Rückl.');
+INSERT INTO gifi (accno,description) VALUES ('0931', 'Sopo m.Rückl.ant.nach §6b EstG');
+INSERT INTO gifi (accno,description) VALUES ('0932', 'Sopo m.Rückl.ant.Abschn.35 EstR');
+INSERT INTO gifi (accno,description) VALUES ('0935', 'Sopo aus Währungsumstellung Euro');
+INSERT INTO gifi (accno,description) VALUES ('0947', 'Sopo m.Rückl.ant. §7g Abs.1 EstG');
+INSERT INTO gifi (accno,description) VALUES ('0948', 'Sopo m.Rückl.ant. §7g Abs.3,7 EstG');
+INSERT INTO gifi (accno,description) VALUES ('0949', 'Sopo f.Zuschüsse u.Zulagen');
+INSERT INTO gifi (accno,description) VALUES ('0950', 'Rückst.f.Pensionen u.ähnl.Verpflichtungen');
+INSERT INTO gifi (accno,description) VALUES ('0955', 'Steuerrückstellung');
+INSERT INTO gifi (accno,description) VALUES ('0957', 'Gewerbesteuerrückstellung');
+INSERT INTO gifi (accno,description) VALUES ('0963', 'Körperschaftssteuerrückstellung');
+INSERT INTO gifi (accno,description) VALUES ('0969', 'Rückstellung für latente Steuern');
+INSERT INTO gifi (accno,description) VALUES ('0970', 'Sonstige Rückstellungen');
+INSERT INTO gifi (accno,description) VALUES ('0971', 'Rückst.f.unterl.Aufw.f.Instandh.,Nachh.i.d.erst.drei Mt.');
+INSERT INTO gifi (accno,description) VALUES ('0972', 'Rückst.f.unterl.Aufw.f.Instandh.,Nachh.inn.d.4-12.Mt.');
+INSERT INTO gifi (accno,description) VALUES ('0973', 'Rückst.f.Abraum-u.Abfallbeseitigung');
+INSERT INTO gifi (accno,description) VALUES ('0974', 'Rückstellungen für Gewährleistungen Gegenkto.4970');
+INSERT INTO gifi (accno,description) VALUES ('0976', 'Rücks.f.drohe.Verl.schweb.Geschäft');
+INSERT INTO gifi (accno,description) VALUES ('0977', 'Rücks.f.Abschluß-u.Prüfungskosten');
+INSERT INTO gifi (accno,description) VALUES ('0978', 'Aufwandsrückstellungen gem.§249 (2)');
+INSERT INTO gifi (accno,description) VALUES ('0979', 'Rückst.f.Umweltschutz');
+INSERT INTO gifi (accno,description) VALUES ('0980', 'Aktive Rechnungsabgrenzung');
+INSERT INTO gifi (accno,description) VALUES ('0983', 'Abgrenzung aktive latente Steuern');
+INSERT INTO gifi (accno,description) VALUES ('0984', 'Als Aufw.berücks.Zölle u.Verbrauchsst.a.Vorräte');
+INSERT INTO gifi (accno,description) VALUES ('0985', 'Als Aufw.berücks.Ust.auf Anzahlungen');
+INSERT INTO gifi (accno,description) VALUES ('0986', 'Damnum/Disagio');
+INSERT INTO gifi (accno,description) VALUES ('0990', 'Passive Rechnungsabgrenzung');
+INSERT INTO gifi (accno,description) VALUES ('0992', 'Wertberichtigungen z.unterjähhr.Kostenver.f.BWA');
+INSERT INTO gifi (accno,description) VALUES ('0996', 'Pauschalwertb.m.Restlaufzeit bis 1J.');
+INSERT INTO gifi (accno,description) VALUES ('0997', 'PWB a.Ford.m.einer RLZ v.mehr als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('0998', 'Einzelwertber.m.Restlaufzeit bis.1 J.');
+INSERT INTO gifi (accno,description) VALUES ('0999', 'Einzelwertber.a.Ford.m.einer RLZ v.mehr als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1000', 'Kasse');
+INSERT INTO gifi (accno,description) VALUES ('1100', 'Postbank');
+INSERT INTO gifi (accno,description) VALUES ('1200', 'Bank');
+INSERT INTO gifi (accno,description) VALUES ('1300', 'Wechsel a. Lieferungen u.Leistungen');
+INSERT INTO gifi (accno,description) VALUES ('1301', '- Restlaufzeit b.1Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1302', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1305', 'Wechsel a.Lief.u.Leist.,bundesbankfähig');
+INSERT INTO gifi (accno,description) VALUES ('1310', 'Besitzwechsel geg.verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('1311', '- Restlaufzeit b.1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1312', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1315', 'Besitzwechsel geg.verb.Untern.,bundesbankfähig');
+INSERT INTO gifi (accno,description) VALUES ('1320', 'Besitzw.geg.Untern.m.Beteiligungsve');
+INSERT INTO gifi (accno,description) VALUES ('1321', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1322', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1325', 'Besitzwechsel geg.Untern.m.denen e.Beteilig.Verh.best.bbf');
+INSERT INTO gifi (accno,description) VALUES ('1327', 'Finanzwechsel');
+INSERT INTO gifi (accno,description) VALUES ('1329', 'And.Wertpap.m.unwesentl.Wertschwank.i.S.Textz.18DRS 2');
+INSERT INTO gifi (accno,description) VALUES ('1330', 'Schecks (Eingang)');
+INSERT INTO gifi (accno,description) VALUES ('1340', 'Anteile verb.Untern.-Umlaufvermögen');
+INSERT INTO gifi (accno,description) VALUES ('1344', 'Anteil an herr.od.m.betei.Gesellschaft');
+INSERT INTO gifi (accno,description) VALUES ('1345', 'Eigene Anteile');
+INSERT INTO gifi (accno,description) VALUES ('1348', 'Sonstige Wertpapiere');
+INSERT INTO gifi (accno,description) VALUES ('1349', 'Wertpapieranl.i.Rahmen d.kurzfr.Finanzdisposition');
+INSERT INTO gifi (accno,description) VALUES ('1350', 'GmbH-Anteile z.kurzfr.Verbleib');
+INSERT INTO gifi (accno,description) VALUES ('1352', 'Genossenschaftsant.z.kurzfr.Verbleib');
+INSERT INTO gifi (accno,description) VALUES ('1355', 'Anspr.a.Rückdeckungsvers.');
+INSERT INTO gifi (accno,description) VALUES ('1360', 'Geldtransit');
+INSERT INTO gifi (accno,description) VALUES ('1370', 'Verrechnungskto.f.Gewinnerm.§4/3 EStG,ergebniswirks.');
+INSERT INTO gifi (accno,description) VALUES ('1371', 'Verrechnungskto.f.Gewinnerm.§4/3 EStG,n.ergebniswirks.');
+INSERT INTO gifi (accno,description) VALUES ('1380', 'Überleitungskonto Kostenstelle');
+INSERT INTO gifi (accno,description) VALUES ('1390', 'Verrechnungskonto Ist-Versteuerung');
+INSERT INTO gifi (accno,description) VALUES ('1400', 'Ford. a.Lieferungen und Leistungen');
+INSERT INTO gifi (accno,description) VALUES ('1401', 'Ford.a.Lieferungen und Leistungen');
+INSERT INTO gifi (accno,description) VALUES ('1410', 'Ford.a.Lief.u.Leist. ohne Kontokorrent');
+INSERT INTO gifi (accno,description) VALUES ('1450', 'Ford.n.§11(1)2EStG f.§4/3 EStG');
+INSERT INTO gifi (accno,description) VALUES ('1451', 'Ford.a.Lief.u.Leist.ohn.Kontok.-RLZ b.1Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1455', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1460', 'Zweifelhafte Forderungen');
+INSERT INTO gifi (accno,description) VALUES ('1461', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1465', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1470', 'Forder.a.Liefe.u.Leis.geg.verb.Unte');
+INSERT INTO gifi (accno,description) VALUES ('1471', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1475', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1478', 'Wertb.a.Ford.m.Rest. bis 1j.geg.verb.Unt');
+INSERT INTO gifi (accno,description) VALUES ('1479', 'Wertber.a.Ford.m.e.RLZ v.mehr als 1J geg.verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('1480', 'Ford. Lief.u.Leis.geg.Untern.m.Beteiligve');
+INSERT INTO gifi (accno,description) VALUES ('1481', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1485', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1488', 'Wertb.a.Ford.m.Rest.bis 1j.Beteiligungs');
+INSERT INTO gifi (accno,description) VALUES ('1489', 'Wertber.a.Ford.m.e.RLZ v.mehr a.1J geg.Untern.m.Bet.verh.');
+INSERT INTO gifi (accno,description) VALUES ('1490', 'Forderung a.Leis.u.Lief.geg.Gesells');
+INSERT INTO gifi (accno,description) VALUES ('1491', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1495', '- Restlaufzeit gösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1498', 'Gegenk.zu sonst.VG b.Buchungen ü.Debitorenkonto');
+INSERT INTO gifi (accno,description) VALUES ('1499', 'Gegenk. 1451-1497 b.Aufteilung Debiorenkonto');
+INSERT INTO gifi (accno,description) VALUES ('1500', 'Sonstige Vermögensgegenstände');
+INSERT INTO gifi (accno,description) VALUES ('1501', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1502', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1503', 'Forde.geg.Vorstandsm.u.Geschäftsfüh RLZ b.1J');
+INSERT INTO gifi (accno,description) VALUES ('1504', 'Ford.geg.Vorstandsmitgl.u.Geschäftsf. RLZ > 1 J.');
+INSERT INTO gifi (accno,description) VALUES ('1505', 'Ford.geg.Aufsichtsrats-u.Beiratsmitgl. RLZ b.1J.');
+INSERT INTO gifi (accno,description) VALUES ('1506', 'Ford.geg.Aufsichtsrats-u.Beiratsmitgl. RLZ > 1 J.');
+INSERT INTO gifi (accno,description) VALUES ('1507', 'Ford.geg.Gesellschafter RLZ bis 1 J.');
+INSERT INTO gifi (accno,description) VALUES ('1508', 'Forderungen gegen Gesellschafter RLZ > 1J');
+INSERT INTO gifi (accno,description) VALUES ('1510', 'Geleistete Anzahlung auf Vorräte');
+INSERT INTO gifi (accno,description) VALUES ('1511', 'Geleistete Anzahlungen 7%');
+INSERT INTO gifi (accno,description) VALUES ('1517', 'Geleistete Anzahlung 16%');
+INSERT INTO gifi (accno,description) VALUES ('1521', 'Agenturwarenabrechnung');
+INSERT INTO gifi (accno,description) VALUES ('1525', 'Kautionen');
+INSERT INTO gifi (accno,description) VALUES ('1526', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1527', '- Restlaufzeit > 1 J.');
+INSERT INTO gifi (accno,description) VALUES ('1530', 'Forderungen aus Lohn-u.Gehaltsabrechnung');
+INSERT INTO gifi (accno,description) VALUES ('1531', '- Restlaufzeit b.1J.');
+INSERT INTO gifi (accno,description) VALUES ('1537', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1540', 'Steuerüberzahlungen');
+INSERT INTO gifi (accno,description) VALUES ('1542', 'Steuererstattungsanspr.gegenüber and.EG-Länd.');
+INSERT INTO gifi (accno,description) VALUES ('1543', 'Ford.a.d.Finanzamt a.abgef.Bauabzugsbetrag');
+INSERT INTO gifi (accno,description) VALUES ('1545', 'Umsatzsteuerforderungen');
+INSERT INTO gifi (accno,description) VALUES ('1547', 'Ford.aus entrichteten Verbrauchsteuern');
+INSERT INTO gifi (accno,description) VALUES ('1548', 'Vorsteuer im Folgejahr abziehbar');
+INSERT INTO gifi (accno,description) VALUES ('1549', 'Körperschaftsteuerrückforderung');
+INSERT INTO gifi (accno,description) VALUES ('1550', 'Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('1551', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1555', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1556', 'Nachträgl.abziehb.Vorst.,§15aUStG,bewegl.WG');
+INSERT INTO gifi (accno,description) VALUES ('1557', 'Zurückzuzahlende Vorsteuer §15a UStG,bewegl.WG');
+INSERT INTO gifi (accno,description) VALUES ('1558', 'Nachträgl.abziehb.Vorst.§15aUStG,unbewegl.WG');
+INSERT INTO gifi (accno,description) VALUES ('1559', 'Zurückzuzahlende Vorst.§15aUStG,unbewegl.WG');
+INSERT INTO gifi (accno,description) VALUES ('1560', 'Aufzuteilende Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('1561', 'Aufzuteilende Vorsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('1562', 'Aufzuteilende Vorst.a.innergem.Erwerb');
+INSERT INTO gifi (accno,description) VALUES ('1565', 'Aufzuteilende Vorsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('1567', 'Aufzuteilende Vorst.n.§13b UStG');
+INSERT INTO gifi (accno,description) VALUES ('1568', 'Aufzuteilende Vorst.n.§13b UStG 16%');
+INSERT INTO gifi (accno,description) VALUES ('1570', 'Abziehbare Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('1571', 'Abziebare Vorsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('1572', 'Abziehb. VorSt innergemein. Erwerb');
+INSERT INTO gifi (accno,description) VALUES ('1573', 'Abziehb.VorSt. innergem.Erwerb 16%');
+INSERT INTO gifi (accno,description) VALUES ('1575', 'Abziehbare Vorsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('1577', 'Vorst.n.allgem.Durchschnittssätzen UStVA Kz.63');
+INSERT INTO gifi (accno,description) VALUES ('1578', 'Abziehb.VorSt. n. §13b UStG');
+INSERT INTO gifi (accno,description) VALUES ('1579', 'Abziehb.VorSt. n.§13b UStG 16%');
+INSERT INTO gifi (accno,description) VALUES ('1580', 'Gegenkonto Vorsteuer §4/3 EStG');
+INSERT INTO gifi (accno,description) VALUES ('1581', 'Auflösung Vorst.a.Vorjahr §4/3 EStG');
+INSERT INTO gifi (accno,description) VALUES ('1584', 'abziehb.VorSt IG Erwerb Neufzg.b.Lief. o. USt.Ident.Nr');
+INSERT INTO gifi (accno,description) VALUES ('1588', 'Bezahlte Einfuhrumsatzsteuer');
+INSERT INTO gifi (accno,description) VALUES ('1590', 'Durchlaufende Posten');
+INSERT INTO gifi (accno,description) VALUES ('1592', 'Fremdgeld');
+INSERT INTO gifi (accno,description) VALUES ('1593', 'Verrechnungskto.erh.Anz.bei Buchung über Debitorenkto.');
+INSERT INTO gifi (accno,description) VALUES ('1594', 'Forderungen geg. verb. Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('1595', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1596', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1597', 'Ford.geg.Untern.m.Beteiligungsverh.');
+INSERT INTO gifi (accno,description) VALUES ('1598', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1599', '- Restlaufzeit grösser als 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1600', 'Verbindlichkeiten aus Lief.u.Leist.');
+INSERT INTO gifi (accno,description) VALUES ('1601', 'Verbindlichkeiten a.Lief.und Leist.');
+INSERT INTO gifi (accno,description) VALUES ('1610', 'Vblk.a.Lief.u.Leist.ohne Kontokorrent');
+INSERT INTO gifi (accno,description) VALUES ('1624', 'Vblk.a.Lief.u.Leist.f.Investitionen f.§4/3 EStG');
+INSERT INTO gifi (accno,description) VALUES ('1625', 'Vblk.a.Lief.u.Leist.o.Kontokorrent RLZ b.1Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1626', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1628', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1630', 'Verbindl.Lief.u.Leist.gegü.verb.Unt');
+INSERT INTO gifi (accno,description) VALUES ('1631', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1635', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1638', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1640', 'Verb.L.u.L gegü.Unter.m.Beteiligungsv');
+INSERT INTO gifi (accno,description) VALUES ('1641', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1645', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1648', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1650', 'Verb.L.u.L gegü.Gesellschaftern');
+INSERT INTO gifi (accno,description) VALUES ('1651', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1655', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1658', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1659', 'Gegenkto. 1625-1658 b.Aufteilung Kreditorenkonto');
+INSERT INTO gifi (accno,description) VALUES ('1660', 'Schuldwechsel');
+INSERT INTO gifi (accno,description) VALUES ('1661', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1680', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1690', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1700', 'Sonstige Verbindlichkeiten');
+INSERT INTO gifi (accno,description) VALUES ('1701', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1702', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1703', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1704', 'Sonst.Vblk.z.B.n.§11(2)S.2EStGf.§4/3EStG');
+INSERT INTO gifi (accno,description) VALUES ('1705', 'Darlehen');
+INSERT INTO gifi (accno,description) VALUES ('1706', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1707', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1708', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1709', 'Gewinnverfügungskonto stiller Ges.');
+INSERT INTO gifi (accno,description) VALUES ('1710', 'Erhaltene Anzahlungen-Verbindlichke');
+INSERT INTO gifi (accno,description) VALUES ('1711', 'Erhaltene,versteuerte Anzahlungen 7% (Vblk)');
+INSERT INTO gifi (accno,description) VALUES ('1716', 'Erhaltene verst.Anzahlungen 15% USt(Vblk.)');
+INSERT INTO gifi (accno,description) VALUES ('1717', 'Erhaltene,versteuerte Anzahl. 16%(Vblk)');
+INSERT INTO gifi (accno,description) VALUES ('1719', 'Erhaltene Anzahlungen bis 1j.');
+INSERT INTO gifi (accno,description) VALUES ('1720', '- Restlaufzeit 1 b.5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1721', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1722', 'Erhaltene Anzahlung v.Vorräten offen abgesetzt');
+INSERT INTO gifi (accno,description) VALUES ('1730', 'Kreditkartenabrechnung');
+INSERT INTO gifi (accno,description) VALUES ('1731', 'Agenturwarenabrechnung');
+INSERT INTO gifi (accno,description) VALUES ('1732', 'Erhaltene Kautionen');
+INSERT INTO gifi (accno,description) VALUES ('1733', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1734', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1735', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1736', 'Vblk.a.Betriebssteuern u.-abgaben');
+INSERT INTO gifi (accno,description) VALUES ('1737', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1738', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1739', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1740', 'Vblk.aus Lohn-u.Gehalt');
+INSERT INTO gifi (accno,description) VALUES ('1741', 'Verbindl.a.Lohn-und Kirchensteuer');
+INSERT INTO gifi (accno,description) VALUES ('1742', 'Vblk.i.Rahmen d.sozialen Sicherheit');
+INSERT INTO gifi (accno,description) VALUES ('1743', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1744', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1745', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1746', 'Vblk.aus Einbehaltungen (KapESt)');
+INSERT INTO gifi (accno,description) VALUES ('1747', 'Vblk.f.Verbrauchsteuern');
+INSERT INTO gifi (accno,description) VALUES ('1748', 'Vblk.f.Einbehaltungen v.Arbeitnehmern');
+INSERT INTO gifi (accno,description) VALUES ('1749', 'Vblk.a.das Finanzamt a.abzuführendem Bauabzugsbetrag');
+INSERT INTO gifi (accno,description) VALUES ('1750', 'Vblk.a.Vermögensbildung');
+INSERT INTO gifi (accno,description) VALUES ('1751', '- Restlaufzeit bis 1 Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1752', '- Restlaufzeit 1 bis 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1753', '- Restlaufzeit grösser als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1754', 'Steuerzahlungen an andere EG-Länder');
+INSERT INTO gifi (accno,description) VALUES ('1755', 'Lohn-und Gehaltsverrechnung');
+INSERT INTO gifi (accno,description) VALUES ('1758', 'USt-Abzugsverfahren 16% od.USt.n.§13bUStG');
+INSERT INTO gifi (accno,description) VALUES ('1760', 'Umsatzsteuer nicht fällig');
+INSERT INTO gifi (accno,description) VALUES ('1761', 'Umsatzsteuer nicht fällig 7%');
+INSERT INTO gifi (accno,description) VALUES ('1762', 'Umsatzsteuer nicht fällig a.im Inland stpfl.EG Lief.');
+INSERT INTO gifi (accno,description) VALUES ('1763', 'Umsatzsteuer nicht fällig a.i.Inland stpfl.EG-Lief.16%');
+INSERT INTO gifi (accno,description) VALUES ('1765', 'Umsatzsteuer n.fällig 16%');
+INSERT INTO gifi (accno,description) VALUES ('1767', 'Umsatzsteuer a.i.anderen EG-Land stpfl.Lieferungen');
+INSERT INTO gifi (accno,description) VALUES ('1768', 'Umsatzsteuer a.i.and.EG-Land stpfl.sonst.Leist./Werklief.');
+INSERT INTO gifi (accno,description) VALUES ('1770', 'Umsatzsteuer');
+INSERT INTO gifi (accno,description) VALUES ('1771', 'Umsatzsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('1772', 'Umsatzsteuer aus innergem. Erwerb');
+INSERT INTO gifi (accno,description) VALUES ('1773', 'Umsatzsteuer innergem.Erwerb 16%');
+INSERT INTO gifi (accno,description) VALUES ('1775', 'Umsatzsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('1777', 'Ust aus im Inland stpfl. EG-Lief16%');
+INSERT INTO gifi (accno,description) VALUES ('1779', 'Umsatzsteuer a.innergem.Erwerb ohne Vorsteuerabzug');
+INSERT INTO gifi (accno,description) VALUES ('1780', 'Umsatzsteuer-Vorauszahlungen');
+INSERT INTO gifi (accno,description) VALUES ('1781', 'Umsatzsteuer-Vorauszahlung 1/11');
+INSERT INTO gifi (accno,description) VALUES ('1782', 'Nachsteuer, UStVA Kz.65');
+INSERT INTO gifi (accno,description) VALUES ('1783', 'In Rechn unberecht.ausgew.geschuld.Steuerbetr.UStVAKz69');
+INSERT INTO gifi (accno,description) VALUES ('1784', 'Ust IG Erwerb Neufahrzeug o.Ust ID');
+INSERT INTO gifi (accno,description) VALUES ('1785', 'Umsatzsteuer n.§13b UStG');
+INSERT INTO gifi (accno,description) VALUES ('1786', 'Umsatzsteuer n.§13b UStG 16%');
+INSERT INTO gifi (accno,description) VALUES ('1788', 'Einfuhrumsatzsteuer augeschoben bis');
+INSERT INTO gifi (accno,description) VALUES ('1789', 'Umsatzsteuer laufendes Jahr');
+INSERT INTO gifi (accno,description) VALUES ('1790', 'Umsatzsteuer Vorjahr');
+INSERT INTO gifi (accno,description) VALUES ('1791', 'Umsatzsteuer frühere Jahre');
+INSERT INTO gifi (accno,description) VALUES ('1792', 'Sonstige Verrechnungskonten');
+INSERT INTO gifi (accno,description) VALUES ('1793', 'Verrechnungskto.geleist.Anz.b.Buchung über Kreditorenkto.');
+INSERT INTO gifi (accno,description) VALUES ('1800', 'Privatentnahme allgemein');
+INSERT INTO gifi (accno,description) VALUES ('1810', 'Privatsteuern');
+INSERT INTO gifi (accno,description) VALUES ('1820', 'Sonderausgaben beschränkt abzugsfähig');
+INSERT INTO gifi (accno,description) VALUES ('1830', 'Sonderausgaben unbeschr.anzugsfähig');
+INSERT INTO gifi (accno,description) VALUES ('1840', 'Zuwendungen, Spenden');
+INSERT INTO gifi (accno,description) VALUES ('1850', 'Aussergewöhnl.Belastungen');
+INSERT INTO gifi (accno,description) VALUES ('1860', 'Grundstücksaufwand');
+INSERT INTO gifi (accno,description) VALUES ('1870', 'Grundstücksertrag');
+INSERT INTO gifi (accno,description) VALUES ('1880', 'Unentgeltliche Wertabgaben');
+INSERT INTO gifi (accno,description) VALUES ('1890', 'Privateinlagen');
+INSERT INTO gifi (accno,description) VALUES ('1900', 'Privatentnahmen allgemein');
+INSERT INTO gifi (accno,description) VALUES ('1910', 'Privatsteuern');
+INSERT INTO gifi (accno,description) VALUES ('1920', 'Sonderausgaben beschränkt abzugsfähig');
+INSERT INTO gifi (accno,description) VALUES ('1930', 'Sonderausgaben unbeschr.anzugsfähig');
+INSERT INTO gifi (accno,description) VALUES ('1940', 'Zuwendungen, Spenden');
+INSERT INTO gifi (accno,description) VALUES ('1950', 'Aussergewöhnl.Belastungen');
+INSERT INTO gifi (accno,description) VALUES ('1960', 'Grundstücksaufwand');
+INSERT INTO gifi (accno,description) VALUES ('1970', 'Grundstücksertrag');
+INSERT INTO gifi (accno,description) VALUES ('1980', 'Unentgeltliche Wertabgaben');
+INSERT INTO gifi (accno,description) VALUES ('1990', 'Privateinlagen');
+INSERT INTO gifi (accno,description) VALUES ('2000', 'Außerordentliche Aufwendung');
+INSERT INTO gifi (accno,description) VALUES ('2001', 'Außerordentl.Aufwendungen finanzwirksam');
+INSERT INTO gifi (accno,description) VALUES ('2005', 'Außerordentl.Aufwendungen nicht finanzwirksam');
+INSERT INTO gifi (accno,description) VALUES ('2010', 'Betriebsfremde Aufwendungen soweit n.außerord.');
+INSERT INTO gifi (accno,description) VALUES ('2020', 'Periodenfremde Aufwend.(soweit n.außerordentlich');
+INSERT INTO gifi (accno,description) VALUES ('2100', 'Zinsen und ähnl.Aufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('2103', 'Steuerl.abzugsfähig,and.Nebenl.zu Steuern');
+INSERT INTO gifi (accno,description) VALUES ('2104', 'Steuerl.nicht.abzugsf.ande.Nl.z.Ste');
+INSERT INTO gifi (accno,description) VALUES ('2107', 'Zinsaufwendung-betriebliche Steuern §223aAO');
+INSERT INTO gifi (accno,description) VALUES ('2108', 'Zinsaufwendung-Personensteuer');
+INSERT INTO gifi (accno,description) VALUES ('2109', 'Zinsaufwendungen an verb.Unternehm.');
+INSERT INTO gifi (accno,description) VALUES ('2110', 'Zinsaufwendung f.kurzf.Verbindlichk');
+INSERT INTO gifi (accno,description) VALUES ('2115', 'Zinsen u.ähnl.Aufwendungen 100%/50% n.abzugsf.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2116', 'Zinsen u.ähnl.Aufwend.a.verb.Untern.100%/50% n.abzugsf.(inl.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2118', 'In Dauerschuldzinsen umqualifizierte Zinsen a.kurzf.Vblk.');
+INSERT INTO gifi (accno,description) VALUES ('2119', 'Zinsaufwend.f.kurzfr.Vblk.an verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2120', 'Zinsaufwendung f.langf.Verbindlichk');
+INSERT INTO gifi (accno,description) VALUES ('2126', 'Zinsen zur Finanzierung des Anlagevermögens');
+INSERT INTO gifi (accno,description) VALUES ('2127', 'Renten u.dauernde Lasten a.Gründung/Erwerb §8GewStG');
+INSERT INTO gifi (accno,description) VALUES ('2128', 'Zinsaufwend.an Mituntern.f.d.Hingabe v.langfr.Kapital §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('2129', 'Zinsaufwend.f.langfr.Vblk.an verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2130', 'Diskontaufwendung');
+INSERT INTO gifi (accno,description) VALUES ('2139', 'Diskontaufwendungen an verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2140', 'Zinsähnliche Aufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('2149', 'Zinsähnl.Aufwendungen an verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2150', 'Aufwendungen aus Kursdifferenzen');
+INSERT INTO gifi (accno,description) VALUES ('2165', 'Aufw.a.d.Währungsumstell.a.d.Euro');
+INSERT INTO gifi (accno,description) VALUES ('2166', 'Aufwendungen a.Bewertung Finanzmittelfonds');
+INSERT INTO gifi (accno,description) VALUES ('2170', 'Nicht abziehbare Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('2171', 'Nicht abziehbare Vorsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('2175', 'Nicht abziehbare Vorsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('2200', 'Körperschaftssteuer');
+INSERT INTO gifi (accno,description) VALUES ('2203', 'Körperschaftssteuer für Vorjahr');
+INSERT INTO gifi (accno,description) VALUES ('2205', 'Anrechb.Körperschaftsst.auf vereinn.Kapitalertr.');
+INSERT INTO gifi (accno,description) VALUES ('2208', 'Solidaritätszuschlag');
+INSERT INTO gifi (accno,description) VALUES ('2209', 'Solidaritätszuschlag für Vorjahr');
+INSERT INTO gifi (accno,description) VALUES ('2210', 'Kapitalertragssteuer 25%');
+INSERT INTO gifi (accno,description) VALUES ('2213', 'Anrechb.Solidaritätszusch.Kapitalertragsst.25%');
+INSERT INTO gifi (accno,description) VALUES ('2214', 'Anrechenb.Soli auf Kapitalertragssteuer 20%');
+INSERT INTO gifi (accno,description) VALUES ('2215', 'Zinsabschlagsteuer');
+INSERT INTO gifi (accno,description) VALUES ('2218', 'Anrechb.Solidari.zuschlag a.Zinsabschlagst.');
+INSERT INTO gifi (accno,description) VALUES ('2223', 'Vermögensteuer für Vorjahre');
+INSERT INTO gifi (accno,description) VALUES ('2280', 'Stnachzahl.Vorj.v.Einkomm u.Ertrag');
+INSERT INTO gifi (accno,description) VALUES ('2282', 'Sterstat.Vorj.Steuer v.Eink.u.Ertrag');
+INSERT INTO gifi (accno,description) VALUES ('2284', 'Ertr.a.d.Aufl.v.Rücks.f.St.v.Ein.Er');
+INSERT INTO gifi (accno,description) VALUES ('2285', 'Steuernachzahlung Vorj.f.sons.Steue');
+INSERT INTO gifi (accno,description) VALUES ('2287', 'Steuererstattung Vorj.f.sons.Steuer');
+INSERT INTO gifi (accno,description) VALUES ('2289', 'Erträge a.d.Aufl.v. Rück.f.sons.Ste');
+INSERT INTO gifi (accno,description) VALUES ('2300', 'Sonstige Aufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('2307', 'Sonst.Aufwend.betriebsfremd u.regelmässig');
+INSERT INTO gifi (accno,description) VALUES ('2309', 'Sonst.Aufwend. unregelmäßig');
+INSERT INTO gifi (accno,description) VALUES ('2310', 'Anlagenabgänge Sachanlagen Restbuchw.b.Buchverlust');
+INSERT INTO gifi (accno,description) VALUES ('2311', 'Anlagenabgänge immat.VG (Restbuchw.b.Buchverlust');
+INSERT INTO gifi (accno,description) VALUES ('2312', 'Anlagenabgänge Finanzanlagen (Restbuchw.b.Buchverlust');
+INSERT INTO gifi (accno,description) VALUES ('2313', 'Anlagenabgänge Finanzanl.100%/50% n.abzugsf.(Restbuchw.b.Buchverlust');
+INSERT INTO gifi (accno,description) VALUES ('2315', 'Anlagenabgänge Sachanlagen Restbuchw.b.Buchgewinn');
+INSERT INTO gifi (accno,description) VALUES ('2316', 'Anlagenabgänge immat.VG (Restbuchwert b.Buchgewinn');
+INSERT INTO gifi (accno,description) VALUES ('2317', 'Anlagenabgänge Finanzanlagen (Restbuchwert b.Buchgewinn');
+INSERT INTO gifi (accno,description) VALUES ('2318', 'Anlagenabgänge Finanzanlagen 100%/50% steuerfr.(Restbuchw.b.Buchgewinn');
+INSERT INTO gifi (accno,description) VALUES ('2320', 'Verluste Abgang Gegenst.d.Anlagever');
+INSERT INTO gifi (accno,description) VALUES ('2323', 'Verluste a.d.Veräußerung v.Anteilen a.Kapitalges.100%/50% n.abzugsf.');
+INSERT INTO gifi (accno,description) VALUES ('2325', 'Verlust a.d.Abg.v.Gegens.d.Umlaufve');
+INSERT INTO gifi (accno,description) VALUES ('2340', 'Einstellungen Sopo m.Rückanlageant.steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2341', 'Einstellungen in SoPo m.Rücklageanteil (Ansparabschreibung');
+INSERT INTO gifi (accno,description) VALUES ('2345', 'Einstellungen Sopo m.R.(Sonderafa)');
+INSERT INTO gifi (accno,description) VALUES ('2346', 'Einst.in SoPo m.Rücklageanteil (§52 Abs.16 EStG');
+INSERT INTO gifi (accno,description) VALUES ('2347', 'Einst.in SoPo m.Rücklageanteil (aus der Währungsumst.EUR)');
+INSERT INTO gifi (accno,description) VALUES ('2348', 'Aufwend.a.d.Zuschreibung v.steuerlich niedriger bewert.Vblk.');
+INSERT INTO gifi (accno,description) VALUES ('2349', 'Aufwend.a.d.Zuschreibung v.steuerlich niedriger bewert.Rückst.');
+INSERT INTO gifi (accno,description) VALUES ('2350', 'Grundstücksaufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('2375', 'Grundsteuer');
+INSERT INTO gifi (accno,description) VALUES ('2380', 'Zuwend.,Spenden,steuerlich n.abziehbar');
+INSERT INTO gifi (accno,description) VALUES ('2381', 'Zuwend.,Spenden f.wissenschaftl.u.kulturelle Zwecke');
+INSERT INTO gifi (accno,description) VALUES ('2382', 'Zuwend.,Spenden f.mildtätige Zwecke');
+INSERT INTO gifi (accno,description) VALUES ('2383', 'Zuwend.,Spenden f.kirchliche,religiöse u.gemeinnützige Zwecke');
+INSERT INTO gifi (accno,description) VALUES ('2384', 'Zuwend.,Spenden an politische Parteien');
+INSERT INTO gifi (accno,description) VALUES ('2385', 'Nicht abziehb.Hälfte der Aufsichtsratsvergütungen');
+INSERT INTO gifi (accno,description) VALUES ('2386', 'Abziehb.Aufsichtsratsvergütungen');
+INSERT INTO gifi (accno,description) VALUES ('2387', 'Zuwend.,Spenden an Stiftungen f.gemeinnützige Zwecke i.S.d.§52(2)Nr.1-3AO');
+INSERT INTO gifi (accno,description) VALUES ('2388', 'Zuwend.,Spenden an Stiftungen f.gemeinnützige Zwecke i.S.d.§52(2)Nr.4AO');
+INSERT INTO gifi (accno,description) VALUES ('2389', 'Zuwend.,Spenden an Stiftungen f.kirchl.,religöse u.gemeinnützige Zwecke');
+INSERT INTO gifi (accno,description) VALUES ('2390', 'Zuwend.,Spenden an Stiftungen f.wissenschaftl.,mildtätige,kulturelle Zwecke');
+INSERT INTO gifi (accno,description) VALUES ('2400', 'Forderungsverlust-übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2401', 'Forderungsverluste 7% USt.(übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2402', 'Forderungsverluste a.steuerfreien EG-Lief.(übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2403', 'Forderungsverluste a.im Inland steuerpfl.EG-Lieferungen 7% USt.(übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2404', 'Forderungsverluste a.im Inland steuerpfl.EG-Lief.16% USt.(übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2405', 'Forderungsverluste 16% USt.(übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('2430', 'Forderungsverluste-unüblich hoch');
+INSERT INTO gifi (accno,description) VALUES ('2450', 'Einstell.i.d.Pauschalwertbe.z.Forde');
+INSERT INTO gifi (accno,description) VALUES ('2451', 'Einstell.i.d.Einzelwertb.z.Forderun');
+INSERT INTO gifi (accno,description) VALUES ('2490', 'Aufwendung aus Verlustübernahme');
+INSERT INTO gifi (accno,description) VALUES ('2492', 'Abgef.Gewinn aufgr.e.Gewinngemeinsc');
+INSERT INTO gifi (accno,description) VALUES ('2493', 'Abgef.Gewinnant.an stille Gesellsch §8GewsT');
+INSERT INTO gifi (accno,description) VALUES ('2494', 'Abgeführte Gewinne auf Grund eines Gewinn-od.Teilgewinnabführungsvertrages');
+INSERT INTO gifi (accno,description) VALUES ('2495', 'Einst.Kapitalrückl.n.Vorschr.über d.vereinf.Kapitalherabsetzung');
+INSERT INTO gifi (accno,description) VALUES ('2496', 'Einstellungen in die gesetzl.Rückla');
+INSERT INTO gifi (accno,description) VALUES ('2497', 'Einstellungen in satzungsmässige Rücklagen');
+INSERT INTO gifi (accno,description) VALUES ('2498', 'Einstellunen in die Rücklage für eigene Anteile');
+INSERT INTO gifi (accno,description) VALUES ('2499', 'Einstellungen in andere Gewinnrücklagen');
+INSERT INTO gifi (accno,description) VALUES ('2500', 'Außerordentliche Erträge');
+INSERT INTO gifi (accno,description) VALUES ('2501', 'Außerordentliche Erträge finanzwirksam');
+INSERT INTO gifi (accno,description) VALUES ('2505', 'Außerordentliche Erträge nicht finanzwirksam');
+INSERT INTO gifi (accno,description) VALUES ('2510', 'Betriebsfremde Erträge nichtaußerorden');
+INSERT INTO gifi (accno,description) VALUES ('2520', 'Periodenfremde Erträge nicht außero');
+INSERT INTO gifi (accno,description) VALUES ('2600', 'Erträge aus Beteiligungen');
+INSERT INTO gifi (accno,description) VALUES ('2615', 'Lfd.Erträge a.Anteilen an Kap.Ges.(Bet.100%/50% steuerfrei(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2616', 'Lfd.Erträge a.Ant.a.Kap.Ges.(verb.Untern)100%/50% steuerfr.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2617', 'Gewinn aus Anteilen an nicht steuerpfl.inländ.Kapitalges.§92aGewS.');
+INSERT INTO gifi (accno,description) VALUES ('2618', 'Gewinnanteile aus Mitunternehmerschaft §9 GewStG');
+INSERT INTO gifi (accno,description) VALUES ('2619', 'Erträge a.Beteil.a.verb.Untérnehmer');
+INSERT INTO gifi (accno,description) VALUES ('2620', 'Erträge a.anderen Wertp u.Ausleihungen d.FinanzAV');
+INSERT INTO gifi (accno,description) VALUES ('2625', 'Lfd.Erträge a.Anteilen a.Kap.Ges.(FinanzAV)100%/50% steuerfr.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2626', 'Lfd.Erträge a.Anteilen a.Kap.Ges.(verb.Untern)100%/50% steuerfr.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2649', 'Erträge a.and.Wertpapieren u.Ausleih.des FinanzAV a.verbund.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('2650', 'Sonstige Zinsen und ähnliche Erträge');
+INSERT INTO gifi (accno,description) VALUES ('2655', 'Lfd.Erträge a.Anteilen a.Kap.Ges.(UV)100%/50% steuerfr.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2656', 'Lfd.Erträge a.Anteilen a.Kap.Ges.(verb.Untern.)100%/50% steuerfr.(inländ.Kap.Ges)');
+INSERT INTO gifi (accno,description) VALUES ('2657', 'Zinserträge-betriebliche Steuern');
+INSERT INTO gifi (accno,description) VALUES ('2658', 'Zinserträge-Körperschaftssteuer Vermögensst.');
+INSERT INTO gifi (accno,description) VALUES ('2659', 'Sons.Zinsen u.ähl.Ertr.a.verb.Unter');
+INSERT INTO gifi (accno,description) VALUES ('2660', 'Erträge aus Kursdifferenzen');
+INSERT INTO gifi (accno,description) VALUES ('2665', 'Erträge a.d.Währungumst.a.d. Euro');
+INSERT INTO gifi (accno,description) VALUES ('2666', 'Erträge a.Bewertung Finanzmittelfonds');
+INSERT INTO gifi (accno,description) VALUES ('2670', 'Diskonterträge');
+INSERT INTO gifi (accno,description) VALUES ('2679', 'Diskonterträge a.verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2680', 'Zinsähnliche Erträge');
+INSERT INTO gifi (accno,description) VALUES ('2689', 'Zinsähnliche Erträge aus verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('2700', 'Sonstige Erträge');
+INSERT INTO gifi (accno,description) VALUES ('2705', 'Sons.Erträge betrieb. u. regelmäßig');
+INSERT INTO gifi (accno,description) VALUES ('2707', 'Sonst.Erträge betriebsfremd u.regelmäßig');
+INSERT INTO gifi (accno,description) VALUES ('2709', 'Sonst.Erträge unregelmäßig');
+INSERT INTO gifi (accno,description) VALUES ('2710', 'Ertrag a.d.Zuschreib.d.Anlagevermög');
+INSERT INTO gifi (accno,description) VALUES ('2711', 'Erträge aus Zuschreibungen des immat.Anlagevermögens');
+INSERT INTO gifi (accno,description) VALUES ('2712', 'Erträge aus Zuschreibungen des Finanzanlagevermögens');
+INSERT INTO gifi (accno,description) VALUES ('2713', 'Erträge aus Zuschreib. d.Finanzanlagevermögens 100%/50% steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2714', 'Erträge aus Zuschreib. d.and.Anlagevermögens 100%/50% steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2715', 'Ertr.a.Zuschreib.d.Umlaufvermögens');
+INSERT INTO gifi (accno,description) VALUES ('2716', 'Erträge aus Zuschreib.d.Umlaufvermögens 100%/50% steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2720', 'Ertr.a.d.Abgang v.Gegens.d.Anlageve');
+INSERT INTO gifi (accno,description) VALUES ('2723', 'Erträge aus der Veräußerung v.Anteilen an Kap.Ges.100%/50% steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2725', 'Ertr.a.d.Abg.v.Gegenst.d.Umlaufverm');
+INSERT INTO gifi (accno,description) VALUES ('2730', 'Ertr.a.Herabsetzung d.PWB zu Forderungen');
+INSERT INTO gifi (accno,description) VALUES ('2731', 'Ertr.a.Herab.d.Einzelw.z.Forderunge');
+INSERT INTO gifi (accno,description) VALUES ('2732', 'Ertr. aus abgeschriebenen Forderung');
+INSERT INTO gifi (accno,description) VALUES ('2734', 'Erträge aus der steuerlich niedrigeren Bewertung v.Vblk.');
+INSERT INTO gifi (accno,description) VALUES ('2735', 'Ertr.a.d.Auflösung v.Rückstellungen');
+INSERT INTO gifi (accno,description) VALUES ('2736', 'Ertr.a.d.steuerl.niedrig.Bewertung v.Rückst.');
+INSERT INTO gifi (accno,description) VALUES ('2737', 'Ertr.a.d..Aufl.v.Sonderp.m.Rücklage (a.Währungsumst.EUR');
+INSERT INTO gifi (accno,description) VALUES ('2738', 'Ertr.a.d.Aufl.v.Sopo.m.Rücklageant.');
+INSERT INTO gifi (accno,description) VALUES ('2739', 'Erträge Aufl. Sopo m.R.(Ansparafa)');
+INSERT INTO gifi (accno,description) VALUES ('2740', 'Erträge Auflösung Sopo (stfreie Rü)m.Rücklageanteil');
+INSERT INTO gifi (accno,description) VALUES ('2741', 'Ertr.a.d.Aufl.v.Sonderp.m.Rücklagen Sonderafa');
+INSERT INTO gifi (accno,description) VALUES ('2742', 'Versicherungsentschädigungen');
+INSERT INTO gifi (accno,description) VALUES ('2743', 'Investitionszuschüsse-steuerpflicht');
+INSERT INTO gifi (accno,description) VALUES ('2744', 'Investitionszulage-steuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('2745', 'Erträge aus Kapitalherabsetzung');
+INSERT INTO gifi (accno,description) VALUES ('2750', 'Grundstückserträge');
+INSERT INTO gifi (accno,description) VALUES ('2790', 'Erträge aus Verlustübernahme');
+INSERT INTO gifi (accno,description) VALUES ('2792', 'Erhalt.Gewinne aufgr.e.Gewinngemein');
+INSERT INTO gifi (accno,description) VALUES ('2794', 'Erhalt.Gewinn aufgr.e.GAV-TeilGAV e.Gewinn-od.Teilgew.abf.vertr.');
+INSERT INTO gifi (accno,description) VALUES ('2795', 'Entnahme aus der Kapitalrücklage');
+INSERT INTO gifi (accno,description) VALUES ('2796', 'Entnahme a.d. gesetzlichen Rücklage');
+INSERT INTO gifi (accno,description) VALUES ('2798', 'Entnahmen aus der Rücklage für eigene Anteile');
+INSERT INTO gifi (accno,description) VALUES ('2799', 'Entnahmen aus anderen Gewinnrücklagen');
+INSERT INTO gifi (accno,description) VALUES ('2860', 'Gewinnvortrag nach Verwendung');
+INSERT INTO gifi (accno,description) VALUES ('2862', 'Gewinnvortrag 40% Vorbelastung');
+INSERT INTO gifi (accno,description) VALUES ('2864', 'Gewinnvortrag 0% Vorbelastung (steuerl.Einlagekonto');
+INSERT INTO gifi (accno,description) VALUES ('2866', 'Gewinnvortrag 0% Vorbelastung (EK02)');
+INSERT INTO gifi (accno,description) VALUES ('2868', 'Verlustvortrag nach Verwendung');
+INSERT INTO gifi (accno,description) VALUES ('2869', 'Vortrag auf neue Rechnungen (GuV');
+INSERT INTO gifi (accno,description) VALUES ('2870', 'Vorabausschüttung');
+INSERT INTO gifi (accno,description) VALUES ('2890', 'Verrechneter kalk.Unternehmerlohn');
+INSERT INTO gifi (accno,description) VALUES ('2891', 'Verrechneter kalk.Miete und Pacht');
+INSERT INTO gifi (accno,description) VALUES ('2892', 'Verrechnete kalkulatorische Zinsen');
+INSERT INTO gifi (accno,description) VALUES ('2893', 'Verrechnete kalkulatorische AfA');
+INSERT INTO gifi (accno,description) VALUES ('2894', 'Verrechnete kalk.Wagnisse');
+INSERT INTO gifi (accno,description) VALUES ('2895', 'Verrechneter kalk.Lohn f.unentgeltl.Mitarbeiter');
+INSERT INTO gifi (accno,description) VALUES ('2990', 'Aufwendung/Erträge Umrechnungsdiff');
+INSERT INTO gifi (accno,description) VALUES ('3000', 'Roh,-Hilfs,-und Betriebsstoffe');
+INSERT INTO gifi (accno,description) VALUES ('3090', 'Energiestoffe (Fertigung)');
+INSERT INTO gifi (accno,description) VALUES ('3100', 'Fremdleistungen');
+INSERT INTO gifi (accno,description) VALUES ('3110', 'Leist.v.ausländ.Untern. 7% VSt.u.7%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3120', 'Leist.v.ausländ.Untern. 16% VSt.u.16%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3130', 'Leist.v.ausländ.Untern.ohne Vorst.u.7%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3140', 'Leist.v.ausländ.Untern.o.Vorst.u.16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('3150', 'Leist.v.ausländ.Untern.(0-Regelung)');
+INSERT INTO gifi (accno,description) VALUES ('3200', 'Wareneingang');
+INSERT INTO gifi (accno,description) VALUES ('3300', 'Wareneingang 7% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3400', 'Wareneingang 16% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3420', 'Innergemein.Erwerb 7% VorSt u. Ust');
+INSERT INTO gifi (accno,description) VALUES ('3425', 'Innergem.Erwerb 16% VorSt u. Ust');
+INSERT INTO gifi (accno,description) VALUES ('3430', 'Innergem.Erwerb o.VSt.u.7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('3435', 'Innergem.Erwerb o.VSt.u.16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('3440', 'Innergem.Erwerb v.Neufahrz.v.Lief.o.USt.Identnr.16%VSt.u.16%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3500', 'Wareneingang 5% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3505', 'Wareneingang 6% Vosteuer');
+INSERT INTO gifi (accno,description) VALUES ('3530', 'Wareneingang 9% Vosteuer');
+INSERT INTO gifi (accno,description) VALUES ('3535', 'Wareneingang 10% Vosteuer');
+INSERT INTO gifi (accno,description) VALUES ('3540', 'Wareneingang 9% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3550', 'Steuerfreier innergem.Erwerb');
+INSERT INTO gifi (accno,description) VALUES ('3600', 'Nicht abziehbare Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3610', 'Nicht abziehb.Vorsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('3650', 'Nicht abziehb.Vorsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('3700', 'Nachlässe');
+INSERT INTO gifi (accno,description) VALUES ('3710', 'Nachlässe 7% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3720', 'Nachlässe 16% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3723', 'Nachlässe 15% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3724', 'Nachlässe a.innergem.Erwerb 7% VSt.u.7%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3725', 'Nachlässe a.innergem.Erwerb 16% VSt.u.16%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3727', 'Nachlässe a.innergem.Erwerb 15% VSt.u.15%USt.');
+INSERT INTO gifi (accno,description) VALUES ('3730', 'Erhaltene Skonti');
+INSERT INTO gifi (accno,description) VALUES ('3731', 'Erhaltene Skonti 7% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3735', 'Erhaltene Skonti 16% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3740', 'Erhaltene Boni');
+INSERT INTO gifi (accno,description) VALUES ('3750', 'Erhaltene Boni 7% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3760', 'Erhaltene Boni 16% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3770', 'Erhaltene Rabatte');
+INSERT INTO gifi (accno,description) VALUES ('3780', 'Erhaltene Rabatte 7% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3790', 'Erhaltene Rabatte 16% Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('3800', 'Bezugsnebenkosten');
+INSERT INTO gifi (accno,description) VALUES ('3830', 'Leergut');
+INSERT INTO gifi (accno,description) VALUES ('3850', 'Zölle und Einfuhrabgaben');
+INSERT INTO gifi (accno,description) VALUES ('3960', 'Bestandsver.Roh-,Hilfs-.Betriebs.sow.bez.Waren');
+INSERT INTO gifi (accno,description) VALUES ('3970', 'Bestand Roh-,Hilfs-,u.Betriebsstoff');
+INSERT INTO gifi (accno,description) VALUES ('3980', 'Bestand Waren');
+INSERT INTO gifi (accno,description) VALUES ('3990', 'Verrechnete Stoffkosten');
+INSERT INTO gifi (accno,description) VALUES ('4000', 'Material-und Stoffverbrauch');
+INSERT INTO gifi (accno,description) VALUES ('4100', 'Löhne und Gehälter');
+INSERT INTO gifi (accno,description) VALUES ('4110', 'Löhne');
+INSERT INTO gifi (accno,description) VALUES ('4120', 'Gehälter');
+INSERT INTO gifi (accno,description) VALUES ('4124', 'Geschäftsführ.gehälter GmbH-Gesell.');
+INSERT INTO gifi (accno,description) VALUES ('4125', 'Ehegattengehalt');
+INSERT INTO gifi (accno,description) VALUES ('4126', 'Tantiemen');
+INSERT INTO gifi (accno,description) VALUES ('4127', 'Geschäftsführergehälter');
+INSERT INTO gifi (accno,description) VALUES ('4128', 'Vergütung a.angestellte Mitunterneh §15EStG.');
+INSERT INTO gifi (accno,description) VALUES ('4130', 'Gesetzlich soziale Aufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('4137', 'Gesetz.sozi.Aufw.f.Mitunternehmen §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4138', 'Beiträge zur Berufsgenossenschaftr');
+INSERT INTO gifi (accno,description) VALUES ('4139', 'Ausgleichsabgabe i.S.d.Schwerbehinterdengesetzes');
+INSERT INTO gifi (accno,description) VALUES ('4140', 'Freiwillig soziale Aufwendungen lohnsteuerfrei');
+INSERT INTO gifi (accno,description) VALUES ('4145', 'Freiwillige sozi.Aufw.lohnsteuerpflichtig.');
+INSERT INTO gifi (accno,description) VALUES ('4149', 'Pauschale Lohnsteuera.sons.Bezüge (z.B.Fahrtkostenzu)');
+INSERT INTO gifi (accno,description) VALUES ('4150', 'Krankengeldzuschüsse');
+INSERT INTO gifi (accno,description) VALUES ('4160', 'Versorgungskasse');
+INSERT INTO gifi (accno,description) VALUES ('4165', 'Aufwendung f.Altersversorgung');
+INSERT INTO gifi (accno,description) VALUES ('4167', 'Pauschale Lohnsteuer auf sonst.Bezüge(z.B.Direktversicherung');
+INSERT INTO gifi (accno,description) VALUES ('4168', 'Aufwend.f.Altersversorgung f.Mitunternehmer §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4169', 'Aufwendungen für Untersützung');
+INSERT INTO gifi (accno,description) VALUES ('4170', 'Vermögenswirksame Leistungen');
+INSERT INTO gifi (accno,description) VALUES ('4175', 'Fahrtkostenerst.Wohnung/Arbeitsstät');
+INSERT INTO gifi (accno,description) VALUES ('4180', 'Bedienungsgelder');
+INSERT INTO gifi (accno,description) VALUES ('4190', 'Aushilfslöhne');
+INSERT INTO gifi (accno,description) VALUES ('4199', 'Lohnsteuer für Aushilfe');
+INSERT INTO gifi (accno,description) VALUES ('4200', 'Raumkosten');
+INSERT INTO gifi (accno,description) VALUES ('4210', 'Miete');
+INSERT INTO gifi (accno,description) VALUES ('4218', 'Gewerbesteuerlich zu berücksichtigende Miete §8GewStG');
+INSERT INTO gifi (accno,description) VALUES ('4219', 'Vergütungen an Mituntern. f.d.mietweise Überlassung ihrer WG §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4220', 'Pacht');
+INSERT INTO gifi (accno,description) VALUES ('4228', 'Gewerbesteuerlich zu berücks.Pacht §8GewStG');
+INSERT INTO gifi (accno,description) VALUES ('4229', 'Vergütungen an Mituntern.f.d.pachtweise Überlassung ihrer WG§15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4230', 'Heizung');
+INSERT INTO gifi (accno,description) VALUES ('4240', 'Gas,Strom, Wasser');
+INSERT INTO gifi (accno,description) VALUES ('4250', 'Reinigung');
+INSERT INTO gifi (accno,description) VALUES ('4260', 'Instandhaltung betrieb.Räume');
+INSERT INTO gifi (accno,description) VALUES ('4270', 'Abgaben f.betrieb.genutz.Grundbesitz');
+INSERT INTO gifi (accno,description) VALUES ('4280', 'Sonstige Raumkosten');
+INSERT INTO gifi (accno,description) VALUES ('4300', 'Nicht abziehbare Vorsteuer');
+INSERT INTO gifi (accno,description) VALUES ('4301', 'Nicht abziehbare Vorsteuer 7%');
+INSERT INTO gifi (accno,description) VALUES ('4305', 'Nicht abziehbare Vorsteuer 16%');
+INSERT INTO gifi (accno,description) VALUES ('4320', 'Gewerbesteuer');
+INSERT INTO gifi (accno,description) VALUES ('4340', 'Sonstige Betriebssteuern');
+INSERT INTO gifi (accno,description) VALUES ('4350', 'Verbrauchssteuer');
+INSERT INTO gifi (accno,description) VALUES ('4355', 'Ökosteuer');
+INSERT INTO gifi (accno,description) VALUES ('4360', 'Versicherungen');
+INSERT INTO gifi (accno,description) VALUES ('4370', 'Nettoprä.f.Rückdeckung künf.Versorgungsleist.');
+INSERT INTO gifi (accno,description) VALUES ('4380', 'Beiträge');
+INSERT INTO gifi (accno,description) VALUES ('4390', 'Sonstige Abgaben');
+INSERT INTO gifi (accno,description) VALUES ('4396', 'Steuerl.abzugs.Verspätungszuschl.u.Zwangsgelder');
+INSERT INTO gifi (accno,description) VALUES ('4397', 'Steuerl.n.abzugsf.Verspätungszuschläge u.Zwangsgelder');
+INSERT INTO gifi (accno,description) VALUES ('4500', 'Fahrzugkosten');
+INSERT INTO gifi (accno,description) VALUES ('4510', 'Kfz-Steuer');
+INSERT INTO gifi (accno,description) VALUES ('4520', 'Kfz-Versicherungen');
+INSERT INTO gifi (accno,description) VALUES ('4530', 'Laufende Kfz-Betriebskosten');
+INSERT INTO gifi (accno,description) VALUES ('4540', 'Kfz-Reparaturen');
+INSERT INTO gifi (accno,description) VALUES ('4550', 'Garagenmiete');
+INSERT INTO gifi (accno,description) VALUES ('4570', 'Fremdfahrzeuge');
+INSERT INTO gifi (accno,description) VALUES ('4580', 'Sonstige Kfz-Kosten');
+INSERT INTO gifi (accno,description) VALUES ('4600', 'Werbe-und Reisekosten');
+INSERT INTO gifi (accno,description) VALUES ('4610', 'Werbekosten');
+INSERT INTO gifi (accno,description) VALUES ('4630', 'Geschenke bis 40 EUR');
+INSERT INTO gifi (accno,description) VALUES ('4635', 'Geschenke über 40 EUR');
+INSERT INTO gifi (accno,description) VALUES ('4638', 'Geschenke ausschließl.betrieb.genut');
+INSERT INTO gifi (accno,description) VALUES ('4640', 'Repräsentationskosten');
+INSERT INTO gifi (accno,description) VALUES ('4650', 'Bewirtungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4653', 'Aufmerksamkeiten');
+INSERT INTO gifi (accno,description) VALUES ('4654', 'Nicht abzugsfähige Bewirtungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4655', 'Nicht abzugsfähige Betriebsausgaben');
+INSERT INTO gifi (accno,description) VALUES ('4660', 'Reisekosten Arbeitnehmer');
+INSERT INTO gifi (accno,description) VALUES ('4663', 'Reisekosten Arbeitn.m.Vorsteuerabzu f.öffentl.Verkehrsm.');
+INSERT INTO gifi (accno,description) VALUES ('4664', 'Reisekosten Arbeitn.Verpflegungmehr');
+INSERT INTO gifi (accno,description) VALUES ('4666', 'Reisekosten Arbeitn.Übernachtungsaufwand');
+INSERT INTO gifi (accno,description) VALUES ('4668', 'Kilometerentgelderstattung Arbeitnehmer');
+INSERT INTO gifi (accno,description) VALUES ('4670', 'Reisekosten Unternehmer');
+INSERT INTO gifi (accno,description) VALUES ('4673', 'Reisek.Untern.m.Vorsteuerabzug (f.öffentl.Verkehrsm.');
+INSERT INTO gifi (accno,description) VALUES ('4674', 'Reisekosten Untern.Verpflegungsmehr');
+INSERT INTO gifi (accno,description) VALUES ('4676', 'Reisekosten Untern.Übernachtungsauf');
+INSERT INTO gifi (accno,description) VALUES ('4678', 'Kilometererstattungsgeld Unternehme');
+INSERT INTO gifi (accno,description) VALUES ('4700', 'Kosten der Warenabgabe');
+INSERT INTO gifi (accno,description) VALUES ('4710', 'Verpackungsmaterial');
+INSERT INTO gifi (accno,description) VALUES ('4730', 'Ausgangsfracht');
+INSERT INTO gifi (accno,description) VALUES ('4750', 'Transportversicherung');
+INSERT INTO gifi (accno,description) VALUES ('4760', 'Verkaufsprovision');
+INSERT INTO gifi (accno,description) VALUES ('4780', 'Fremdarbeiten');
+INSERT INTO gifi (accno,description) VALUES ('4790', 'Aufwand für Gewährleistungen');
+INSERT INTO gifi (accno,description) VALUES ('4800', 'Rep.u.Instandhaltungen v.techn.Anlagen u.Maschinen');
+INSERT INTO gifi (accno,description) VALUES ('4805', 'Rep.u.Instandhaltungen v.and.Anlagen u.Betriebs-u.Geschäftsausst.');
+INSERT INTO gifi (accno,description) VALUES ('4806', 'Wartungskosten für Hard-u.Software');
+INSERT INTO gifi (accno,description) VALUES ('4809', 'Sonstige Reparaturen u.Instandhalt.');
+INSERT INTO gifi (accno,description) VALUES ('4810', 'Mietleasing');
+INSERT INTO gifi (accno,description) VALUES ('4814', 'Gewerbesteuerlich zu berücks.Mietleasing §8GewStG');
+INSERT INTO gifi (accno,description) VALUES ('4815', 'Kaufleasing');
+INSERT INTO gifi (accno,description) VALUES ('4820', 'AfA a.Aufw.f.d.Inga.u.Erw.Geschäfts');
+INSERT INTO gifi (accno,description) VALUES ('4821', 'AfA a.Aufw.f.d.Währungsumst.a.Euro');
+INSERT INTO gifi (accno,description) VALUES ('4822', 'Abschreibungen a.immat.Vermögensgeg');
+INSERT INTO gifi (accno,description) VALUES ('4824', 'Abschreibung a.d.Geschäft-o.Firmenw');
+INSERT INTO gifi (accno,description) VALUES ('4826', 'Außerplan.AfA a.immat.Vermögensgeg.');
+INSERT INTO gifi (accno,description) VALUES ('4830', 'Abschreibungen auf Sachanlagen');
+INSERT INTO gifi (accno,description) VALUES ('4840', 'Außerplanmäßig Abschr.a.Sachanlagen');
+INSERT INTO gifi (accno,description) VALUES ('4850', 'Abschr.a.Sachanl.aufgr.steuerl.Sondervorschriften');
+INSERT INTO gifi (accno,description) VALUES ('4855', 'Sofortabschreibung GWG');
+INSERT INTO gifi (accno,description) VALUES ('4860', 'Abschreibungen auf aktivierte GWG');
+INSERT INTO gifi (accno,description) VALUES ('4865', 'Außerplanmäßige AFA auf aktivierte geringwertige WG');
+INSERT INTO gifi (accno,description) VALUES ('4870', 'Abschreibungen auf Finanzanlagen');
+INSERT INTO gifi (accno,description) VALUES ('4871', 'Abschreibungen a.Finanzanlagen 100%/50% n.abzugsfähig');
+INSERT INTO gifi (accno,description) VALUES ('4872', 'Abschreibungen an Mitunternehmerschaften §8 GewStG');
+INSERT INTO gifi (accno,description) VALUES ('4873', 'Abschreibungen a.Finanzanlagen a.Grund steuerl.Sondervorschr.100%/50%n.abzf.');
+INSERT INTO gifi (accno,description) VALUES ('4874', 'Abschreibungen a.Finanzanlagen auf Grund steuerl.Sondervorschriften');
+INSERT INTO gifi (accno,description) VALUES ('4875', 'Abschr.a.Wertp.d.Umlaufvermögens');
+INSERT INTO gifi (accno,description) VALUES ('4876', 'Abschr.a.Wertpapiere d.Umlaufverm. 100%/50% n.abzugsf.');
+INSERT INTO gifi (accno,description) VALUES ('4879', 'Vorwegnahme künftiger Wertschwank.b.Wertpap.d.Umlaufvermögens');
+INSERT INTO gifi (accno,description) VALUES ('4880', 'Abschreibungen auf Umlaufverm. o.Wertpapiere (soweit unübl.Höhe');
+INSERT INTO gifi (accno,description) VALUES ('4882', 'Abschreibungen a.Umlaufverm.,steuerrechtl. bedingt (soweit unübl.Höhe');
+INSERT INTO gifi (accno,description) VALUES ('4885', 'Vorwegnahme künft.Wertschwank.i.Umlaufverm.außer Vorräte u.Wertpap.d.UV');
+INSERT INTO gifi (accno,description) VALUES ('4886', 'Abschr.a.UV außer Vorräte u.Wertpap.d.UV (soweit übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('4887', 'Abschr.a.UV steuerrechtl.bedingt(soweit übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('4890', 'Vorwegnahme künft.Wertschwank. i.UV (soweit übliche Höhe');
+INSERT INTO gifi (accno,description) VALUES ('4900', 'Sonstige betriebliche Aufwendungen');
+INSERT INTO gifi (accno,description) VALUES ('4905', 'Sons.Aufw.betriebl. und regelmäßig');
+INSERT INTO gifi (accno,description) VALUES ('4909', 'Fremdleistungen');
+INSERT INTO gifi (accno,description) VALUES ('4910', 'Porto');
+INSERT INTO gifi (accno,description) VALUES ('4920', 'Telefon');
+INSERT INTO gifi (accno,description) VALUES ('4925', 'Telefax');
+INSERT INTO gifi (accno,description) VALUES ('4930', 'Bürobedarf');
+INSERT INTO gifi (accno,description) VALUES ('4940', 'Zeitschriften, Bücher');
+INSERT INTO gifi (accno,description) VALUES ('4945', 'Fortbildungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4946', 'Freiwillige Sozialleistungen');
+INSERT INTO gifi (accno,description) VALUES ('4948', 'Vergütungen an freiberufl.Mitunternehmer §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4949', 'Haftungsvergütung an Mitunternehmer §15EStG');
+INSERT INTO gifi (accno,description) VALUES ('4950', 'Rechts- und Beratungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4955', 'Buchführungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4957', 'Abschluß- und Prüfungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4960', 'Mieten für Einrichtungen');
+INSERT INTO gifi (accno,description) VALUES ('4968', 'Gewerbesteuerl.zu berückst.Miete f.Einricht.§8GewStG');
+INSERT INTO gifi (accno,description) VALUES ('4969', 'Aufwend.f.Abraum-u.Abfallbeseitigung');
+INSERT INTO gifi (accno,description) VALUES ('4970', 'Nebenkosten des Geldverkehrs');
+INSERT INTO gifi (accno,description) VALUES ('4975', 'Aufwend.a.Anteilen an Kap.Ges.100%/50% n.abzugsf.(inländ.Kap.Ges.');
+INSERT INTO gifi (accno,description) VALUES ('4976', 'Aufwend.a.d.Veräußerung v.Anteilen an Kap.Ges.100%/50% n.abzugsf.');
+INSERT INTO gifi (accno,description) VALUES ('4980', 'Betriebsbedarf');
+INSERT INTO gifi (accno,description) VALUES ('4985', 'Werkzeuge und Kleingeräte');
+INSERT INTO gifi (accno,description) VALUES ('4990', 'Kalkulatorischer Unternehmerlohn');
+INSERT INTO gifi (accno,description) VALUES ('4992', 'Kalkulatorische Zinsen');
+INSERT INTO gifi (accno,description) VALUES ('4993', 'Kalkulatorische Aschreibungen');
+INSERT INTO gifi (accno,description) VALUES ('4994', 'Kalkulatorische Wagnisse');
+INSERT INTO gifi (accno,description) VALUES ('4995', 'Kalkulatorischer Lohn f.unentgeltl.Mitarbeiter');
+INSERT INTO gifi (accno,description) VALUES ('4996', 'Herstellungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4997', 'Verwaltungskosten');
+INSERT INTO gifi (accno,description) VALUES ('4998', 'Vertriebskosten');
+INSERT INTO gifi (accno,description) VALUES ('7000', 'Unfertige Erzeu.unfert.Leistungen (Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('7050', 'Unfertige Erzeugnisse (Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('7080', 'Unfertige Leistungen (Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('7090', 'In Ausführung befindl. Bauaufträge');
+INSERT INTO gifi (accno,description) VALUES ('7095', 'In Arbeit befindliche Aufträge');
+INSERT INTO gifi (accno,description) VALUES ('7100', 'Fertige Erzeugnisse und Waren(Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('7110', 'Fertige Erzeugnisse (Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('7140', 'Waren (Bestand)');
+INSERT INTO gifi (accno,description) VALUES ('8100', 'Steuerfreie Umsätze §4Nr.8ff UstG');
+INSERT INTO gifi (accno,description) VALUES ('8110', 'Sonstige steuerfreie Umsätze Inland');
+INSERT INTO gifi (accno,description) VALUES ('8120', 'Steuerfreie Umsätze §4Nr.1a UstG');
+INSERT INTO gifi (accno,description) VALUES ('8125', 'Steuerfrei innergem. Lieferungen §41bUStG');
+INSERT INTO gifi (accno,description) VALUES ('8130', 'Liefe.d.1.Abnehm.bei innergem.Dreiecksg §25b2UStG');
+INSERT INTO gifi (accno,description) VALUES ('8135', 'Steuerfr.innergem.Lief.v.Neufahrz.an Abn.o.USt-Ident-Nr.');
+INSERT INTO gifi (accno,description) VALUES ('8140', 'Steuerfreie Umsätze Offshore usw.');
+INSERT INTO gifi (accno,description) VALUES ('8150', 'Sonstige steuerfreie Umsätze §42-7UStG');
+INSERT INTO gifi (accno,description) VALUES ('8196', 'Erlöse aus Geldspielautomaten 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8200', 'Erlöse');
+INSERT INTO gifi (accno,description) VALUES ('8300', 'Erlöse 7%USt');
+INSERT INTO gifi (accno,description) VALUES ('8310', 'Erlöse Inland stpfl. EG-Lieferung7%');
+INSERT INTO gifi (accno,description) VALUES ('8315', 'Erlös Inland stpfl.EG-Lieferung 16%');
+INSERT INTO gifi (accno,description) VALUES ('8320', 'Erlöse aus im and.EG-Land steuerpfl.Lieferungen');
+INSERT INTO gifi (accno,description) VALUES ('8339', 'Erl.EG-Land stpfl.so.Leist.(0-Regl)');
+INSERT INTO gifi (accno,description) VALUES ('8400', 'Erlöse 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8500', 'Provisionserlöse');
+INSERT INTO gifi (accno,description) VALUES ('8504', 'Provisionserlöse,steuerfrei (§4Nr.8ff.UStG)');
+INSERT INTO gifi (accno,description) VALUES ('8505', 'Provisionserlöse,steuerfrei (§4Nr.5UStG)');
+INSERT INTO gifi (accno,description) VALUES ('8506', 'Provisionserlöse 7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8508', 'Provisionserlöse 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8520', 'Erlöse Abfallverwertung');
+INSERT INTO gifi (accno,description) VALUES ('8540', 'Erlös Leergut');
+INSERT INTO gifi (accno,description) VALUES ('8590', 'Verrechnete sons. Sachbezüge keine Waren');
+INSERT INTO gifi (accno,description) VALUES ('8591', 'Sachbezüge 7% Ust (Waren)');
+INSERT INTO gifi (accno,description) VALUES ('8595', 'Sachbezüge 16% Ust (Waren)');
+INSERT INTO gifi (accno,description) VALUES ('8600', 'Sonstige Erlöse betriebl.u.regelmäß');
+INSERT INTO gifi (accno,description) VALUES ('8610', 'Verrechnete sonstige Sachbezüge');
+INSERT INTO gifi (accno,description) VALUES ('8611', 'Verr.sons.Sachbezüge 16%USt(Kfz-Gestellung)');
+INSERT INTO gifi (accno,description) VALUES ('8614', 'Verrechnete sons.Sachbezüge o. USt');
+INSERT INTO gifi (accno,description) VALUES ('8625', 'Sons. Erlöse betriebl.u.reg.steuerf');
+INSERT INTO gifi (accno,description) VALUES ('8650', 'Erlöse Zinsen und Diskotspesen');
+INSERT INTO gifi (accno,description) VALUES ('8630', 'Sonst.Erlöse betriebl.u.regelmäßig 7% USt');
+INSERT INTO gifi (accno,description) VALUES ('8640', 'Sonst.Erlöse betriebl.u.regelmäßig 16% USt');
+INSERT INTO gifi (accno,description) VALUES ('8660', 'Erlöse Zinsen u.Diskontspesen aus verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('8700', 'Erlösschmälerungen');
+INSERT INTO gifi (accno,description) VALUES ('8705', 'Erlösschmälerungen aus steuerfr.Umsätzen §4 Nr.1a UStG');
+INSERT INTO gifi (accno,description) VALUES ('8710', 'Erlösschmälerung 7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8720', 'Erlösschmälerung 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8724', 'Erlösschmäler.a.stfrei.IG Lieferung');
+INSERT INTO gifi (accno,description) VALUES ('8725', 'Erlösschmä.Inl.stpfl.EG-Lief. 7%USt');
+INSERT INTO gifi (accno,description) VALUES ('8726', 'Erlösschmä.Inl.stpfl.EG-Lief.16%USt');
+INSERT INTO gifi (accno,description) VALUES ('8727', 'Erlösschmä.and.EG Land stpfl.Liefer');
+INSERT INTO gifi (accno,description) VALUES ('8729', 'Erlösschmälerungen aus im Inland steuerpfl.EG-Lief.15% USt');
+INSERT INTO gifi (accno,description) VALUES ('8730', 'Gewährte Skonti');
+INSERT INTO gifi (accno,description) VALUES ('8731', 'Gewährte Skonti 7% USt');
+INSERT INTO gifi (accno,description) VALUES ('8735', 'Gewährte Skonti 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8740', 'Gewährte Boni');
+INSERT INTO gifi (accno,description) VALUES ('8750', 'Gewährte Boni 7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8760', 'Gewährte Boni 16% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8770', 'Gewährte Rabatte');
+INSERT INTO gifi (accno,description) VALUES ('8780', 'Gewährte Rabatte 7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8790', 'Gewährte Rabatte 16% Ust.');
+INSERT INTO gifi (accno,description) VALUES ('8800', 'Erlöse aus Anlagenverkäufen');
+INSERT INTO gifi (accno,description) VALUES ('8801', 'Erlöse aus Anlagenverkäufen Sachanl.verm.b.Buchverl.16%USt.');
+INSERT INTO gifi (accno,description) VALUES ('8817', 'Erlöse aus Verkäufen immat.VG (bei Buchverlust)');
+INSERT INTO gifi (accno,description) VALUES ('8818', 'Erlöse aus Verkäufen Finanzanlagen (bei Buchverlust)');
+INSERT INTO gifi (accno,description) VALUES ('8819', 'Erlöse aus Verkäufen Finanzanl.100%/50% nicht abzugsf.(b.Buchverlust)');
+INSERT INTO gifi (accno,description) VALUES ('8820', 'Erlöse aus Anlageverkäufen Sachanl.verm.b.Buchgewinn16%Ust');
+INSERT INTO gifi (accno,description) VALUES ('8829', 'Erl.a.Anlagenverk.bei Buchgewinn');
+INSERT INTO gifi (accno,description) VALUES ('8837', 'Erlöse aus Verk.immat.VG (bei Buchgewinn)');
+INSERT INTO gifi (accno,description) VALUES ('8838', 'Erlöse aus Verkäufen Finanzanlagen (bei Buchgewinn)');
+INSERT INTO gifi (accno,description) VALUES ('8839', 'Erlöse aus Verkäufen Finanzanlagen 100%/50% steuerfrei (bei Buchgewinn)');
+INSERT INTO gifi (accno,description) VALUES ('8900', 'Unentgeldliche Wertabgaben');
+INSERT INTO gifi (accno,description) VALUES ('8905', 'Entnahme v. Gegenst.o.USt.');
+INSERT INTO gifi (accno,description) VALUES ('8910', 'Entnahme des Untern.f.Zwecke ausserh.d.Untern 16%(Waren)');
+INSERT INTO gifi (accno,description) VALUES ('8915', 'Entnah.d.Untern.f.Zwecke ausserh.d.Untern.7%USt');
+INSERT INTO gifi (accno,description) VALUES ('8919', 'Entnahme durch den Untern.f.Zwecke außerhalb d.Untern.(Waren)o.USt');
+INSERT INTO gifi (accno,description) VALUES ('8920', 'Verw.v.Gegens.f.Zwecke ausserh.d.Untern.16%USt.');
+INSERT INTO gifi (accno,description) VALUES ('8924', 'Verwendung v.Gegenständen f.Zwecke außerhalb d.Untern.o.USt.');
+INSERT INTO gifi (accno,description) VALUES ('8925', 'Unentgeldl.Erbring.sons.Leis.16%USt');
+INSERT INTO gifi (accno,description) VALUES ('8929', 'Unentgeltliche Erbringung einer sonst.Leistung o.USt.');
+INSERT INTO gifi (accno,description) VALUES ('8930', 'Verwendung v.Gegenst.f.Zwecke außerhalb d.Unternehmens 7% USt.');
+INSERT INTO gifi (accno,description) VALUES ('8932', 'Unentgelt.Erbring.sons.Leist. 7%Ust');
+INSERT INTO gifi (accno,description) VALUES ('8935', 'Unentgeltl.Zuwend.v.Gegens. 16% Ust');
+INSERT INTO gifi (accno,description) VALUES ('8939', 'Unentgeldl.Zuw.v.Gegens.ohne Ust');
+INSERT INTO gifi (accno,description) VALUES ('8940', 'Unentgeltl.Zuw.v Waren 16% Ust');
+INSERT INTO gifi (accno,description) VALUES ('8945', 'Unentgeltl.Zuw.von Waren 7% Ust');
+INSERT INTO gifi (accno,description) VALUES ('8949', 'Unentgeltl.Zuwendung v.Waren o.USt.');
+INSERT INTO gifi (accno,description) VALUES ('8950', 'Nicht steuerbare Umsätze');
+INSERT INTO gifi (accno,description) VALUES ('8955', 'Umsatzsteuervergütungen');
+INSERT INTO gifi (accno,description) VALUES ('8960', 'Bestandsveränderung-unfertige Erzeu');
+INSERT INTO gifi (accno,description) VALUES ('8970', 'Bestandsveränderung-unfertige Leist');
+INSERT INTO gifi (accno,description) VALUES ('8975', 'Bestandsverä.i.Ausfü.befi.Bauaufträ');
+INSERT INTO gifi (accno,description) VALUES ('8977', 'Bestandsverä.i.Arbeit befindl.Auftr');
+INSERT INTO gifi (accno,description) VALUES ('8980', 'Bestandsverä.fertige Erzeugnisse');
+INSERT INTO gifi (accno,description) VALUES ('8990', 'Andere aktivierte Eigenleistungen');
+INSERT INTO gifi (accno,description) VALUES ('9000', 'Saldenverträge,Sachkonten');
+INSERT INTO gifi (accno,description) VALUES ('9008', 'Saldenverträge,Debitoren');
+INSERT INTO gifi (accno,description) VALUES ('9009', 'Saldenverträge,Kreditoren');
+INSERT INTO gifi (accno,description) VALUES ('9060', 'Offene Posten aus 1990');
+INSERT INTO gifi (accno,description) VALUES ('9069', 'Offene Posten aus 1999');
+INSERT INTO gifi (accno,description) VALUES ('9070', 'Offene Posten aus 2000');
+INSERT INTO gifi (accno,description) VALUES ('9071', 'Offene Posten aus 2001');
+INSERT INTO gifi (accno,description) VALUES ('9072', 'Offene Posten aus 2002');
+INSERT INTO gifi (accno,description) VALUES ('9090', 'Summenvortragskonto');
+INSERT INTO gifi (accno,description) VALUES ('9220', 'Gezeichnetes kapital in DM');
+INSERT INTO gifi (accno,description) VALUES ('9221', 'Gezeichnetes Kapital in Euro');
+INSERT INTO gifi (accno,description) VALUES ('9229', 'Gegenkonto zu 9220-9221');
+INSERT INTO gifi (accno,description) VALUES ('9230', 'Baukostenzuschüsse');
+INSERT INTO gifi (accno,description) VALUES ('9232', 'Investitionszulagen');
+INSERT INTO gifi (accno,description) VALUES ('9234', 'Investitionszuschüsse');
+INSERT INTO gifi (accno,description) VALUES ('9240', 'Investitionsverbindlichkeiten bei den Leistungsvblk.');
+INSERT INTO gifi (accno,description) VALUES ('9241', 'Investitionsvblk.aus Sachanlagenkäufen b.Leistungsvblk.');
+INSERT INTO gifi (accno,description) VALUES ('9242', 'Investitionsvblk.aus Käufen v.immat.VG bei Leistungsvblk.');
+INSERT INTO gifi (accno,description) VALUES ('9243', 'Investitionsvblk.aus Käufen v.Finanzanlagen bei Leistungsvblk.');
+INSERT INTO gifi (accno,description) VALUES ('9244', 'Gegenkonto zu Konten 9240-43');
+INSERT INTO gifi (accno,description) VALUES ('9245', 'Forde.a.Sachanlageverk.b.Sonst.VG');
+INSERT INTO gifi (accno,description) VALUES ('9246', 'Ford.a.Verk.immat.VG b.sonst.VG');
+INSERT INTO gifi (accno,description) VALUES ('9247', 'Ford.a.Verk.v.Finanzanlagen b.sonst.VG');
+INSERT INTO gifi (accno,description) VALUES ('9249', 'Gegenkonto zu Konten 9245-47');
+INSERT INTO gifi (accno,description) VALUES ('9250', 'Eigenkapitalersetzende Gesellschafterdarlehen');
+INSERT INTO gifi (accno,description) VALUES ('9255', 'Ungesicherte Gesellschafterdarl.m.Restlaufz. größer als 5 Jahre');
+INSERT INTO gifi (accno,description) VALUES ('9259', 'Gegenkonto zu 9250 und 9255');
+INSERT INTO gifi (accno,description) VALUES ('9260', 'Kurzfristige Rückstellung');
+INSERT INTO gifi (accno,description) VALUES ('9262', 'Mittelfristige Rückstellung');
+INSERT INTO gifi (accno,description) VALUES ('9264', 'Langfristige Rückstellungen');
+INSERT INTO gifi (accno,description) VALUES ('9269', 'Gegenkonto zu Konten 9260-9268');
+INSERT INTO gifi (accno,description) VALUES ('9270', 'Gegenkonto zu 9271-9278 (Soll-Buchung)');
+INSERT INTO gifi (accno,description) VALUES ('9271', 'Vblk.aus der Begebung u.Übertragung v.Wechseln');
+INSERT INTO gifi (accno,description) VALUES ('9272', 'Vblk.a.d.Begebung u.Übertragung v.Wechseln gegenüb.verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('9273', 'Vblk.a.Bürgschaften,Wechseln-u.Scheckbürgschaften');
+INSERT INTO gifi (accno,description) VALUES ('9274', 'Vblk.a.Bürgschaften,Wechseln-u.Scheckbürgschaften geg.verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('9275', 'Vblk.aus Gewährleistungsverträgen');
+INSERT INTO gifi (accno,description) VALUES ('9276', 'Vblk.a.Gewährleistungsverträgen geg.verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('9277', 'Haftung aus der Bestellung v.Sicherheiten f.fremde Vblk.');
+INSERT INTO gifi (accno,description) VALUES ('9278', 'Haftung a.d.Bestellung v.Sicherh.f.fremde Vblk.geg.verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('9280', 'Gegenkonto zu 9281-9284');
+INSERT INTO gifi (accno,description) VALUES ('9281', 'Verpfl.a.Miet-und Leasinggesch.');
+INSERT INTO gifi (accno,description) VALUES ('9282', 'Verpfl.geg.verb.Unternehmen');
+INSERT INTO gifi (accno,description) VALUES ('9283', 'Andere Verpflichtungen gem. §285 Nr.3HGB');
+INSERT INTO gifi (accno,description) VALUES ('9284', 'And.Verpfl.gem.§285 3 HGB verb.Untern.');
+INSERT INTO gifi (accno,description) VALUES ('9290', 'Statistisches Konto steuerfreie Auslagen');
+INSERT INTO gifi (accno,description) VALUES ('9291', 'Gegenkonto zu 9290');
+INSERT INTO gifi (accno,description) VALUES ('9292', 'Statistisches Konto Fremdgeld');
+INSERT INTO gifi (accno,description) VALUES ('9293', 'Gegenkonto zu 9292');
+INSERT INTO gifi (accno,description) VALUES ('9880', 'Ausgleichsposten f.aktivierte eigene Anteile');
+INSERT INTO gifi (accno,description) VALUES ('9882', 'Ausgleichsposten f.aktivierte Bilanzierungshilfen');
--- /dev/null
+-- Lizenzverwaltung
+CREATE TABLE "license" (
+ "id" integer DEFAULT nextval('id'::text),
+ "parts_id" integer,
+ "customer_id" integer,
+ "comment" text,
+ "validuntil" date,
+ "issuedate" date DEFAULT date ('now'::text),
+ "quantity" integer,
+ "licensenumber" text
+);
+CREATE INDEX "license_id_key" ON "license" (id);
+
+CREATE TABLE "licenseinvoice" (
+ trans_id integer,
+ license_id integer
+);
+
+--Datev-Ergänzungen
+alter table chart add column datevautomatik boolean;
+alter table chart alter column datevautomatik set default 'false';
+update chart set datevautomatik='false';
+
+alter table customer add column datevexport integer;
+alter table vendor add column datevexport integer;
+update customer set datevexport=1;
+update vendor set datevexport=1;
+
+create table datev (
+ "beraternr" character varying(7),
+ "beratername" character varying(9),
+ "mandantennr" character varying(5),
+ "dfvkz" character varying(2),
+ "datentraegernr" character varying(3),
+ "abrechnungsnr" character varying(6)
+);
+
+CREATE FUNCTION set_datevexport() RETURNS trigger AS '
+ BEGIN
+ IF OLD.datevexport IS NULL THEN
+ NEW.datevexport := 1;
+ END IF;
+ IF OLD.datevexport = 0 THEN
+ NEW.datevexport := 2;
+ END IF;
+ RETURN NEW;
+ END;
+' LANGUAGE plpgsql;
+
+CREATE TRIGGER customer_datevexport BEFORE UPDATE ON customer
+ FOR EACH ROW EXECUTE PROCEDURE set_datevexport();
+
+CREATE TRIGGER vendor_datevexport BEFORE UPDATE ON vendor
+ FOR EACH ROW EXECUTE PROCEDURE set_datevexport();
+
+alter table customer add column language varchar(5);
+alter table vendor add column language varchar(5);
+
+alter table oe add column cusordnumber text;
+alter table ar add column cusordnumber text;
+
+alter table parts rename column unit to unit_old;
+alter table parts add column unit varchar(10);
+update parts set unit=unit_old;
+alter table parts drop column unit_old;
+
+--
+--LINET-SK: add column account_number, bank code number and bank to customer and vendor
+alter table customer add column account_number varchar(10);
+alter table customer add column bank_code varchar(10);
+alter table customer add column bank text;
+--
+alter table vendor add column account_number varchar(10);
+alter table vendor add column bank_code varchar(10);
+alter table vendor add column bank text;
+
+--LINET-SK: add colum cp_id at oe, ar and ap
+alter table ap add column cp_id integer;
+alter table ar add column cp_id integer;
+alter table oe add column cp_id integer;
+
+--deafult-Werte für Kunden, Lieferanten und Artikelnummern
+alter table defaults add column customernumber text;
+alter table defaults add column vendornumber text;
+alter table defaults add column articlenumber text;
+alter table defaults add column servicenumber text;
+
+update defaults set customernumber=(select max(customernumber) from customer);
+update defaults set vendornumber=(select max(vendornumber) from vendor);
+update defaults set articlenumber=(select max(partnumber) from parts where inventory_accno_id notnull);
+update defaults set servicenumber=(select max(partnumber) from parts where inventory_accno_id isnull);
+
+--
+update defaults set version = '2.1.0';
--- /dev/null
+--Erweiterung Abteilung Lieferant/Kunde und Kundennummer beim Lieferanten
+alter table customer add column department_1 varchar(75);
+alter table customer add column department_2 varchar(75);
+alter table customer add column c_vendor_id text;
+
+alter table vendor add column department_1 varchar(75);
+alter table vendor add column department_2 varchar(75);
+alter table vendor add column v_customer_id text;
+
+--Erweitere jeweils Spalte unit von 5 auf 10 Stellen
+alter table invoice rename column unit to unitold;
+alter table invoice add column unit varchar(10);
+update invoice set unit=unitold;
+alter table invoice drop column unitold;
+
+alter table orderitems rename column unit to unitold;
+alter table orderitems add column unit varchar(10);
+update orderitems set unit=unitold;
+alter table orderitems drop column unitold;
+
+-- Table of tax authoritys
+-- for module ustva
+-- Lx office
+CREATE TABLE finanzamt (
+ FA_Land_Nr text,
+ FA_BUFA_Nr text,
+ FA_Name text,
+ FA_Strasse text,
+ FA_PLZ text,
+ FA_Ort text,
+ FA_Telefon text,
+ FA_Fax text,
+ FA_PLZ_Grosskunden text,
+ FA_PLZ_Postfach text,
+ FA_Postfach text,
+ FA_BLZ_1 text,
+ FA_Kontonummer_1 text,
+ FA_Bankbezeichnung_1 text,
+ FA_BLZ_2 text,
+ FA_Kontonummer_2 text,
+ FA_Bankbezeichnung_2 text,
+ FA_Oeffnungszeiten text,
+ FA_Email text,
+ FA_Internet text);
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1010','Saarlouis ','Gaswerkweg 25','66740','Saarlouis','06831/4490','06831/449397','','66714','1440','59000000','59301502','BBK SAARBRUECKEN','59010066','7761668','POSTBANK SAARBRUECKEN','Mo,Di,Do 7.30-15.30, Mi 7.30-18,Fr 7.30-12','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1020','Merzig ','Am Gaswerk','66663','Merzig','06861/7030','06861/703133','','66653','100232','59000000','59301502','BBK SAARBRUECKEN','59010066','7761668','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 7.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1030','Neunkirchen ','Uhlandstr.','66538','Neunkirchen','06821/1090','06821/109275','','66512','1234','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1040','Saarbrücken Am Stadtgr ','Am Stadtgraben 2-4','66111','Saarbrücken','0681/30000','0681/3000329','','66009','100952','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Di,Do 7.30-15.30, Mi 7.30-18,Fr 7.30-12','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1055','Saarbrücken MainzerStr ','Mainzer Str.109-111','66121','Saarbrücken','0681/30000','0681/3000762','','66009','100944','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Mi,Fr 8.30-12.00, zus. Mi 13.30 - 15.30','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1060','St. Wendel ','Marienstr. 27','66606','St. Wendel','06851/8040','06851/804189','','66592','1240','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1070','Sulzbach ','Vopeliusstr. 8','66280','Sulzbach','06897/9082-0','06897/9082110','','66272','1164','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Mi,Fr 08.30-12.00, zus. Mi 13.30-18.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1075','Homburg ','Schillerstr. 15','66424','Homburg','06841/6970','06841/697199','','66406','1551','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1085','St. Ingbert ','Rentamtstr. 39','66386','St. Ingbert','06894/984-01','06894/984159','','66364','1420','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 7.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1090','Völklingen ','Marktstr.','66333','Völklingen','06898/20301','06898/203133','','66304','101440','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1113','Berlin Charlottenburg','Bismarckstraße 48','10627','Berlin','030 9024-13-0','030 9024-13-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','facharlottenburg@berlin.de','http://www.berlin.de/ofd');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1114','Berlin Kreuzberg','Mehringdamm 22','10961','Berlin','030 9024-14-0','030 9024-14-900','10958','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakreuzberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1115','Berlin Neukölln','','','','','','','','','','','','','','','','faneukoelln@berlin.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1116','Berlin Neukölln','Thiemannstr. 1','12059','Berlin','030 9024-16-0','030 9024-16-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','faneukoelln@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1117','Berlin Reinickendorf','Eichborndamm 208','13403','Berlin','030 9024-17-0','030 9024-17-900','13400','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fareinickendorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1118','Berlin Schöneberg','Bülowstraße 85/88','10783','Berlin','030/9024-18-0','030/9024-18-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Montag und Freitag: 8:00 - 13:00 Uhr Donnerstag: 11:00 - 18:00 Uhr','faschoeneberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1119','Berlin Spandau','Nonnendammallee 15-21','13599','Berlin','030/9024-19-0','030/9024-19-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','faspandau@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1120','Berlin Steglitz','Schloßstr. 58/59','12165','Berlin','030/9024-20-0','030/9024-20-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fasteglitz@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1121','Berlin Tempelhof','Tempelhofer Damm 234/236','12099','Berlin','030 9024-21-0','030 9024-21-900','12096','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fatempelhof@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1123','Berlin Wedding','Osloer Straße 37','13359','Berlin','030 9024-23-0','030 9024-23-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fawedding@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1124','Berlin Wilmersdorf','Blissestr. 5','10713','Berlin','030/9024-24-0','030/9024-24-900','10702','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fawilmersdorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1125','Berlin Zehlendorf','Martin-Buber-Str. 20/21','14163','Berlin','030 9024-25-0','030 9024-25-900','14160','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fazehlendorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1127','Berlin für Körperschaften I','Gerichtstr. 27','13347','Berlin','030 9024-27-0','030 9024-27-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoerperschaften1@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1128','Berlin Pankow/Weißennsee - nur KFZ-Steuer -','Berliner Straße 32','13089','Berlin','030/4704-0','030/94704-1777','13083','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','pankow.weissensee@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1129','Berlin für Körperschaften III','Volkmarstr. 13','12099','Berlin','030/70102-0','030/70102-100','','12068','420844','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften3@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1130','Berlin für Körperschaften IV','Magdalenenstr. 25','10365','Berlin','030 9024-30-0','030 9024-30-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften4@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1131','Berlin Friedrichsh./Prenzb.','Pappelallee 78/79','10437','Berlin','030 9024-28-0','030 9024-28-900','10431','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fafriedrichshain.prenzlauerberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1132','Berlin Lichtenb./Hohenschh.','Josef-Orlopp-Str. 62','10365','Berlin','030/5501-0','030/55012222','10358','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','falichtenberg.hohenschoenhausen@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1133','Berlin Hellersdorf/Marzahn','Allee der Kosmonauten 29','12681','Berlin','030 9024-26-0','030 9024-26-900','12677','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fahellersdorf.marzahn@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1134','Berlin Mitte/Tiergarten','Neue Jakobstr. 6-7','10179','Berlin','030 9024-22-0','030 9024-22-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','famitte.tiergarten@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1135','Berlin Pankow/Weißensee','Berliner Straße 32','13089','Berlin','030/4704-0','030/47041777','13083','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','pankow.weissensee@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1136','Berlin Treptow/Köpenick','Seelenbinderstr. 99','12555','Berlin','030 9024-12-0','030 9024-12-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fatreptow.koepenick@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1137','Berlin für Körperschaften II','Magdalenenstr. 25','10365','Berlin','030 9024-29-0','030 9024-29-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften2@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1138','Berlin für Fahndung und Strafsachen','Colditzstr. 41','12099','Berlin','030/70102-777','030/70102-700','','','','','','','','','','Mo - Mi 10:00 - 14:00, Do 10:00 - 18:00, Fr 10:00 - 14:00 Uhr','fafahndung.strafsachen@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2111','Bad Segeberg ','Theodor-Storm-Str. 4-10','23795','Bad Segeberg','04551 54-0','04551 54-303','23792','','','23000000','23001502','BBK LUEBECK','23051030','744','KR SPK SUEDHOLSTEIN BAD SEG','0830-1200 MO, DI, DO, FR, 1330-1630 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2112','Eckernförde ','Bergstr. 50','24340','Eckernförde','04351 756-0','04351 83379','','24331','1180','21000000','21001500','BBK KIEL','21092023','11511260','ECKERNFOERDER BANK VRB','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2113','Elmshorn ','Friedensallee 7-9','25335','Elmshorn','04121 481-0','04121 481-460','25333','','','22200000','22201502','BBK KIEL EH ITZEHOE','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2114','Eutin ','Robert-Schade-Str. 22','23701','Eutin','04521 704-0','04521 704-406','','23691','160','23000000','23001505','BBK LUEBECK','21352240','4283','SPK OSTHOLSTEIN EUTIN','0830-1200 MO-FR, Nebenstelle Janusstr. 5 am Mo., Di, Do und Fr. 0830-1200, Do. 1330-1700','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2115','Flensburg ','Duburger Str. 58-64','24939','Flensburg','0461 813-0','0461 813-254','','24905','1552','21500000','21501500','BBK FLENSBURG','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2116','Heide ','Ernst-Mohr-Str. 34','25746','Heide','0481 92-1','0481 92-690','25734','','','21500000','21701502','BBK FLENSBURG','22250020','60000123','SPK WESTHOLSTEIN','0800-1200 MO, DI, DO, FR, 1400-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2117','Husum ','Herzog-Adolf-Str. 18','25813','Husum','04841 8949-0','04841 8949-200','','25802','1230','21500000','21701500','BBK FLENSBURG','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2118','Itzehoe ','Fehrsstr. 5','25524','Itzehoe','04821 66-0','04821 661-499','','25503','1344','22200000','22201500','BBK KIEL EH ITZEHOE','','','','0800-1200 MO, DI, DO, FR, 1400-1730 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2119','Kiel-Nord ','Holtenauer Str. 183','24118','Kiel','0431 8819-0','0431 8819-1200','24094','','','21000000','21001501','BBK KIEL','21050000','52001500','HSH NORDBANK KIEL','0800-1200 MO-FR 1430-1600 DI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2120','Kiel-Süd ','Hopfenstr. 2a','24114','Kiel','0431 602-0','0431 602-1009','24095','','','21000000','21001502','BBK KIEL','21050000','52001510','HSH NORDBANK KIEL','0800-1200 MO, DI, DO, FR, 1430-1730 DI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2121','Leck ','Eesacker Str. 11 a','25917','Leck','04662 85-0','04662 85-266','','25912','1240','21700000','21701501','BBK FLENSBURG EH HUSUM','21750000','80003569','NORD-OSTSEE SPK SCHLESWIG','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2122','Lübeck ','Possehlstr. 4','23560','Lübeck','0451 132-0','0451 132-501','23540','','','23000000','23001500','BBK LUEBECK','21050000','7052000200','HSH NORDBANK KIEL','0730-1300 MO+DI 0730-1700 Do 0730-1200 Fr','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2123','Meldorf ','Jungfernstieg 1','25704','Meldorf','04832 87-0','04832 87-2508','','25697','850','21500000','21701503','BBK FLENSBURG','21851830','106747','VERB SPK MELDORF','0800-1200 MO, DI, DO, FR, 1400-1700 MO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2124','Neumünster ','Bahnhofstr. 9','24534','Neumünster','04321 496 0','04321 496-189','24531','','','21000000','21001507','BBK KIEL','','','','0800-1200 MO-MI, FR 1400-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2125','Oldenburg ','Lankenstr. 1','23758','Oldenburg','04361 497-0','04361 497-125','','23751','1155','23000000','23001504','BBK LUEBECK','21352240','51000396','SPK OSTHOLSTEIN EUTIN','0900-1200 MO-FR 1400-1600 MI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2126','Plön ','Fünf-Seen-Allee 1','24306','Plön','04522 506-0','04522 506-2149','','24301','108','21000000','21001503','BBK KIEL','21051580','2600','SPK KREIS PLOEN','0800-1200 MO, Di, Do, Fr, 1400-1700 Di','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2127','Ratzeburg ','Bahnhofsallee 20','23909','Ratzeburg','04541 882-01','04541 882-200','23903','','','23000000','23001503','BBK LUEBECK','23052750','100188','KR SPK LAUENBURG RATZEBURG','0830-1230 MO, DI, DO, FR, 1430-1730 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2128','Rendsburg ','Ritterstr. 10','24768','Rendsburg','04331 598-0','04331 598-2770','','24752','640','21000000','21001504','BBK KIEL','21450000','1113','SPK MITTELHOLSTEIN RENDSBG','0730-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2129','Schleswig ','Suadicanistr. 26-28','24837','Schleswig','04621 805-0','04621 805-290','','24821','1180','21500000','21501501','BBK FLENSBURG','21690020','91111','VOLKSBANK RAIFFEISENBANK','0800-1200 MO, DI, DO, FR, 1430-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2130','Stormarn ','Berliner Ring 25','23843','Bad Oldesloe','04531 507-0','04531 507-399','23840','','','23000000','23001501','BBK LUEBECK','23051610','20503','SPK BAD OLDESLOE','0830-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2131','Pinneberg ','Friedrich-Ebert-Str. 29','25421','Pinneberg','04101 5472-0','04101 5472-680','','25404','1451','22200000','22201503','BBK KIEL EH ITZEHOE','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2132','Bad Segeberg / Außenst.Norderstedt','Europaallee 22','22850','Norderstedt','040 523068-0','040 523068-70','','','','23000000','23001502','BBK LUEBECK','23051030','744','KR SPK SUEDHOLSTEIN BAD SEG','0830-1200 MO, DI, DO, FR, 1330-1630 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2201','Hamburg Steuerkasse','Steinstraße 10','20095','Hamburg','040/42853-03','040/42853-2159','','20041','106026','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerSteuererhebung@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2202','Hamburg-Altona ','Gr. Bergstr. 264/266','22767','Hamburg','040/42811-02','040/42811-2871','','22704','500471','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgAltona@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2203','Hamburg-Bergedorf ','Ludwig-Rosenberg-Ring 41','21031','Hamburg','040/42891-0','040/42891-2243','','21003','800360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgBergedorf@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2206','Hamburg-Harburg ','Harburger Ring 40','21073','Hamburg','040/42871-0','040/42871-2215','','21043','900352','20000000','200 015 30','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgHarburg@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2208','Hamburg-Wandsbek ','Schloßstr.107','22041','Hamburg','040/42881-0','040/42881-2888','','22006','700660','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgWandsbek@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2209','Hamburg-Oberalster ','Hachmannplatz 2','20099','Hamburg','040/42854-90','040/42854-4960','','20015','102248','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgOberalster@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2210','Hamburg f.VerkSt.u.Grundbes-10','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2215','Hamburg-Barmbek-Uhlenhorst 15 ','Lübecker Str. 101-109','22087','Hamburg','040/42860-0','040/42860-730','','22053','760360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgBarmbekUhlenhorst@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2216','Hamburg f.VerkSt.u.Grundbes-16','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2217','Hamburg-Mitte-Altstadt 17 ','Wendenstraße 35 b','20097','Hamburg','040/42853-06','040/42853-6671','','20503','261338','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgMitteAltstadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2220','Hamburg f.VerkSt.u.Grundbes-20','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6599','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2222','Hamburg-Hansa ','Steinstraße 10','20095','Hamburg','040/42853-01','040/42853-2064','','20015','102244','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgHansa@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2224','Hamburg-Mitte-Altstadt ','Wendenstr. 35 b','20097','Hamburg','040/42853-06','040/42853-6671','','20503','261338','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgMitteAltstadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2225','Hamburg-Neustadt-St.Pauli ','Steinstraße 10','20095','Hamburg','040/42853-02','040/42853-2106','','20015','102246','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgNeustadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2226','Hamburg-Nord ','Borsteler Chaussee 45','22453','Hamburg','040/42806-0','040/42806-220','','22207','600707','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgNord@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2227','Hamburg für Großunternehmen','Amsinckstr. 40','20097','Hamburg','040/42853-05','040/42853-5559','','20015','102205','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerGroßunternehmen@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2228','Hamburg Neust.-St.Pauli-28','Steinstr. 10','20095','Hamburg','040/42853-3589','040/42853-2106','','20015','102246','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgNeustadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2230','Hamburg f.Verkehrst.u.Grundbes','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6799','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2235','Hamburg f.VerkSt.u.Grundbes-35','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2254','Hamburg-Eimsbüttel ','Stresemannstraße 23','22769','Hamburg','040/42807-0','040/42807-220','','22770','570110','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgEimsbuettel@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2257','Hamburg-Am Tierpark ','Hugh-Greene-Weg 6','22529','Hamburg','','','','22520','','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgAmTierpark@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2271','Hamburg-Barmbek-Uhlenhorst ','Lübecker Str. 101-109','22087','Hamburg','040/42860-0','040/42860-730','','22053','760360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FABarmbekUhlenhorst@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2311','Alfeld (Leine) ','Ravenstr.10','31061','Alfeld','05181/7050','05181/705240','','31042','1244','25000000','25901505','BBK HANNOVER','25950130','10011102','KR SPK HILDESHEIM','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-alf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2312','Bad Gandersheim ','Alte Gasse 24','37581','Bad Gandersheim','05382/760','(05382) 76-213 + 204','','37575','1180','26000000','26001501','BBK GOETTINGEN','25050000','22801005','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-gan.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2313','Braunschweig-Altewiekring ','Altewiekring 20','38102','Braunschweig','0531/7050','0531/705309','','38022','3229','27000000','27001501','BBK BRAUNSCHWEIG','25050000','2498020','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mo. 14.00 - 17.00 Uhr','Poststelle@fa-bs-a.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2314','Braunschweig-Wilhelmstr. ','Wilhelmstr. 4','38100','Braunschweig','0531/4890','0531/489224','','38022','3249','27000000','27001502','BBK BRAUNSCHWEIG','25050000','811422','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mo. 14.00 - 17.00 Uhr','Poststelle@fa-bs-w.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2315','Buchholz in der Nordheide ','Bgm.-A.-Meyer-Str. 5','21244','Buchholz','04181/2030','(04181) 203-4444','','21232','1262','20000000','20001520','BBK HAMBURG','20750000','3005063','SPK HARBURG-BUXTEHUDE','Mo. - Fr. 8.00 - 12.00 Uhr , Do. 14.00 - 17.00 Uhr','Poststelle@fa-buc.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2316','Burgdorf ','V.d.Hannov. Tor 30','31303','Burgdorf','05136/8060','05136/806144','31300','','','25000000','25001515','BBK HANNOVER','25050180','1040400010','SPARKASSE HANNOVER','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-bu.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2317','Celle ','Sägemühlenstr. 5','29221','Celle','(05141) 915-0','05141/915666','','29201','1107','25000000','25701511','BBK HANNOVER','25750001','59','SPARKASSE CELLE','Mo. - Fr. 8.00 - 12.00 Uhr , Do. 14.00 - 17.00 Uhr','Poststelle@fa-ce.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2318','Cuxhaven ','Poststr. 81','27474','Cuxhaven','(04721) 563-0','04721/563313','','27452','280','29000000','24101501','BBK BREMEN','24150001','100503','ST SPK CUXHAVEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-cux.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2319','Gifhorn ','Braunschw. Str. 6-8','38518','Gifhorn','05371/8000','05371/800241','','38516','1249','27000000','27001503','BBK BRAUNSCHWEIG','26951311','11009958','SPK GIFHORN-WOLFSBURG','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00','Poststelle@fa-gf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2320','Göttingen ','Godehardstr. 6','37073','Göttingen','0551/4070','0551/407449','37070','','','26000000','26001500','BBK GOETTINGEN','26050001','91','SPARKASSE GOETTINGEN','Servicecenter: Mo., Di., Mi. und Fr. 8.00 - 12.00 u. Do. 8.00 - 17.00 Uhr,','Poststelle@fa-goe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2321','Goslar ','Wachtelpforte 40','38644','Goslar','05321/5590','05321/559200','','38604','1440','27000000','27001505','BBK BRAUNSCHWEIG','26850001','2220','SPARKASSE GOSLAR/HARZ','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-gs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2322','Hameln ','Süntelstraße 2','31785','Hameln','05151/2040','05151/204200','','31763','101325','25000000','25401511','BBK HANNOVER','25450001','430','ST SPK HAMELN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2323','Hannover-Land I ','Göttinger Chaus. 83A','30459','Hannover','(0511) 419-1','0511/4192269','','30423','910320','25000000','25001512','BBK HANNOVER','25050000','101342434','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-l1.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2324','Hannover-Mitte ','Lavesallee 10','30169','Hannover','0511/16750','0511/1675277','','30001','143','25000000','25001516','BBK HANNOVER','25050000','101341816','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhrund nach Vereinbarung','Poststelle@fa-h-mi.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2325','Hannover-Nord ','Vahrenwalder Str.206','30165','Hannover','0511/67900','(0511) 6790-6090','','30001','167','25000000','25001514','BBK HANNOVER','25050000','101342426','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-no.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2326','Hannover-Süd ','Göttinger Chaus. 83B','30459','Hannover','0511/4191','0511/4192575','','30423','910355','25000000','25001517','BBK HANNOVER','25050000','101342400','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-su.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2327','Hannover-Land II ','Vahrenwalder Str.208','30165','Hannover','0511/67900','(0511) 6790-6633','','30001','165','25000000','25001520','BBK HANNOVER','25050000','101342517','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-l2.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2328','Helmstedt ','Ernst-Koch-Str.3','38350','Helmstedt','05351/1220','(05351) 122-299','','38333','1320','27000000','27101500','BBK BRAUNSCHWEIG','25050000','5801006','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-he.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2329','Herzberg am Harz ','Sieberstr. 1','37412','Herzberg','05521/8570','05521/857220','','37401','1153','26000000','26001502','BBK GOETTINGEN','26351015','1229327','SPARKASSE IM KREIS OSTERODE','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hz.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2330','Hildesheim ','Kaiserstrasse 47','31134','Hildesheim','05121/3020','05121/302480','','31104','100455','25000000','25901500','BBK HANNOVER','25950130','5555','KR SPK HILDESHEIM','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-hi.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2331','Holzminden ','Ernst-August-Str.30','37603','Holzminden','05531/1220','05531/122100','','37601','1251','25000000','25401512','BBK HANNOVER','25050000','27811140','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2332','Lüchow ','Mittelstr.5','29439','Lüchow','(05841) 963-0','05841/963170','','29431','1144','24000000','25801503','BBK LUENEBURG','25851335','2080000','KR SPK LUECHOW-DANNENBERG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-luw.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2333','Lüneburg ','Am Alt. Eisenwerk 4a','21339','Lüneburg','04131/3050','04131/305915','21332','','','24000000','24001500','BBK LUENEBURG','24050110','18','SPK LUENEBURG','Mo. - Fr. 8.00-12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-lg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2334','Nienburg/Weser ','Schloßplatz 10','31582','Nienburg','05021/8011','05021/801300','','31580','2000','25000000','25601500','BBK HANNOVER','25650106','302224','SPARKASSE NIENBURG','Mo. - Fr. 7.30 - 12.00 Uhr und nach Vereinbarung, zusätzl. Arbeitnehmerbereich: Do. 14 -','Poststelle@fa-ni.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2335','Northeim ','Graf-Otto-Str. 31','37154','Northeim','05551/7040','05551/704221','','37142','1261','26000000','26201500','BBK GOETTINGEN','26250001','208','KR SPK NORTHEIM','Mo. - Fr. 8.30 - 12.30 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nom.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2336','Osterholz-Scharmbeck ','Pappstraße 2','27711','Osterholz-Scharmbeck','04791/3020','04791/302101','','27701','1120','29000000','29001523','BBK BREMEN','29152300','202622','KR SPK OSTERHOLZ','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ohz.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2338','Peine ','Duttenstedt.Str. 106','31224','Peine','05171/4070','05171/407199','31221','','','27000000','27001507','BBK BRAUNSCHWEIG','25250001','75003210','KR SPK PEINE','Mo. - Mi. Fr. 9.00 - 12.00, Do. 13.30 - 16.00 UhrDo. (Infothek) 13.30 -','Poststelle@fa-pe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2340','Rotenburg (Wümme) ','Hoffeldstr. 5','27356','Rotenburg','04261/740','04261/74108','','27342','1260','29000000','29001522','BBK BREMEN','24151235','26106377','SPK ROTENBURG-BREMERVOERDE','Mo. - Mi., Fr. 8.00 - 12.00 Uhr, Do. 8.00 - 17.30','Poststelle@fa-row.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2341','Soltau ','Rühberg 16 - 20','29614','Soltau','05191/8070','05191/807144','','29602','1243','24000000','25801502','BBK LUENEBURG','25851660','100016','KR SPK SOLTAU','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-sol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2342','Hannover-Land I Außenstelle Springe','Bahnhofstr. 28','31832','Springe','05041/7730','05041/77363','','31814','100255','25000000','25001512','BBK HANNOVER','25050180','3001000037','SPARKASSE HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-ast-spr.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2343','Stade ','Harburger Str. 113','21680','Stade','(04141) 536-0','(04141) 536-499','21677','','','24000000','24001560','BBK LUENEBURG','24151005','42507','SPK STADE-ALTES LAND','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-std.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2344','Stadthagen ','Schloß','31655','Stadthagen','05721/7050','05721/705250','31653','','','49000000','49001502','BBK MINDEN, WESTF','25551480','470140401','SPARKASSE SCHAUMBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-shg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2345','Sulingen ','Hindenburgstr. 16','27232','Sulingen','04271/870','04271/87289','','27226','1520','29000000','29001516','BBK BREMEN','25651325','30101430','KR SPK DIEPHOLZ','Mo., Mi., Do. und Fr. 8.00 - 12.00 Uhr, Di. 8.00 - 17.00 Uhr','Poststelle@fa-su.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2346','Syke ','Bürgerm.-Mävers-Str. 15','28857','Syke','04242/1620','04242/162423','','28845','1164','29000000','29001515','BBK BREMEN','29151700','1110044557','KREISSPARKASSE SYKE','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-sy.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2347','Uelzen ','Am Königsberg 3','29525','Uelzen','0581/8030','0581/803404','','29504','1462','24000000','25801501','BBK LUENEBURG','25850110','26','SPARKASSE UELZEN','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ue.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2348','Verden (Aller) ','Bremer Straße 4','27283','Verden','04231/9190','04231/919310','','27263','1340','29000000','29001517','BBK BREMEN','29152670','10000776','KR SPK VERDEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-ver.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2349','Wesermünde ','Borriesstr. 50','27570','Bremerhaven','0471/1830','0471/183119','','27503','100369','29000000','29201501','BBK BREMEN','29250150','100103200','KR SPK WESERMUENDE-HADELN','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-wem.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2350','Winsen (Luhe) ','Von-Somnitz-Ring 6','21423','Winsen','04171/6560','(04171) 656-115','','21413','1329','24000000','24001550','BBK LUENEBURG','20750000','7051519','SPK HARBURG-BUXTEHUDE','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 18.00 Uhr und nach Vereinbarung','Poststelle@fa-wl.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2351','Wolfenbüttel ','Jägerstr. 19','38304','Wolfenbüttel','05331/8030','(05331) 803-113/266 ','38299','','','27000000','27001504','BBK BRAUNSCHWEIG','25050000','9801002','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mi. 14.00 - 17.00 Uhr','Poststelle@fa-wf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2352','Zeven ','Kastanienweg 1','27404','Zeven','04281/7530','04281/753290','','27392','1259','29000000','29201503','BBK BREMEN','24151235','404350','SPK ROTENBURG-BREMERVOERDE','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-zev.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2353','Papenburg ','Große Straße 32','26871','Aschendorf','04962/5030','04962/503222','','26883','2264','28000000','28501512','BBK OLDENBURG (OLDB)','26650001','1020007','SPK EMSLAND','Mo. - Fr. 9.00 - 12.00 Uhr, Mi. 14.00 - 17.00 Uhr','Poststelle@fa-pap.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2354','Aurich ','Hasseburger Str. 3','26603','Aurich','04941/1750','04941/175152','','26582','1260','28000000','28501514','BBK OLDENBURG (OLDB)','28350000','90001','SPK AURICH-NORDEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-aur.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2355','Bad Bentheim ','Heinrich-Böll-Str. 2','48455','Bad Bentheim','05922/970-0','05922/970-2000','','48443','1262','26500000','26601501','BBK OSNABRUECK','26750001','1000066','KR SPK NORDHORN','Mo. - Fr. 9.00 - 12.00 Uhr, Do 14.00 - 15.30 Uhr','Poststelle@fa-ben.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2356','Cloppenburg ','Bahnhofstr. 57','49661','Cloppenburg','04471/8870','04471/887477','','49646','1680','28000000','28001501','BBK OLDENBURG (OLDB)','28050100','80402100','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-clp.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2357','Delmenhorst ','Fr.-Ebert-Allee 15','27749','Delmenhorst','04221/1530','04221/153126','27747','','','29000000','29001521','BBK BREMEN','28050100','30475669','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Di. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-del.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2358','Emden ','Ringstr. 5','26721','Emden','(04921) 934-0','(04921) 934-499','','26695','1553','28000000','28401500','BBK OLDENBURG (OLDB)','28450000','26','SPARKASSE EMDEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-emd.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2360','Leer (Ostfriesland) ','Edzardstr. 12/16','26789','Leer','(0491) 9870-0','0491/9870209','26787','','','28000000','28501511','BBK OLDENBURG (OLDB)','28550000','849000','SPARKASSE LEER-WEENER','Mo. - Fr. 8.00 - 12.00 Uhr, nur Infothek: Mo., Do. 14.00 - 17.30 Uhr','Poststelle@fa-ler.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2361','Lingen (Ems) ','Mühlentorstr. 14','49808','Lingen','0591/91490','0591/9149468','','49784','1440','26500000','26601500','BBK OSNABRUECK','26650001','2402','SPK EMSLAND','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-lin.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2362','Norden ','Mühlenweg 20','26506','Norden','04931/1880','04931/188196','','26493','100360','28000000','28501515','BBK OLDENBURG (OLDB)','28350000','1115','SPK AURICH-NORDEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nor.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2363','Nordenham ','Plaatweg 1','26954','Nordenham','04731/8700','04731/870100','','26942','1264','28000000','28001504','BBK OLDENBURG (OLDB)','28050100','63417000','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nhm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2364','Oldenburg (Oldenburg) ','91er Straße 4','26121','Oldenburg','0441/2381','(0441) 238-201/2/3','','26014','2445','28000000','28001500','BBK OLDENBURG (OLDB)','28050100','423301','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2365','Osnabrück-Land ','Hannoversche Str. 12','49084','Osnabrück','0541/58420','0541/5842450','','49002','1280','26500000','26501501','BBK OSNABRUECK','26552286','110007','KREISSPARKASSE MELLE','Mo., Mi., Do. u. Fr. 8.00 - 12.00 Uhr, Di. 12.00 - 17.00 Uhr','Poststelle@fa-os-l.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2366','Osnabrück-Stadt ','Süsterstr. 46/48','49074','Osnabrück','0541/3540','(0541) 354-312','','49009','1920','26500000','26501500','BBK OSNABRUECK','26550105','19000','SPARKASSE OSNABRUECK','Mo. - Mi., Fr. 8.00 - 12.00 Uhr, nur Infothek: Do. 12.00 - 17.00 Uhr','Poststelle@fa-os-s.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2367','Quakenbrück ','Lange Straße 37','49610','Quakenbrück','05431/1840','05431/184101','','49602','1261','26500000','26501503','BBK OSNABRUECK','26551540','18837179','KR SPK BERSENBRUECK','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-qua.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2368','Vechta ','Rombergstr. 49','49377','Vechta','04441/180','(04441) 18-100','49375','','','28000000','28001502','BBK OLDENBURG (OLDB)','28050100','70400049','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 8.30 - 12.00 Uhr, Mo. 14.00 - 16.00 Uhr,Mi. 14.00 - 17.00','Poststelle@fa-vec.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2369','Westerstede ','Ammerlandallee 14','26655','Westerstede','04488/5150','04488/515444','26653','','','28000000','28001503','BBK OLDENBURG (OLDB)','28050100','40465007','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-wst.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2370','Wilhelmshaven ','Rathausplatz 3','26382','Wilhelmshaven','04421/1830','04421/183111','','26354','1462','28000000','28201500','BBK OLDENBURG (OLDB)','28250110','2117000','SPARKASSE WILHELMSHAVEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-whv.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2371','Wittmund ','Harpertshausen.Str.2','26409','Wittmund','04462/840','04462/84195','','26398','1153','28000000','28201502','BBK OLDENBURG (OLDB)','','','','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-wtm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2380','Braunschweig für Großbetriebsprüfung','Theodor-Heuss-Str.4a','38122','Braunschweig','0531/80970','(0531) 8097-333','','38009','1937','','','','','','','nach Vereinbarung','Poststelle@fa-gbp-bs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2381','Göttingen für Großbetriebsprüfung','Godehardstr. 6','37073','Göttingen','0551/4070','(0551) 407-448','','','','','','','','','','','Poststelle@fa-gbp-goe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2382','Hannover I für Großbetriebsprüfung','Bischofsholer Damm 15','30173','Hannover','(0511) 8563-01','(0511) 8563-195','','','','','','','','','','','Poststelle@fa-gbp-h1.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2383','Hannover II für Großbetriebsprüfung','Bischofsholer Damm 15','30173','Hannover','(0511) 8563-02','(0511) 8563-250','','30019','1927','','','','','','','','Poststelle@fa-gbp-h2.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2384','Stade für Großbetriebsprüfung','Am Ärztehaus 12','21680','Stade','(04141) 602-0','(04141) 602-60','','','','','','','','','','','Poststelle@fa-gbp-std.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2385','Oldenburg für Großbetriebsprüfung','Georgstr. 36','26121','Oldenburg','0441/2381','(0441) 238-522','','26014','2445','','','','','','','','Poststelle@fa-gbp-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2386','Osnabrück für Großbetriebsprüfung','Johann-Domann-Str. 6','49080','Osnabrück','(0541) 503 800','(0541) 503 888','','','','','','','','','','','Poststelle@fa-gbp-os.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2390','Braunschweig für Fahndung und Strafsachen','Rudolf-Steiner-Str. 1','38120','Braunschweig','0531/28510','(0531) 2851-150','','38009','1931','','','','','','','nach Vereinbarung','Poststelle@fa-fust-bs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2391','Hannover für Fahndung und Strafsachen','Göttinger Chaus. 83B','30459','Hannover','(0511) 419-1','(0511) 419-2988','','30430','911007','','','','','','','','Poststelle@fa-fust-h.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2392','Lüneburg für Fahndung und Strafsachen','Horst-Nickel-Str. 6','21337','Lüneburg','(04131) 8545-600','(04131) 8545-698','','21305','1570','','','','','','','','Poststelle@fa-fust-lg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2393','Oldenburg für Fahndung und Strafsachen','Cloppenburger Str. 320','26133','Oldenburg','(0441) 9401-0','(0441) 9401-200','','26014','2442','','','','','','','','Poststelle@fa-fust-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2457','Bremen-Mitte Bewertung ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-2725','0421 322-2878','','28079','10 79 67','29050000','1070110002','BREMER LANDESBANK BREMEN','29050101','109 0901','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2471','Bremen-Mitte ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-2725','0421 322-2878','28187','28079','10 79 67','29000000','29001512','BBK BREMEN','29050101','1090646','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2472','Bremen-Ost ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3005','0421 322-3178','','28057','10 57 09','29000000','29001513','BBK BREMEN','29050101','1090612','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtOst.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2473','Bremen-West ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3422','0421 322-3478','','28057','10 57 29','29000000','29001514','BBK BREMEN','29050101','1090638','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtWest.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2474','Bremen-Nord ','Gerhard-Rohlfs-Str. 32','28757','Bremen','0421 6607-1','0421 6607-300','','28734','76 04 34','29000000','29001518','BBK BREMEN','29050101','5016001','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-14:00','office@FinanzamtNord.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2475','Bremerhaven ','Schifferstr. 2-8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2476','Bremen-Mitte KraftfahrzeugSt ','Schillerstr. 22','28195','Bremen','0421 322-2725','0421 322-2878','','28079','107967','29000000','29001512','BBK BREMEN','29050101',' 109 0646','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2477','Bremerhaven Bewertung ','Schifferstr. 2 - 8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08.00-18.00/Di+Mi 08.00-16.00/Fr 08.00-15.00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2478','Bremen für Großbetriebsprüfung','Schillerstr. 6-7','28195','Bremen','0421 322-4019','0421 322-4078','','28057','10 57 69','','','','','','','nach Vereinbarung','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2482','Bremen-Ost Arbeitnehmerbereich ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3005','0421 322-3178','','28057','10 57 09','29000000','29001513','BBK BREMEN','29050101','1090612','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtOst.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2484','Bremen-Nord Arbeitnehmerbereic ','Gerhard-Rohlfs-Str. 32','28757','Bremen','0421 6607-1','0421 6607-300','','28734','76 04 34','29000000','29001518','BBK BREMEN','29050101','5016001','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-14:00','office@FinanzamtNord.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2485','Bremerhaven Arbeitnehmerbereic ','Schifferstr. 2-8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2601','Alsfeld-Lauterbach Verwaltungsstelle Alsfeld','In der Rambach 11','36304','Alsfeld','06631/790-0','06631/790-555','','36292','1263','51300000','51301504','BBK GIESSEN','53051130','1022003','SPARKASSE VOGELSBERGKREIS','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Alsfeld-Lauterbach.de','www.Finanzamt-Alsfeld-Lauterbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2602','Hersfeld-Rotenburg Verwaltungsstelle Bad Hersfeld','Im Stift 7','36251','Bad Hersfeld','06621/933-0','06621/933-333','','36224','1451','53200000','53201500','BBK KASSEL EH BAD HERSFELD','53250000','1000016','SPK BAD HERSFELD-ROTENBURG','Mo u. Do 8:00-12:00, Di 14:00-18:00 Uhr','poststelle@Finanzamt-Hersfeld-Rotenburg.de','www.Finanzamt-Hersfeld-Rotenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2603','Bad Homburg v.d. Höhe ','Kaiser-Friedr.-Promenade 8-10 ','61348','Bad Homburg','06172/107-0','06172/107-317','61343','61284','1445','50000000','50001501','BBK FILIALE FRANKFURT MAIN','51250000','1014781','TAUNUS-SPARKASSE BAD HOMBG','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Bad-Homburg.de','www.Finanzamt-Bad-Homburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2604','Rheingau-Taunus Verwaltungsst. Bad Schwalbach ','Emser Str.27a','65307','Bad Schwalbach','06124/705-0','06124/705-400','','65301','1165','51000000','51001502','BBK WIESBADEN','51050015','393000643','NASS SPK WIESBADEN','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Rheingau-Taunus.de','www.Finanzamt-Rheingau-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2605','Bensheim ','Berliner Ring 35','64625','Bensheim','06251/15-0','06251/15-267','','64603','1351','50800000','50801510','BBK DARMSTADT','50950068','1040005','SPARKASSE BENSHEIM','Mo-Mi 8:00-15:30, Do 13:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Bensheim.de','www.Finanzamt-Bensheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2606','Marburg-Biedenkopf Verwaltungsstelle Biedenkopf','Im Feldchen 2','35216','Biedenkopf','06421/698-0','06421/698-109','','','','51300000','51301514','BBK GIESSEN','53350000','110027303','SPK MARBURG-BIEDENKOPF','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06461/709-0','poststelle@Finanzamt-Marburg-Biedenkopf.de','www.Finanzamt-Marburg-Biedenkopf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2607','Darmstadt ','Soderstraße 30','64283','Darmstadt','06151/102-0','06151/102-1262','64287','64219','110465','50800000','50801500','BBK DARMSTADT','50850049','5093005006','LD BK GZ DARMSTADT','Mo-Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Darmstadt.de','www.Finanzamt-Darmstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2608','Dieburg ','Marienstraße 19','64807','Dieburg','06071/2006-0','06071/2006-100','','64802','1209','50800000','50801501','BBK DARMSTADT','50852651','33211004','SPARKASSE DIEBURG','Mo-Mi 7:30-15:30, Do 13:30-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Dieburg.de','www.Finanzamt-Dieburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2609','Dillenburg ','Wilhelmstraße 9','35683','Dillenburg','02771/908-0','02771/908-100','','35663','1362','51300000','51301509','BBK GIESSEN','51650045','18','BEZ SPK DILLENBURG','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Dillenburg.de','www.Finanzamt-Dillenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2610','Eschwege-Witzenhausen Verwaltungsstelle Eschwege','Schlesienstraße 2','37269','Eschwege','05651/926-5','05651/926-720','37267','37252','1280','52000000','52001510','BBK KASSEL','52250030','18','SPARKASSE WERRA-MEISSNER','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Eschwege-Witzenhausen.de','www.Finanzamt-Eschwege-Witzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2611','Korbach-Frankenberg Verwaltungsstelle Frankenberg ','Geismarer Straße 16','35066','Frankenberg','05631/563-0','05631/563-888','','','','51300000','51301513','BBK GIESSEN','52350005','5001557','SPK WALDECK-FRANKENBERG','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Korbach-Frankenberg.de','www.Finanzamt-Korbach-Frankenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2612','Frankfurt am Main II ','Gutleutstraße 122','60327','Frankfurt','069/2545-02','069/2545-2999','','60305','110862','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Frankfurt-2.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2613','Frankfurt am Main I ','Gutleutstraße 124','60327','Frankfurt','069/2545-01','069/2545-1999','','60305','110861','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Frankfurt-1.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2614','Frankfurt am Main IV ','Gutleutstraße 118','60327','Frankfurt','069/2545-04','069/2545-4999','','60305','110864','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-4.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2615','Frankfurt/M. V-Höchst Verwaltungsstelle Höchst','Hospitalstraße 16 a','65929','Frankfurt','069/2545-05','069/2545-5999','','','','50000000','50001502','BBK FILIALE FRANKFURT MAIN','50050201','608604','FRANKFURTER SPK FRANKFURT','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 069/30830-0','poststelle@Finanzamt-Frankfurt-5-Hoechst.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2616','Friedberg (Hessen) ','Leonhardstraße 10 - 12','61169','Friedberg','06031/49-1','06031/49-333','','61143','100362','51300000','51301506','BBK GIESSEN','51850079','50000400','SPARKASSE WETTERAU','Di 8:00-12:00, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Friedberg.de','www.Finanzamt-Friedberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2617','Bensheim Außenstelle Fürth','Erbacher Straße 23','64658','Fürth','06253/206-0','06253/206-10','','64654','1154','50800000','50801510','BBK DARMSTADT','50950068','1040005','SPARKASSE BENSHEIM','','poststelle@Finanzamt-Bensheim.de','www.Finanzamt-Bensheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2618','Fulda ','Königstraße 2','36037','Fulda','0661/924-01','0661/924-1606','','36003','1346','53000000','53001500','BBK KASSEL EH FULDA','53050180','49009','SPARKASSE FULDA','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Fulda.de','www.Finanzamt-Fulda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2619','Gelnhausen ','Frankfurter Straße 14','63571','Gelnhausen','06051/86-0','06051/86-299','63569','63552','1262','50600000','50601502','BBK FRANKFURT EH HANAU','50750094','2008','KREISSPARKASSE GELNHAUSEN','Mo u. Mi 8:00-12:00, Do 14:30-18:00 Uhr','poststelle@Finanzamt-Gelnhausen.de','www.Finanzamt-Gelnhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2620','Gießen ','Schubertstraße 60','35392','Gießen','0641/4800-100','0641/4800-1590','35387','35349','110440','','','','51300000','51301500','BBK GIESSEN','Mo-Mi 8:00-15:30,Do 14:00-18:00, Fr 8:00-12:00 Uhr','info@Finanzamt-Giessen.de','www.Finanzamt-Giessen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2621','Groß-Gerau ','Europaring 11-13','64521','Groß-Gerau','06152/170-01','06152/170-601','64518','64502','1262','50800000','50801502','BBK DARMSTADT','50852553','1685','KR SPK GROSS-GERAU','Mo-Mi 8:00-15.30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Gross-Gerau.de','www.Finanzamt-Gross-Gerau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2622','Hanau ','Am Freiheitsplatz 2','63450','Hanau','06181/101-1','06181/101-501','63446','63404','1452','50600000','50601500','BBK FRANKFURT EH HANAU','50650023','50104','SPARKASSE HANAU','Mo u. Mi 7:30-12:00, Do 14:30-18:00 Uhr','poststelle@Finanzamt-Hanau.de','www.Finanzamt-Hanau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2623','Kassel-Hofgeismar Verwaltungsstelle Hofgeismar','Altstädter Kirchplatz 10','34369','Hofgeismar','0561/7207-0','0561/7207-2500','','','','52000000','52001501','BBK KASSEL','52050353','100009202','KASSELER SPARKASSE','Di, Mi u. Fr 8:00-12:00, Do 15:00-18:00 Uhr Telefon Verwaltungsstelle: 05671/8004-0','poststelle@Finanzamt-Kassel-Hofgeismar.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2624','Schwalm-Eder Verwaltungsstelle Fritzlar','Georgengasse 5','34560','Fritzlar','05622/805-0','05622/805-111','','34551','1161','52000000','52001502','BBK KASSEL','52052154','110007507','KREISSPARKASSE SCHWALM-EDER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2625','Kassel-Spohrstraße ','Spohrstraße 7','34117','Kassel','0561/7208-0','0561/7208-408','34111','34012','101249','52000000','52001500','BBK KASSEL','52050000','4091300006','LANDESKREDITKASSE KASSEL','Mo u. Fr 7:30-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Kassel-Spohrstrasse.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2626','Kassel-Hofgeismar Verwaltungsstelle Kassel','Goethestraße 43','34119','Kassel','0561/7207-0','0561/7207-2500','34111','34012','101229','52000000','52001500','BBK KASSEL','52050000','4091300006','LANDESKREDITKASSE KASSEL','Mo, Mi u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Kassel-Hofgeismar.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2627','Korbach-Frankenberg Verwaltungsstelle Korbach','Medebacher Landstraße 29','34497','Korbach','05631/563-0','05631/563-888','34495','34482','1240','52000000','52001509','BBK KASSEL','52350005','19588','SPK WALDECK-FRANKENBERG','Mo, Mi u. Fr 8:00-12:00, Do 15:30-18:00 Uhr','poststelle@Finanzamt-Korbach-Frankenberg.de','www.Finanzamt-Korbach-Frankenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2628','Langen ','Zimmerstraße 27','63225','Langen','06103/591-01','06103/591-285','63222','63202','1280','50000000','50001511','BBK FILIALE FRANKFURT MAIN','50592200','31500','VB DREIEICH','Mo, Mi u. Do 8:00-15:30, Di 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Langen.de','www.Finanzamt-Langen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2629','Alsfeld-Lauterbach Verwaltungsstelle Lauterbach','Bahnhofstraße 69','36341','Lauterbach','06631/790-0','06631/790-555','36339','','','53000000','53001501','BBK KASSEL EH FULDA','53051130','60100509','SPARKASSE VOGELSBERGKREIS','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06641/188-0','poststelle@Finanzamt-Alsfeld-Lauterbach.de','www.Finanzamt-Alsfeld-Lauterbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2630','Limburg-Weilburg Verwaltungsstelle Limburg','Walderdorffstraße 11','65549','Limburg','06431/208-1','06431/208-294','65547','65534','1465','51000000','51001507','BBK WIESBADEN','51050015','535054800','NASS SPK WIESBADEN','Mo-Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Limburg-Weilburg.de','www.Finanzamt-Limburg-Weilburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2631','Marburg-Biedenkopf Verwaltungsstelle Marburg','Robert-Koch-Straße 7','35037','Marburg','06421/698-0','06421/698-109','35034','35004','1469','51300000','51301512','BBK GIESSEN','53350000','11517','SPK MARBURG-BIEDENKOPF','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Marburg-Biedenkopf.de','www.Finanzamt-Marburg-Biedenkopf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2632','Schwalm-Eder Verwaltungsstelle Melsungen','Kasseler Straße 31 (Schloß)','34212','Melsungen','05622/805-0','05622/805-111','','','','52000000','52001503','BBK KASSEL','52052154','10060002','KREISSPARKASSE SCHWALM-EDER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 05661/706-0','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2633','Michelstadt ','Erbacher Straße 48','64720','Michelstadt','06061/78-0','06061/78-100','','64712','3180','50800000','50801503','BBK DARMSTADT','50851952','40041451','SPK ODENWALDKREIS ERBACH','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Michelstadt.de','www.Finanzamt-Michelstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2634','Nidda ','Schillerstraße 38','63667','Nidda','06043/805-0','06043/805-159','','63658','1180','50600000','50601501','BBK FRANKFURT EH HANAU','51850079','150003652','SPARKASSE WETTERAU','Mo, Di u. Do 7:30-16:00, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Nidda.de','www.Finanzamt-Nidda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2635','Offenbach am Main-Stadt ','Bieberer Straße 59','63065','Offenbach','069/8091-1','069/8091-2400','63063','63005','100563','50000000','50001500','BBK FILIALE FRANKFURT MAIN','50550020','493','STE SPK OFFENBACH','Mo, Di u. Do 7:30-15:30, Mi 13:00-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Offenbach-Stadt.de','www.Finanzamt-Offenbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2636','Hersfeld-Rotenburg Verwaltungsstelle Rotenburg','Dickenrücker Straße 12','36199','Rotenburg','06621/933-0','06621/933-333','','','','52000000','52001504','BBK KASSEL','53250000','50000012','SPK BAD HERSFELD-ROTENBURG','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06623/816-0','poststelle@Finanzamt-Hersfeld-Rotenburg.de','www.Finanzamt-Hersfeld-Rotenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2637','Rheingau-Taunus Verwaltungsstelle Rüdesheim','Hugo-Asbach-Straße 3 - 7','65385','Rüdesheim','06124/705-0','06124/705-400','','','','51000000','51001501','BBK WIESBADEN','51050015','455022800','NASS SPK WIESBADEN','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06722/405-0','poststelle@Finanzamt-Rheingau-Taunus.de','www.Finanzamt-Rheingau-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2638','Limburg-Weilburg Verwaltungsstelle Weilburg','Kruppstraße 1','35781','Weilburg','06431/208-1','06431/208-294','35779','','','51000000','51001511','BBK WIESBADEN','51151919','100000843','KR SPK WEILBURG','Mo-Mi 8:00-16:00, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Limburg-Weilburg.de','www.Finanzamt-Limburg-Weilburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2639','Wetzlar ','Frankfurter Straße 59','35578','Wetzlar','06441/202-0','06441/202-6810','35573','35525','1520','51300000','51301508','BBK GIESSEN','51550035','46003','SPARKASSE WETZLAR','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Wetzlar.de','www.Finanzamt-Wetzlar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2640','Wiesbaden I ','Dostojewskistraße 8','65187','Wiesbaden','0611/813-0','0611/813-1000','65173','65014','2469','51000000','51001500','BBK WIESBADEN','51050015','100061600','NASS SPK WIESBADEN','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Wiesbaden-1.de','www.Finanzamt-Wiesbaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2641','Eschwege-Witzenhausen Verwaltungsstelle Witzenhausen','Südbahnhofstraße 37','37213','Witzenhausen','05651/926-5','05651/926-720','','','','52000000','52001505','BBK KASSEL','52250030','50000991','SPARKASSE WERRA-MEISSNER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 05542/602-0','poststelle@Finanzamt-Eschwege-Witzenhausen.de','www.Finanzamt-Eschwege-Witzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2642','Schwalm-Eder Verwaltungsstelle Schwalmstadt','Landgraf-Philipp-Straße 15','34613','Schwalmstadt','05622/805-0','05622/805-111','','','','52000000','52001506','BBK KASSEL','52052154','200006641','KREISSPARKASSE SCHWALM-EDER','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06691/738-0','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2643','Wiesbaden II ','Dostojewskistraße 8','65187','Wiesbaden','0611/813-0','0611/813-2000','65173','65014','2469','51000000','51001500','BBK WIESBADEN','51050015','100061600','NASS SPK WIESBADEN','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Wiesbaden-2.de','www.Finanzamt-Wiesbaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2644','Offenbach am Main-Land ','Bieberer Straße 59','63065','Offenbach','069/8091-1','069/8091-3400','63063','63005','100552','50000000','50001500','BBK FILIALE FRANKFURT MAIN','50550020','493','STE SPK OFFENBACH','Mo, Di u. Do 7:30-15:30, Mi 13:00-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Offenbach-Land.de','www.Finanzamt-Offenbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2645','Frankfurt am Main III ','Gutleutstraße 120','60327','Frankfurt','069/2545-03','069/2545-3999','','60305','110863','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-3.de','wwww.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2646','Hofheim am Taunus ','Nordring 4 - 10','65719','Hofheim','06192/960-0','06192/960-412','65717','65703','1380','50000000','50001503','BBK FILIALE FRANKFURT MAIN','51250000','2000008','TAUNUS-SPARKASSE BAD HOMBG','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Hofheim-am-Taunus.de','www.Finanzamt-Hofheim-am-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2647','Frankfurt/M. V-Höchst Verwaltungsstelle Frankfurt','Gutleutstraße 116','60327','Frankfurt','069/2545-05','069/2545-5999','','60305','110865','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-5-Hoechst.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2701','Bad Neuenahr-Ahrweiler ','Römerstr. 5','53474','Bad Neuenahr-Ahrweiler','02641/3820','02641/38212000','','53457','1209','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-aw.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2702','Altenkirchen-Hachenburg ','Frankfurter Str. 21','57610','Altenkirchen','02681/860','02681/8610090','57609','57602','1260','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ak.fin-rlp.de','www.finanzamt-altenkirchen-hachenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2703','Bingen-Alzey Aussenstelle Alzey','Rochusallee 10','55411','Bingen','06721/7060','06721/70614080','55409','55382','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06731/4000','Poststelle@fa-bi.fin-rlp.de','www.finanzamt-bingen-alzey.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2706','Bad Kreuznach ','Ringstr. 10','55543','Bad Kreuznach','0671/7000','0671/70011702','55541','55505','1552','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-kh.fin-rlp.de','www.finanzamt-bad-kreuznach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2707','Bernkastel-Wittlich Aussenstelle Bernkastel-Kues','Unterer Sehlemet 15','54516','Wittlich','06571/95360','06571/953613400','','54502','1240','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06531/5060','Poststelle@fa-wi.fin-rlp.de','www.finanzamt-bernkastel-wittlich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2708','Bingen-Alzey ','Rochusallee 10','55411','Bingen','06721/7060','06721/70614080','55409','55382','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-bi.fin-rlp.de','www.finanzamt-bingen-alzey.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2709','Idar-Oberstein ','Hauptstraße 199','55743','Idar-Oberstein','06781/680','06781/6818333','','55708','11820','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-io.fin-rlp.de','www.finanzamt-idar-oberstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2710','Bitburg-Prüm ','Kölner Straße 20','54634','Bitburg','06561/6030','06561/60315090','','54622','1252','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-bt.fin-rlp.de','www.finanzamt-bitburg-pruem.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2713','Daun ','Berliner Straße 1','54550','Daun','06592/95790','06592/957916175','','54542','1160','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-da.fin-rlp.de','www.finanzamt-daun.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2714','Montabaur-Diez Aussenstelle Diez','Koblenzer Str. 15','56410','Montabaur','02602/1210','02602/12127099','56409','56404','1461','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06432/5040','Poststelle@fa-mt.fin-rlp.de','www.finanzamt-montabaur-diez.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2715','Frankenthal ','Friedrich-Ebert-Straße 6','67227','Frankenthal','06233/49030','06233/490317082','67225','67203','1324','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ft.fin-rlp.de','www.finanzamt-frankenthal.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2716','Speyer-Germersheim Aussenstelle Germersheim','Johannesstr. 9-12','67346','Speyer','06232/60170','06232/601733431','67343','67323','1309','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 07274/9500','Poststelle@fa-sp.fin-rlp.de','www.finanzamt-speyer-germersheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2718','Altenkirchen-Hachenburg Aussenstelle Hachenburg','Frankfurter Str. 21','57610','Altenkirchen','02681/860','02681/8610090','57609','57602','1260','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 02662/94520','Poststelle@fa-ak.fin-rlp.de','www.finanzamt-altenkirchen-hachenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2719','Kaiserslautern ','Eisenbahnstr. 56','67655','Kaiserslautern','0631/36760','0631/367619500','67653','67621','3360','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-kl.fin-rlp.de','www.finanzamt-kaiserslautern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2721','Worms-Kirchheimbolanden Aussenstelle Kirchheimbolanden','Karlsplatz 6','67549','Worms','06241/30460','06241/304635060','67545','','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06352/4070','Poststelle@fa-wo.fin-rlp.de','www.finanzamt-worms-kirchheimbolanden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2722','Koblenz ','Ferdinand-Sauerbruch-Str. 19','56073','Koblenz','0261/49310','0261/493120090','56060','56007','709','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ko.fin-rlp.de','www.finanzamt-koblenz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2723','Kusel-Landstuhl ','Trierer Str. 46','66869','Kusel','06381/99670','06381/996721060','','66864','1251','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ku.fin-rlp.de','www.finanzamt-kusel-landstuhl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2724','Landau ','Weißquartierstr. 13','76829','Landau','06341/9130','06341/91322100','76825','76807','1760u.1780','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ld.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2725','Kusel-Landstuhl Aussenstelle Landstuhl','Trierer Str. 46','66869','Kusel','06381/99670','06381/996721060','','66864','1251','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06371/61730','Poststelle@fa-ku.fin-rlp.de','www.finanzamt-kusel-landstuhl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2726','Mainz-Mitte ','Schillerstr. 13','55116','Mainz','06131/2510','06131/25124090','','55009','1980','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-mz.fin-rlp.de','www.finanzamt-mainz-mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2727','Ludwigshafen ','Bayernstr. 39','67061','Ludwigshafen','0621/56140','0621/561423051','','67005','210507','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-lu.fin-rlp.de','www.finanzamt-ludwigshafen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2728','Mainz-Süd ','Emy-Roeder-Str. 3','55129','Mainz','06131/5520','06131/55225272','','55071','421365','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ms.fin-rlp.de','www.finanzamt-mainz-sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2729','Mayen ','Westbahnhofstr. 11','56727','Mayen','02651/70260','02651/702626090','','56703','1363','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-my.fin-rlp.de','www.finanzamt-mayen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2730','Montabaur-Diez ','Koblenzer Str. 15','56410','Montabaur','02602/1210','02602/12127099','56409','56404','1461','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-mt.fin-rlp.de','www.finanzamt-montabaur-diez.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2731','Neustadt ','Konrad-Adenauer-Str. 26','67433','Neustadt','06321/9300','06321/93028600','67429','67404','100 465','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-nw.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2732','Neuwied ','Augustastr. 54','56564','Neuwied','02631/9100','02631/91029906','56562','56505','1561','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-nr.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2735','Pirmasens-Zweibrücken ','Kaiserstr. 2','66955','Pirmasens','06331/7110','06331/71130950','66950','66925','1662','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ps.fin-rlp.de','www.finanzamt-pirmasens-zweibruecken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2736','Bitburg-Prüm Aussenstelle Prüm','Kölner Str. 20','54634','Bitburg','06561/6030','06561/60315093','','54622','1252','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06551/9400','Poststelle@fa-bt.fin-rlp.de','www.finanzamt-bitburg-pruem.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2738','Sankt Goarshausen-Sankt Goar Aussenstelle Sankt Goar','Wellmicher Str. 79','56346','St. Goarshausen','06771/95900','06771/959031090','','56342','','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06741/98100','Poststelle@fa-gh.fin-rlp.de','www.finanzamt-sankt-goarshausen-sankt-goar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2739','Sankt Goarshausen-Sankt Goar ','Wellmicher Str. 79','56346','St. Goarshausen','06771/95900','06771/959031090','','56342','','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-gh.fin-rlp.de','www.finanzamt-sankt-goarshausen-sankt-goar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2740','Simmern-Zell ','Brühlstraße 3','55469','Simmern','06761/8550','06761/85532053','','55464','440','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-si.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2741','Speyer-Germersheim ','Johannesstr. 9-12','67346','Speyer','06232/60170','06232/601733431','67343','67323','1309','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-sp.fin-rlp.de','www.finanzamt-speyer-germersheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2742','Trier ','Hubert-Neuerburg-Str. 1','54290','Trier','0651/93600','0651/936034900','','54207','1750u.1760','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-tr.fin-rlp.de','www.finanzamt-trier.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2743','Bernkastel-Wittlich ','Unterer Sehlemet 15','54516','Wittlich','06571/95360','06571/953613400','','54502','1240','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-wi.fin-rlp.de','www.finanzamt-bernkastel-wittlich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2744','Worms-Kirchheimbolanden ','Karlsplatz 6','67549','Worms','06241/30460','06241/304635060','67545','','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-wo.fin-rlp.de','www.finanzamt-worms-kirchheimbolanden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2745','Simmern-Zell Aussenstelle Zell','Brühlstr. 3','55469','Simmern','06761/8550','06761/85532053','','55464','440','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06542/7090','Poststelle@fa-si.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2746','Pirmasens-Zweibrücken Aussenstelle Zweibrücken','Kaiserstr. 2','66955','Pirmasens','06331/7110','06331/71130950','66950','66925','1662','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06332/80680','Poststelle@fa-ps.fin-rlp.de','www.finanzamt-pirmasens-zweibruecken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2801','Achern ','Allerheiligenstr. 10','77855','Achern','07841/6940','07841/694136','77843','77843','1260','66000000','66001518','BBK KARLSRUHE','66450050','88013009','SPARKASSE OFFENBURG-ORTENAU','MO-DO 8-12.30+13.30-15.30,DO-17.30,FR 8-12 H','poststelle@fa-achern.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2804','Donaueschingen ','Käferstr. 25','78166','Donaueschingen','0771/8080','0771/808359','78153','78153','1269','69400000','694 01501','BBK VILLINGEN-SCHWENNINGEN','69421020','6204700600','BW BANK DONAUESCHINGEN','MO-MI 8-16 UHR, DO 8-17.30 UHR, FR 8-12 UHR','poststelle@fa-donaueschingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2805','Emmendingen ','Bahnhofstr. 3','79312','Emmendingen','07641/4500','07641/450350','79305','79305','1520','68000000','680 01507','BBK FREIBURG IM BREISGAU','68050101','20066684','SPK FREIBURG-NOERDL BREISGA','MO-MI 7:30-15:30,DO 7:30-17:00,FR 7:30-12:00','poststelle@fa-emmendingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2806','Freiburg-Stadt ','Sautierstr. 24','79104','Freiburg','0761/2040','0761/2043295','79079','','','68000000','680 01501','BBK FREIBURG IM BREISGAU','68020020','4402818100','BW BANK FREIBURG BREISGAU','MO, DI, DO 7.30-16,MI 7.30-17.30, FR 7.30-12','poststelle@fa-freiburg-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2807','Freiburg-Land ','Stefan-Meier-Str. 133','79104','Freiburg','0761/2040','0761/2043424','79095','','','68000000','680 015 00','BBK FREIBURG IM BREISGAU','68090000','12222300','VOLKSBANK FREIBURG','ZIA: MO,DI,DO 8-16, MI 8-17:30, FR 8-12 UHR','poststelle@fa-freiburg-land.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2808','Kehl ','Ludwig-Trick-Str. 1','77694','Kehl','07851/8640','07851/864108','77676','77676','1640','66400000','664 01501','BBK FREIBURG EH OFFENBURG','66451862','-6008','SPK HANAUERLAND KEHL','MO,DI,MI 7.45-15.30, DO -17.30, FR -12.00UHR','poststelle@fa-kehl.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2809','Konstanz ','Bahnhofplatz 12','78462','Konstanz','07531/2890','07531/289312','78459','','','69400000','69001500','BBK VILLINGEN-SCHWENNINGEN','69020020','6604947900','BW BANK KONSTANZ','MO,DI,DO 7.30-15.30,MI 7.30-17.00,FR 7.30-12','poststelle@fa-konstanz.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2810','Lahr ','Gerichtstr. 5','77933','Lahr','07821/2830','07821/283100','','77904','1466','66000000','66001527','BBK KARLSRUHE','66450050','76103333','SPARKASSE OFFENBURG-ORTENAU','MO,DI,DO 7:30-16:00, MI 7:30-17:30, FR 7:30-12:00','poststelle@fa-lahr.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2811','Lörrach ','Luisenstr. 10 a','79539','Lörrach','07621/1730','07621/173245','79537','','','68000000','68301500','BBK FREIBURG IM BREISGAU','68320020','4602600100','BW BANK LOERRACH','MO-MI 7.00-15.30/DO 7.00-17.30/FR 7.00-12.00','poststelle@fa-loerrach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2812','Müllheim ','Goethestr. 11','79379','Müllheim','07631/18900','(07631)189-190','79374','79374','1461','68000000','680 01511','BBK FREIBURG IM BREISGAU','68351865','802 888 8','SPARKASSE MARKGRAEFLERLAND','MO-MI 7,30-15,30 DO 7,30-17,30 FR 7,30-12,00','poststelle@fa-muellheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2813','Titisee-Neustadt ','Goethestr. 5','79812','Titisee-Neustadt','07651/2030','07651/203110','','79812','12 69','68000000','680 015 10','BBK FREIBURG IM BREISGAU','68051004','4040408','SPK HOCHSCHWARZWALD T-NEUST','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.30','poststelle@fa-titisee-neustadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2814','Offenburg ','Zeller Str. 1- 3','77654','Offenburg','0781/9330','0781/9332444','77604','77604','1440','68000000','664 01500','BBK FREIBURG IM BREISGAU','66420020','4500000700','BW BANK OFFENBURG','MO-DO 7.30-15.30 DURCHGEHEND,MI -18.00,FR-12','poststelle@fa-offenburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2815','Oberndorf ','Brandeckerstr. 4','78727','Oberndorf','07423/8150','07423/815107','78721','78721','1240','69400000','694 01506','BBK VILLINGEN-SCHWENNINGEN','64250040','813 015','KR SPK ROTTWEIL','ZIA:MO,DI,DO 8-16,MI 8-17:30,FR 8-12 UHR','poststelle@fa-oberndorf.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2816','Bad Säckingen ','Werderstr. 5','79713','Bad Säckingen','07761/5660','07761/566126','79702','79702','1148','68000000','683 015 02','BBK FREIBURG IM BREISGAU','','','','MO,DI,DO 8-15.30, MI 8-17.30, FR 8-12 UHR','poststelle@fa-badsaeckingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2818','Singen ','Alpenstr. 9','78224','Singen','07731/8230','07731/823650','','78221','380','69000000','69001507','BBK VILL-SCHWEN EH KONSTANZ','69220020','6402000100','BW BANK SINGEN','MO-DO 7:30-15:30, MI bis 17:30, FR 7:30-12:00','poststelle@fa-singen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2819','Rottweil ','Körnerstr. 28','78628','Rottweil','0741/2430','0741/2432194','78612','78612','1252','69400000','69401505','BBK VILLINGEN-SCHWENNINGEN','64250040','136503','KR SPK ROTTWEIL','MO-MI 8-16, DO 8-18, FR 8-12 UHR','poststelle@fa-rottweil.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2820','Waldshut-Tiengen ','Bahnhofstr. 11','79761','Waldshut-Tiengen','07741/6030','07741/603213','79753','79753','201360','68000000','68301501','BBK FREIBURG IM BREISGAU','68452290','14449','SPARKASSE HOCHRHEIN','MO-MI 8-15.30,DO 8-17.30,FR 8-12 UHR','poststelle@fa-waldshut-tiengen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2821','Tuttlingen ','Zeughausstr. 91','78532','Tuttlingen','07461/980','07461/98303','','78502','180','69400000','69401502','BBK VILLINGEN-SCHWENNINGEN','64350070','251','KR SPK TUTTLINGEN','MO-MI8-15.30,DO8-17.30,FR8-12.00UHR','poststelle@fa-tuttlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2822','Villingen-Schwenningen ','Weiherstr. 7','78050','Villingen-Schwenningen','07721/923-0','07721/923-100','78045','','','69400000','69401500','BBK VILLINGEN-SCHWENNINGEN','','','','MO-MI 8-16UHR,DO 8-17.30UHR,FR 8-12UHR','poststelle@fa-villingen-schwenningen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2823','Wolfach ','Hauptstr. 55','77709','Wolfach','07834/9770','07834/977-169','77705','77705','1160','66400000','664 01502','BBK FREIBURG EH OFFENBURG','66452776','-31956','SPK WOLFACH','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-wolfach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2830','Bruchsal ','Schönbornstr. 1-5','76646','Bruchsal','07251/740','07251/742111','76643','76643','3021','66000000','66001512','BBK KARLSRUHE','66350036','50','SPK KRAICHGAU','SERVICEZENTRUM:MO-MI8-15:30DO8-17:30FR8-1200','poststelle@fa-bruchsal.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2831','Ettlingen ','Pforzheimer Str. 16','76275','Ettlingen','07243/5080','07243/508295','76257','76257','363','66000000','66001502','BBK KARLSRUHE','66051220','1043009','SPARKASSE ETTLINGEN','MO+DI 8-15.30,MI 7-15.30,DO 8-17.30,FR 8-12','poststelle@fa-ettlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2832','Heidelberg ','Kurfürsten-Anlage 15-17','69115','Heidelberg','06221/590','06221/592355','69111','','','67000000','67001510','BBK MANNHEIM','67220020','5302059000','BW BANK HEIDELBERG','ZIA:MO-DO 7.30-15.30, MI - 17.30, FR - 12.00','poststelle@fa-heidelberg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2833','Baden-Baden ','Stephanienstr. 13 + 15','76530','Baden-Baden','07221/3590','07221/359320','76520','','','66000000','66001516','BBK KARLSRUHE','66220020','4301111300','BW BANK BADEN-BADEN','MO,DI,DO 8-16 UHR,MI 8-17.30 UHR,FR 8-12 UHR','poststelle@fa-baden-baden.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2834','Karlsruhe-Durlach ','Prinzessenstr. 2','76227','Karlsruhe','0721/9940','0721/9941235','76225','76203','410326','66000000','66001503','BBK KARLSRUHE','','','','MO-DO 8-15.30,MI 8-17.30,FR 8-12','poststelle@fa-karlsruhe-durlach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2835','Karlsruhe-Stadt ','Schlossplatz 14','76131','Karlsruhe','0721/1560','(0721) 156-1000','','','','66000000','66001501','BBK KARLSRUHE','66020020','4002020800','BW BANK KARLSRUHE','MO-DO 7.30-15.30 MI -17.30 FR 7.30-12.00','poststelle@fa-karlsruhe-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2836','Bühl ','Alban-Stolz-Str. 8','77815','Bühl','07223/8030','07223/3625','77815','','','66000000','66001525','BBK KARLSRUHE','66220020','4301111300','BW BANK BADEN-BADEN','MO,DI,DO=8-16UHR, MI=8-17.30UHR,FR=8-12UHR','poststelle@fa-buehl.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2837','Mannheim-Neckarstadt ','L3, 10','68161','Mannheim','0621/2920','0621/292-1010','68150','','','67000000','67001500','BBK MANNHEIM','67020020','5104719900','BW BANK MANNHEIM','MO,DI,DO7.30-15.30,MI7.30-17.30,FR7.30-12.00','poststelle@fa-mannheim-neckarstadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2838','Mannheim-Stadt ','L3, 10','68161','Mannheim','0621/2920','2923640','68150','','','67000000','670 01500','BBK MANNHEIM','67020020','5104719900','BW BANK MANNHEIM','MO,DI,DO7.30-15.30,MI7.30.17.30,FR7.30-12.00','poststelle@fa-mannheim-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2839','Rastatt ','An der Ludwigsfeste 3','76437','Rastatt','07222/9780','07222/978330','76404','76404','1465','66000000','66001519','BBK KARLSRUHE','66020020','4150199000','BW BANK KARLSRUHE','MO-MI 8-15:30 UHR,DO 8-17:30 UHR,FR 8-12 UHR','poststelle@fa-rastatt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2840','Mosbach ','Pfalzgraf-Otto-Str. 5','74821','Mosbach','06261/8070','06261/807200','74819','','','62000000','62001502','BBK HEILBRONN, NECKAR','62030050','5501964000','BW BANK HEILBRONN','MO-DO 08.00-16.00 UHR, DO-17.30,FR-12.00 UHR','poststelle@fa-mosbach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2841','Pforzheim ','Moltkestr. 8','75179','Pforzheim','07231/1830','(07231)183-1111','75090','','','66000000','66001520','BBK KARLSRUHE','66620020','4812000000','BW BANK PFORZHEIM','MO-DO 7:30-15:30, DO bis 17:30, FR 7:30-12:00','poststelle@fa-pforzheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2842','Freudenstadt ','Musbacher Str. 33','72250','Freudenstadt','07441/560','07441/561011','','','','66000000','66001510','BBK KARLSRUHE','64251060','19565','KR SPK FREUDENSTADT','MO-MI 8.00-16.00,DO 8.00-17.30,FR 8.00-12.00','poststelle@fa-freudenstadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2843','Schwetzingen ','Schloss','68723','Schwetzingen','06202/810','(06202) 81298','68721','','','67000000','67001501','BBK MANNHEIM','67250020','25008111','SPK HEIDELBERG','ZIA:MO-DO 7.30-15.30,MI-17.30,FR.7.30-12.00','poststelle@fa-schwetzingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2844','Sinsheim ','Bahnhofstr. 27','74889','Sinsheim','07261/6960','07261/696444','74887','','','67000000','67001511','BBK MANNHEIM','','','','MO-DO 7:30-15:30, MI bis 17:30, FR 7:30-12 UHR','poststelle@fa-sinsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2845','Calw ','Klosterhof 1','75365','Calw','07051/5870','07051/587111','75363','','','66000000','66001521','BBK KARLSRUHE','60651070','1996','SPARKASSE PFORZHEIM CALW','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-calw.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2846','Walldürn ','Albert-Schneider-Str. 1','74731','Walldürn','06282/7050','06282/705101','74723','74723','1162','62000000','62001509','BBK HEILBRONN, NECKAR','67450048','8102204','SPK NECKARTAL-ODENWALD','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-wallduern.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2847','Weinheim ','Weschnitzstr. 2','69469','Weinheim','06201/6050','(06201) 605-220/299 ','69443','69443','100353','67000000','67001502','BBK MANNHEIM','67050505','63034444','SPK RHEIN NECKAR NORD','MO-MI 7.30-15.30 DO 7.30-17.30 FR 7.30-12','poststelle@fa-weinheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2848','Mühlacker ','Konrad-Adenauer-Platz 6','75417','Mühlacker','07041/8930','07041/893999','','75415','1153','66000000','660 015 22','BBK KARLSRUHE','66650085','961 000','SPARKASSE PFORZHEIM CALW','ZIA:MO-DO 8-12:30 13:30-15:30 DO bis 17:30 FR 8-12','poststelle@fa-muehlacker.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2849','Neuenbürg ','Wildbader Str. 107','75305','Neuenbürg','07082/7990','07082/799166','75301','75301','1165','66600000','66601503','BBK PFORZHEIM','66650085','998400','SPARKASSE PFORZHEIM CALW','MO-FR 7.30-12UHR,MO-MI 13-16UHR,DO 13-18UHR','poststelle@fa-neuenbuerg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2850','Aalen / Württemberg ','Bleichgartenstr. 17','73431','Aalen','(07361) 9578-0','(07361)9578-440','73428','','','63000000','614 01500','BBK ULM, DONAU','61450050','110036902','KREISSPARKASSE OSTALB','MO-MI 7.30-16.00,DO 7.30-18.00,FR 7.30-12.00','poststelle@fa-aalen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2851','Backnang ','Stiftshof 20','71522','Backnang','07191/120','07191/12221','71522','','','60000000','60201501','BBK STUTTGART','60250010','244','KR SPK WAIBLINGEN','MO,DI,DO7.30-16.00MI7.30-18.00FR7.30-12.00','poststelle@fa-backnang.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2852','Bad Mergentheim ','Schloss 7','97980','Bad Mergentheim','07931/5300','07931/530228','97962','97962','1233','62000000','620 01508','BBK HEILBRONN, NECKAR','67352565','25866','SPK TAUBERFRANKEN','MO-DO 7.30-15.30,MI-17.30 UHR,FR 7.30-12 UHR','poststelle@fa-badmergentheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2853','Balingen ','Jakob-Beutter-Str. 4','72336','Balingen','07433/970','07433/972099','72334','','','64000000','653 01500','BBK REUTLINGEN','65351260','24000110','SPK ZOLLERNALB','Mo-Mi 7:45-16:00,Do 7:45-17:30,Fr 7:45-12:30','poststelle@fa-balingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2854','Biberach ','Bahnhofstr. 11','88400','Biberach','07351/590','07351/59202','88396','','','63000000','63001508','BBK ULM, DONAU','65450070','17','KR SPK BIBERACH','MO,DI,DO 8-15.30, MI 8-17.30, FR 8-12 UHR','poststelle@fa-biberach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2855','Bietigheim-Bissingen ','Kronenbergstr. 13','74321','Bietigheim-Bissingen','07142/5900','07142/590199','74319','','','60000000','604 01501','BBK STUTTGART','60490150','427500001','VOLKSBANK LUDWIGSBURG','MO-MI(DO)7.30-15.30(17.30),FR 7.30-12.00 UHR','poststelle@fa-bietigheim-bissingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2856','Böblingen ','Talstr. 46','71034','Böblingen','(07031)13-01','07031/13-3200','71003','71003','1307','60300000','603 01500','BBK STUTTGART EH SINDELFING','60350130','220','KR SPK BOEBLINGEN','MO-MI 7.30-15.30,DO7.30-17.30,FR7.30-12.30','poststelle@fa-boeblingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2857','Crailsheim ','Schillerstr. 1','74564','Crailsheim','07951/4010','07951/401220','74552','74552','1252','62000000','620 01506','BBK HEILBRONN, NECKAR','62250030','282','SPARKASSE SCHWAEBISCH HALL','MO-DO:7.45-16.00,MI:-17.30,FR:7.45-12.30','poststelle@fa-crailsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2858','Ehingen ','Hehlestr. 19','89584','Ehingen','07391/5080','07391/508260','89572','89572','1251','63000000','630 01502','BBK ULM, DONAU','63050000','9 300 691','SPARKASSE ULM','Mo-Mi 7.30-15.30,Do 7.30-17.30,Fr 7.30-12.00','poststelle@fa-ehingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2859','Esslingen ','Entengrabenstr. 11','73728','Esslingen','0711/39721','0711/3972400','73726','','','61100000','61101500','BBK STUTTGART EH ESSLINGEN','61150020','902139','KR SPK ESSLINGEN-NUERTINGEN','Infothek Mo-Mi 7-15.30,Do-17.30, Fr 7-12 Uhr','poststelle@fa-esslingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2861','Friedrichshafen ','Ehlersstr. 13','88046','Friedrichshafen','07541/7060','07541/706111','88041','','','63000000','65001504','BBK ULM, DONAU','','','','MO-MI 8-15.30, DO 8-17.30, FR 8-12.30 Uhr','poststelle@fa-friedrichshafen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2862','Geislingen ','Schillerstr. 2','73312','Geislingen','07331/220','07331/22200','73302','73302','1253','60000000','61101504','BBK STUTTGART','61050000','6007203','KR SPK GOEPPINGEN','Mo-Mi 7-15:30, Do 7-17:30,Fr 7-12','poststelle@fa-geislingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2863','Göppingen ','Gartenstr. 42','73033','Göppingen','07161/63-0','07161/632935','','73004','420','60000000','61101503','BBK STUTTGART','61050000','1 023','KR SPK GOEPPINGEN','MO-MI.7-15.30 Uhr,DO.7-17.30 Uhr,FR.7-12 Uhr','poststelle@fa-goeppingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2864','Heidenheim ','Marienstr. 15','89518','Heidenheim','07321/380','07321/381528','89503','89503','1320','63000000','61401505','BBK ULM, DONAU','63250030','880433','KR SPK HEIDENHEIM','Mo-Mi 7.30-15.30 Do 7.30-17.30 Fr 7.30-12.30','poststelle@fa-heidenheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2865','Heilbronn ','Moltkestr. 91','74076','Heilbronn','07131/1041','07131/1043000','74064','','','62000000','620 01500','BBK HEILBRONN, NECKAR','62050000','123925','KR SPK HEILBRONN','Mo,Di,Do7:30-15:30,Mi7:30-17:30,Fr7:30-12:00','poststelle@fa-heilbronn.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2869','Kirchheim ','Alleenstr. 120','73230','Kirchheim','07021/5750','575258','73220','73220','1241','61100000','61101501','BBK STUTTGART EH ESSLINGEN','61150020','48317054','KR SPK ESSLINGEN-NUERTINGEN','KUNDENCENTER MO-MI 8-15.30,DO 8-17.30,FR8-12','poststelle@fa-kirchheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2870','Leonberg ','Schlosshof 3','71229','Leonberg','(07152) 15-1','07152/15333','71226','','','60000000','60301501','BBK STUTTGART','60350130','8619864','KR SPK BOEBLINGEN','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.30','poststelle@fa-leonberg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2871','Ludwigsburg ','Alt-Württ.-Allee 40 (Neubau)','71638','Ludwigsburg','07141/180','07141/182105','71631','','','60000000','604 01500','BBK STUTTGART','60450050','7 759','KREISSPARKASSE LUDWIGSBURG','MO-MI 8-15.30,DO 8-18.00,FR 8-12.00','poststelle@fa-ludwigsburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2874','Nürtingen ','Sigmaringer Str. 15','72622','Nürtingen','07022/7090','07022/709-120','72603','72603','1309','60000000','61101502','BBK STUTTGART','','','','MO-Mi 7.30-15.30 Do 7.30-17.30 Fr 7.30-12.00','poststelle@fa-nuertingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2876','Öhringen ','Haagweg 39','74613','Öhringen','07941/6040','07941/604400','74611','','','62000000','62001501','BBK HEILBRONN, NECKAR','62251550','40008','SPARKASSE HOHENLOHEKREIS','MO-DO 7.30-16.00UhrFR 7.30-12.00 Uhr','poststelle@fa-oehringen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2877','Ravensburg ','Broner Platz 12','88250','Weingarten','0751/4030','403-303','88248','','','65000000','650 015 00','BBK ULM EH RAVENSBURG','65050110','86 500 500','KR SPK RAVENSBURG','Mo,Di,Do 8-15.30Uhr,ZIA Mi 8-17.30,Fr8-12Uhr','poststelle@fa-ravensburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2878','Reutlingen ','Leonhardsplatz 1','72764','Reutlingen','07121/9400','07121/9401002','72705','72705','1543','64000000','64001500','BBK REUTLINGEN','64050000','64 905','KR SPK REUTLINGEN','Mo-Mi 7-15.30, Do 7-17.30, Fr 7-12.00 Uhr','poststelle@fa-reutlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2879','Riedlingen ','Kirchstr. 30','88499','Riedlingen','07371/1870','07371/1871000','88491','88491','1164','63000000','63001509','BBK ULM, DONAU','65450070','400 600','KR SPK BIBERACH','INFOST. MO-MI 7.30-15.30,DO-17.30,FR-12 UHR','poststelle@fa-riedlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2880','Tauberbischofsheim ','Dr.-Burger-Str. 1','97941','Tauberbischofsheim','09341/8040','09341/804244','97933','97933','1340','62000000','620 01507','BBK HEILBRONN, NECKAR','67332551','8282661100','BW BANK TAUBERBISCHOFSHEIM','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-tauberbischofsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2881','Bad Saulgau ','Schulstr. 5','88348','Bad Saulgau','07581/504-0','07581/504499','88341','88341','1255','65000000','650 01501','BBK ULM EH RAVENSBURG','65351050','210058','LD BK KR SPK SIGMARINGEN','MO,DO,FR 8-12,DO 13.30-15.30UHR','poststelle@fa-badsaulgau.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2882','Schorndorf ','Johann-Philipp-Palm-Str. 28','73614','Schorndorf','07181/6010','07181/601499','73603','73603','1320','60000000','60201502','BBK STUTTGART','60250010','5014008','KR SPK WAIBLINGEN','MO,DI,DO 8-15.30,MI 8-17.30,FR 8-12.00','poststelle@fa-schorndorf.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2883','Schwäbisch Gmünd ','Augustinerstr. 6','73525','Schwäbisch Gmünd','(07171) 602-0','07171/602266','73522','','','63000000','61401501','BBK ULM, DONAU','61450050','440066604','KREISSPARKASSE OSTALB','MO,DI,DO 8-15.30 MI 8-17.30 FR 8-12.00 UHR','poststelle@fa-schwaebischgmuend.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2884','Schwäbisch Hall ','Bahnhofstr. 25','74523','Schwäbisch Hall','0791/752-0','0791/7521115','74502','74502','100260','62000000','62001503','BBK HEILBRONN, NECKAR','62250030','5070 011','SPARKASSE SCHWAEBISCH HALL','MO-MI 7.30-16.00 DO 7.30-17.30 FR 7.30-12.00','poststelle@fa-schwaebischhall.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2885','Sigmaringen ','Karlstr. 31','72488','Sigmaringen','07571/1010','07571/101300','72481','72481','1250','65300000','653 01501','BBK REUTLINGEN EH ALBSTADT','65351050','808 408','LD BK KR SPK SIGMARINGEN','MO-MI 7.45-15.30,DO 7.45-17.30,FR 7.45-12.00','poststelle@fa-sigmaringen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2886','Tübingen ','Steinlachallee 6 - 8','72072','Tübingen','07071/7570','07071/7574500','72005','72005','1520','64000000','64001505','BBK REUTLINGEN','','','','Mo-Do 7.30-15.30,Mi -17.30,Fr 7.30-13.00 Uhr','poststelle@fa-tuebingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2887','Überlingen (Bodensee) ','Mühlenstr. 28','88662','Überlingen','07551/8360','07551/836299','88660','','','69400000','69001501','BBK VILLINGEN-SCHWENNINGEN','69220020','6426155500','BW BANK SINGEN','Mo-Mi 8.00-15.30,Do 8.00-17.30,Fr 8.00-12.00','poststelle@fa-ueberlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2888','Ulm ','Wagnerstr. 2','89077','Ulm','0731/1030','0731/103800','','89008','1860','63000000','63001500','BBK ULM, DONAU','63050000','30001','SPARKASSE ULM','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-ulm.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2889','Bad Urach ','Graf-Eberhard-Platz 7','72574','Bad Urach','07125/1580','(07125)158-300','72562','72562','1149','64000000','640 01501','BBK REUTLINGEN','64050000','300 346','KR SPK REUTLINGEN','MO-MI 7.30-15.30 DO 7.30-17.30 FR 7.30-12.00','poststelle@fa-badurach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2890','Waiblingen ','Fronackerstr. 77','71332','Waiblingen','07151/9550','07151/955200','71328','','','60000000','602 01500','BBK STUTTGART','60250010','200 398','KR SPK WAIBLINGEN','INFOTHEK MO-DO 7.30-15.30,MI-17.30,FR-12.00','poststelle@fa-waiblingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2891','Wangen ','Lindauer Str.37','88239','Wangen','07522/710','07522(714000)','88228','88228','1262','63000000','650 01502','BBK ULM, DONAU','65050110','218 153','KR SPK RAVENSBURG','MO-MI 8-15.30, DO 8-17.30, FR 8-12 UHR','poststelle@fa-wangen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2892','Stuttgart IV ','Seidenstr.23','70174','Stuttgart','0711/66730','0711/66736060','70049','70049','106052','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','MO,MI,FR 8-12,MI 13.30-16 UHR','poststelle@fa-stuttgart4.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2893','Stuttgart I ','Rotebühlplatz 30','70173','Stuttgart','0711/66730','6673 - 5010','70049','70049','106055','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','Mo,Die,Do: 8-15.30, Mi: 8-17.30, Fr: 8-12.00','poststelle@fa-stuttgart1.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2895','Stuttgart II ','Rotebühlstr. 40','70178','Stuttgart','0711/66730','0711/66735610','','','','60000000','60001503','BBK STUTTGART','60050101','2065854','LANDESBANK BADEN-WUERTT','MO-DO:8-15.30 FR:8-12 MI:15.30-17.30','poststelle@fa-stuttgart2.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2896','Stuttgart Zentrales Konzernprüfungsamt','Hackstr. 86','70190','Stuttgart','0711/9251-6','0711/9251706','','','','','','','','','','','poststelle@zbp-stuttgart.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2897','Stuttgart III ','Rotebühlplatz 30','70173','Stuttgart','0711/66730','0711/66735710','','70049','106053','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','Mo-Do:8-15.30 Mi:8-17.30 Fr:8-12.00 Uhr','poststelle@fa-stuttgart3.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2899','Stuttgart-Körpersch. ','Paulinenstr. 44','70178','Stuttgart','0711/66730','0711/66736525','70049','70049','106051','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','MO-FR 8:00-12:00, MO-DO 13:00-15:30 Uhr','poststelle@fa-stuttgart-koerperschaften.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3046','Potsdam-Stadt ','Am Bürohochhaus 2','14478','Potsdam','0331 287-0','0331 287-1515','','14429','80 03 22','16000000','16001501','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Potsdam-Stadt@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3047','Potsdam-Land ','Steinstr. 104 - 106','14480','Potsdam','0331 6469-0','0331 6469-200','','14437','90 01 45','16000000','16001502','BBK POTSDAM','','','','täglich außer Mi: 08:00-12:30 Uhr, zusätzlich Di: 14:00-17:00 Uhr','poststelle.FA-Potsdam-Land@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3048','Brandenburg ','Magdeburger Straße 46','14770','Brandenburg','03381 397-100','03381 397-200','','','','16000000','16001503','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Brandenburg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3049','Königs Wusterhausen ','Weg am Kreisgericht 9','15711','Königs Wusterhausen','03375 275-0','03375 275-103','','','','16000000','16001505','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Koenigs-Wusterhausen@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3050','Luckenwalde ','Industriestraße 2','14943','Luckenwalde','03371 606-0','03371 606-200','','','','16000000','16001504','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Luckenwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3051','Nauen ','Ketziner Straße 3','14641','Nauen','03321 412-0','03321 412-888','','14631','11 61','16000000','16001509','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Nauen@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3052','Kyritz ','Perleberger Straße 1 - 2','16866','Kyritz','033971 65-0','033971 65-200','','','','16000000','16001507','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Kyritz@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3053','Oranienburg ','Heinrich-Grüber-Platz 3','16515','Oranienburg','03301 857-0','03301 857-334','','','','16000000','16001508','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Oranienburg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3054','Pritzwalk ','Freyensteiner Chaussee 10','16928','Pritzwalk','03395 757-0','03395 302110','','','','16000000','16001506','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Pritzwalk@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3056','Cottbus ','Vom-Stein-Straße 29','3050','Cottbus','0355 4991-4100','0355 4991-4150','','3004','10 04 53','18000000','18001501','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Cottbus@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3057','Calau ','Springteichallee 25','3205','Calau','03541 83-0','03541 83-100','','3201','11 71','18000000','18001502','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Calau@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3058','Finsterwalde ','Leipziger Straße 61 - 67','3238','Finsterwalde','03531 54-0','03531 54-180','','3231','11 50','18000000','18001503','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Finsterwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3061','Frankfurt (Oder) ','Müllroser Chaussee 53','15236','Frankfurt (Oder)','0335 560-1399','0335 560-1202','','','','17000000','17001502','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Frankfurt-Oder@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3062','Angermünde ','Jahnstraße 49','16278','Angermünde','03331 267-0','03331 267-200','','','','17000000','17001500','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Angermuende@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3063','Fürstenwalde ','Beeskower Chaussee 12','15517','Fürstenwalde','03361 595-0','03361 2198','','','','17000000','17001503','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Fuerstenwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3064','Strausberg ','Prötzeler Chaussee 12 A','15344','Strausberg','03341 342-0','03341 342-127','','','','17000000','17001504','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Strausberg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3065','Eberswalde ','Tramper Chaussee 5','16225','Eberswalde','03334 66-2000','03334 66-2001','','','','17000000','17001501','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Eberswalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3101','Magdeburg I ','Tessenowstraße 10','39114','Magdeburg','0391 885-29','0391 885-1400','','39014','39 62','81000000','810 015 06','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-md1.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3102','Magdeburg II ','Tessenowstraße 6','39114','Magdeburg','0391 885-12','0391 885-1000','','39006','16 63','81000000','810 015 07','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-md2.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3103','Genthin ','Berliner Chaussee 29 b','39307','Genthin','03933 908-0','03933 908-499','','39302','13 41','81000000','810 015 08','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 09.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-gtn.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3104','Halberstadt ','R.-Wagner-Straße 51','38820','Halberstadt','03941 33-0','03941 33-199','','38805','15 26','81000000','268 015 01','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-hbs.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3105','Haldensleben ','Jungfernstieg 37','39340','Haldensleben','03904 482-0','03904 482-200','','39332','10 02 09','81000000','810 015 10','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-hdl.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3106','Salzwedel ','Buchenallee 2','29410','Salzwedel','03901 857-0','03901 857-100','','29403','21 51','81000000','810 015 05','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-saw.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3107','Staßfurt ','Atzendorfer Straße 20','39418','Staßfurt','03925 980-0','03925 980-101','','39404','13 55','81000000','810 015 12','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.30 - 18.00 Uhr','poststelle@fa-sft.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3108','Stendal ','Scharnhorststraße 87','39576','Stendal','03931 57-1000','03931 57-2000','','39551','10 11 31','81000000','810 015 13','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-sdl.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3109','Wernigerode ','Gustav-Petri-Straße 14','38855','Wernigerode','03943 657-0','03943 657-150','','38842','10 12 51','81000000','268 015 03','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 09.00 - 12.00 Uhr, Do.: 14.00 - 18.00 Uhr','poststelle@fa-wrg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3110','Halle-Süd ','Blücherstraße 1','6122','Halle','0345 6923-5','0345 6923-600','6103','','','80000000','800 015 02','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00','poststelle@fa-ha-s.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3111','Halle-Nord ','Blücherstraße 1','6122','Halle','0345 6924-0','0345 6924-400','6103','','','80000000','800 015 01','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00','poststelle@fa-ha-n.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3112','Merseburg ','Bahnhofstraße 10','6217','Merseburg','03461 282-0','03461 282-199','','6203','13 51','80000000','800 015 09','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-msb.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3113','Bitterfeld ','Röhrenstraße 33','6749','Bitterfeld','03493 347-0','03493 347-247','','6732','12 64','80000000','805 015 05','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-btf.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3114','Dessau ','Kühnauer Straße 166','6846','Dessau','0340 6513-0','0340 6513-403','','6815','18 25','80000000','805 015 26','BBK HALLE','','','','Mo. - Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-des.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3115','Wittenberg ','Dresdener Straße 40','6886','Wittenberg','03491 430-0','03491 430-113','','6872','10 02 54','80000000','805 015 07','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-wbg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3116','Köthen ','Zeppelinstraße 15','6366','Köthen','03496 44-0','03496 44-2900','','6354','14 52','80000000','805 015 06','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-kot.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3117','Quedlinburg ','Adelheidstraße 2','6484','Quedlinburg','03946 976-0','03946 976-400','','6472','14 20','81000000','268 015 02','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 17.30 Uhr','poststelle@fa-qlb.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3118','Eisleben ','Bahnhofsring 10 a','6295','Eisleben','03475 725-0','03475 725-109','6291','','','80000000','800 015 08','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-eil.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3119','Naumburg ','Oststraße 26/26 a','6618','Naumburg','03445 753-0','03445 753-999','','6602','12 51','80000000','800 015 27','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-nbg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3120','Zeitz ','Friedensstraße 80','6712','Zeitz','03441 864-0','03441 864-480','','6692','12 08','80000000','800 015 04','BBK HALLE','','','','Mo., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 08.00 - 18.00 Uhr','poststelle@fa-ztz.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3121','Sangerhausen ','Alte Promenade 27','6526','Sangerhausen','03464 539-0','03464 539-539','','6512','10 12 24','80000000','800 015 25','BBK HALLE','','','','Di., Do., Fr.: 09.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00 -','poststelle@fa-sgh.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3201','Dresden I ','Lauensteiner Str. 37','1277','Dresden','0351 2567-0','0351 2567-111','1264','','','85000000','85001502','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-dresden1.smf.sachsen.de','http://www.Finanzamt-Dresden-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3202','Dresden II ','Gutzkowstraße 10','1069','Dresden','0351 4655-0','0351 4655-269','1056','','','85000000','85001503','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr, Di 14:00-18:00, Do 14:00-18:00 Uhr','poststelle@fa-dresden2.smf.sachsen.de','http://www.Finanzamt-Dresden-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3203','Dresden III ','Rabenerstr.1','1069','Dresden','0351 4691-0','0351 4717 369','','1007','120641','85000000','85001504','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-dresden3.smf.sachsen.de','http://www.Finanzamt-Dresden-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3204','Bautzen ','Wendischer Graben 3','2625','Bautzen','03591 488-0','03591 488-888','2621','','','85000000','85001505','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-17:00, Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-bautzen.smf.sachsen.de','http://www.Finanzamt-Bautzen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3205','Bischofswerda ','Kirchstraße 25','1877','Bischofswerda','03594 754-0','03594 754-444','','1871','1111','85000000','85001506','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-17:00, Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-bischofswerda.smf.sachsen.de','http://www.Finanzamt-Bischofswerda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3206','Freital ','Coschützer Straße 8-10','1705','Freital','0351 6478-0','0351 6478-428','','1691','1560','85000000','85001507','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-freital.smf.sachsen.de','http://www.Finanzamt-Freital.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3207','Görlitz ','Sonnenstraße 7','2826','Görlitz','03581 875-0','03581 875-100','','2807','300235','85000000','85001512','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-goerlitz.smf.sachsen.de','http://www.Finanzamt-Goerlitz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3208','Löbau ','Georgewitzer Str.40','2708','Löbau','03585 455-0','03585 455-100','','2701','1165','85000000','85001509','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-loebau.smf.sachsen.de','http://www.Finanzamt-Loebau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3209','Meißen ','Hermann-Grafe-Str.30','1662','Meißen','03521 745-30','03521 745-450','','1651','100151','85000000','85001508','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr Di 13:00-18:00, Do 13:00-17:00 Uhr','poststelle@fa-meissen.smf.sachsen.de','http://www.Finanzamt-Meissen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3210','Pirna ','Emil-Schlegel-Str. 11','1796','Pirna','03501 551-0','03501 551-201','','1781','100143','85000000','85001510','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr, Di 13:30-18:00, Do 13:30-17:00 Uhr','poststelle@fa-pirna.smf.sachsen.de','http://www.Finanzamt-Pirna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3211','Riesa ','Stahlwerkerstr.3','1591','Riesa','03525 714-0','03525 714-133','','1571','24','85000000','85001511','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00 , Fr 8:00-12:00 Uhr','poststelle@fa-riesa.smf.sachsen.de','http://www.Finanzamt-Riesa.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3213','Hoyerswerda ','Pforzheimer Platz 1','2977','Hoyerswerda','03571 460-0','03571 460-115','','2961','1161/1162 ','85000000','85001527','BBK DRESDEN','','','','Mo 7:30-15:30, Di 7:30-17:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-hoyerswerda.smf.sachsen.de','http://www.Finanzamt-Hoyerswerda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3214','Chemnitz-Süd ','Paul-Bertz-Str. 1','9120','Chemnitz','0371 279-0','0371 227065','9097','','','87000000','87001501','BBK CHEMNITZ','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-13:00, Do 8:00-18:00, Fr 8:00-13:00 Uhr','poststelle@fa-chemnitz-sued.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3215','Chemnitz-Mitte ','August-Bebel-Str. 11/13','9113','Chemnitz','0371 467-0','0371 415830','9097','','','87000000','87001502','BBK CHEMNITZ','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-14:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-chemnitz-mitte.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3216','Chemnitz-Land ','Reichenhainer Str. 31-33','9126','Chemnitz','0371 5360-0','0371 5360-317','9097','','','87000000','87001503','BBK CHEMNITZ','','','','täglich 8:00-12:00, Di 13:30-17.00, Do 13:30-18:00 Uhr','poststelle@fa-chemnitz-land.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3217','Annaberg ','Magazingasse 16','9456','Annaberg-B.','03733 4270','03733 427-217','','9453','100631','87000000','87001504','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-annaberg.smf.sachsen.de','http://www.Finanzamt-Annaberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3218','Schwarzenberg ','Karlsbader Str.23','8340','Schwarzenberg','03774 161-0','03774 161-100','','8332','1209','87000000','87001505','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-schwarzenberg.smf.sachsen.de','http://www.Finanzamt-Schwarzenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3219','Auerbach ','Schulstraße 3, Haus 1','8209','Auerbach','03744 824-0','03744 824-200','','8202','10132','87000000','87001506','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-12:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-aucherbach.smf.sachsen.de','http://www.Finanzamt-Auerbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3220','Freiberg ','Brückenstr.1','9599','Freiberg','03731 379-0','03731 379-999','9596','','','87000000','87001507','BBK CHEMNITZ','','','','Mo - Fr 7:30-12:30, Mo 13:30-15:30, Di 13:00-18:00, Mi 13:30-15:30, Do 13:00-17:00 Uhr','poststelle@fa-freiberg.smf.sachsen.de','http://www.Finanzamt-Freiberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3221','Hohenstein-Ernstthal ','Schulstraße 34','9337','Hohenstein-E.','03723 745-0','03723 745-399','','9332','1246','87000000','87001510','BBK CHEMNITZ','','','','Mo - Fr 8:00-12:00, Mo 12:30-15:30, Di 12:30-18:00, Do 12:30-17:00','poststelle@fa-hohenstein-ernstthal.smf.sachsen.de','http://www.Finanzamt-Hohenstein-Ernstthal.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3222','Mittweida ','Robert-Koch-Str. 17','9648','Mittweida','03727 987-0','03727 987-333','','9641','1157','87000000','87001509','BBK CHEMNITZ','','','','Mo 7:30-15:00, Di 7:30-18:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-mittweida.smf.sachsen.de','http://www.Finanzamt-Mittweida.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3223','Plauen ','Europaratstraße 17','8523','Plauen','03741 10-0','03741 10-2000','','8507','100384','87000000','87001512','BBK CHEMNITZ','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-plauen.smf.sachsen.de','http://www.Finanzamt-Plauen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3224','Stollberg ','HOHENSTEINER STRASSE 54','9366','Stollberg','037296 522-0','037296 522-199','','9361','1107','87000000','87001508','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-17:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-stollberg.smf.sachsen.de','http://www.Finanzamt-Stollberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3226','Zwickau-Stadt ','Dr.-Friedrichs-Ring 21','8056','Zwickau','0375 3529-0','0375 3529-444','','8070','100452','87000000','87001513','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-12:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-zwickau-stadt.smf.sachsen.de','http://www.Finanzamt-Zwickau-Stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3227','Zwickau-Land ','Äußere Schneeberger Str. 62','8056','Zwickau','0375 4440-0','0375 4440-222','','8067','100150','87000000','87001514','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-zwickau-land.smf.sachsen.de','http://www.Finanzamt-Zwickau-Land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3228','Zschopau ','August-Bebel-Str.17','9405','Zschopau','03725 293-0','03725 293-111','','9402','58','87000000','87001515','BBK CHEMNITZ','','','','Mo7:30-12:00/13:00-16:30,Di 7:30-12:00/13:00-18:00Mi u. Fr 7:30-13:00, Do 7:30-12:00/13:00-18:00 Uhr','poststelle@fa-zschopau.smf.sachsen.de','http://www.Finanzamt-Zschopau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3230','Leipzig I ','Wilhelm-Liebknecht-Platz 3/4','4105','Leipzig','0341 559-0','0341 559-1540','','4001','100105','86000000','86001501','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig1.smf.sachsen.de','http://www.Finanzamt-Leipzig-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3231','Leipzig II ','Erich-Weinert-Str. 20','4105','Leipzig','0341 559-0','0341 559-2505','','4001','100145','86000000','86001502','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig2.smf.sachsen.de','http://www.Finanzamt-Leipzig-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3232','Leipzig III ','Wilhelm-Liebknecht-Platz 3/4','4105','Leipzig','0341 559-0','0341 559-3640','','4002','100226','86000000','86001503','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig3.smf.sachsen.de','http://www.Finanzamt-Leipzig-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3235','Borna ','Brauhausstr.8','4552','Borna','03433 872-0','03433 872-255','','4541','1325','86000000','86001509','BBK LEIPZIG','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-borna.smf.sachsen.de','http://www.Finanzamt-Borna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3236','Döbeln ','Burgstr.31','4720','Döbeln','03431 653-30','03431 653-444','','4713','2346','86000000','86001507','BBK LEIPZIG','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-13:00, Do 7:30-17:00, Fr 7:30-12:00 Uhr','poststelle@fa-doebeln.smf.sachsen.de','http://www.Finanzamt-Doebeln.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3237','Eilenburg ','Walther-Rathenau-Straße 8','4838','Eilenburg','03423 660-0','03423 660-460','','4831','1133','86000000','86001506','BBK LEIPZIG','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-14:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-eilenburg.smf.sachsen.de','http://www.Finanzamt-Eilenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3238','Grimma ','Lausicker Straße 2','4668','Grimma','03437 940-0','03437 940-500','','4661','1126','86000000','86001508','BBK LEIPZIG','','','','Mo 7:30-15:00, Di 7:30-18:00, Mi 7:30-13:30, Do 7:30-17:00, Fr 7:30-12:00 Uhr','poststelle@fa-grimma.smf.sachsen.de','http://www.Finanzamt-Grimma.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3239','Oschatz ','Dresdener Str.77','4758','Oschatz','03435 978-0','03435 978-366','','4752','1265','86000000','86001511','BBK LEIPZIG','','','','Mo 8:00-16:00, Di 8:00-17:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-oschatz.smf.sachsen.de','http://www.Finanzamt-Oschatz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4071','Malchin ','Schratweg 33','17139','Malchin','03994/6340','03994/634322','','17131','1101','15000000','15001511','BBK NEUBRANDENBURG','','','','Mo Di Fr 08-12 Uhr Di 13-17 Uhr und Do 13-16 UhrMittwoch geschlossen','poststelle@fa-mc.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4072','Neubrandenburg ','Neustrelitzer Str. 120','17033','Neubrandenburg','0395/380 1000','0395/3801059','','17041','110164','15000000','15001518','BBK NEUBRANDENBURG','','','','Mo Di Do Fr 08-12 Uhr und Di 13.00-17.30 Uhr Mittwoch geschlossen','poststelle@fa-nb.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4074','Pasewalk ','Torgelower Str. 32','17309','Pasewalk','(03973) 224-0','03973/2241199','','17301','1102','15000000','15001512','BBK NEUBRANDENBURG','','','','Mo bis Fr 09.00-12.00 Uhr Di 14.00-18.00 Uhr','poststelle@fa-pw.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4075','Waren ','Einsteinstr. 15','17192','Waren (Müritz)','03991/1740','(03991)174499','','17183','3154','15000000','15001515','BBK NEUBRANDENBURG','','','','Mo-Mi 08.00-16.00 Uhr Do 08.00-18.00 Uhr Fr 08.-13.00 Uhr','poststelle@fa-wrn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4079','Rostock ','Möllner Str. 13','18109','Rostock','(0381)7000-0','(0381)7000444','','18071','201062','13000000','13001508','BBK ROSTOCK','','','','Mo Di Fr 8.30-12.00 Di 13.30-17.00 Do 13.30-16.00','poststelle@fa-hro.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4080','Wismar ','Philosophenweg 1','23970','Wismar','03841444-0','03841/444222','','','','14000000','14001516','BBK SCHWERIN','','','','Mo Di Fr 08.00-12.00 Uhr Di Do 14.00-17.00 Uhr Mittwoch geschlossen','poststelle@fa-wis.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4081','Ribnitz-Damgarten ','Sandhufe 3','18311','Ribnitz-Damgarten','(03821)884-0','(03821)884140','','18301','1061','13000000','13001510','BBK ROSTOCK','','','','MO Di Mi DO 08.30-12.00 UHR DI 13.00-17.00 UHR Freitag geschlossen','poststelle@fa-rdg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4082','Stralsund ','Lindenstraße 136','18435','Stralsund','03831/3660','(03831)366245 / 188 ','','18409','2241','13000000','13001513','BBK ROSTOCK','','','','Mo Di Do Fr 08.00-12.00 Uhr Di 14.00 - 18.00 UhrMittwoch geschlossen','poststelle@fa-hst.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4083','Bergen ','Wasserstr. 15 d','18528','Bergen (Rügen)','03838/4000','03838/22217','18522','18522','1242','13000000','13001512','BBK ROSTOCK','','','','Mo Di Do Fr 8.30-12.00 Di 13.00-18.00 Mittwoch geschlossen','poststelle@fa-brg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4084','Greifswald ','Am Gorzberg Haus 11','17489','Greifswald','03834/5590','03834-559315/316','17462','17462','3254','15000000','15001528','BBK NEUBRANDENBURG','','','','Mo Di Do Fr 8.30-12.00 Uhr Di 13.00-17.30 Uhr Mittwoch geschlossen','poststelle@fa-hgw.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4085','Wolgast ','Pestalozzistr. 45','17438','Wolgast','03836/254-0','03836/254300 /254100','','17431','1139','15000000','15001529','BBK NEUBRANDENBURG','','','','Mo Di Mi Do Fr 08.00-12.00 Uhr','poststelle@fa-wlg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4086','Güstrow ','Klosterhof 1','18273','Güstrow','03843/2620','03843/262111','18271','','','13000000','13001501','BBK ROSTOCK','','','','Mo-Do 09.00-12.00 Uhr Do 13.00-18.00 Uhr Freitag geschlossen','poststelle@fa-gue.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4087','Hagenow ','Steegener Chaussee 8','19230','Hagenow','03883/6700','03883 670216 /670217','','19222','1242','14000000','14001504','BBK SCHWERIN','','','','Mo Di Do Fr 08.30-12.00 Di 13.00-17.30 Mittwoch geschlossen','poststelle@fa-hgn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4089','Parchim ','Ludwigsluster Chaussee 5','19370','Parchim','03871/4650','03871/443131','','19363','1351','14000000','14001506','BBK SCHWERIN','','','','Mo Di Mi 08.30-15.00 Uhr Do 08.30-18.00 Uhr Fr 08.30-13.00 Uhr','poststelle@fa-pch.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4090','Schwerin ','Johannes-Stelling-Str.9-11','19053','Schwerin','0385/54000','0385/5400300','','19091','160131','14000000','14001502','BBK SCHWERIN','','','',' Di Do Fr 08.30 - 12.00 Uhr Mo 13.00 - 16.00 Uhr Do 14.00','poststelle@fa-sn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4151','Erfurt ','Mittelhäuser Str. 64f','99091','Erfurt','(0361)378-00','0361/3782800','','99001','100121','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','DI. 8- 12/ 13.30 -18 MI./FR. 8 - 12 UHR','poststelle@finanzamt-erfurt.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4152','Sömmerda ','Uhlandstrasse 3','99610','Sömmerda','03634/363-0','03634/363200','','99609','100','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 8-16 UHR DI 8-18,FR 8-12 UHR','poststelle@finanzamt-soemmerda.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4153','Weimar ','Jenaer Str.2a','99425','Weimar','03643/5500','(03643)903811','','99421','3676','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO,MI,DO 8-15.30 UHR DI 8-18,FR 8-12 UHR','poststelle@finanzamt-weimar.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4154','Ilmenau ','Wallgraben 1','98693','Ilmenau','(03677) 861-0','03677/861111','','98686','100754','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO,MI 8-15.30 UHR, DI 8-18 UHR DO 8-16 UHR, FR 8-12 UHR','poststelle@finanzamt-ilmenau.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4155','Eisenach ','Ernst-Thaelmann-Str. 70','99817','Eisenach','03691/687-0','03691/687250','','99804','101454','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO-FR: 8-12 UHR, MO-MI: 13-16 UHR, DO: 13-18 UHR','poststelle@finanzamt-eisenach.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4156','Gotha ','Reuterstr. 2a','99867','Gotha','(03621)33-0','03621/332000','','99853','100301','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO - MI 8-15.30 UHR DO 8-18,FR 8-12 UHR','poststelle@finanzamt-gotha.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4157','Mühlhausen ','Martinistr. 22','99974','Mühlhausen','(03601)456-0','03601/456100','','99961','1155','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 7.30-15 UHR DI.7.30-18,FR.7.30-12','poststelle@finanzamt-muehlhausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4158','Nordhausen ','Gerhart-Hauptmann-Str. 3','99734','Nordhausen','03631/427-0','03631/427174','','99729','1120','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO,DI,MI 8-12, 13.30-16 UHR DO 8-12,14-18 FR 8-12 UHR','poststelle@finanzamt-nordhausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4159','Sondershausen ','Schillerstraße 6','99706','Sondershausen','(03632)742-0','03632/742555','','99702','1265','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 8-15.30 UHR DI 8-18, FR 8-12 UHR','poststelle@finanzamt-sondershausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4160','Worbis ','Bahnhofstr. 18','37339','Worbis','036074/37-0','036074/37219','','37334','173','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-worbis.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4161','Gera ','Hermann-Drechsler-Str.1','7548','Gera','0365/639-0','0365/6391491','','7490','3044','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO,MI 7.30-15 DI,DO 7.30- 18 UHR FR 7.30-12 UHR','poststelle@finanzamt-gera.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4162','Jena ','Leutragraben 8','7743','Jena','(03641)378-0','03641/378653','','7740','500','82050000','3001111602','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 8-15.30 DO 8-18 FR 8-12.00UHR','poststelle@finanzamt-jena.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4163','Rudolstadt ','Mörlaer Str. 2','7407','Rudolstadt','(03672)443-0','(03672)443100','','7391','100155','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-12, 13-15 DO 7.30-12, 13-18 UHR FR 7.30-12 UHR','poststelle@finanzamt-rudolstadt.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4164','Greiz ','Rosa-Luxemburg-Str. 23','7973','Greiz','03661/700-0','03661/700300','','7962','1365','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO/DI/MI 8-16UHR DO 8-18,FR 8-12UHR','poststelle@finanzamt-greiz.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4165','Pößneck ','Gerberstr. 65','7381','Pößneck','(03647)446-0','(03647)446430','','7372','1253','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO-FR 8-12 MO,MI,DO 13-15 UHR DI 13-18 UHR','poststelle@finanzamt-poessneck.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4166','Altenburg ','Wenzelstr. 45','4600','Altenburg','03447/593-0','03447/593200','','4582','1251','82050000','3001111511','LD BK HESS-THUER GZ ERFURT','','','','MO,MI,DO 7.30-15.30 DI 7.30-18 UHR FR 7.30-12 UHR','poststelle@finanzamt-altenburg.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4168','Bad Salzungen ','August-Bebel-Str.2','36433','Bad Salzungen','(03695)668-0','03695/622496','','36421','1153','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-badsalzungen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4169','Meiningen ','Charlottenstr. 2','98617','Meiningen','03693/461-0','(03693)461322','','98606','100661','82050000','3001111610','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-meiningen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4170','Sonneberg ','Köppelsdorfer Str.86','96515','Sonneberg','03675/884-0','03675/884254','','96502','100241','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15.00 UHR DO 7.30-18 FR 7.30-12','poststelle@finanzamt-sonneberg.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4171','Suhl ','Karl-Liebknecht-Str. 4','98527','Suhl','03681/73-0','03681/733512','','98490','100153','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO - MI 8-16 UHR, DO 8-13 u. 14-18 UHR , FR 8-12 UHR','poststelle@finanzamt-suhl.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5101','Dinslaken ','Schillerstr. 71','46535','Dinslaken','02064/445-0','0800 10092675101','','46522','100220','35000000','35201501','BBK DUISBURG','35251000','100123','SPK DINSLAKEN-VOERDE-HUENXE','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5101.fin-nrw.de','www.finanzamt-Dinslaken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5102','Viersen ','Eindhovener Str. 71','41751','Viersen','02162/955-0','0800 10092675102','','41726','110263','31000000','31001503','BBK MOENCHENGLADBACH','32050000','59203406','SPARKASSE KREFELD','Mo-Fr 8:30 bis 12:00 Uhr,Di auch 13:30 bis 15:00 Uhr,und nach Vereinbarung','Service@FA-5102.fin-nrw.de','www.finanzamt-Viersen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5103','Düsseldorf-Altstadt ','Kaiserstr. 52','40479','Düsseldorf','0211/4974-0','0800 10092675103','','40001','101021','30000000','30001504','BBK DUESSELDORF','30050110','10124006','ST SPK DUESSELDORF','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5103.fin-nrw.de','www.finanzamt-Duesseldorf-Altstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5105','Düsseldorf-Nord ','Roßstr. 68','40476','Düsseldorf','0211/4496-0','0800 10092675105','','40403','300314','30000000','30001501','BBK DUESSELDORF','30050110','10124501','ST SPK DUESSELDORF','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5105.fin-nrw.de','www.finanzamt-Duesseldorf-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5106','Düsseldorf-Süd ','Kruppstr.110- 112','40227','Düsseldorf','0211/779-9','0800 10092675106','','40001','101025','30000000','30001502','BBK DUESSELDORF','30050110','10125003','ST SPK DUESSELDORF','Mo-Fr 8.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5106.fin-nrw.de','www.finanzamt-Duesseldorf-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5107','Duisburg-Hamborn ','Hufstr. 25','47166','Duisburg','0203/5445-0','0800 10092675107','','47142','110264','35000000','35001502','BBK DUISBURG','','','','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5107.fin-nrw.de','www.finanzamt-Duisburg-Hamborn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5109','Duisburg-Süd ','Landfermannstr 25','47051','Duisburg','0203/3001-0','0800 10092675109','','47015','101502','35000000','35001500','BBK DUISBURG','35050000','200403020','SPK DUISBURG','Mo-Fr 08:30 Uhr - 12:00 Uhr,Di auch 13:30 Uhr - 15:00 Uhr','Service@FA-5109.fin-nrw.de','www.finanzamt-Duisburg-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5110','Essen-Nord ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675110','','45011','101155','36000000','36001500','BBK ESSEN','36050105','275008','SPARKASSE ESSEN','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5110.fin-nrw.de','www.finanzamt-Essen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5111','Essen-Ost ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675111','45116','45012','101262','36000000','36001501','BBK ESSEN','36050105','261800','SPARKASSE ESSEN','Mo-Fr,Di','Service@FA-5111.fin-nrw.de','www.finanzamt-Essen-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5112','Essen-Süd ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675112','','45011','101145','36000000','36001502','BBK ESSEN','36050105','203000','SPARKASSE ESSEN','Mo-Fr 08.30-12.00 Uhr, Di auch 13.30-15.00 Uhr, und nach Vereinbarung','Service@FA-5112.fin-nrw.de','www.finanzamt-Essen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5113','Geldern ','Gelderstr 32','47608','Geldern','02831/127-0','0800 10092675113','','47591','1163','32000000','32001502','BBK MOENCHENGLADBACH EH KRE','32051370','112011','SPARKASSE GELDERN','Montag - Freitag 8:30 - 12:00,Uhr,Dienstag auch 13:00 - 15:00 U,hr und nach Vereinbarung','Service@FA-5113.fin-nrw.de','www.finanzamt-Geldern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5114','Grevenbroich ','Erckensstr. 2','41515','Grevenbroich','02181/607-0','0800 10092675114','','41486','100264','30000000','30001507','BBK DUESSELDORF','30550000','101683','SPARKASSE NEUSS','Mo-Fr 8:30-12:00 Uhr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5114.fin-nrw.de','www.finanzamt-Grevenbroich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5115','Kempen ','Arnoldstr 13','47906','Kempen','02152/919-0','0800 10092675115','','47880','100329','31000000','32001501','BBK MOENCHENGLADBACH','','','','MO.-DO. 8.30-12.00 UHR,FREITAGS GESCHLOSSEN','Service@FA-5115.fin-nrw.de','www.finanzamt-Kempen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5116','Kleve ','Emmericher Str. 182','47533','Kleve','02821/803-1','0800 10092675116','','47512','1251','35000000','32401501','BBK DUISBURG','32450000','5013628','SPARKASSE KLEVE','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr','Service@FA-5116.fin-nrw.de','www.finanzamt-Kleve.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5117','Krefeld ','Grenzstr 100','47799','Krefeld','02151/854-0','0800 10092675117','','47706','100665','31000000','32001500','BBK MOENCHENGLADBACH','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5117.fin-nrw.de','www.finanzamt-Krefeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5119','Moers ','Unterwallstr 1','47441','Moers','02841/208-0','0800 10092675119','47439','47405','101520','35000000','35001505','BBK DUISBURG','35450000','1101000121','SPARKASSE MOERS','Montag-Freitag von 8.30-12.00,Dienstag von 13.30-15.00','Service@FA-5119.fin-nrw.de','www.finanzamt-Moers.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5120','Mülheim an der Ruhr ','Wilhelmstr 7','45468','Mülheim an der Ruhr','0208/3001-1','0800 10092675120','','45405','100551','36000000','36201500','BBK ESSEN','36250000','300007007','SPK MUELHEIM AN DER RUHR','Mo-Fr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5120.fin-nrw.de','www.finanzamt-Muelheim-Ruhr.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5121','Mönchengladbach-Mitte ','Kleiststr. 1','41061','Mönchengladbach','02161/189-0','0800 10092675121','','41008','100813','31000000','31001500','BBK MOENCHENGLADBACH','31050000','8888','ST SPK MOENCHENGLADBACH','Mo - Fr,Di auch,und nach Vereinbarung','Service@FA-5121.fin-nrw.de','www.finanzamt-Moenchengladbach-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5122','Neuss II ','Hammfelddamm 9','41460','Neuss','02131/6656-0','0800 10092675122','','41405','100502','30000000','30001509','BBK DUESSELDORF','30550000','123000','SPARKASSE NEUSS','Mo,Di,Do,Fr von 8.30-12.00,Di von 13.30-15.00','Service@FA-5122.fin-nrw.de','www.finanzamt-Neuss2.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5123','Oberhausen-Nord ','Gymnasialstr. 16','46145','Oberhausen','0208/6499-0','0800 10092675123','','46122','110220','36000000','36501501','BBK ESSEN','36550000','260125','ST SPK OBERHAUSEN','Mo-Fr 08:30-12:00 Uhr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5123.fin-nrw.de','www.finanzamt-Oberhausen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5124','Oberhausen-Süd ','Schwartzstr. 7-9','46045','Oberhausen','0208/8504-0','0800 10092675124','','46004','100447','36000000','36501500','BBK ESSEN','36550000','138156','ST SPK OBERHAUSEN','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5124.fin-nrw.de','www.finanzamt-Oberhausen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5125','Neuss I ','Schillerstr 80','41464','Neuss','02131/943-0','0800 10092675125','41456','41405','100501','30000000','30001508','BBK DUESSELDORF','30550000','129999','SPARKASSE NEUSS','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5125.fin-nrw.de','www.finanzamt-Neuss1.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5126','Remscheid ','Wupperstr 10','42897','Remscheid','02191/961-0','0800 10092675126','','42862','110269','33000000','33001505','BBK WUPPERTAL','34050000','113001','ST SPK REMSCHEID','Mo-Fr 08.30-12.00Uhr,Di auch 13.30-15.00Uhr,und nach Vereinbarung','Service@FA-5126.fin-nrw.de','www.finanzamt-Remscheid.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5127','Mönchengladbach-Rheydt ','Wilhelm-Strauß-Str. 50','41236','Mönchengladbach','02166/450-0','0800 10092675127','','41204','200442','31000000','31001502','BBK MOENCHENGLADBACH','31050000','295600','ST SPK MOENCHENGLADBACH','MO - FR 08.30 - 12.00 Uhr,DI auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5127.fin-nrw.de','www.finanzamt-Moenchengladbach-Rheydt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5128','Solingen-Ost ','Goerdelerstr.24- 26','42651','Solingen','0212/282-1','0800 10092675128','42648','42609','100984','33000000','33001503','BBK WUPPERTAL','34250000','22707','ST SPK SOLINGEN','Mo.-Fr.,Mo. auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5128.fin-nrw.de','www.finanzamt-Solingen-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5129','Solingen-West ','Merscheider Busch 23','42699','Solingen','0212/2351-0','0800 10092675129','','42663','110340','33000000','33001501','BBK WUPPERTAL','34250000','130005','ST SPK SOLINGEN','MO-FR 08.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5129.fin-nrw.de','www.finanzamt-Solingen-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5130','Wesel ','Poppelbaumstr. 5-7','46483','Wesel','0281/105-0','0800 10092675130','','46461','100136','35000000','35601500','BBK DUISBURG','35650000','208660','VERB SPK WESEL','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5130.fin-nrw.de','www.finanzamt-Wesel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5131','Wuppertal-Barmen ','Unterdörnen 96','42283','Wuppertal','0202/9543-0','0800 10092675131','42271','42208','200853','33000000','33001502','BBK WUPPERTAL','','','','Mo - Fr,Do auch,und nach Vereinbarung','Service@FA-5131.fin-nrw.de','www.finanzamt-Wuppertal-Barmen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5132','Wuppertal-Elberfeld ','Kasinostr. 12','42103','Wuppertal','0202/489-0','0800 10092675132','','42002','100209','33000000','33001500','BBK WUPPERTAL','','','','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5132.fin-nrw.de','www.finanzamt-Wuppertal-Elberfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5133','Düsseldorf-Mitte ','Kruppstr. 110','40227','Düsseldorf','0211/779-9','0800 10092675133','','40001','101024','30000000','30001505','BBK DUESSELDORF','30050110','10123008','ST SPK DUESSELDORF','','Service@FA-5133.fin-nrw.de','www.finanzamt-Duesseldorf-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5134','Duisburg-West ','Friedrich-Ebert-Str 133','47226','Duisburg','02065/307-0','0800 10092675134','','47203','141355','35000000','35001503','BBK DUISBURG','','','','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5134.fin-nrw.de','www.finanzamt-Duisburg-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5135','Hilden ','Neustr. 60','40721','Hilden','02103/917-0','0800 10092675135','','40710','101046','30000000','30001506','BBK DUESSELDORF','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5135.fin-nrw.de','www.finanzamt-Hilden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5139','Velbert ','Nedderstraße 38','42549','Velbert','02051/47-0','0800 10092675139','','42513','101310','33000000','33001504','BBK WUPPERTAL','33450000','26205500','SPARKASSE HRV','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5139.fin-nrw.de','www.finanzamt-Velbert.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5147','Düsseldorf-Mettmann ','Harkortstr. 2-4','40210','Düsseldorf','0211/3804-0','0800 10092675147','','40001','101023','30000000','30001500','BBK DUESSELDORF','30050000','4051017','WESTLB DUESSELDORF','Montag bis Freitag,08.30 bis 12.00 Uhr,und nach Vereinbarung','Service@FA-5147.fin-nrw.de','www.finanzamt-Duesseldorf-Mettmann.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5149','Rechenzentrum d. FinVew NRW ','Roßstraße 131','40476','Düsseldorf','0211/4572-0','0211/4572-302','','40408','300864','','','','','','','','Service@FA-5149.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5170','Düsseldorf I für Groß- und Konzernbetriebsprüfung','Werftstr. 16','40549','Düsseldorf','0211/56354-01','0800 10092675170','','40525','270264','','','','','','','','Service@FA-5170.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5171','Düsseldorf II für Groß- und Konzernbetriebsprüfung','Werftstr. 16','40549','Düsseldorf','0211/56354-0','0800 10092675171','','40525','270264','','','','','','','','Service@FA-5171.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5172','Essen für Groß- und Konzernbetriebsprüfung','In der Hagenbeck 64','45143','Essen','0201/6300-1','0800 10092675172','','45011','101155','','','','','','','','Service@FA-5172.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5173','Krefeld für Groß- und Konzernbetriebsprüfung','Steinstr. 137','47798','Krefeld','02151/8418-0','0800 10092675173','','','','','','','','','','','Service@FA-5173.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5174','Berg. Land für Groß- und Konzernbetriebsprüfung','Bendahler Str. 29','42285','Wuppertal','0202/2832-0','0800 10092675174','42271','','','','','','','','','','Service@FA-5174.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5176','Mönchengladbach für Groß- und Konzernbetriebsprüfung','Aachener Str. 114','41061','Mönchengladbach','02161/3535-0','0800 10092675176','','41017','101715','','','','','','','','Service@FA-5176.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5181','Düsseldorf f. Steuerfahndung und Steuerstrafsachen','Kruppstr.110 -112','40227','Düsseldorf','0211/779-9','0800 10092675181','','40001','101024','30000000','30001502','BBK DUESSELDORF','30050110','10125003','ST SPK DUESSELDORF','Mo - Di 07.30 - 16.30 Uhr,Mi - Fr 07.30 - 16.00 Uhr','Service@FA-5181.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5182','Essen f. Steuerfahndung und Steuerstrafsachen','In der Hagenbeck 64','45143','Essen','0201/6300-1','0800 10092675182','','45011','101155','36000000','36001502','BBK ESSEN','36050105','203000','SPARKASSE ESSEN','','Service@FA-5182.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5183','Wuppertal f. Steuerfahndung und Steuerstrafsachen','Unterdörnen 96','42283','Wuppertal','0202/9543-0','0800 10092675183','','42205','200553','33000000','33001502','BBK WUPPERTAL','33050000','135004','ST SPK WUPPERTAL','','Service@FA-5183.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5201','Aachen-Innenstadt ','Mozartstr 2-10','52064','Aachen','0241/469-0','0800 10092675201','','52018','101833','39000000','39001501','BBK AACHEN','39050000','26','SPARKASSE AACHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 -15.00 Uhr,und nach Vereinbarung','Service@FA-5201.fin-nrw.de','www.finanzamt-Aachen-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5202','Aachen-Kreis ','Beverstr 17','52066','Aachen','0241/940-0','0800 10092675202','','52018','101829','39000000','39001500','BBK AACHEN','39050000','311118','SPARKASSE AACHEN','Mo.-Fr. 08.30 - 12.00 Uhr,Mo.,und nach Vereinbarung','Service@FA-5202.fin-nrw.de','www.finanzamt-Aachen-Kreis.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5203','Bergheim ','Rathausstrasse 3','50126','Bergheim','02271/82-0','0800 10092675203','','50101','1120','39500000','39501501','BBK AACHEN EH DUEREN','','','','Mo-Fr 08:30-12:00 Uhr,Di 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5203.fin-nrw.de','www.finanzamt-Bergheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5204','Bergisch Gladbach ','Refrather Weg 35','51469','Bergisch Gladbach','02202/9342-0','0800 10092675204','','51433','200380','37000000','37001508','BBK KOELN','','','','Mo.-Fr. 8.30-12.00 Uhr','Service@FA-5204.fin-nrw.de','www.finanzamt-Bergisch-Gladbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5205','Bonn-Innenstadt ','Welschnonnenstr. 15','53111','Bonn','0228/718-0','0800 10092675205','','53031','180120','38000000','38001500','BBK BONN','38050000','17079','SPARKASSE BONN','Mo-Mi 08.30-12.00 Uhr,Do 07.00-17.00 Uhr,Freitag geschlossen','Service@FA-5205.fin-nrw.de','www.finanzamt-Bonn-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5206','Bonn-Außenstadt ','Bachstr. 36','53115','Bonn','0228/7268-0','0800 10092675206','','53005','1580','38000000','38001501','BBK BONN','38050000','22004','SPARKASSE BONN','Mo-Do,Do auch 13:30 bis 17:30 Uhr,Freitags geschlossen','Service@FA-5206.fin-nrw.de','www.finanzamt-Bonn-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5207','Düren ','Goethestrasse 7','52349','Düren','02421/947-0','0800 10092675207','','52306','100646','39500000','39501500','BBK AACHEN EH DUEREN','39550110','188300','SPARKASSE DUEREN','Mo-Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5207.fin-nrw.de','www.finanzamt-Dueren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5208','Erkelenz ','Südpromenade 37','41812','Erkelenz','02431/801-0','0800 10092675208','','41806','1651','31000000','31001501','BBK MOENCHENGLADBACH','31251220','402800','KR SPK HEINSBERG ERKELENZ','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5208.fin-nrw.de','www.finanzamt-Erkelenz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5209','Euskirchen ','Thomas-Mann-Str. 2','53879','Euskirchen','02251/982-0','0800 10092675209','','53864','1487','38000000','38001505','BBK BONN','38250110','1000330','KREISSPARKASSE EUSKIRCHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5209.fin-nrw.de','www.finanzamt-Euskirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5210','Geilenkirchen ','H.-Wilh.-Str 45','52511','Geilenkirchen','02451/623-0','0800 10092675210','','52501','1193','39000000','39001502','BBK AACHEN','31251220','5397','KR SPK HEINSBERG ERKELENZ','Mo.-Fr. 8.30 - 12.00 Uhr,nachmittags nur tel. von,13.30 - 15.00 Uhr','Service@FA-5210.fin-nrw.de','www.finanzamt-Geilenkirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5211','Schleiden ','Kurhausstr. 7','53937','Schleiden','02444/85-0','0800 10092675211','','53929','1140','38000000','38001506','BBK BONN','38250110','3200235','KREISSPARKASSE EUSKIRCHEN','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,sowie nach Vereinbarung','Service@FA-5211.fin-nrw.de','www.finanzamt-Schleiden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5212','Gummersbach ','Mühlenbergweg 5','51645','Gummersbach','02261/86-0','0800 10092675212','51641','','','37000000','37001506','BBK KOELN','','','','Mo - Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5212.fin-nrw.de','www.finanzamt-Gummersbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5213','Jülich ','Wilhelmstr 5','52428','Jülich','02461/685-0','0800 10092675213','','52403','2180','39000000','39701500','BBK AACHEN','39550110','25023','SPARKASSE DUEREN','Mo.-Fr. 08.00-12.00 Uhr,Di. 13.30-15.00 Uhr','Service@FA-5213.fin-nrw.de','www.finanzamt-Juelich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5214','Köln-Altstadt ','Am Weidenbach 2-4','50676','Köln','0221/2026-0','0800 10092675214','','50517','250140','37000000','37001501','BBK KOELN','37050198','70052964','STADTSPARKASSE KOELN','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.00 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5214.fin-nrw.de','www.finanzamt-Koeln-Altstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5215','Köln-Mitte ','Blaubach 7','50676','Köln','0221/92400-0','0800 10092675215','','50524','290208','37000000','37001505','BBK KOELN','37050198','70062963','STADTSPARKASSE KOELN','MO-FR 08.30 - 12.00 UHR','Service@FA-5215.fin-nrw.de','www.finanzamt-Koeln-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5216','Köln-Porz ','Klingerstr. 2-6','51143','Köln','02203/598-0','0800 10092675216','','51114','900469','37000000','37001524','BBK KOELN','','','','Mo-Fr08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5216.fin-nrw.de','www.finanzamt-Koeln-Porz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5217','Köln-Nord ','Innere Kanalstr. 214','50670','Köln','0221/97344-0','0800 10092675217','','50495','130164','37000000','37001502','BBK KOELN','37050198','70102967','STADTSPARKASSE KOELN','Mo - Fr 8.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5217.fin-nrw.de','www.finanzamt-Koeln-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5218','Köln-Ost ','Siegesstrasse 1','50679','Köln','0221/9805-0','0800 10092675218','','50529','210340','37000000','37001503','BBK KOELN','37050198','70082961','STADTSPARKASSE KOELN','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5218.fin-nrw.de','www.finanzamt-Koeln-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5219','Köln-Süd ','Am Weidenbach 6','50676','Köln','0221/2026-0','0800 10092675219','','50517','250160','37000000','37001504','BBK KOELN','37050198','70032966','STADTSPARKASSE KOELN','Mo-Fr,Di auch 13.00-15.00 Uhr','Service@FA-5219.fin-nrw.de','www.finanzamt-Koeln-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5220','Siegburg ','Mühlenstr 19','53721','Siegburg','02241/105-0','0800 10092675220','','53703','1351','38000000','38001503','BBK BONN','','','','Mo.-Fr. 08.30-12.00 Uhr,Mo. auch 13.30-17.00 Uhr,und nach Vereinbarung','Service@FA-5220.fin-nrw.de','www.finanzamt-Siegburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5221','Wipperfürth ','Am Stauweiher 3','51688','Wipperfürth','02267/870-0','0800 10092675221','','51676','1240','37000000','37001513','BBK KOELN','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5221.fin-nrw.de','www.finanzamt-Wipperfuerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5222','Sankt Augustin ','Hubert-Minz-Str 10','53757','Sankt Augustin','02241/242-1','0800 10092675222','','53730','1229','38000000','38001504','BBK BONN','','','','Mo - Fr 8.30-12.00 Uhr,Di auch 13.30-15.00 Uhr','Service@FA-5222.fin-nrw.de','www.finanzamt-Sankt-Augustin.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5223','Köln-West ','Haselbergstr 20','50931','Köln','0221/5734-0','0800 10092675223','','50864','410469','37000000','37001523','BBK KOELN','37050198','70022967','STADTSPARKASSE KOELN','','Service@FA-5223.fin-nrw.de','www.finanzamt-Koeln-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5224','Brühl ','Kölnstr. 104','50321','Brühl','02232/703-0','0800 10092675224','50319','','','37000000','37001507','BBK KOELN','','','','Mo-Fr 08.30 - 12.00,Die zusätzlich 13.30 - 15.00 ,und nach Vereinbarung','Service@FA-5224.fin-nrw.de','www.finanzamt-Bruehl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5225','Aachen-Außenstadt ','Beverstraße','52066','Aachen','0241/940-0','0800 10092675225','','52018','101825','39000000','39001503','BBK AACHEN','39050000','1099','SPARKASSE AACHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5225.fin-nrw.de','www.finanzamt-Aachen-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5230','Leverkusen ','Haus-Vorster-Str 12','51379','Leverkusen','02171/407-0','0800 10092675230','51367','','','37000000','37001511','BBK KOELN','37551440','118318500','SPARKASSE LEVERKUSEN','Mo-Do 8.30 - 12.00 Uhr,Di.: 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5230.fin-nrw.de','www.finanzamt-Leverkusen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5270','KonzBP Köln für Groß- und Konzernbetriebsprüfung','Riehler Platz 2','50668','Köln','0221/2021-0','0800 10092675270','','','','','','','','','','','Service@FA-5270.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5271','Aachen für Groß- und Konzernbetriebsprüfung','Beverstr. 17','52066','Aachen','0241/940-0','0800 10092675271','','52017','101744','','','','','','','','Service@FA-5271.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5272','Bonn für Groß- und Konzernbetriebsprüfung','Am Propsthof 17','53121','Bonn','0228/7223-0','0800 10092675272','','','','','','','','','','','Service@FA-5272.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5281','Aachen f. Steuerfahndung und Steuerstrafsachen','Beverstr 17','52066','Aachen','0241/940-0','0800 10092675281','','52017','101722','39000000','39001500','BBK AACHEN','39050000','311118','SPARKASSE AACHEN','','Service@FA-5281.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5282','Bonn f. Steuerfahndung und Steuerstrafsachen','Theaterstr. 1','53111','Bonn','0228/718-0','0800 10092675282','','','','38000000','38001500','BBK BONN','38050000','17079','SPARKASSE BONN','','Service@FA-5282.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5283','Köln f. Steuerfahndung und Steuerstrafsachen','Am Gleisdreieck 7- 9','50823','Köln','0221/5772-0','0800 10092675283','','50774','300451','37000000','37001502','BBK KOELN','37050198','70102967','STADTSPARKASSE KOELN','','Service@FA-5283.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5301','Ahaus ','Vredener Dyk 2','48683','Ahaus','02561/929-0','0800 10092675301','','48662','1251','40000000','40001503','BBK MUENSTER, WESTF','40154530','51027902','SPARKASSE WESTMUENSTERLAND','Mo - Fr 08.30 - 12.00 Uhr,zudem Mo 13.30 - 15.00 Uhr,sowie Do 13.30 -','Service@FA-5301.fin-nrw.de','www.finanzamt-Ahaus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5302','Altena ','Winkelsen 11','58762','Altena','02352/917-0','0800 10092675302','','58742','1253','45000000','45001501','BBK HAGEN','45851020','80020001','VER SPK PLETTENBERG','Mo,Di-Do,und nach Vereinbarung','Service@FA-5302.fin-nrw.de','www.finanzamt-Altena.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5303','Arnsberg ','Rumbecker Straße 36','59821','Arnsberg','02931/875-0','0800 10092675303','59818','59802','5245','41000000','46401501','BBK HAMM, WESTF','46650005','1020007','SPK ARNSBERG-SUNDERN','Mo-Mi 08.30 - 12.00 Uhr,Fr,und nach Vereinbarung','Service@FA-5303.fin-nrw.de','www.finanzamt-Arnsberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5304','Beckum ','Elisabethstraße 19','59269','Beckum','02521/25-0','0800 10092675304','59267','59244','1452','41000000','41001501','BBK HAMM, WESTF','41250035','1000223','SPK BECKUM-WADERSLOH','MO-FR 08.30-12.00 UHR,MO AUCH 13.30-15.00 UHR,UND NACH VEREINBARUNG','Service@FA-5304.fin-nrw.de','www.finanzamt-Beckum.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5305','Bielefeld-Innenstadt ','Ravensberger Straße 90','33607','Bielefeld','0521/548-0','0800 10092675305','','33503','100371','48000000','48001500','BBK BIELEFELD','48050161','109','SPK BIELEFELD','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5305.fin-nrw.de','www.finanzamt-Bielefeld-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5306','Bochum-Mitte ','Castroper Str. 40 - 42','44791','Bochum','0234/514-0','0800 10092675306','','44707','100729','43000000','43001500','BBK BOCHUM','43050001','1300011','SPARKASSE BOCHUM','Mo-Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,Individuelle Terminver-,einbarungen sind möglich','Service@FA-5306.fin-nrw.de','www.finanzamt-Bochum-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5307','Borken ','Nordring 184','46325','Borken','02861/938-0','0800 10092675307','46322','46302','1240','40000000','40001514','BBK MUENSTER, WESTF','40154530','51021137','SPARKASSE WESTMUENSTERLAND','Mo-Fr 8.30 - 12.00 Uhr,Mo 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5307.fin-nrw.de','www.finanzamt-Borken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5308','Bottrop ','Scharnhölzstraße 32','46236','Bottrop','02041/691-0','0800 10092675308','','46205','100553','43000000','42401501','BBK BOCHUM','42451220','10009','SPK BOTTROP','Mo-Mi 08.00-12.00 Uhr,Do 07.30-12.00 u 13.30-15.00 ,Freitags geschlossen','Service@FA-5308.fin-nrw.de','www.finanzamt-Bottrop.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5309','Brilon ','Steinweg 30','59929','Brilon','02961/788-0','0800 10092675309','','59915','1260','48000000','47201502','BBK BIELEFELD','41651770','17004','SPK HOCHSAUERLAND BRILON','Mo - Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5309.fin-nrw.de','www.finanzamt-Brilon.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5310','Bünde ','Lettow-Vorbeck-Str 2-10','32257','Bünde','05223/169-0','0800 10092675310','','32216','1649','48000000','48001502','BBK BIELEFELD','49450120','210003000','SPARKASSE HERFORD','','Service@FA-5310.fin-nrw.de','www.finanzamt-Buende.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5311','Steinfurt ','Ochtruper Straße 2','48565','Steinfurt','02551/17-0','0800 10092675311','48563','48542','1260','40000000','40301500','BBK MUENSTER, WESTF','','','','Mo-Fr 08.00-12.00 Uhr,Mo auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5311.fin-nrw.de','www.finanzamt-Steinfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5312','Coesfeld ','Friedrich-Ebert-Str. 8','48653','Coesfeld','02541/732-0','0800 10092675312','','48633','1344','40000000','40001505','BBK MUENSTER, WESTF','40154530','59001644','SPARKASSE WESTMUENSTERLAND','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5312.fin-nrw.de','www.finanzamt-Coesfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5313','Detmold ','Wotanstraße 8','32756','Detmold','05231/972-0','0800 10092675313','32754','32706','1664','48000000','48001504','BBK BIELEFELD','47650130','4002','SPK DETMOLD','Mo. bis Fr.,Montags,und nach Vereinbarung','Service@FA-5313.fin-nrw.de','www.finanzamt-Detmold.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5314','Dortmund-West ','Märkische Straße 124','44141','Dortmund','0231/9581-0','0800 10092675314','','44047','105041','44000000','44001500','BBK DORTMUND','44050199','301001886','SPARKASSE DORTMUND','Montags geschlossen,Di - Fr 8.30 - 12.00,Do zusätzlich 13.30 - 15.00','Service@FA-5314.fin-nrw.de','www.finanzamt-Dortmund-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5315','Dortmund-Hörde ','Niederhofener Str 3','44263','Dortmund','0231/4103-0','0800 10092675315','','44232','300255','44000000','44001503','BBK DORTMUND','44050199','21003468','SPARKASSE DORTMUND','Mo-Do 8.30-12.00 Uhr,und nach Vereinbarung','Service@FA-5315.fin-nrw.de','www.finanzamt-Dortmund-Hoerde.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5316','Dortmund-Unna ','Rennweg 1','44143','Dortmund','0231/5188-1','0800 10092675316','','44047','105020','44000000','44001501','BBK DORTMUND','44050199','1060600','SPARKASSE DORTMUND','Mo-Fr 08.30-12.00 Uhr,und nach Vereinbarung','Service@FA-5316.fin-nrw.de','www.finanzamt-Dortmund-Unna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5317','Dortmund-Ost ','Nußbaumweg 210','44143','Dortmund','0231/5188-1','0800 10092675317','','44047','105039','44000000','44001502','BBK DORTMUND','44050199','301001827','SPARKASSE DORTMUND','Mo - Fr 8.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5317.fin-nrw.de','www.finanzamt-Dortmund-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5318','Gelsenkirchen-Nord ','Rathausplatz 1','45894','Gelsenkirchen','0209/368-1','0800 10092675318','','45838','200351','43000000','42001501','BBK BOCHUM','42050001','160012007','SPARKASSE GELSENKIRCHEN','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00Uhr','Service@FA-5318.fin-nrw.de','www.finanzamt-Gelsenkirchen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5319','Gelsenkirchen-Süd ','Zeppelinallee 9-13','45879','Gelsenkirchen','0209/173-1','0800 10092675319','','45807','100753','43000000','42001500','BBK BOCHUM','42050001','101050003','SPARKASSE GELSENKIRCHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr','Service@FA-5319.fin-nrw.de','www.finanzamt-Gelsenkirchen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5320','Gladbeck ','Jovyplatz 4','45964','Gladbeck','02043/270-1','0800 10092675320','','45952','240','43000000','42401500','BBK BOCHUM','42450040','91','ST SPK GLADBECK','MO-FR 08.30-12.00 UHR,DO AUCH 13.30-15.00 UHR,UND NACH VEREINBARUNG','Service@FA-5320.fin-nrw.de','www.finanzamt-Gladbeck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5321','Hagen ','Schürmannstraße 7','58097','Hagen','02331/180-0','0800 10092675321','','58041','4145','45000000','45001500','BBK HAGEN','45050001','100001580','SPARKASSE HAGEN','Mo-Fr,Mo auch 13.30-15.00 Uhr','Service@FA-5321.fin-nrw.de','www.finanzamt-Hagen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5322','Hamm ','Grünstraße 2','59065','Hamm','02381/918-0','0800 10092675322','59061','59004','1449','41000000','41001500','BBK HAMM, WESTF','41050095','90001','SPARKASSE HAMM','Mo-Do 8.30-12.00 Uhr,Mi auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5322.fin-nrw.de','www.finanzamt-Hamm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5323','Hattingen ','Rathausplatz 19','45525','Hattingen','02324/208-0','0800 10092675323','','45502','800257','43000000','43001501','BBK BOCHUM','','','','Mo-Fr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5323.fin-nrw.de','www.finanzamt-Hattingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5324','Herford ','Wittekindstraße 5','32051','Herford','05221/188-0','0800 10092675324','','32006','1642','48000000','48001503','BBK BIELEFELD','49450120','36004','SPARKASSE HERFORD','Mo,Di,Fr 7.30-12.00 Uhr,Do 7.30-17.00 Uhr,Mi geschlossen,und nach Vereinbarung','Service@FA-5324.fin-nrw.de','www.finanzamt-Herford.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5325','Herne-Ost ','Markgrafenstraße 12','44623','Herne','02323/598-0','0800 10092675325','','44602','101220','43000000','43001502','BBK BOCHUM','43250030','1012004','HERNER SPARKASSE','Rückfragen bitte nur,telefonisch oder nach,vorheriger Rücksprache mit,dem Bearbeiter','Service@FA-5325.fin-nrw.de','www.finanzamt-Herne-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5326','Höxter ','Bismarckstraße 11','37671','Höxter','05271/969-0','0800 10092675326','37669','37652','100239','48000000','47201501','BBK BIELEFELD','47251550','3008521','SPK HOEXTER BRAKEL','Mo - Do,Do auch,und nach Vereinbarung','Service@FA-5326.fin-nrw.de','www.finanzamt-Hoexter.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5327','Ibbenbüren ','Uphof 10','49477','Ibbenbüren','05451/920-0','0800 10092675327','','49462','1263','40000000','40301501','BBK MUENSTER, WESTF','40351060','2469','KR SPK STEINFURT','Mo - Fr,Di auch','Service@FA-5327.fin-nrw.de','www.finanzamt-Ibbenbueren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5328','Iserlohn ','Zollernstraße 16','58636','Iserlohn','02371/969-0','0800 10092675328','58634','58585','1554','45000000','45001503','BBK HAGEN','44550045','44008','SPK DER STADT ISERLOHN','Mo - Do 08.30 - 12.00 Uhr,Do auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5328.fin-nrw.de','www.finanzamt-Iserlohn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5329','Lemgo ','Engelb.-Kämpfer Str. 18','32657','Lemgo','05261/253-1','0800 10092675329','','32632','240','48000000','48001505','BBK BIELEFELD','48250110','45005','SPARKASSE LEMGO','Mo - Fr,Do auch,und nach Vereinbarung','Service@FA-5329.fin-nrw.de','www.finanzamt-Lemgo.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5330','Lippstadt ','Im Grünen Winkel 3','59555','Lippstadt','02941/982-0','0800 10092675330','','59525','1580','41000000','46401505','BBK HAMM, WESTF','41650001','15008','ST SPK LIPPSTADT','Mo - Fr 08.30 - 12.00,Do zusätzlich 13.30 - 15.00','Service@FA-5330.fin-nrw.de','www.finanzamt-Lippstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5331','Lübbecke ','Bohlenstraße 102','32312','Lübbecke','05741/334-0','0800 10092675331','','32292','1244','49000000','49001501','BBK MINDEN, WESTF','49050101','141','SPARKASSE MINDEN-LUEBBECKE','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5331.fin-nrw.de','www.finanzamt-Luebbecke.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5332','Lüdenscheid ','Bahnhofsallee 16','58507','Lüdenscheid','02351/155-0','0800 10092675332','58505','58465','1589','45000000','45001502','BBK HAGEN','45850005','18','SPK LUEDENSCHEID','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5332.fin-nrw.de','www.finanzamt-Luedenscheid.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5333','Lüdinghausen ','Bahnhofstraße 32','59348','Lüdinghausen','02591/930-0','0800 10092675333','','59332','1243','40000000','40001506','BBK MUENSTER, WESTF','40154530','1008','SPARKASSE WESTMUENSTERLAND','vormittags: Mo.-Fr.8.30-12.00,nachmittags: Di. 13.30-15.00','Service@FA-5333.fin-nrw.de','www.finanzamt-Luedinghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5334','Meschede ','Fritz-Honsel-Straße 4','59872','Meschede','0291/950-0','0800 10092675334','','59852','1265','41000000','46401502','BBK HAMM, WESTF','46451012','13003','SPK MESCHEDE','Mo-Fr 08:30 - 12:00,und nach Vereinbarung','Service@FA-5334.fin-nrw.de','www.finanzamt-Meschede.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5335','Minden ','Heidestraße 10','32427','Minden','0571/804-1','0800 10092675335','','32380','2340','49000000','49001500','BBK MINDEN, WESTF','49050101','40018145','SPARKASSE MINDEN-LUEBBECKE','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5335.fin-nrw.de','www.finanzamt-Minden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5336','Münster-Außenstadt ','Friedrich-Ebert-Str. 46','48153','Münster','0251/9729-0','0800 10092675336','','48136','6129','40000000','40001501','BBK MUENSTER, WESTF','40050150','95031001','SPK MUENSTERLAND OST','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5336.fin-nrw.de','www.finanzamt-Muenster-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5337','Münster-Innenstadt ','Münzstr. 10','48143','Münster','0251/416-1','0800 10092675337','','48136','6103','40000000','40001502','BBK MUENSTER, WESTF','40050150','300004','SPK MUENSTERLAND OST','','Service@FA-5337.fin-nrw.de','www.finanzamt-Muenster-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5338','Olpe ','Am Gallenberg 20','57462','Olpe','02761/963-0','0800 10092675338','','57443','1320','45000000','46001501','BBK HAGEN','','','','Mo-Do 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,Freitag keine Sprechzeit','Service@FA-5338.fin-nrw.de','www.finanzamt-Olpe.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5339','Paderborn ','Bahnhofstraße 28','33102','Paderborn','05251/100-0','0800 10092675339','','33045','1520','48000000','47201500','BBK BIELEFELD','47250101','1001353','SPARKASSE PADERBORN','','Service@FA-5339.fin-nrw.de','www.finanzamt-Paderborn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5340','Recklinghausen ','Westerholter Weg 2','45657','Recklinghausen','02361/583-0','0800 10092675340','','45605','100553','43000000','42601500','BBK BOCHUM','42650150','90034158','SPK RECKLINGHAUSEN','Mo - Fr 08:30 bis 12:00,Mi auch 13:30 bis 15:00,und nach Vereinbarung','Service@FA-5340.fin-nrw.de','www.finanzamt-Recklinghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5341','Schwelm ','Bahnhofplatz 6','58332','Schwelm','02336/803-0','0800 10092675341','','58316','340','45000000','45001520','BBK HAGEN','45451555','80002','ST SPK SCHWELM','Mo-Fr 8.30-12.00 Uhr,Mo,und nach Vereinbarung','Service@FA-5341.fin-nrw.de','www.finanzamt-Schwelm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5342','Siegen ','Weidenauer Straße 207','57076','Siegen','0271/4890-0','0800 10092675342','','57025','210148','45000000','46001500','BBK HAGEN','46050001','1100114','SPK SIEGEN','Mo-Fr,Do auch 13:30 - 17:00 Uhr,und nach Vereinbarung','Service@FA-5342.fin-nrw.de','www.finanzamt-Siegen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5343','Soest ','Waisenhausstraße 11','59494','Soest','02921/351-0','0800 10092675343','59491','59473','1364','41000000','46401504','BBK HAMM, WESTF','41450075','208','SPARKASSE SOEST','Mo-Fr 0830-1200Uhr,und nach Vereinbarung','Service@FA-5343.fin-nrw.de','www.finanzamt-Soest.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5344','Herne-West ','Edmund-Weber-Str. 210','44651','Herne','02325/696-0','0800 10092675344','','44632','200262','43000000','43001503','BBK BOCHUM','43250030','17004','HERNER SPARKASSE','Mo-Fr 08.30-12.00 Uhr,Mo 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5344.fin-nrw.de','www.finanzamt-Herne-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5345','Warburg ','Sternstraße 33','34414','Warburg','05641/771-0','0800 10092675345','','34402','1226','48000000','47201503','BBK BIELEFELD','47251550','25005521','SPK HOEXTER BRAKEL','','Service@FA-5345.fin-nrw.de','www.finanzamt-Warburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5346','Warendorf ','Düsternstraße 43','48231','Warendorf','02581/924-0','0800 10092675346','','48205','110361','40000000','40001504','BBK MUENSTER, WESTF','40050150','182','SPK MUENSTERLAND OST','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5346.fin-nrw.de','www.finanzamt-Warendorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5347','Wiedenbrück ','Hauptstraße 34','33378','Rheda-Wiedenbrück','05242/934-0','0800 10092675347','33372','33342','1429','48000000','47801500','BBK BIELEFELD','47853520','5231','KREISSPARKASSE WIEDENBRUECK','Mo - Fr 08.30 - 12.00 Uhr,Do auch 13.30 - 14.30 Uhr','Service@FA-5347.fin-nrw.de','www.finanzamt-Wiedenbrueck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5348','Witten ','Ruhrstraße 43','58452','Witten','02302/921-0','0800 10092675348','','58404','1420','43000000','43001505','BBK BOCHUM','45250035','6007','ST SPK WITTEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5348.fin-nrw.de','www.finanzamt-Witten.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5349','Bielefeld-Außenstadt ','Ravensberger Straße 125','33607','Bielefeld','0521/548-0','0800 10092675349','','33503','100331','48000000','48001501','BBK BIELEFELD','48050161','180000','SPK BIELEFELD','Mo - Fr 08:30 - 12:00 Uhr,Do auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5349.fin-nrw.de','www.finanzamt-Bielefeld-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5350','Bochum-Süd ','Königsallee 21','44789','Bochum','0234/3337-0','0800 10092675350','','44707','100764','43000000','43001504','BBK BOCHUM','43050001','1307792','SPARKASSE BOCHUM','Mo-Fr 08:30-12:00 Uhr,Di auch 13:30-15:00 Uhr','Service@FA-5350.fin-nrw.de','www.finanzamt-Bochum-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5351','Gütersloh ','Neuenkirchener Str. 86','33332','Gütersloh','05241/3071-0','0800 10092675351','','33245','1565','48000000','48001506','BBK BIELEFELD','','','','Mo - Fr 08.30 - 12.00 Uhr,Do auch 13.30 - 15.00 Uhr','Service@FA-5351.fin-nrw.de','www.finanzamt-Guetersloh.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5359','Marl ','Brassertstraße 1','45768','Marl','02365/516-0','0800 10092675359','45765','45744','1420','43000000','42601501','BBK BOCHUM','42650150','40020000','SPK RECKLINGHAUSEN','','Service@FA-5359.fin-nrw.de','www.finanzamt-Marl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5371','Bielefeld für Groß- und Konzernbetriebsprüfung','Ravensberger Str. 90','33607','Bielefeld','0521/548-0','0800 10092675371','','33511','101150','','','','','','','','Service@FA-5371.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5372','Herne für Groß- und Konzernbetriebsprüfung','Hauptstr. 123','44651','Herne','02325/693-0','0800 10092675372','','44636','200620','','','','','','','','Service@FA-5372.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5373','Detmold für Groß- und Konzernbetriebsprüfung','Richthofenstrasse 94','32756','Detmold','05231/974-300','0800 10092675373','','32706','1664','','','','','','','','Service@FA-5373.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5374','Dortmund für Groß- und Konzernbetriebsprüfung','Nußbaumweg 210','44143','Dortmund','0231/5188-8953','0800 10092675374','','44047','105039','','','','','','','','Service@FA-5374.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5375','Hagen für Groß- und Konzernbetriebsprüfung','Hochstr. 43 - 45','58095','Hagen','02331/3760-0','0800 10092675375','','','','','','','','','','','Service@FA-5375.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5376','Münster für Groß- und Konzernbetriebsprüfung','Andreas-Hofer-Straße 50','48145','Münster','0251/934-2115','0800 10092675376','','','','','','','','','','','Service@FA-5376.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5381','Bielefeld f. Steuerfahndung und Steuerstrafsachen','Ravensberger Str. 90','33607','Bielefeld','0521/548-0','0800 10092675381','','33511','101173','48000000','48001500','BBK BIELEFELD','48050161','109','SPK BIELEFELD','','Service@FA-5381.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5382','Bochum f. Steuerfahndung und Steuerstrafsachen','Uhlandstr. 37','44791','Bochum','0234/5878-0','0800 10092675382','','44707','100768','43000000','43001500','BBK BOCHUM','43050001','1300011','SPARKASSE BOCHUM','','Service@FA-5382.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5383','Hagen f. Steuerfahndung und Steuerstrafsachen','Becheltestr. 32','58089','Hagen','02331/3089-0','0800 10092675383','','58041','4143','45000000','145001500','BBK HAGEN','45050001','100001580','SPARKASSE HAGEN','','Service@FA-5383.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5384','Münster f. Steuerfahndung und Steuerstrafsachen','Hohenzollernring 80','48145','Münster','0251/9370-0','0800 10092675384','','','','40000000','40001501','BBK MUENSTER, WESTF','40050150','95031001','SPK MUENSTERLAND OST','','Service@FA-5384.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9101','Augsburg-Stadt Arbeitnehmerbereich','Prinzregentenpl. 2','86150','Augsburg','0821 506-01','0821 506-2222','','86135','10 00 65','72000000','72001500','BBK AUGSBURG','72050000','24109','ST SPK AUGSBURG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-a-s.bayern.de','www.finanzamt-augsburg-stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9102','Augsburg-Land ','Peutingerstr. 25','86152','Augsburg','0821 506-02','0821 506-3270','86144','86031','11 06 69','72000000','72001501','BBK AUGSBURG','72050101','8003','KR SPK AUGSBURG','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-a-l.bayern.de','www.finanzamt-augsburg-land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9103','Augsburg-Stadt ','Prinzregentenpl. 2','86150','Augsburg','0821 506-01','0821 506-2222','','86135','10 00 65','72000000','72001500','BBK AUGSBURG','72050000','24109','ST SPK AUGSBURG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-a-s.bayern.de','www.finanzamt-augsburg-stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9104','Bad Tölz -Außenstelle des Finanzamts Wolfratshausen-','Prof.-Max-Lange-Platz 2','83646','Bad Tölz','08041 8005-0','08041 8005-185','','83634','1420','70000000','70001505','BBK MUENCHEN','70054306','31054','SPK BAD TOELZ-WOLFRATSHAUSE','Servicezentrum: Mo 7:30-18:00 Uhr, Di-Do 7:30-13:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-toel.bayern.de','www.finanzamt-bad-toelz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9105','Berchtesgaden ','Salzburger Str. 6','83471','Berchtesgaden','08652 960-0','08652 960-100','','83461','1154','71000000','71001500','BBK MUENCHEN EH B REICHENHA','71050000','350009','SPK BERCHTESGADENER LAND','Servicezentrum: Mo-Do 7:30-13:30 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-bgd.bayern.de','www.finanzamt-berchtesgaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9106','Burghausen ','Tittmoninger Str. 1','84489','Burghausen','08677 8706-0','08677 8706-100','','84480','1257','71000000','71001501','BBK MUENCHEN EH B REICHENHA','71051010','250001','KR SPK ALTOETTING-BURGHAUSE','Servicezentrum: Mo-Mi 7:45-15:00 Uhr Do 7:45-17:00 Uhr, Fr 7:45-12:00 Uhr','poststelle@fa-burgh.bayern.de','www.finanzamt-burghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9107','Dachau ','Bürgermeister-Zauner-Ring 2','85221','Dachau','08131 701-0','08131 701-111','85219','85202','1280','70000000','70001507','BBK MUENCHEN','70051540','908327','SPARKASSE DACHAU','Servicezentrum: Mo, Di, Do 7:30-15:00 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Mi,Fr 7:30-12:00 Uhr','poststelle@fa-dah.bayern.de','www.finanzamt-dachau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9108','Deggendorf ','Pfleggasse 18','94469','Deggendorf','0991 384-0','0991 384-150','','94453','1355','75000000','75001506','BBK REGENSBURG','74150000','380019950','SPK DEGGENDORF','Servicezentrum: Mo, Di, Do 7:45-15:00 Uhr (Jan-Mai Do 7:45-18:00 Uhr), Mi, Fr 7:45-12:00 Uhr','poststelle@fa-deg.bayern.de','www.finanzamt-deggendorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9109','Dillingen ','Schloßstr. 3','89407','Dillingen','09071 507-0','09071 507-300','89401','','','72000000','72001503','BBK AUGSBURG','72251520','24066','KR U ST SPK DILLINGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-dlg.bayern.de','www.finanzamt-dillingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9110','Dingolfing ','Obere Stadt 44','84130','Dingolfing','08731 504-0','08731 504-190','','84122','1156','74300000','74301501','BBK REGENSBURG EH LANDSHUT','74351310','100017805','SPK DINGOLFING-LANDAU','Servicezentrum: Mo-Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-17:00 Uhr','poststelle@fa-dgf.bayern.de','www.finanzamt-dingolfing.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9111','Donauwörth -Außenstelle des Finanzamts Nördlingen-','Sallingerstr. 2','86609','Donauwörth','0906 77-0','0906 77-150','86607','','','72000000','72001502','BBK AUGSBURG','70010080','1632-809','POSTBANK -GIRO- MUENCHEN','Servicezentrum: Mo-Mi 7:30-13:30 Uhr, Do 7:30-18:00 Uhr, Fr 7:30 -13:00 Uhr','poststelle@fa-don.bayern.de','www.finanzamt-donauwoerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9112','Ebersberg ','Schloßplatz 1-3','85560','Ebersberg','08092 267-0','08092 267-102','','','','70000000','70001508','BBK MUENCHEN','70051805','75','KR SPK EBERSBERG','Servicezentrum: Mo-Do 7:30-13:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ebe.bayern.de','www.finanzamt-ebersberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9113','Eggenfelden ','Pfarrkirchner Str. 71','84307','Eggenfelden','08721 981-0','08721 981-200','','84301','1160','74300000','74301502','BBK REGENSBURG EH LANDSHUT','74351430','5603','SPK ROTTAL-INN EGGENFELDEN','Servicezentrum: Mo, Di, Do 7:45-15:00 Uhr (Jan-Mai Do 7:45-17:00 Uhr), Mi, Fr 7:30-12:00 Uhr','poststelle@fa-eg.bayern.de','www.finanzamt-eggenfelden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9114','Erding ','Münchener Str. 31','85435','Erding','08122 188-0','08122 188-150','','85422','1262','70000000','70001509','BBK MUENCHEN','70051995','8003','SPK ERDING-DORFEN','Servicezentrum: Mo-Mi 7:30-14:00 Uhr Do 7:30-18:00 Uhr, Fr 7:30 -12:00 Uhr','poststelle@fa-ed.bayern.de','www.finanzamt-erding.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9115','Freising ','Prinz-Ludwig-Str. 26','85354','Freising','08161 493-0','08161 493-106','85350','85313','1343','70000000','70001510','BBK MUENCHEN','70021180','4001010','HYPOVEREINSBK FREISING','Servicezentrum: Mo-Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-fs.bayern.de','www.finanzamt-freising.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9117','Fürstenfeldbruck ','Münchner Str.36','82256','Fürstenfeldbruck','08141 60-0','08141 60-150','','82242','1261','70000000','70001511','BBK MUENCHEN','70053070','8007221','SPK FUERSTENFELDBRUCK','Servicezentrum: Mo-Mi 7:30-14:30 Uhr, Do 7:30-17:30 Uhr, Fr 7:30 -12:30 Uhr','poststelle@fa-ffb.bayern.de','www.finanzamt-fuerstenfeldbruck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9118','Füssen -Außenstelle des Finanzamts Kaufbeuren-','Rupprechtstr. 1','87629','Füssen','08362 5056-0','08362 5056-290','','87620','1460','73300000','73301510','BBK AUGSBURG EH KEMPTEN','73350000','310500525','SPARKASSE ALLGAEU','Servicezentrum: Mo-Mi 8:00-15:00 Uhr, Do 8:00-18:00 Uhr, Fr 8:00-13:00 Uhr','poststelle@fa-fues.bayern.de','www.finanzamt-fuessen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9119','Garmisch-Partenkirchen ','Von-Brug-Str. 5','82467','Garmisch-Partenkirchen','08821 700-0','08821 700-111','','82453','1363','70000000','70001520','BBK MUENCHEN','70350000','505','KR SPK GARMISCH-PARTENKIRCH','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-gap.bayern.de','www.finanzamt-garmisch-partenkirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9120','Bad Griesbach -Außenstelle des Finanzamts Passau-','Schloßhof 5-6','94086','Bad Griesbach','0851 504-0','0851 504-2222','','94083','1222','74000000','74001500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-griesb.bayern.de','www.finanzamt-bad-griesbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9121','Günzburg ','Schloßpl. 4','89312','Günzburg','08221 902-0','08221 902-209','','89302','1241','72000000','72001505','BBK AUGSBURG','72051840','18','SPK GUENZBURG-KRUMBACH','Servicezentrum: Mo-Di 7:45-12:30 u. 13:30-15:30, Mi, Fr 7:45-12:30, Do 7:45-12:30 u. 13:30-18:00','poststelle@fa-gz.bayern.de','www.finanzamt-guenzburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9123','Immenstadt -Außenstelle des Finanzamts Kempten-','Rothenfelsstr. 18','87509','Immenstadt','08323 801-0','08323 801-235','','87502','1251','73300000','73301520','BBK AUGSBURG EH KEMPTEN','73350000','113464','SPARKASSE ALLGAEU','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-immen.bayern.de','www.finanzamt-immenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9124','Ingolstadt ','Esplanade 38','85049','Ingolstadt','0841 311-0','0841 311-133','','85019','210451','72100000','72101500','BBK MUENCHEN EH INGOLSTADT','72150000','25 080','SPARKASSE INGOLSTADT','Servicezentrum: Mo-Di 7:15-13:30, Mi 7:15-12:30, Do 7:15-17:30, Fr 7:15-12:00','poststelle@fa-in.bayern.de','www.finanzamt-ingolstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9125','Kaufbeuren ','Remboldstr. 21','87600','Kaufbeuren','08341 802-0','08341 802-221','','87572','1260','73300000','73401500','BBK AUGSBURG EH KEMPTEN','73450000','25700','KR U ST SPK KAUFBEUREN','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-kf.bayern.de','www.finanzamt-kaufbeuren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9126','Kelheim ','Klosterstr. 1','93309','Kelheim','09441 201-0','09441 201-201','','93302','1252','75000000','75001501','BBK REGENSBURG','75051565','190201301','KREISSPARKASSE KELHEIM','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-keh.bayern.de','www.finanzamt-kelheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9127','Kempten (Allgäu) ','Am Stadtpark 3','87435','Kempten','0831 256-0','0831 256-260','','87405','1520','73300000','73301500','BBK AUGSBURG EH KEMPTEN','73350000','117','SPARKASSE ALLGAEU','Servicezentrum: Mo-Do 7:30-14:30 Uhr (Nov-Mai Do 7:20-17:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-ke.bayern.de','www.finanzamt-kempten.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9131','Landsberg ','Israel-Beker-Str. 20','86899','Landsberg','08191 332-0','08191 332-108','86896','','','72000000','72001504','BBK AUGSBURG','70052060','158','SPK LANDSBERG-DIESSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-16:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ll.bayern.de','www.finanzamt-landsberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9132','Landshut ','Maximilianstr. 21','84028','Landshut','0871 8529-000','0871 8529-360','','','','74300000','74301500','BBK REGENSBURG EH LANDSHUT','74350000','10111','SPK LANDSHUT','Servicezentrum: Mo-Di 8:00-15:00 Uhr, Mi, Fr 8:00-12:00 Uhr, Do 8:00-18:00 Uhr','poststelle@fa-la.bayern.de','www.finanzamt-landshut.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9133','Laufen - Außenstelle des Finanzamts Berchtesgaden-','Rottmayrstr. 13','83410','Laufen','08682 918-0','08682 918-100','','83406','1251','71000000','71001502','BBK MUENCHEN EH B REICHENHA','71050000','59998','SPK BERCHTESGADENER LAND','Servicezentrum: Mo-Do 7:30-13:30 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-lauf.bayern.de','www.finanzamt-laufen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9134','Lindau ','Brettermarkt 4','88131','Lindau','08382 916-0','08382 916-100','','88103','1320','73300000','73501500','BBK AUGSBURG EH KEMPTEN','73150000','620018333','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-li.bayern.de','www.finanzamt-lindau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9138','Memmingen ','Bodenseestr. 6','87700','Memmingen','08331 608-0','08331 608-165','','87683','1345','73100000','73101500','BBK AUGSBURG EH MEMMINGEN','73150000','210005','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-mm.bayern.de','www.finanzamt-memmingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9139','Miesbach ','Schlierseer Str. 5','83714','Miesbach','08025 709-0','08025 709-500','','83711','302','70000000','70001512','BBK MUENCHEN','71152570','4002','KR SPK MIESBACH-TEGERNSEE','Servicezentrum: Mo, Di, Mi, Fr 7:30-14:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-mb.bayern.de','www.finanzamt-miesbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9140','Mindelheim -Außenstelle des Finanzamts Memmingen-','Bahnhofstr. 16','87719','Mindelheim','08261 9912-0','08261 9912-300','','87711','1165','73100000','73101502','BBK AUGSBURG EH MEMMINGEN','73150000','810004788','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Mi 7:30-12:00 u. 13:30-15:30, Do 7:30-12:00 u. 13:30-17:30, Fr 7:30-12:00','poststelle@fa-mn.bayern.de','www.finanzamt-mindelheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9141','Mühldorf ','Katharinenplatz 16','84453','Mühldorf','08631 616-0','08631 616-100','','84445','1369','71100000','71101501','BBK MUENCHEN EH ROSENHEIM','71151020','885','KR SPK MUEHLDORF','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-mue.bayern.de','www.finanzamt-muehldorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9142','München f. Körpersch. Bewertung des Grundbesitzes','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9143','München f. Körpersch. Körperschaftsteuer','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9144','München I ','Karlstr. 9-11','80333','München','089 1252-0','089 1252-1111','80276','80008','20 09 05','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m1.bayern.de','www.finanzamt-muenchen-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9145','München III ','Deroystr. 18','80335','München','089 1252-0','089 1252-3333','80301','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m3.bayern.de','www.finanzamt-muenchen-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9146','München IV ','Deroystr. 4 Aufgang I','80335','München','089 1252-0','089 1252-4000','80302','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m4.bayern.de','www.finanzamt-muenchen-IV.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9147','München II ','Deroystr. 20','80335','München','089 1252-0','089 1252-2222','80269','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m2.bayern.de','www.finanzamt-muenchen-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9148','München V ','Deroystr. 4 Aufgang II','80335','München','089 1252-0','089 1252-5281','80303','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m5.bayern.de','www.finanzamt-muenchen-V.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9149','München-Zentral Erhebung, Vollstreckung','Winzererstr. 47a','80797','München','089 3065-0','089 3065-1900','80784','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-zfa.bayern.de','www.finanzamt-muenchen-zentral.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9150','Neuburg -Außenstelle des Finanzamts Schrobenhausen-','Fünfzehnerstr. 7','86633','Neuburg','08252 918-0','08252 918-222','','86618','1320','72100000','72101505','BBK MUENCHEN EH INGOLSTADT','72151880','104000','ST SPK SCHROBENHAUSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-nd.bayern.de','www.finanzamt-neuburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9151','Neu-Ulm ','Nelsonallee 5','89231','Neu-Ulm','0731 7045-0','0731 7045-500','89229','89204','1460','63000000','63001501','BBK ULM, DONAU','73050000','430008425','SPK NEU-ULM ILLERTISSEN','Servicezentrum: Mo, Di, Mi, Fr 8:00-13:00 Uhr, Do 8:00-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-nu.bayern.de','www.finanzamt-neu-ulm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9152','Nördlingen ','Tändelmarkt 1','86720','Nördlingen','09081 215-0','09081 215-100','','86715','1521','72000000','72001506','BBK AUGSBURG','72250000','111500','SPARKASSE NOERDLINGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-noe.bayern.de','www.finanzamt-noerdlingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9153','Passau mit Außenstellen ','Innstr. 36','94032','Passau','0851 504-0','0851 504-1410','','94030','1450','74000000','740 01500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-pa.bayern.de','www.finanzamt-passau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9154','Pfaffenhofen ','Schirmbeckstr. 5','85276','Pfaffenhofen a. d. Ilm','08441 77-0','08441 77-199','','85265','1543','72100000','72101504','BBK MUENCHEN EH INGOLSTADT','72151650','7302','VER SPK PFAFFENHOFEN','Servicezentrum: Mo-Mi 7:30-14:30 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-paf.bayern.de','www.finanzamt-pfaffenhofen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9156','Rosenheim m. ASt Wasserburg ','Wittelsbacherstr. 25','83022','Rosenheim','08031 201-0','08031 201-222','','83002','100255','71100000','71101500','BBK MUENCHEN EH ROSENHEIM','71150000','34462','SPK ROSENHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Okt-Mai Do 7:30-17:00 Uhr), Fr 7:30-12.00 Uhr','poststelle@fa-ro.bayern.de','www.finanzamt-rosenheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9157','Grafenau ','Friedhofstr. 1','94481','Grafenau','08552 423-0','08552 423-170','','','','75000000','75001507','BBK REGENSBURG','70010080','1621-806','POSTBANK -GIRO- MUENCHEN','Servicezentrum: Mo, Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-gra.bayern.de','www.finanzamt-grafenau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9158','Schongau - Außenstelle des Finanzamts Weilheim-Schongau -','Rentamtstr. 1','86956','Schongau','0881 184-0','0881 184-373','','86951','1147','70000000','70001521','BBK MUENCHEN','70351030','20149','VER SPK WEILHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Jun Do 7:30-17:30 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-sog.bayern.de','www.finanzamt-schongau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9159','Schrobenhausen m. ASt Neuburg ','Rot-Kreuz-Str. 2','86529','Schrobenhausen','08252 918-0','08252 918-430','','86522','1269','72100000','72101505','BBK MUENCHEN EH INGOLSTADT','72151880','104000','ST SPK SCHROBENHAUSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-sob.bayern.de','www.finanzamt-schrobenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9161','Starnberg ','Schloßbergstr.','82319','Starnberg','08151 778-0','08151 778-250','','82317','1251','70000000','70001513','BBK MUENCHEN','70250150','430064295','KR SPK MUENCHEN STARNBERG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-13:00 Uhr','poststelle@fa-sta.bayern.de','www.finanzamt-starnberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9162','Straubing ','Fürstenstr. 9','94315','Straubing','09421 941-0','09421 941-272','','94301','151','75000000','75001502','BBK REGENSBURG','74250000','240017707','SPK STRAUBING-BOGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-sr.bayern.de','www.finanzamt-straubing.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9163','Traunstein ','Herzog-Otto-Str. 6','83278','Traunstein','0861 701-0','0861 701-338','83276','83263','1309','71000000','71001503','BBK MUENCHEN EH B REICHENHA','71052050','7070','KR SPK TRAUNSTEIN-TROSTBERG','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt.-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-ts.bayern.de','www.finanzamt-traunstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9164','Viechtach -Außenstelle des Finanzamts Zwiesel-','Mönchshofstr. 27','94234','Viechtach','09922 507-0','09922 507-399','','94228','1162','75000000','75001508','BBK REGENSBURG','74151450','240001008','SPARKASSE REGEN-VIECHTACH','Servicezentrum: Mo-Di 7:45-15:00 Uhr, Mi, Fr 7:45-12:00 Uhr, Do 7:45-18:00 Uhr','poststelle@fa-viech.bayern.de','www.finanzamt-viechtach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9166','Vilshofen -Außenstelle des Finanzamts Passau-','Kapuzinerstr. 36','94474','Vilshofen','0851 504-0','0851 504-2465','','','','74000000','74001500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-vof.bayern.de','www.finanzamt-vilshofen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9167','Wasserburg -Außenstelle des Finanzamts Rosenheim-','Rosenheimer Str. 16','83512','Wasserburg','08037 201-0','08037 201-150','','83502','1280','71100000','71101500','BBK MUENCHEN EH ROSENHEIM','71150000','34462','SPK ROSENHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Okt-Mai Do 7:30-17:00 Uhr), Fr 7:30-12.00 Uhr','poststelle@fa-ws.bayern.de','www.finanzamt-wasserburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9168','Weilheim-Schongau ','Hofstr. 23','82362','Weilheim','0881 184-0','0881 184-500','','82352','1264','70000000','70001521','BBK MUENCHEN','70351030','20149','VER SPK WEILHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Jun Do 7:30-17:30 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-wm.bayern.de','www.finanzamt-weilheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9169','Wolfratshausen ','Heimgartenstr. 5','82515','Wolfratshausen','08171 25-0','08171 25-150','','82504','1444','70000000','70001514','BBK MUENCHEN','70054306','505','SPK BAD TOELZ-WOLFRATSHAUSE','Servicezentrum: Mo-MI 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-wor.bayern.de','www.finanzamt-wolfratshausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9170','Zwiesel m. ASt Viechtach ','Stadtplatz 16','94227','Zwiesel','09922 507-0','09922 507-200','','94221','1262','75000000','75001508','BBK REGENSBURG','74151450','240001008','SPARKASSE REGEN-VIECHTACH','Servicezentrum: Mo-Di 7:45-15:00 Uhr, Mi, Fr 7:45-12:00 Uhr, Do 7:45-18:00 Uhr','poststelle@fa-zwi.bayern.de','www.finanzamt-zwiesel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9171','Eichstätt ','Residenzplatz 8','85072','Eichstätt','08421 6007-0','08421 6007-400','85071','85065','1163','72100000','72101501','BBK MUENCHEN EH INGOLSTADT','72151340','1214','SPARKASSE EICHSTAETT','Servicezentrum: Mo, Di, Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ei.bayern.de','www.finanzamt-eichstaett.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9180','München f. Körpersch. ','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9181','München I Arbeitnehmerbereich','Karlstr. 9/11','80333','München','089 1252-0','089 1252-1111','80276','80008','20 09 05','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m1-BS.bayern.de','www.finanzamt-muenchen-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9182','München II Arbeitnehmerbereich','Deroystr. 20','80335','München','089 1252-0','089 1252-2888','80269','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m2-BS.bayern.de','www.finanzamt-muenchen-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9183','München III Arbeitnehmerbereich','Deroystr. 18','80335','München','089 1252-0','089 1252-3788','80301','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m3-BS.bayern.de','www.finanzamt-muenchen-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9184','München IV Arbeitnehmerbereich','Deroystr. 4 Aufgang I','80335','München','089 1252-0','089 1252-4820','80302','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m4-BS.bayern.de','www.finanzamt-muenchen-IV.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9185','München V Arbeitnehmerbereich','Deroystr. 4 Aufgang II','80335','München','089 1252-0','089 1252-5799','80303','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m5-BS.bayern.de','www.finanzamt-muenchen-V.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9187','München f. Körpersch. ','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9189','München-Zentral Kraftfahrzeugsteuer','Winzererstr. 47a','80797','München','089 3065-0','089 3065-1900','80784','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-zfa.bayern.de','www.finanzamt-muenchen-zentral.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9201','Amberg ','Kirchensteig 2','92224','Amberg','09621 36-0','09621 36-413','','92204','1452','75300000','75301503','BBK REGENSBURG EH WEIDEN','75250000','190011122','SPARKASSE AMBERG-SULZBACH','Servicezentrum: Mo, Die, Mi, Fr: 07:30 - 12:00 UhrDo: 07:30 - 17:30 Uhr','poststelle@fa-am.bayern.de','www.finanzamt-amberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9202','Obernburg a. Main mit Außenstelle Amorbach','Schneeberger Str. 1','63916','Amorbach','09373 202-0','09373 202-100','','63912','1160','79500000','79501502','BBK WUERZBURG EH ASCHAFFENB','79650000','620300111','SPK MILTENBERG-OBERNBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-amorb.bayern.de','www.finanzamt-amorbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9203','Ansbach mit Außenstellen','Mozartstr. 25','91522','Ansbach','0981 16-0','0981 16-333','','91511','608','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-an.bayern.de','www.finanzamt-ansbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9204','Aschaffenburg ','Auhofstr. 13','63741','Aschaffenburg','06021 492-0','06021 492-1000','63736','','','79500000','79501500','BBK WUERZBURG EH ASCHAFFENB','79550000','8375','SPK ASCHAFFENBURG ALZENAU','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 8:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-ab.bayern.de','www.finanzamt-aschaffenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9205','Bad Kissingen ','Bibrastr. 10','97688','Bad Kissingen','0971 8021-0','0971 8021-200','','97663','1360','79300000','79301501','BBK WUERZBURG EH SCHWEINFUR','79351010','10009','SPK BAD KISSINGEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kg.bayern.de','/www.finanzamt-bad-kissingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9206','Bad Neustadt a.d.S. ','Meininger Str. 39','97616','Bad Neustadt','09771 9104-0','09771 9104-444','97615','','','79300000','79301502','BBK WUERZBURG EH SCHWEINFUR','79353090','7005','SPK BAD NEUSTADT A D SAALE','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-nes.bayern.de','www.finanzamt-bad-neustadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9207','Bamberg ','Martin-Luther-Str. 1','96050','Bamberg','0951 84-0','0951 84-230','96045','','','77000000','77001500','BBK NUERNBERG EH BAMBERG','77050000','30700','SPK BAMBERG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-ba.bayern.de','www.finanzamt-bamberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9208','Bayreuth ','Maximilianstr. 12/14','95444','Bayreuth','0921 609-0','0921 609-254','','95422','110361','77300000','773 01500','BBK BAYREUTH','77350110','9033333','SPARKASSE BAYREUTH','Servicezentrum: Mo - Mi: 07:30 - 14:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-bt.bayern.de','www.finanzamt-bayreuth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9211','Cham mit Außenstellen ','Reberstr. 2','93413','Cham','09971 488-0','09971 488-199','','93402','1253','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 18:00 Uhr, Fr: 07:30','poststelle@fa-cha.bayern.de','www.finanzamt-cham.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9212','Coburg ','Rodacher Straße 4','96450','Coburg','09561 646-0','09561 646-130','','96406','1653','77000000','78301500','BBK NUERNBERG EH BAMBERG','78350000','7450','VER SPK COBURG','Servicezentrum: Mo - Fr: 08:00 - 13:00 Uhr, Do: 14:00 - 18:00 Uhr','poststelle@fa-co.bayern.de','www.finanzamt-coburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9213','Dinkelsbühl - Außenstelle des Finanzamts Ansbach -','Föhrenberggasse 30','91550','Dinkelsbühl','0981 16-0','09851 5737-607','','','','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00, Do: 08:00 - 18:00 Uhr, Fr: 08:00 -','poststelle@fa-dkb.bayern.de','www.finanzamt-dinkelsbuehl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9214','Ebern - Außenstelle des Finanzamts Zeil -','Rittergasse 1','96104','Ebern','09524 824-0','09524 824-225','','','','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ebn.bayern.de','www.finanzamt-ebern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9216','Erlangen ','Schubertstr 10','91052','Erlangen','09131 121-0','09131 121-369','91051','','','76000000','76001507','BBK NUERNBERG','76350000','2929','ST U KR SPK ERLANGEN','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-er.bayern.de','www.finanzamt-erlangen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9217','Forchheim ','Dechant-Reuder-Str. 6','91301','Forchheim','09191 626-0','09191 626-200','91299','','','76000000','76001508','BBK NUERNBERG','76351040','91','SPARKASSE FORCHHEIM','Servicezentrum: Mo - Mi: 08:00 - 13:00 Uhr, Do: 08:00 - 17:30, Fr: 08:00 -','poststelle@fa-fo.bayern.de','www.finanzamt-forchheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9218','Fürth ','Herrnstraße 69','90763','Fürth','0911 7435-0','0911 7435-350','90744','','','76000000','76201500','BBK NUERNBERG','76250000','18200','SPK FUERTH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-fue.bayern.de','www.finanzamt-fuerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9220','Gunzenhausen ','Hindenburgplatz 1','91710','Gunzenhausen','09831 8009-0','09831 8009-77','91709','','','76500000','76501502','BBK NUERNBERG EH ANSBACH','76551540','109785','VER SPK GUNZENHAUSEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-gun.bayern.de','www.finanzamt-gunzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9221','Hersbruck ','Amberger Str. 76 (Haus B)','91217','Hersbruck','09151 731-0','09151 731-200','','91211','273','76000000','76001505','BBK NUERNBERG','76050101','190016618','SPARKASSE NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 15:30 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-heb.bayern.de','www.finanzamt-hersbruck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9222','Hilpoltstein ','Spitalwinkel 3','91161','Hilpoltstein','09174 469-0','09174 469-100','','91155','1180','76000000','76401520','BBK NUERNBERG','76450000','240000026','SPK MITTELFRANKEN-SUED','Servicezentrum: Mo - Fr: 08:00 - 12:30 Uhr, Do: 14:00 - 18:00 Uhr','poststelle@fa-hip.bayern.de','www.finanzamt-hilpoltstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9223','Hof mit Außenstellen ','Ernst-Reuter-Str. 60','95030','Hof','09281 929-0','09281 929-1500','','95012','1368','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ho.bayern.de','www.finanzamt-hof.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9224','Hofheim - Außenstelle des Finanzamts Zeil -','Marktplatz 1','97457','Hofheim','09524 824-0','09524 824-250','','','','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-hoh.bayern.de','www.finanzamt-hofheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9225','Karlstadt - Außenstelle des Finanzamts Lohr -','Gemündener Str. 3','97753','Karlstadt','09353 949-0','09353 949-2250','','','','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kar.bayern.de','www.finanzamt-karlstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9227','Kitzingen ','Moltkestr. 24','97318','Kitzingen','09321 703-0','09321 703-444','','97308','660','79000000','79101500','BBK WUERZBURG','79050000','42070557','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kt.bayern.de','www.finanzamt-kitzingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9228','Kronach ','Amtsgerichtsstr. 13','96317','Kronach','09261 510-0','09261 510-199','','96302','1262','77300000','77101501','BBK BAYREUTH','77151640','240006007','SPK KRONACH-LUDWIGSSTADT','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08.00 - 17:30 Uhr, Fr: 08:00','poststelle@fa-kc.bayern.de','www.finanzamt-kronach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9229','Kulmbach ','Georg-Hagen-Str. 17','95326','Kulmbach','09221 650-0','09221 650-283','','95304','1420','77300000','77101500','BBK BAYREUTH','77150000','105445','SPARKASSE KULMBACH','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08.00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ku.bayern.de','www.finanzamt-kulmbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9230','Lichtenfels ','Kronacher Str. 39','96215','Lichtenfels','09571 764-0','09571 764-420','','96206','1680','77000000','77001502','BBK NUERNBERG EH BAMBERG','77051860','2345','KR SPK LICHTENFELS','Servicezentrum: Mo - Fr: 08:00 - 13:00 Uhr, Do: 14:00 - 17:00 Uhr','poststelle@fa-lif.bayern.de','www.finanzamt-lichtenfels.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9231','Lohr a. Main mit Außenstellen ','Rexrothstr. 14','97816','Lohr','09352 850-0','09352 850-1300','','97804','1465','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-loh.bayern.de','www.finanzamt-lohr.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9232','Marktheidenfeld - Außenstelle des Finanzamts Lohr -','Ringstr. 24/26','97828','Marktheidenfeld','09391 506-0','09391 506-3299','','','','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-mar.bayern.de','www.finanzamt-marktheidenfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9233','Münchberg - Außenstelle des Finanzamts Hof -','Hofer Str. 1','95213','Münchberg','09281 929-0','09281 929-3505','','','','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-mueb.bayern.de','www.finanzamt-muenchberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9234','Naila - Außenstelle des Finanzamts Hof -','Carl-Seyffert-Str. 3','95119','Naila','09281 929-0','09281 929-2506','','','','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-nai.bayern.de','www.finanzamt-naila.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9235','Neumarkt i.d.Opf. ','Ingolstädter Str. 3','92318','Neumarkt','09181 692-0','09181 692-1200','','','','76000000','76001506','BBK NUERNBERG','76052080','6296','SPK NEUMARKT I D OPF-PARSBG','Servicezentrum: Mo - Do: 07:30 - 15:00 Uhr, Fr: 07:30 - 12:00 Uhr','poststelle@fa-nm.bayern.de','/www.finanzamt-neumarkt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9236','Neunburg v. W. - Außenstelle des Finanzamts Schwandorf -','Krankenhausstr. 6','92431','Neunburg vorm Wald','09431 382-0','09431 382-539','','92428','1000','75300000','75301502','BBK REGENSBURG EH WEIDEN','75051040','380019000','SPK IM LANDKREIS SCHWANDORF','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:30,Do: 07:30-12:30 u. 13:30-17:00, Fr: 07:30-12:30 h ','poststelle@fa-nen.bayern.de','www.finanzamt-neunburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9238','Nürnberg-Nord ','Kirchenweg 10','90419','Nürnberg','0911 3998-0','0911 3998-296','90340','','','76000000','76001502','BBK NUERNBERG','76050000','20161','BAYERNLB NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-n-n.bayern.de','www.finanzamt-nuernberg-nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9240','Nürnberg-Süd ','Sandstr. 20','90443','Nürnberg','0911 248-0','0911 248-2299/2599','90339','','','76000000','76001503','BBK NUERNBERG','76050101','3648043','SPARKASSE NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-n-s.bayern.de','www.finanzamt-nuernberg-sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9241','Nürnberg-Zentral ','Voigtländerstr. 7/9','90489','Nürnberg','0911 5393-0','0911 5393-2000','','','','76000000','76001501','BBK NUERNBERG','76050101','1025008','SPARKASSE NUERNBERG','Servicezentrum: Mo - Do: 08:00 - 12:30 h, Di und Do: 13:30 - 15:00 h,','poststelle@fa-n-zfa.bayern.de','www.zentralfinanzamt-nuernberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9242','Ochsenfurt - Außenstelle des Finanzamts Würzburg -','Völkstr.1','97199','Ochsenfurt','09331 904-0','09331 904-200','','97196','1263','79000000','79001500','BBK WUERZBURG','79020076','801283','HYPOVEREINSBK WUERZBURG','Servicezentrum: Mo - Mi: 07:30 - 13:00 Uhr, Do: 07:30 - 17:00 uhr, Fr: 07:30','poststelle@fa-och.bayern.de','www.finanzamt-ochsenfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9244','Regensburg ','Landshuter Str. 4','93047','Regensburg','0941 5024-0','0941 5024-1199','93042','','','75000000','75001500','BBK REGENSBURG','75050000','111500','SPK REGENSBURG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-r.bayern.de','www.finanzamt-regensburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9246','Rothenburg - Außenstelle des Finanzamts Ansbach -','Ludwig-Siebert-Str. 31','91541','Rothenburg o.d.T.','0981 16-0','09861 706-511','','','','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-rot.bayern.de','www.finanzamt-rothenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9247','Schwabach ','Theodor-Heuss-Str. 63','91126','Schwabach','09122 928-0','09122 928-100','91124','','','76000000','76401500','BBK NUERNBERG','76450000','55533','SPK MITTELFRANKEN-SUED','Servicezentrum: Mo - Mi: 08:00 - 13:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-sc.bayern.de','www.finanzamt-schwabach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9248','Schwandorf mit Außenstelle Neunburg v. W.','Friedrich-Ebert-Str.59','92421','Schwandorf','09431 382-0','09431 382-111','92419','','','75300000','75301502','BBK REGENSBURG EH WEIDEN','75051040','380019000','SPK IM LANDKREIS SCHWANDORF','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:30,Do: 07:30-12:30 u. 13:30-17:00, Fr: 07:30-12:30 h ','poststelle@fa-sad.bayern.de','www.finanzamt-schwandorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9249','Schweinfurt ','Schrammstr. 3','97421','Schweinfurt','09721 2911-0','09721 2911-5070','97420','','','79300000','79301500','BBK WUERZBURG EH SCHWEINFUR','79350101','15800','KR SPK SCHWEINFURT','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-sw.bayern.de','www.finanzamt-schweinfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9250','Selb - Außenstelle des Finanzamts Wunsiedel -','Wittelsbacher Str. 8','95100','Selb','09232 607-0','09232 607-300','','','','78000000','78101512','BBK BAYREUTH EH HOF','78055050','620006254','SPK FICHTELGEBIRGE','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:00,Do: 07:30-12:30 und 13:30-17:00, Fr: 07:30-12:00 h','poststelle@fa-sel.bayern.de','www.finanzamt-selb.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9252','Uffenheim ','Schloßpl.','97215','Uffenheim','09842 200-0','09842 200-345','','97211','1240','76500000','76501504','BBK NUERNBERG EH ANSBACH','76251020','620002006','SPK I LANDKREIS NEUSTADT','Servicezentrum: Mo-Mi: 08:00-12:00 u. 13:00-15:00,Do: 08:00-12:00 u. 13:00-17:00, Fr: 08:00-12:00 h ','poststelle@fa-uff.bayern.de','www.finanzamt-uffenheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9253','Waldmünchen - Außenstelle des Finanzamts Cham -','Bahnhofstr. 10','93449','Waldmünchen','09971 488-0','09971 488-550','','','','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-wuem.bayern.de','www.finanzamt-waldmuenchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9254','Waldsassen ','Johannisplatz 13','95652','Waldsassen','09632 847-0','09632 847-199','','95646','1329','75300000','75301511','BBK REGENSBURG EH WEIDEN','78151080','32367','SPK TIRSCHENREUTH','Servicezentrum: Mo - Fr: 07:30 - 12:30 Uhr, Mo - Mi: 13:30 - 15:30 Uhr,','poststelle@fa-wasa.bayern.de','www.finanzamt-waldsassen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9255','Weiden i.d.Opf. ','Schlörpl. 2 u. 4','92637','Weiden','0961 301-0','0961 32600','','92604','1460','75300000','75301500','BBK REGENSBURG EH WEIDEN','75350000','172700','ST SPK WEIDEN','Servicezentrum: Mo - Fr: 07:30 - 12:30 Uhr, Mo - Mi: 13:30 - 15:30 Uhr,','poststelle@fa-wen.bayern.de','www.finanzamt-weiden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9257','Würzburg mit Außenstelle Ochsenfurt','Ludwigstr. 25','97070','Würzburg','0931 387-0','0931 387-4444','97064','','','79000000','79001500','BBK WUERZBURG','79020076','801283','HYPOVEREINSBK WUERZBURG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-wue.bayern.de','www.finanzamt-wuerzburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9258','Wunsiedel mit Außenstelle Selb','Sonnenstr. 11','95632','Wunsiedel','09232 607-0','09232 607-200','95631','','','78000000','78101512','BBK BAYREUTH EH HOF','78055050','620006254','SPK FICHTELGEBIRGE','Servicezentrum: Mo-Mi: 07:30-12:30 u 13:30-15:00, Do: 07:30-12:30 und 13:30-17:00, Fr: 07:30-12:00 h','poststelle@fa-wun.bayern.de','www.finanzamt-wunsiedel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9259','Zeil a. Main mit Außenstellen ','Obere Torstr. 9','97475','Zeil','09524 824-0','09524 824-100','','97470','1160','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-zei.bayern.de','www.finanzamt-zeil.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9260','Kötzting - Außenstelle des Finanzamts Cham -','Bahnhofstr. 3','93444','Kötzting','09971 488-0','09971 488-450','','','','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 18:00 Uhr, Fr: 07:30','poststelle@fa-koez.bayern.de','www.finanzamt-koetzting.de');
+
+--Update fuer Ersetung der float8 bzw. double precision Variablen auf Numeric mit 10 Vor und 3 Nachkommastellen
+--
+--TABLE ap
+alter table ap rename column paid to paidold;
+alter table ap add column paid numeric(10,5);
+update ap set paid=paidold;
+alter table ap drop column paidold;
+--
+alter table ap rename column netamount to netamountold;
+alter table ap add column netamount numeric(10,5);
+update ap set netamount=netamountold;
+alter table ap drop column netamountold;
+--
+alter table ap rename column amount to amountold;
+alter table ap add column amount numeric(10,5);
+update ap set amount=amountold;
+alter table ap drop column amountold;
+--
+--TABLE acc_trans
+alter table acc_trans rename column amount to amountold;
+alter table acc_trans add column amount numeric(10,5);
+update acc_trans set amount=amountold;
+alter table acc_trans drop column amountold;
+--
+--TABLE ar
+alter table ar rename column amount to amountold;
+alter table ar add column amount numeric(10,5);
+update ar set amount=amountold;
+alter table ar drop column amountold;
+--
+alter table ar rename column netamount to netamountold;
+alter table ar add column netamount numeric(10,5);
+update ar set netamount=netamountold;
+alter table ar drop column netamountold;
+--
+alter table ar rename column paid to paidold;
+alter table ar add column paid numeric(10,5);
+update ar set paid=paidold;
+alter table ar drop column paidold;
+--
+--TABLE customer
+alter table customer rename column creditlimit to creditlimitold;
+alter table customer add column creditlimit numeric(10,5);
+update customer set creditlimit=creditlimitold;
+alter table customer drop column creditlimitold;
+--
+--TABLE exchangerate
+alter table exchangerate rename column buy to buyold;
+alter table exchangerate add column buy numeric(10,5);
+update exchangerate set buy=buyold;
+alter table exchangerate drop column buyold;
+--
+alter table exchangerate rename column sell to sellold;
+alter table exchangerate add column sell numeric(10,5);
+update exchangerate set sell=sellold;
+alter table exchangerate drop column sellold;
+--
+--TABLE invoice
+alter table invoice rename column sellprice to sellpriceold;
+alter table invoice add column sellprice numeric(10,5);
+update invoice set sellprice=sellpriceold;
+alter table invoice drop column sellpriceold;
+--
+alter table invoice rename column fxsellprice to fxsellpriceold;
+alter table invoice add column fxsellprice numeric(10,5);
+update invoice set fxsellprice=fxsellpriceold;
+alter table invoice drop column fxsellpriceold;
+--
+--TABLE oe
+alter table oe rename column amount to amountold;
+alter table oe add column amount numeric(10,5);
+update oe set amount=amountold;
+alter table oe drop column amountold;
+--
+alter table oe rename column netamount to netamountold;
+alter table oe add column netamount numeric(10,5);
+update oe set netamount=netamountold;
+alter table oe drop column netamountold;
+--
+--TABLE orderitems
+alter table orderitems rename column sellprice to sellpriceold;
+alter table orderitems add column sellprice numeric(10,5);
+update orderitems set sellprice=sellpriceold;
+alter table orderitems drop column sellpriceold;
+--
+--TABLE parts
+alter table parts rename column listprice to listpriceold;
+alter table parts add column listprice numeric(10,5);
+update parts set listprice=listpriceold;
+alter table parts drop column listpriceold;
+--
+alter table parts rename column sellprice to sellpriceold;
+alter table parts add column sellprice numeric(10,5);
+update parts set sellprice=sellpriceold;
+alter table parts drop column sellpriceold;
+--
+alter table parts rename column lastcost to lastcostold;
+alter table parts add column lastcost numeric(10,5);
+update parts set lastcost=lastcostold;
+alter table parts drop column lastcostold;
+--
+--TABLE tax
+alter table tax rename column rate to rateold;
+alter table tax add column rate numeric(10,5);
+update tax set rate=rateold;
+alter table tax drop column rateold;
+--
+--TABLE vendor
+alter table vendor rename column creditlimit to creditlimitold;
+alter table vendor add column creditlimit numeric(10,5);
+update vendor set creditlimit=creditlimitold;
+alter table vendor drop column creditlimitold;
+--
+
+--
+update defaults set version = '2.1.1';
+--
--- /dev/null
+
+--Update der Numeric-Spalten von 5 auf 10 Vorkommastellen
+--
+--TABLE ap
+alter table ap rename column paid to paidold;
+alter table ap add column paid numeric(15,5);
+update ap set paid=paidold;
+alter table ap drop column paidold;
+--
+alter table ap rename column netamount to netamountold;
+alter table ap add column netamount numeric(15,5);
+update ap set netamount=netamountold;
+alter table ap drop column netamountold;
+--
+alter table ap rename column amount to amountold;
+alter table ap add column amount numeric(15,5);
+update ap set amount=amountold;
+alter table ap drop column amountold;
+--
+--TABLE acc_trans
+alter table acc_trans rename column amount to amountold;
+alter table acc_trans add column amount numeric(15,5);
+update acc_trans set amount=amountold;
+alter table acc_trans drop column amountold;
+--
+--TABLE ar
+alter table ar rename column amount to amountold;
+alter table ar add column amount numeric(15,5);
+update ar set amount=amountold;
+alter table ar drop column amountold;
+--
+alter table ar rename column netamount to netamountold;
+alter table ar add column netamount numeric(15,5);
+update ar set netamount=netamountold;
+alter table ar drop column netamountold;
+--
+alter table ar rename column paid to paidold;
+alter table ar add column paid numeric(15,5);
+update ar set paid=paidold;
+alter table ar drop column paidold;
+--
+--TABLE customer
+alter table customer rename column creditlimit to creditlimitold;
+alter table customer add column creditlimit numeric(15,5);
+update customer set creditlimit=creditlimitold;
+alter table customer drop column creditlimitold;
+--
+--TABLE exchangerate
+alter table exchangerate rename column buy to buyold;
+alter table exchangerate add column buy numeric(15,5);
+update exchangerate set buy=buyold;
+alter table exchangerate drop column buyold;
+--
+alter table exchangerate rename column sell to sellold;
+alter table exchangerate add column sell numeric(15,5);
+update exchangerate set sell=sellold;
+alter table exchangerate drop column sellold;
+--
+--TABLE invoice
+alter table invoice rename column sellprice to sellpriceold;
+alter table invoice add column sellprice numeric(15,5);
+update invoice set sellprice=sellpriceold;
+alter table invoice drop column sellpriceold;
+--
+alter table invoice rename column fxsellprice to fxsellpriceold;
+alter table invoice add column fxsellprice numeric(15,5);
+update invoice set fxsellprice=fxsellpriceold;
+alter table invoice drop column fxsellpriceold;
+--
+--TABLE oe
+alter table oe rename column amount to amountold;
+alter table oe add column amount numeric(15,5);
+update oe set amount=amountold;
+alter table oe drop column amountold;
+--
+alter table oe rename column netamount to netamountold;
+alter table oe add column netamount numeric(15,5);
+update oe set netamount=netamountold;
+alter table oe drop column netamountold;
+--
+--TABLE orderitems
+alter table orderitems rename column sellprice to sellpriceold;
+alter table orderitems add column sellprice numeric(15,5);
+update orderitems set sellprice=sellpriceold;
+alter table orderitems drop column sellpriceold;
+--
+--TABLE parts
+alter table parts rename column listprice to listpriceold;
+alter table parts add column listprice numeric(15,5);
+update parts set listprice=listpriceold;
+alter table parts drop column listpriceold;
+--
+alter table parts rename column sellprice to sellpriceold;
+alter table parts add column sellprice numeric(15,5);
+update parts set sellprice=sellpriceold;
+alter table parts drop column sellpriceold;
+--
+alter table parts rename column lastcost to lastcostold;
+alter table parts add column lastcost numeric(15,5);
+update parts set lastcost=lastcostold;
+alter table parts drop column lastcostold;
+--
+--TABLE tax
+alter table tax rename column rate to rateold;
+alter table tax add column rate numeric(15,5);
+update tax set rate=rateold;
+alter table tax drop column rateold;
+--
+--TABLE vendor
+alter table vendor rename column creditlimit to creditlimitold;
+alter table vendor add column creditlimit numeric(15,5);
+update vendor set creditlimit=creditlimitold;
+alter table vendor drop column creditlimitold;
+--
+
+--New Fields for customer and vendor
+alter table vendor add column obsolete boolean;
+alter table vendor alter column obsolete set default 'false';
+alter table customer add column obsolete boolean;
+alter table customer alter column obsolete set default 'false';
+alter table customer add column ustid varchar(12);
+alter table vendor add column ustid varchar(12);
+
+alter table customer add column username varchar(50);
+alter table vendor add column username varchar(50);
+alter table customer add column user_password varchar(12);
+alter table vendor add column user_password varchar(12);
+alter table customer add column salesman_id integer;
+alter table vendor add column salesman_id integer;
+
+-- Addon for business
+alter table business add column salesman boolean;
+alter table business alter column salesman set default 'false';
+alter table business add column customernumberinit text;
+
+alter table parts add column ve integer;
+alter table parts add column gv numeric(15,5);
+--
+
+-- Add table contrains
+alter table customer alter name SET NOT NULL;
+alter table vendor alter name set NOT NULL;
+alter table chart alter accno set NOT NULL;
+alter table parts alter partnumber set NOT NULL;
+alter table ar alter invnumber set NOT NULL;
+alter table ap alter invnumber set NOT NULL;
+alter table oe alter ordnumber set NOT NULL;
+
+alter table gl add primary key (id);
+alter table chart add primary key (id);
+alter table parts add primary key (id);
+alter table invoice add primary key (id);
+alter table vendor add primary key (id);
+alter table customer add primary key (id);
+alter table contacts add primary key (cp_id);
+alter table ar add primary key (id);
+alter table ap add primary key (id);
+alter table oe add primary key (id);
+alter table employee add primary key (id);
+alter table warehouse add primary key (id);
+alter table business add primary key (id);
+alter table license add primary key (id);
+alter table orderitems add primary key (id);
+
+alter table acc_trans add foreign key (chart_id) references chart (id);
+alter table invoice add foreign key (parts_id) references parts (id);
+alter table ar add foreign key (customer_id) references customer (id);
+alter table ap add foreign key (vendor_id) references vendor (id);
+alter table orderitems add foreign key (trans_id) references oe (id);
+alter table orderitems add foreign key (parts_id) references parts (id);
+
+--Modify the possible length of bank account numbers
+alter table customer add column temp_account_number character varying(15);
+update customer set temp_account_number=account_number;
+alter table customer drop column account_number;
+alter table customer rename temp_account_number to account_number;
+
+alter table vendor add column temp_account_number character varying(15);
+update vendor set temp_account_number=account_number;
+alter table vendor drop column account_number;
+alter table vendor rename temp_account_number to account_number;
+
+update defaults set version = '2.1.2';
+--
+
--- /dev/null
+-- Swiss chart of accounts
+-- adapted to numeric representation of chart no.
+--
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('10000','AKTIVEN','H','1','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11000','UMLAUFSVERMÖGEN','H','10000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11100','Flüssige Mittel','H','11000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11102','Bank CS Kt. 177929-11','A','11100','A','AR_paid:AP_paid');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11110','Forderungen','H','11000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11120','Vorräte und angefangene Arbeiten','H','11000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11128','Angefangene Arbeiten','A','11120','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11130','Aktive Rechnungsabgrenzung','A','11000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('14000','ANLAGEVERMÖGEN','H','10000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('18000','AKTIVIERTER AUFWAND UND AKTIVE BERICHTIGUNGSPOSTEN','H','10000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('18182','Entwicklungsaufwand','A','18000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('20000','PASSIVEN','H','2','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21000','FREMDKAPITAL KURZFRISTIG','H','20000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21200','Kurzfristige Verbindlichkeiten aus Lieferungen und Leistungen','H','21000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21201','Lieferanten','A','21200','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21202','Personalaufwand','A','21200','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21203','Sozialversicherungen','A','21200','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21205','Leasing','A','21200','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21210','Kurzfristige Finanzverbindlichkeiten','H','21000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21220','Andere kurzfristige Verbindlichkeiten','H','21000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21222','MWST (3,6)','A','21220','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21229','Gewinnausschüttung','A','21220','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21230','Passive Rechnungsabgrenzung, kurzfristige Rückstellungen','H','21000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21235','Rückstellungen','A','21230','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('24000','FREMDKAPITAL LANGFRISTIG','H','20000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('24256','Gesellschafter','A','24000','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28000','EIGENKAPITAL','H','20000','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28280','Stammkapital','A','28000','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28290','Reserven, Bilanzgewinn','H','28000','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28291','Reserven','A','28290','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28295','Gewinnvortrag','A','28290','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('28296','Jahresgewinn','A','28290','Q','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('30000','BETRIEBSERTRAG AUS LIEFERUNGEN UND LEISTUNGEN','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('31000','PRODUKTIONSERTRAG','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('31001','Computer','A','31000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('31005','Übrige Produkte','A','31000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('32000','HANDELSERTRAG','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('32001','Hardware','A','32000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('32002','Software OSS','A','32000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('32003','Software kommerz.','A','32000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('32005','Übrige','A','32000','I','AR_amount:IC_sale');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('34000','DIENSTLEISTUNGSERTRAG','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('34001','Beratung','A','34000','I','AR_amount:IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('34002','Installation','A','34000','I','AR_amount:IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36000','ÜBRIGER ERTRAG','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('37000','EIGENLEISTUNGEN UND EIGENVERBRAUCH','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('37001','Eigenleistungen','A','37000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('37002','Eigenverbrauch','A','37000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('38000','BESTANDESÄNDERUNGEN ANGEFANGENE UND FERTIGGESTELLTE ARBEITUNG AUS PRODUKTION UND DIENSTLEISTUNG','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('38001','Bestandesänderungen','A','38000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39000','ERTRAGSMINDERUNGEN AUS PRODUKTIONS-, HANDELS- UND DIENSTLEISTUNGSERTRÄGEN','H','30000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('40000','AUFWAND FÜR MATERIAL, WAREN UND DIENSTLEISTUNGEN','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('41000','MATERIALAUFWAND','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('41001','Computer','A','41000','E','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('41005','Übrige Produkte','A','41000','E','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('42000','HANDELSWARENAUFWAND','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('42001','Hardware','A','42000','E','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('42002','Software OSS','A','32000','I','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('42003','Software kommerz.','A','42000','I','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('42005','Übrige','A','42000','E','AP_amount:IC_cogs');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('44000','AUFWAND FÜR DRITTLEISTUNGEN','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('46000','ÜBRIGER AUFWAND','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('47000','DIREKTE EINKAUFSSPESEN','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('47001','Einkaufsspesen','A','47000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('48000','BESTANDESVERÄNDERUNGEN, MATERIAL- UND WARENVERLUSTE','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('48001','Bestandesänderungen','A','48000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('49000','AUFWANDMINDERUNGEN','H','40000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('49005','Aufwandminderungen','A','49000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('50000','PERSONALAUFWAND','H','50000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57000','SOZIALVERSICHERUNGSAUFWAND','H','50000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('58000','ÜBRIGER PERSONALAUFWAND','H','58000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('58005','Sonstiger Personalaufwand','A','58000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('59000','ARBEITSLEISTUNGEN DRITTER','H','50000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('60000','SONSTIGER BETRIEBSAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61000','RAUMAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61900','UNTERHALT, REPARATUREN, ERSATZ, LEASINGAUFWAND MOBILE SACHANLAGEN','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61901','Unterhalt','A','61900','E','AP_amount');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('62000','FAHRZEUG- UND TRANSPORTAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('62002','Transportaufwand','A','62000','E','AP_amount');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('63000','SACHVERSICHERUNGEN, ABGABEN, GEBÜHREN, BEWILLIGUNGEN','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65000','VERWALTUNGS- UND INFORMATIKAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('66000','WERBEAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('67000','ÜBRIGER BETRIEBSAUFWAND','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('67001','Übriger Betriebsaufwand','A','67000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('68000','FINANZERFOLG','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('68001','Finanzaufwand','A','68000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('68002','Bankspesen','A','68000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('68005','Finanzertrag','A','68000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('69000','ABSCHREIBUNGEN','H','60000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('69001','Abschreibungen','A','69000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('80000','AUSSERORDENTLICHER UND BETRIEBSFREMDER ERFOLG, STEUERN','H','80000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('80001','Ausserordentlicher Ertrag','A','80000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('80002','Ausserordentlicher Aufwand','A','80000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('89000','STEUERAUFWAND','H','80000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('89001','Steuern','A','80000','E','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('90000','ABSCHLUSS','H','90000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('91000','ERFOLGSRECHNUNG','H','91000','I','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('92000','BILANZ','H','92000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('93000','GEWINNVERWENDUNG','H','93000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('99000','SAMMEL- UND FEHLBUCHUNGEN','H','99000','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11121','Warenvorräte','A','11120','A','IC');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('44001','Aufwand für Drittleistungen','A','44000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('63001','Betriebsversicherungen','A','63000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57004','Unfallversicherung','A','57000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57005','Krankentaggeldversicherung','A','57000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57003','Berufliche Vorsorge','A','57000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57002','FAK','A','57000','E','AP_amount:IC_income:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65009','Übriger Verwaltungsaufwand','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65003','Porti','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65002','Telekomm','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65001','Büromaterial','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('18181','Gründungsaufwand','A','18000','A','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('50001','Löhne und Gehälter','A','50000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('50002','Erfolgsbeteiligungen','A','50000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21216','Gesellschafter','A','21210','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('62001','Fahrzeugaufwand','A','62000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('58003','Spesen','A','58000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65004','Fachliteratur','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39001','Skonti','A','39000','I','IC_sale:IC_cogs:IC_income:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39002','Rabatte, Preisnachlässe','A','39000','I','IC_sale:IC_cogs:IC_income:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36005','Kursgewinn','A','39000','I','IC_sale:IC_cogs:IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39006','Kursverlust','A','39000','E','IC_sale:IC_cogs:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39005','Verluste aus Forderungen','A','39000','E','IC_sale:IC_cogs:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('14151','Mobiliar und Einrichtungen','A','14150','A','IC');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('14152','Büromaschinen, EDV','A','14150','A','IC');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11119','Verrechnungssteuer','A','11110','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11118','MWST Vorsteuer auf Investitionen','A','11110','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36004','Versand','A','36000','I','IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36001','Reisezeit','A','36000','I','IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36002','Reise (Fahrt)','A','36000','I','IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11117','MWST Vorsteuer auf Aufwand','A','11110','A','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21228','Geschuldete Steuern','A','21220','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21223','MWST (7,6)','A','21220','L','AR_tax:AP_tax:IC_taxpart:IC_expense:IC_taxservice:CT_tax');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('57001','AHV, IV, EO, ALV','A','57000','E','AP_amount:IC_income:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21221','MWST (2,4)','A','21220','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice:CT_tax');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21224','MWST (7.6) 1/2','A','21220','L','AR_tax:AP_tax:IC_taxpart:IC_expense:IC_taxservice:CT_tax');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('66001','Werbeaufwand','A','66000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21217','Privat','A','21210','L','AP');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11101','Kasse','A','11100','A','AR_paid:AP_paid');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('50005','Leistungen von Sozialversicherung','A','50000','E','AP_amount:IC_income:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('65005','Informatikaufwand','A','65000','E','AP_amount:IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('39004','Rundungsdifferenzen','A','39000','I','AR_paid:AP_paid');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('11111','Debitoren','A','11110','A','AR');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61001','Miete','A','61000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61002','Reinigung','A','61000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('61005','Übriger Raumaufwand','A','61000','E','IC_expense');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('36003','Essen','A','36000','I','IC_income');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('21231','Passive Rechnungsabgrenzung','A','21230','L','');
+INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('67002','Produkteentwicklung','A','67000','E','');
+--
+insert into tax (chart_id,rate) values ((select id from chart where accno = '21222'),0.036);
+insert into tax (chart_id,rate) values ((select id from chart where accno = '21223'),0.076);
+insert into tax (chart_id,rate) values ((select id from chart where accno = '21221'),0.024);
+insert into tax (chart_id,rate) values ((select id from chart where accno = '21224'),0.076);
+--
+update defaults set inventory_accno_id = (select id from chart where accno = '11121'), income_accno_id = (select id from chart where accno = '34002'), expense_accno_id = (select id from chart where accno = '42005'), fxgain_accno_id = (select id from chart where accno = '36005'), fxloss_accno_id = (select id from chart where accno = '39006'), invnumber = '2002000', sonumber = '2002000', ponumber = '2002000', curr = 'EUR:USD', weightunit = 'kg';
+--
--- /dev/null
+--
+INSERT INTO gifi (accno,description) VALUES ('1','AKTIVEN');
+INSERT INTO gifi (accno,description) VALUES ('2','PASSIVEN');
+INSERT INTO gifi (accno,description) VALUES ('4','AUFWAND FÜR MATERIAL, WAREN UND DIENSTLEISTUNGEN');
+INSERT INTO gifi (accno,description) VALUES ('5','PERSONALAUFWAND');
+INSERT INTO gifi (accno,description) VALUES ('10000','ANLAGEVERMÖGEN');
+INSERT INTO gifi (accno,description) VALUES ('11000','Forderungen');
+INSERT INTO gifi (accno,description) VALUES ('11100','Bank');
+INSERT INTO gifi (accno,description) VALUES ('11110','MWST Vorsteuer auf Investitionen');
+INSERT INTO gifi (accno,description) VALUES ('11120','Angefangene Arbeiten');
+INSERT INTO gifi (accno,description) VALUES ('14150','Büromaschinen, EDV');
+INSERT INTO gifi (accno,description) VALUES ('18000','Gründungsaufwand');
+INSERT INTO gifi (accno,description) VALUES ('20000','FREMDKAPITAL LANGFRISTIG');
+INSERT INTO gifi (accno,description) VALUES ('21000','Kurzfristige Finanzverbindlichkeiten');
+INSERT INTO gifi (accno,description) VALUES ('21200','Sozialversicherungen');
+INSERT INTO gifi (accno,description) VALUES ('21210','Gesellschafter');
+INSERT INTO gifi (accno,description) VALUES ('21220','MWST (3,6)');
+INSERT INTO gifi (accno,description) VALUES ('21230','Passive Rechnungsabgrenzung');
+INSERT INTO gifi (accno,description) VALUES ('24000','Gesellschafter');
+INSERT INTO gifi (accno,description) VALUES ('28000','Stammkapital');
+INSERT INTO gifi (accno,description) VALUES ('28290','Gewinnvortrag');
+INSERT INTO gifi (accno,description) VALUES ('30000','ÜBRIGER ERTRAG');
+INSERT INTO gifi (accno,description) VALUES ('31000','Computer');
+INSERT INTO gifi (accno,description) VALUES ('32000','Software kommerz.');
+INSERT INTO gifi (accno,description) VALUES ('34000','Beratung');
+INSERT INTO gifi (accno,description) VALUES ('36000','Essen');
+INSERT INTO gifi (accno,description) VALUES ('37000','Eigenleistungen');
+INSERT INTO gifi (accno,description) VALUES ('38000','Bestandesänderungen');
+INSERT INTO gifi (accno,description) VALUES ('39000','Rabatte, Preisnachlässe');
+INSERT INTO gifi (accno,description) VALUES ('40000','AUFWANDMINDERUNGEN');
+INSERT INTO gifi (accno,description) VALUES ('41000','Übrige Produkte');
+INSERT INTO gifi (accno,description) VALUES ('42000','Software kommerz.');
+INSERT INTO gifi (accno,description) VALUES ('44000','Aufwand für Drittleistungen');
+INSERT INTO gifi (accno,description) VALUES ('47000','Einkaufsspesen');
+INSERT INTO gifi (accno,description) VALUES ('48000','Bestandesänderungen');
+INSERT INTO gifi (accno,description) VALUES ('49000','Aufwandminderungen');
+INSERT INTO gifi (accno,description) VALUES ('50000','Löhne und Gehälter');
+INSERT INTO gifi (accno,description) VALUES ('57000','FAK');
+INSERT INTO gifi (accno,description) VALUES ('58000','Spesen');
+INSERT INTO gifi (accno,description) VALUES ('60000','VERWALTUNGS- UND INFORMATIKAUFWAND');
+INSERT INTO gifi (accno,description) VALUES ('61000','Reinigung');
+INSERT INTO gifi (accno,description) VALUES ('61900','Unterhalt');
+INSERT INTO gifi (accno,description) VALUES ('62000','Fahrzeugaufwand');
+INSERT INTO gifi (accno,description) VALUES ('63000','Betriebsversicherungen');
+INSERT INTO gifi (accno,description) VALUES ('65000','Übriger Verwaltungsaufwand');
+INSERT INTO gifi (accno,description) VALUES ('66000','Werbeaufwand');
+INSERT INTO gifi (accno,description) VALUES ('67000','Produkteentwicklung');
+INSERT INTO gifi (accno,description) VALUES ('68000','Finanzaufwand');
+INSERT INTO gifi (accno,description) VALUES ('69000','Abschreibungen');
+INSERT INTO gifi (accno,description) VALUES ('80000','AUSSERORDENTLICHER UND BETRIEBSFREMDER ERFOLG, STEUERN');
+INSERT INTO gifi (accno,description) VALUES ('90000','ABSCHLUSS');
+INSERT INTO gifi (accno,description) VALUES ('91000','ERFOLGSRECHNUNG');
+INSERT INTO gifi (accno,description) VALUES ('92000','BILANZ');
+INSERT INTO gifi (accno,description) VALUES ('93000','GEWINNVERWENDUNG');
+INSERT INTO gifi (accno,description) VALUES ('99000','SAMMEL- UND FEHLBUCHUNGEN');
--- /dev/null
+update chart set datevautomatik=true where accno='3710';
+update chart set datevautomatik=true where accno='3720';
+update chart set datevautomatik=true where accno='3723';
+update chart set datevautomatik=true where accno='3724';
+update chart set datevautomatik=true where accno='3725';
+update chart set datevautomatik=true where accno='3727';
+update chart set datevautomatik=true where accno='3731';
+update chart set datevautomatik=true where accno='3735';
+update chart set datevautomatik=true where accno='3736';
+update chart set datevautomatik=true where accno='3750';
+update chart set datevautomatik=true where accno='3760';
+update chart set datevautomatik=true where accno='3764';
+update chart set datevautomatik=true where accno='3780';
+update chart set datevautomatik=true where accno='3790';
+update chart set datevautomatik=true where accno='3794';
+update chart set datevautomatik=true where accno='3110';
+update chart set datevautomatik=true where accno='3120';
+update chart set datevautomatik=true where accno='3130';
+update chart set datevautomatik=true where accno='3140';
+update chart set datevautomatik=true where accno='3300';
+update chart set datevautomatik=true where accno='3400';
+update chart set datevautomatik=true where accno='3420';
+update chart set datevautomatik=true where accno='3425';
+update chart set datevautomatik=true where accno='3430';
+update chart set datevautomatik=true where accno='3435';
+update chart set datevautomatik=true where accno='3440';
+update chart set datevautomatik=true where accno='3500';
+update chart set datevautomatik=true where accno='3530';
+update chart set datevautomatik=true where accno='3540';
+update chart set datevautomatik=true where accno='1511';
+update chart set datevautomatik=true where accno='1516';
+update chart set datevautomatik=true where accno='1517';
+update chart set datevautomatik=true where accno='8910';
+update chart set datevautomatik=true where accno='8915';
+update chart set datevautomatik=true where accno='8920';
+update chart set datevautomatik=true where accno='8921';
+update chart set datevautomatik=true where accno='8922';
+update chart set datevautomatik=true where accno='8925';
+update chart set datevautomatik=true where accno='8930';
+update chart set datevautomatik=true where accno='8932';
+update chart set datevautomatik=true where accno='8935';
+update chart set datevautomatik=true where accno='8940';
+update chart set datevautomatik=true where accno='8945';
+update chart set datevautomatik=true where accno='8591';
+update chart set datevautomatik=true where accno='8595';
+update chart set datevautomatik=true where accno='8609';
+update chart set datevautomatik=true where accno='8611';
+update chart set datevautomatik=true where accno='8625';
+update chart set datevautomatik=true where accno='8630';
+update chart set datevautomatik=true where accno='8640';
+update chart set datevautomatik=true where accno='8705';
+update chart set datevautomatik=true where accno='8710';
+update chart set datevautomatik=true where accno='8720';
+update chart set datevautomatik=true where accno='8723';
+update chart set datevautomatik=true where accno='8724';
+update chart set datevautomatik=true where accno='8725';
+update chart set datevautomatik=true where accno='8726';
+update chart set datevautomatik=true where accno='8729';
+update chart set datevautomatik=true where accno='8731';
+update chart set datevautomatik=true where accno='8750';
+update chart set datevautomatik=true where accno='8760';
+update chart set datevautomatik=true where accno='8764';
+update chart set datevautomatik=true where accno='8780';
+update chart set datevautomatik=true where accno='8790';
+update chart set datevautomatik=true where accno='8794';
+update chart set datevautomatik=true where accno='8801';
+update chart set datevautomatik=true where accno='8807';
+update chart set datevautomatik=true where accno='8808';
+update chart set datevautomatik=true where accno='8809';
+update chart set datevautomatik=true where accno='8820';
+update chart set datevautomatik=true where accno='8827';
+update chart set datevautomatik=true where accno='8828';
+update chart set datevautomatik=true where accno='8100';
+update chart set datevautomatik=true where accno='8110';
+update chart set datevautomatik=true where accno='8120';
+update chart set datevautomatik=true where accno='8125';
+update chart set datevautomatik=true where accno='8130';
+update chart set datevautomatik=true where accno='8135';
+update chart set datevautomatik=true where accno='8140';
+update chart set datevautomatik=true where accno='8150';
+update chart set datevautomatik=true where accno='8196';
+update chart set datevautomatik=true where accno='8300';
+update chart set datevautomatik=true where accno='8310';
+update chart set datevautomatik=true where accno='8315';
+update chart set datevautomatik=true where accno='8338';
+update chart set datevautomatik=true where accno='8339';
+update chart set datevautomatik=true where accno='8400';
+update chart set datevautomatik=true where accno='8504';
+update chart set datevautomatik=true where accno='8505';
+update chart set datevautomatik=true where accno='2401';
+update chart set datevautomatik=true where accno='2402';
+update chart set datevautomatik=true where accno='2403';
+update chart set datevautomatik=true where accno='2404';
+update chart set datevautomatik=true where accno='2405';
+update chart set datevautomatik=true where accno='2407';
+update chart set datevautomatik=true where accno='2409';
+update chart set datevautomatik=true where accno='1711';
+update chart set datevautomatik=true where accno='1716';
+update chart set datevautomatik=true where accno='1717';
--- /dev/null
+UPDATE chart set taxkey_id=9 WHERE accno='0027';
+UPDATE chart set taxkey_id=9 WHERE accno='0090';
+UPDATE chart set taxkey_id=9 WHERE accno='0200';
+UPDATE chart set taxkey_id=9 WHERE accno='0210';
+UPDATE chart set taxkey_id=9 WHERE accno='0380';
+UPDATE chart set taxkey_id=9 WHERE accno='0400';
+UPDATE chart set taxkey_id=9 WHERE accno='0410';
+UPDATE chart set taxkey_id=9 WHERE accno='0420';
+UPDATE chart set taxkey_id=9 WHERE accno='0430';
+UPDATE chart set taxkey_id=9 WHERE accno='0440';
+UPDATE chart set taxkey_id=9 WHERE accno='0480';
+UPDATE chart set taxkey_id=0 WHERE accno='1200';
+UPDATE chart set taxkey_id=0 WHERE accno='1360';
+UPDATE chart set taxkey_id=0 WHERE accno='1400';
+UPDATE chart set taxkey_id=0 WHERE accno='1590';
+UPDATE chart set taxkey_id=0 WHERE accno='1600';
+UPDATE chart set taxkey_id=0, pos_eur=28 WHERE accno='1780';
+UPDATE chart set taxkey_id=0, pos_eur=28 WHERE accno='1790';
+UPDATE chart set taxkey_id=0, pos_eur=28 WHERE accno='1791';
+UPDATE chart set taxkey_id=0 WHERE accno='1800';
+UPDATE chart set taxkey_id=0 WHERE accno='1810';
+UPDATE chart set taxkey_id=0 WHERE accno='1820';
+UPDATE chart set taxkey_id=0 WHERE accno='1830';
+UPDATE chart set taxkey_id=0 WHERE accno='1840';
+UPDATE chart set taxkey_id=0 WHERE accno='1890';
+UPDATE chart set taxkey_id=0, pos_bwa=30, pos_eur=29 WHERE accno='2110';
+UPDATE chart set taxkey_id=0, pos_bwa=30, pos_eur=29 WHERE accno='2120';
+UPDATE chart set taxkey_id=0, pos_bwa=30 WHERE accno='2130';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=2 WHERE accno='2310';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=2 WHERE accno='2315';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2320';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=4 WHERE accno='2650';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2720';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2742';
+UPDATE chart set taxkey_id=9, pos_bwa=4 WHERE accno='3000';
+UPDATE chart set taxkey_id=8, pos_bwa=4, pos_eur=8 WHERE accno='3300';
+UPDATE chart set taxkey_id=9, pos_bwa=4, pos_eur=8 WHERE accno='3400';
+UPDATE chart set taxkey_id=0, pos_ustva=93, pos_bwa=4, pos_eur=8 WHERE accno='3420';
+UPDATE chart set taxkey_id=0, pos_ustva=97, pos_bwa=4, pos_eur=8 WHERE accno='3425';
+UPDATE chart set taxkey_id=19, pos_ustva=94, pos_eur=8 WHERE accno='3440';
+UPDATE chart set taxkey_id=0, pos_ustva=91, pos_eur=8 WHERE accno='3550';
+UPDATE chart set taxkey_id=8, pos_bwa=4 WHERE accno='3731';
+UPDATE chart set taxkey_id=9, pos_bwa=4 WHERE accno='3735';
+UPDATE chart set taxkey_id=8, pos_bwa=4 WHERE accno='3750';
+UPDATE chart set taxkey_id=9, pos_bwa=4 WHERE accno='3760';
+UPDATE chart set taxkey_id=8, pos_bwa=4 WHERE accno='3780';
+UPDATE chart set taxkey_id=9, pos_bwa=4 WHERE accno='3790';
+UPDATE chart set taxkey_id=0, pos_bwa=4, pos_eur=8 WHERE accno='3800';
+UPDATE chart set taxkey_id=0, pos_bwa=4 WHERE accno='3830';
+UPDATE chart set taxkey_id=0, pos_bwa=4 WHERE accno='3850';
+UPDATE chart set taxkey_id=0, pos_bwa=2 WHERE accno='3960';
+UPDATE chart set taxkey_id=0 WHERE accno='3970';
+UPDATE chart set taxkey_id=0 WHERE accno='3980';
+UPDATE chart set taxkey_id=0, pos_bwa=20 WHERE accno='4000';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4110';
+UPDATE chart set taxkey_id=0, pos_bwa=4 WHERE accno='3990';
+UPDATE chart set taxkey_id=0, pos_bwa=10 WHERE accno='4120';
+UPDATE chart set taxkey_id=0, pos_bwa=10 WHERE accno='4125';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=10 WHERE accno='4138';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=10 WHERE accno='4139';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=10 WHERE accno='4140';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=10 WHERE accno='4145';
+UPDATE chart set taxkey_id=0 WHERE accno='4149';
+UPDATE chart set taxkey_id=0, pos_bwa=10 WHERE accno='4150';
+UPDATE chart set taxkey_id=0, pos_bwa=10 WHERE accno='4175';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4190';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=10 WHERE accno='4199';
+UPDATE chart set taxkey_id=9, pos_bwa=11 WHERE accno='4200';
+UPDATE chart set taxkey_id=9, pos_bwa=11, pos_eur=11 WHERE accno='4210';
+UPDATE chart set taxkey_id=0, pos_eur=11 WHERE accno='4220';
+UPDATE chart set taxkey_id=9, pos_bwa=11 WHERE accno='4230';
+UPDATE chart set taxkey_id=9, pos_bwa=11, pos_eur=12 WHERE accno='4240';
+UPDATE chart set taxkey_id=9, pos_bilanz=11, pos_eur=24 WHERE accno='4250';
+UPDATE chart set taxkey_id=9, pos_bwa=11, pos_eur=13 WHERE accno='4260';
+UPDATE chart set taxkey_id=9, pos_bwa=11, pos_eur=13 WHERE accno='4280';
+UPDATE chart set taxkey_id=0, pos_bwa=20 WHERE accno='4301';
+UPDATE chart set taxkey_id=0, pos_bwa=20 WHERE accno='4305';
+UPDATE chart set taxkey_id=0, pos_bwa=12, pos_eur=31 WHERE accno='4320';
+UPDATE chart set taxkey_id=0, pos_bwa=12, pos_eur=31 WHERE accno='4340';
+UPDATE chart set taxkey_id=0 WHERE accno='4350';
+UPDATE chart set taxkey_id=0, pos_bwa=12 WHERE accno='4355';
+UPDATE chart set taxkey_id=0, pos_eur=31 WHERE accno='4396';
+UPDATE chart set taxkey_id=0, pos_eur=31 WHERE accno='4397';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4500';
+UPDATE chart set taxkey_id=9, pos_bwa=14, pos_eur=17 WHERE accno='4530';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=1 WHERE accno='8100';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8110';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=1, pos_eur=1 WHERE accno='8300';
+UPDATE chart set taxkey_id=9, pos_bwa=14, pos_eur=17 WHERE accno='4540';
+UPDATE chart set taxkey_id=0, pos_bwa=14, pos_eur=17 WHERE accno='4550';
+UPDATE chart set taxkey_id=0, pos_bwa=14, pos_eur=17 WHERE accno='4570';
+UPDATE chart set taxkey_id=9, pos_bwa=14, pos_eur=17 WHERE accno='4580';
+UPDATE chart set taxkey_id=9, pos_bwa=15, pos_eur=18 WHERE accno='4600';
+UPDATE chart set taxkey_id=9, pos_bilanz=15, pos_eur=18 WHERE accno='4610';
+UPDATE chart set taxkey_id=9, pos_eur=18 WHERE accno='4638';
+UPDATE chart set taxkey_id=9, pos_bwa=15, pos_eur=18 WHERE accno='4640';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=18 WHERE accno='4650';
+UPDATE chart set taxkey_id=9, pos_eur=18 WHERE accno='4653';
+UPDATE chart set taxkey_id=9, pos_eur=18 WHERE accno='4654';
+UPDATE chart set taxkey_id=9, pos_bwa=15, pos_eur=18 WHERE accno='4660';
+UPDATE chart set taxkey_id=8, pos_bwa=15, pos_eur=18 WHERE accno='4663';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4664';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4666';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4668';
+UPDATE chart set taxkey_id=9, pos_bwa=15, pos_eur=18 WHERE accno='4670';
+UPDATE chart set taxkey_id=8, pos_bwa=15, pos_eur=18 WHERE accno='4673';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4674';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4676';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4700';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4710';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4730';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4750';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4760';
+UPDATE chart set taxkey_id=16, pos_eur=24 WHERE accno='4780';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4790';
+UPDATE chart set taxkey_id=9, pos_bwa=18, pos_eur=19 WHERE accno='4800';
+UPDATE chart set taxkey_id=9, pos_bwa=18, pos_eur=19 WHERE accno='4806';
+UPDATE chart set taxkey_id=9, pos_eur=19 WHERE accno='4809';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4810';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4815';
+UPDATE chart set taxkey_id=17, pos_eur=25 WHERE accno='4822';
+UPDATE chart set taxkey_id=17, pos_eur=25 WHERE accno='4824';
+UPDATE chart set taxkey_id=17, pos_eur=25 WHERE accno='4840';
+UPDATE chart set taxkey_id=17, pos_eur=26 WHERE accno='4855';
+UPDATE chart set taxkey_id=17, pos_eur=25 WHERE accno='4860';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=24 WHERE accno='4900';
+UPDATE chart set taxkey_id=9, pos_eur=24 WHERE accno='4905';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4909';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=23 WHERE accno='4910';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=23 WHERE accno='4920';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=23 WHERE accno='4925';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=23 WHERE accno='4930';
+UPDATE chart set taxkey_id=8, pos_bwa=20, pos_eur=20 WHERE accno='4940';
+UPDATE chart set taxkey_id=9, pos_eur=24 WHERE accno='4945';
+UPDATE chart set taxkey_id=0, pos_eur=9 WHERE accno='4946';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=22 WHERE accno='4950';
+UPDATE chart set taxkey_id=9, pos_eur=24 WHERE accno='4955';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=22 WHERE accno='4957';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=21 WHERE accno='4960';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=24 WHERE accno='4969';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4970';
+UPDATE chart set taxkey_id=9, pos_bwa=20, pos_eur=24 WHERE accno='4980';
+UPDATE chart set taxkey_id=9, pos_eur=19 WHERE accno='4985';
+UPDATE chart set taxkey_id=0, pos_ustva=48, pos_bwa=1, pos_eur=1 WHERE accno='8120';
+UPDATE chart set taxkey_id=0, pos_ustva=41, pos_bwa=1, pos_eur=1 WHERE accno='8125';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8130';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8135';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8150';
+UPDATE chart set taxkey_id=0, pos_bwa=1, pos_eur=1 WHERE accno='8200';
+UPDATE chart set taxkey_id=12, pos_ustva=86, pos_bwa=1, pos_eur=1 WHERE accno='8310';
+UPDATE chart set taxkey_id=13, pos_ustva=51, pos_bwa=1, pos_eur=1 WHERE accno='8315';
+UPDATE chart set taxkey_id=10, pos_bwa=1, pos_eur=1 WHERE accno='8320';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=2 WHERE accno='8500';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_eur=2 WHERE accno='8506';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_eur=2 WHERE accno='8508';
+UPDATE chart set taxkey_id=3, pos_eur=2 WHERE accno='8520';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=2 WHERE accno='8540';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=5, pos_eur=2 WHERE accno='8591';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=2 WHERE accno='8595';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=2 WHERE accno='8600';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=1, pos_eur=1 WHERE accno='8731';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=1, pos_eur=1 WHERE accno='8735';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=1, pos_eur=1 WHERE accno='8750';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=1, pos_eur=1 WHERE accno='8760';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=1, pos_eur=1 WHERE accno='8780';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=1, pos_eur=1 WHERE accno='8790';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=1 WHERE accno='8820';
+UPDATE chart set taxkey_id=3, pos_eur=1 WHERE accno='8829';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8900';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=2 WHERE accno='8905';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=3 WHERE accno='8910';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=5, pos_eur=3 WHERE accno='8915';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=3 WHERE accno='8919';
+UPDATE chart set taxkey_id=0, pos_eur=3 WHERE accno='8924';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_eur=3 WHERE accno='8925';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=5, pos_eur=3 WHERE accno='8930';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_eur=3 WHERE accno='8935';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=1 WHERE accno='8950';
+UPDATE chart set taxkey_id=0, pos_eur=7 WHERE accno='8955';
+UPDATE chart set taxkey_id=0 WHERE accno='9000';
+UPDATE chart set taxkey_id=0 WHERE accno='9008';
+UPDATE chart set taxkey_id=0 WHERE accno='9009';
+UPDATE chart set taxkey_id=0 WHERE accno='9090';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=1, pos_eur=1 WHERE accno='8400';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_eur=1 WHERE accno='8800';
+UPDATE chart set taxkey_id=0, pos_eur=14 WHERE accno='4380';
+UPDATE chart set taxkey_id=0, pos_bwa=13, pos_eur=14 WHERE accno='4360';
+UPDATE chart set taxkey_id=0, pos_eur=14 WHERE accno='4390';
+UPDATE chart set taxkey_id=0 WHERE accno='0631';
+UPDATE chart set taxkey_id=0 WHERE accno='0640';
+UPDATE chart set taxkey_id=0 WHERE accno='0650';
+UPDATE chart set taxkey_id=0, pos_bwa=19, pos_eur=15 WHERE accno='4510';
+UPDATE chart set taxkey_id=0, pos_bwa=14, pos_eur=16 WHERE accno='4520';
+UPDATE chart set taxkey_id=0, pos_eur=5 WHERE accno='1771';
+UPDATE chart set taxkey_id=0, pos_eur=6 WHERE accno='1775';
+UPDATE chart set taxkey_id=10, pos_bwa=0 WHERE accno='1767';
+UPDATE chart set taxkey_id=0 WHERE accno='0853';
+UPDATE chart set taxkey_id=0 WHERE accno='1607';
+UPDATE chart set taxkey_id=0 WHERE accno='1609';
+UPDATE chart set taxkey_id=0, pos_eur=29 WHERE accno='2125';
+UPDATE chart set taxkey_id=0 WHERE accno='1445';
+UPDATE chart set taxkey_id=0 WHERE accno='1446';
+UPDATE chart set taxkey_id=0 WHERE accno='1447';
+UPDATE chart set taxkey_id=0 WHERE accno='1448';
+UPDATE chart set taxkey_id=0 WHERE accno='1449';
+UPDATE chart set taxkey_id=0 WHERE accno='1605';
+UPDATE chart set taxkey_id=0 WHERE accno='1606';
+UPDATE chart set taxkey_id=0 WHERE accno='2212';
+UPDATE chart set taxkey_id=0 WHERE accno='2342';
+UPDATE chart set taxkey_id=0, pos_eur=24 WHERE accno='2351';
+UPDATE chart set taxkey_id=0 WHERE accno='2376';
+UPDATE chart set taxkey_id=0 WHERE accno='2733';
+UPDATE chart set taxkey_id=0, pos_eur=2 WHERE accno='2746';
+UPDATE chart set taxkey_id=0, pos_eur=2 WHERE accno='2747';
+UPDATE chart set taxkey_id=0 WHERE accno='2797';
+UPDATE chart set taxkey_id=0 WHERE accno='3559';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=4, pos_eur=8 WHERE accno='3580';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=4, pos_eur=8 WHERE accno='3581';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=4, pos_eur=8 WHERE accno='3582';
+UPDATE chart set taxkey_id=0 WHERE accno='3589';
+UPDATE chart set taxkey_id=0, pos_eur=11 WHERE accno='4261';
+UPDATE chart set taxkey_id=0, pos_eur=11 WHERE accno='4271';
+UPDATE chart set taxkey_id=0, pos_eur=24 WHERE accno='4288';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=11, pos_eur=24 WHERE accno='4289';
+UPDATE chart set taxkey_id=0, pos_eur=24 WHERE accno='4361';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4505';
+UPDATE chart set taxkey_id=0, pos_eur=15 WHERE accno='4515';
+UPDATE chart set taxkey_id=0, pos_eur=16 WHERE accno='4525';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4535';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4545';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4555';
+UPDATE chart set taxkey_id=0, pos_eur=17 WHERE accno='4565';
+UPDATE chart set taxkey_id=0, pos_bwa=20, pos_eur=24 WHERE accno='4651';
+UPDATE chart set taxkey_id=0, pos_eur=24 WHERE accno='4652';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4678';
+UPDATE chart set taxkey_id=0, pos_eur=18 WHERE accno='4679';
+UPDATE chart set taxkey_id=0, pos_eur=18 WHERE accno='4680';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4831';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4830';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4832';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4841';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4842';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4843';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4851';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4852';
+UPDATE chart set taxkey_id=9, pos_eur=24 WHERE accno='4965';
+UPDATE chart set taxkey_id=0, pos_eur=24 WHERE accno='4966';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=1, pos_eur=1 WHERE accno='8580';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=1, pos_eur=1 WHERE accno='8581';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=1, pos_eur=1 WHERE accno='8582';
+UPDATE chart set taxkey_id=0 WHERE accno='8589';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8827';
+UPDATE chart set taxkey_id=0, pos_eur=2 WHERE accno='8828';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=5, pos_eur=3 WHERE accno='8921';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=5, pos_eur=3 WHERE accno='8922';
+UPDATE chart set taxkey_id=0 WHERE accno='1000';
+UPDATE chart set taxkey_id=0, pos_ustva=61, pos_eur=27 WHERE accno='1572';
+UPDATE chart set taxkey_id=0, pos_ustva=66, pos_eur=27 WHERE accno='1571';
+UPDATE chart set taxkey_id=0, pos_ustva=61, pos_eur=27 WHERE accno='1573';
+UPDATE chart set taxkey_id=0, pos_ustva=66, pos_eur=27 WHERE accno='1575';
+UPDATE chart set taxkey_id=0, pos_eur=6 WHERE accno='1772';
+UPDATE chart set taxkey_id=0, pos_eur=28 WHERE accno='1773';
+UPDATE chart set taxkey_id=0, pos_eur=5 WHERE accno='2501';
+UPDATE chart set taxkey_id=0, pos_eur=5 WHERE accno='2505';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=10, pos_eur=10 WHERE accno='4130';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4630';
+UPDATE chart set taxkey_id=0, pos_bwa=15, pos_eur=18 WHERE accno='4635';
+UPDATE chart set taxkey_id=9, pos_bwa=15, pos_eur=24 WHERE accno='4655';
+UPDATE chart set taxkey_id=9, pos_bwa=18, pos_eur=19 WHERE accno='4805';
+UPDATE chart set pos_eur=1 WHERE accno='8190';
+UPDATE chart set pos_bwa=1, pos_eur=1 WHERE accno='8195';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8807';
+UPDATE chart set taxkey_id=0, pos_eur=1 WHERE accno='8808';
+UPDATE chart set taxkey_id=0, pos_eur=2 WHERE accno='8809';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=1 WHERE accno='8801';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=2 WHERE accno='8960';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=2 WHERE accno='8970';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=2 WHERE accno='8980';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=3 WHERE accno='8990';
+UPDATE chart set taxkey_id=9, pos_ustva=0, pos_bwa=4, pos_eur=8 WHERE accno='3090';
+UPDATE chart set taxkey_id=0, pos_bwa=14, pos_eur=17 WHERE accno='4595';
+UPDATE chart set taxkey_id=0 WHERE accno='1450';
+UPDATE chart set taxkey_id=0, pos_eur=27 WHERE accno='1577';
+UPDATE chart set taxkey_id=0, pos_eur=27 WHERE accno='1578';
+UPDATE chart set taxkey_id=0 WHERE accno='1580';
+UPDATE chart set taxkey_id=0 WHERE accno='1581';
+UPDATE chart set taxkey_id=0, pos_eur=27 WHERE accno='1582';
+UPDATE chart set taxkey_id=0, pos_eur=27 WHERE accno='1584';
+UPDATE chart set taxkey_id=0, pos_ustva=62 WHERE accno='1588';
+UPDATE chart set taxkey_id=0 WHERE accno='1592';
+UPDATE chart set taxkey_id=9, pos_bwa=5, pos_eur=8 WHERE accno='3100';
+UPDATE chart set taxkey_id=8, pos_bwa=5, pos_eur=8 WHERE accno='3110';
+UPDATE chart set taxkey_id=9, pos_bwa=5, pos_eur=8 WHERE accno='3120';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=8 WHERE accno='3600';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=8 WHERE accno='3610';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=8 WHERE accno='3650';
+UPDATE chart set taxkey_id=0, pos_bwa=5 WHERE accno='2739';
+UPDATE chart set taxkey_id=0, pos_ustva=0, pos_bwa=5, pos_eur=2 WHERE accno='8590';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=3 WHERE accno='8920';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=3 WHERE accno='8939';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=5, pos_eur=3 WHERE accno='8940';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=5, pos_eur=3 WHERE accno='8945';
+UPDATE chart set taxkey_id=0, pos_bwa=5, pos_eur=3 WHERE accno='8949';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4126';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4127';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4167';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4170';
+UPDATE chart set taxkey_id=0, pos_bwa=10, pos_eur=9 WHERE accno='4180';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4826';
+UPDATE chart set taxkey_id=0, pos_bwa=17, pos_eur=25 WHERE accno='4850';
+UPDATE chart set taxkey_id=0 WHERE accno='4870';
+UPDATE chart set taxkey_id=0, pos_bwa=17 WHERE accno='4875';
+UPDATE chart set taxkey_id=0, pos_bwa=17 WHERE accno='4880';
+UPDATE chart set taxkey_id=0, pos_bwa=35 WHERE accno='2208';
+UPDATE chart set taxkey_id=0, pos_bwa=19 WHERE accno='2209';
+UPDATE chart set taxkey_id=0, pos_bwa=19 WHERE accno='2375';
+UPDATE chart set taxkey_id=0, pos_bwa=20 WHERE accno='2400';
+UPDATE chart set taxkey_id=0, pos_ustva=86, pos_bwa=20 WHERE accno='2401';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=20 WHERE accno='2405';
+UPDATE chart set taxkey_id=0, pos_bwa=20 WHERE accno='2341';
+UPDATE chart set taxkey_id=0, pos_bwa=30, pos_eur=29 WHERE accno='2100';
+UPDATE chart set taxkey_id=0, pos_bwa=30, pos_eur=29 WHERE accno='2107';
+UPDATE chart set taxkey_id=0, pos_bwa=30, pos_eur=29 WHERE accno='2140';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=30 WHERE accno='2000';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=24 WHERE accno='2010';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2020';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=24 WHERE accno='2150';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=24 WHERE accno='2170';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=24 WHERE accno='2171';
+UPDATE chart set taxkey_id=0, pos_bwa=31, pos_eur=24 WHERE accno='2175';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2280';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2285';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2289';
+UPDATE chart set taxkey_id=9, pos_bwa=31 WHERE accno='2350';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2380';
+UPDATE chart set taxkey_id=0, pos_bwa=31 WHERE accno='2450';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=4 WHERE accno='2657';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=4 WHERE accno='2670';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=4 WHERE accno='2680';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=4 WHERE accno='8650';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=1 WHERE accno='8700';
+UPDATE chart set taxkey_id=2, pos_ustva=86, pos_bwa=32, pos_eur=1 WHERE accno='8710';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=32, pos_eur=1 WHERE accno='8720';
+UPDATE chart set taxkey_id=12, pos_ustva=86, pos_bwa=32, pos_eur=1 WHERE accno='8725';
+UPDATE chart set taxkey_id=13, pos_ustva=51, pos_bwa=32, pos_eur=1 WHERE accno='8726';
+UPDATE chart set taxkey_id=0, pos_bwa=32, pos_eur=1 WHERE accno='8727';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=5 WHERE accno='2500';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2510';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2520';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2600';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2660';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=33, pos_eur=2 WHERE accno='2700';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2710';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2715';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2725';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=2 WHERE accno='2730';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2732';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2735';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2743';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2744';
+UPDATE chart set taxkey_id=3, pos_ustva=51, pos_bwa=33 WHERE accno='2750';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2284';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2287';
+UPDATE chart set taxkey_id=0, pos_bwa=33 WHERE accno='2282';
+UPDATE chart set taxkey_id=0, pos_bwa=33, pos_eur=7 WHERE accno='1785';
+UPDATE chart set taxkey_id=0, pos_bwa=34 WHERE accno='4990';
+UPDATE chart set taxkey_id=0, pos_bwa=34 WHERE accno='4992';
+UPDATE chart set taxkey_id=0, pos_bwa=34 WHERE accno='4993';
+UPDATE chart set taxkey_id=0, pos_bwa=34 WHERE accno='4994';
+UPDATE chart set taxkey_id=0, pos_bwa=34 WHERE accno='4995';
+UPDATE chart set taxkey_id=0, pos_bwa=35 WHERE accno='2200';
+UPDATE chart set taxkey_id=0, pos_bwa=35 WHERE accno='2214';
+UPDATE chart set taxkey_id=0, pos_bwa=35 WHERE accno='2215';
+UPDATE chart set taxkey_id=0, pos_bwa=35 WHERE accno='2218';
+
+
+
+
--- /dev/null
+--Lx-Office ERP Datenbankschema
+
+--Eindeutige ID
+CREATE SEQUENCE "id" start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+CREATE SEQUENCE "glid" start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+
+--Lx-Office ERP Basistabellen
+CREATE TABLE "gl" (
+ "id" integer DEFAULT nextval('glid'::text) PRIMARY KEY,
+ "reference" text,
+ "description" text,
+ "transdate" date DEFAULT date('now'::text),
+ "gldate" date DEFAULT date ('now'::text),
+ "employee_id" integer,
+ "notes" text,
+ "department_id" integer DEFAULT 0,
+ "taxincluded" boolean,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+
+CREATE TABLE "chart" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "accno" text NOT NULL,
+ "description" text,
+ "charttype" character(1) DEFAULT 'A',
+ "category" character(1),
+ "link" text,
+ "gifi_accno" text,
+ "taxkey_id" integer,
+ "pos_ustva" integer,
+ "pos_bwa" integer,
+ "pos_bilanz" integer,
+ "pos_eur" integer,
+ "datevautomatik" boolean DEFAULT 'FALSE',
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+create table datev (
+ "beraternr" character varying(7),
+ "beratername" character varying(9),
+ "mandantennr" character varying(5),
+ "dfvkz" character varying(2),
+ "datentraegernr" character varying(3),
+ "abrechnungsnr" character varying(6),
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+
+
+CREATE TABLE "gifi" (
+ "accno" text,
+ "description" text
+);
+
+CREATE TABLE "parts" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "partnumber" text NOT NULL,
+ "description" text,
+ "unit" character varying(10),
+ "listprice" numeric (15,5),
+ "sellprice" numeric (15,5),
+ "lastcost" numeric (15,5),
+ "priceupdate" date DEFAULT date('now'::text),
+ "weight" real,
+ "onhand" real DEFAULT 0,
+ "notes" text,
+ "makemodel" boolean DEFAULT 'f',
+ "assembly" boolean DEFAULT 'f',
+ "alternate" boolean DEFAULT 'f',
+ "rop" real,
+ "inventory_accno_id" integer,
+ "income_accno_id" integer,
+ "expense_accno_id" integer,
+ "bin" text,
+ "shop" boolean DEFAULT 'f',
+ "obsolete" boolean DEFAULT 'f',
+ "bom" boolean DEFAULT 'f',
+ "image" text,
+ "drawing" text,
+ "microfiche" text,
+ "partsgroup_id" integer,
+ "ve" integer,
+ "gv" numeric(15,5),
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "defaults" (
+ "inventory_accno_id" integer,
+ "income_accno_id" integer,
+ "expense_accno_id" integer,
+ "fxgain_accno_id" integer,
+ "fxloss_accno_id" integer,
+ "invnumber" text,
+ "sonumber" text,
+ "yearend" character varying(5),
+ "weightunit" character varying(5),
+ "businessnumber" text,
+ "version" character varying(8),
+ "curr" text,
+ "closedto" date,
+ "revtrans" boolean DEFAULT 'f',
+ "ponumber" text,
+ "sqnumber" text,
+ "rfqnumber" text,
+ "customernumber" text,
+ "vendornumber" text,
+ "articlenumber" text,
+ "servicenumber" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+INSERT INTO defaults (version) VALUES ('2.1.2');
+
+CREATE TABLE "acc_trans" (
+ "trans_id" integer,
+ "chart_id" integer REFERENCES chart (id),
+ "amount" numeric (15,5),
+ "transdate" date DEFAULT date('now'::text),
+ "gldate" date DEFAULT date ('now'::text),
+ "source" text,
+ "cleared" boolean DEFAULT 'f',
+ "fx_transaction" boolean DEFAULT 'f',
+ "project_id" integer,
+ "memo" text,
+ "taxkey" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+
+CREATE TABLE "invoice" (
+ "id" integer DEFAULT nextval('invoiceid'::text) PRIMARY KEY,
+ "trans_id" integer,
+ "parts_id" integer REFERENCES parts (id),
+ "description" text,
+ "qty" real,
+ "allocated" real,
+ "sellprice" numeric (15,5),
+ "fxsellprice" numeric (15,5),
+ "discount" real,
+ "assemblyitem" boolean DEFAULT 'f',
+ "unit" character varying(10),
+ "project_id" integer,
+ "deliverydate" date,
+ "serialnumber" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "vendor" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "name" character varying(75) NOT NULL,
+ "department_1" character varying(75),
+ "department_2" character varying(75),
+ "street" character varying(75),
+ "zipcode" character varying(10),
+ "city" character varying(75),
+ "country" character varying(75),
+ "contact" character varying(75),
+ "phone" character varying(30),
+ "fax" character varying(30),
+ "homepage" text,
+ "email" text,
+ "notes" text,
+ "terms" smallint DEFAULT 0,
+ "taxincluded" boolean,
+ "vendornumber" text,
+ "cc" text,
+ "bcc" text,
+ "gifi_accno" text,
+ "business_id" integer,
+ "taxnumber" text,
+ "sic_code" text,
+ "discount" real,
+ "creditlimit" numeric (15,5),
+ "account_number" varchar(15),
+ "bank_code" varchar(10),
+ "bank" text,
+ "language" varchar(5),
+ "datevexport" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "obsolete" boolean DEFAULT 'f',
+ "ustid" varchar(12),
+ "username" varchar(50),
+ "user_password" varchar(12),
+ "salesman_id" integer,
+ "v_customer_id" text
+);
+
+CREATE TABLE "customer" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "name" character varying(75) NOT NULL,
+ "department_1" character varying(75),
+ "department_2" character varying(75),
+ "street" character varying(75),
+ "zipcode" character varying(10),
+ "city" character varying(75),
+ "country" character varying(75),
+ "contact" character varying(75),
+ "phone" character varying(30),
+ "fax" character varying(30),
+ "homepage" text,
+ "email" text,
+ "notes" text,
+ "discount" real,
+ "taxincluded" boolean,
+ "creditlimit" numeric (15,5) DEFAULT 0,
+ "terms" smallint DEFAULT 0,
+ "customernumber" text,
+ "cc" text,
+ "bcc" text,
+ "business_id" integer,
+ "taxnumber" text,
+ "sic_code" text,
+ "account_number" varchar(15),
+ "bank_code" varchar(10),
+ "bank" text,
+ "language" varchar(5),
+ "datevexport" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "obsolete" boolean DEFAULT 'f',
+ "ustid" varchar(12),
+ "username" varchar(50),
+ "user_password" varchar(12),
+ "salesman_id" integer,
+ "c_vendor_id" text
+
+);
+
+CREATE TABLE "contacts" (
+ "cp_id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "cp_cv_id" integer,
+ "cp_greeting" character varying(75),
+ "cp_title" character varying(75),
+ "cp_givenname" character varying(75),
+ "cp_name" character varying(75),
+ "cp_email" text,
+ "cp_phone1" character varying(75),
+ "cp_phone2" character varying(75),
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "assembly" (
+ "id" integer,
+ "parts_id" integer,
+ "qty" real,
+ "bom" boolean,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "ar" (
+ "id" integer DEFAULT nextval('glid'::text) PRIMARY KEY,
+ "invnumber" text NOT NULL,
+ "transdate" date DEFAULT date('now'::text),
+ "gldate" date DEFAULT date ('now'::text),
+ "customer_id" integer REFERENCES customer (id),
+ "taxincluded" boolean,
+ "amount" numeric (15,5),
+ "netamount" numeric (15,5),
+ "paid" numeric (15,5),
+ "datepaid" date,
+ "duedate" date,
+ "invoice" boolean DEFAULT 'f',
+ "shippingpoint" text,
+ "terms" smallint DEFAULT 0,
+ "notes" text,
+ "curr" character(3),
+ "ordnumber" text,
+ "employee_id" integer,
+ "quonumber" text,
+ "cusordnumber" text,
+ "intnotes" text,
+ "department_id" integer DEFAULT 0,
+ "shipvia" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "cp_id" integer
+);
+
+CREATE TABLE "ap" (
+ "id" integer DEFAULT nextval('glid'::text) PRIMARY KEY,
+ "invnumber" text NOT NULL,
+ "transdate" date DEFAULT date('now'::text),
+ "gldate" date DEFAULT date ('now'::text),
+ "vendor_id" integer REFERENCES vendor (id),
+ "taxincluded" boolean DEFAULT 'f',
+ "amount" numeric (15,5),
+ "netamount" numeric (15,5),
+ "paid" numeric (15,5),
+ "datepaid" date,
+ "duedate" date,
+ "invoice" boolean DEFAULT 'f',
+ "ordnumber" text,
+ "curr" character(3),
+ "notes" text,
+ "employee_id" integer,
+ "quonumber" text,
+ "intnotes" text,
+ "department_id" integer DEFAULT 0,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "shipvia" text,
+ "cp_id" integer
+);
+
+CREATE TABLE "partstax" (
+ "parts_id" integer,
+ "chart_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "tax" (
+ "chart_id" integer,
+ "rate" numeric (15,5),
+ "taxnumber" text,
+ "taxkey" integer,
+ "taxdescription" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "customertax" (
+ "customer_id" integer,
+ "chart_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "vendortax" (
+ "vendor_id" integer,
+ "chart_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "oe" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "ordnumber" text NOT NULL,
+ "transdate" date DEFAULT date('now'::text),
+ "vendor_id" integer,
+ "customer_id" integer,
+ "amount" numeric (15,5),
+ "netamount" numeric (15,5),
+ "reqdate" date,
+ "taxincluded" boolean,
+ "shippingpoint" text,
+ "notes" text,
+ "curr" character(3),
+ "employee_id" integer,
+ "closed" boolean DEFAULT 'f',
+ "quotation" boolean DEFAULT 'f',
+ "quonumber" text,
+ "cusordnumber" text,
+ "intnotes" text,
+ "department_id" integer DEFAULT 0,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "shipvia" text,
+ "cp_id" integer
+);
+
+CREATE TABLE "orderitems" (
+ "trans_id" integer REFERENCES oe (id),
+ "parts_id" integer REFERENCES parts (id),
+ "description" text,
+ "qty" real,
+ "sellprice" numeric (15,5),
+ "discount" real,
+ "unit" character varying(10),
+ "project_id" integer,
+ "reqdate" date,
+ "ship" real,
+ "serialnumber" text,
+ "id" integer DEFAULT nextval('orderitemsid'::text) PRIMARY KEY,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "exchangerate" (
+ "curr" character(3),
+ "transdate" date,
+ "buy" numeric (15,5),
+ "sell" numeric (15,5),
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "employee" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "login" text,
+ "name" character varying(35),
+ "addr1" character varying(35),
+ "addr2" character varying(35),
+ "addr3" character varying(35),
+ "addr4" character varying(35),
+ "workphone" character varying(20),
+ "homephone" character varying(20),
+ "startdate" date DEFAULT date('now'::text),
+ "enddate" date,
+ "notes" text,
+ "role" text,
+ "sales" boolean DEFAULT 't',
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "shipto" (
+ "trans_id" integer,
+ "shiptoname" character varying(75),
+ "shiptostreet" character varying(75),
+ "shiptozipcode" character varying(75),
+ "shiptocity" character varying(75),
+ "shiptocountry" character varying(75),
+ "shiptocontact" character varying(75),
+ "shiptophone" character varying(30),
+ "shiptofax" character varying(30),
+ "shiptoemail" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "project" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "projectnumber" text,
+ "description" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "partsgroup" (
+ "id" integer DEFAULT nextval('id'::text),
+ "partsgroup" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "makemodel" (
+ "parts_id" integer,
+ "make" text,
+ "model" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "status" (
+ "trans_id" integer,
+ "formname" text,
+ "printed" boolean DEFAULT 'f',
+ "emailed" boolean DEFAULT 'f',
+ "spoolfile" text,
+ "chart_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE SEQUENCE "invoiceid" start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+
+CREATE SEQUENCE "orderitemsid" start 1 increment 1 maxvalue 100000 minvalue 1 cache 1 cycle;
+
+CREATE TABLE "warehouse" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "inventory" (
+ "warehouse_id" integer,
+ "parts_id" integer,
+ "oe_id" integer,
+ "orderitems_id" integer,
+ "qty" real,
+ "shippingdate" date,
+ "employee_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "department" (
+ "id" integer DEFAULT nextval('id'::text),
+ "description" text,
+ "role" character(1) DEFAULT 'P',
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "dpt_trans" (
+ "trans_id" integer,
+ "department_id" integer,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "business" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "discount" real,
+ "customernumberinit" text,
+ "salesman" boolean DEFAULT 'f',
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "sic" (
+ "code" text,
+ "sictype" character(1),
+ "description" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+-- Lizenzverwaltung
+CREATE TABLE "license" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "parts_id" integer,
+ "customer_id" integer,
+ "comment" text,
+ "validuntil" date,
+ "issuedate" date DEFAULT date ('now'::text),
+ "quantity" integer,
+ "licensenumber" text
+);
+
+CREATE INDEX "license_id_key" ON "license" (id);
+
+CREATE TABLE "licenseinvoice" (
+ trans_id integer,
+ license_id integer
+);
+
+-- Table of tax authoritys
+-- for module ustva
+-- Lx office
+CREATE TABLE finanzamt (
+ FA_Land_Nr text,
+ FA_BUFA_Nr text,
+ FA_Name text,
+ FA_Strasse text,
+ FA_PLZ text,
+ FA_Ort text,
+ FA_Telefon text,
+ FA_Fax text,
+ FA_PLZ_Grosskunden text,
+ FA_PLZ_Postfach text,
+ FA_Postfach text,
+ FA_BLZ_1 text,
+ FA_Kontonummer_1 text,
+ FA_Bankbezeichnung_1 text,
+ FA_BLZ_2 text,
+ FA_Kontonummer_2 text,
+ FA_Bankbezeichnung_2 text,
+ FA_Oeffnungszeiten text,
+ FA_Email text,
+ FA_Internet text);
+
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1010','Saarlouis ','Gaswerkweg 25','66740','Saarlouis','06831/4490','06831/449397','','66714','1440','59000000','59301502','BBK SAARBRUECKEN','59010066','7761668','POSTBANK SAARBRUECKEN','Mo,Di,Do 7.30-15.30, Mi 7.30-18,Fr 7.30-12','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1020','Merzig ','Am Gaswerk','66663','Merzig','06861/7030','06861/703133','','66653','100232','59000000','59301502','BBK SAARBRUECKEN','59010066','7761668','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 7.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1030','Neunkirchen ','Uhlandstr.','66538','Neunkirchen','06821/1090','06821/109275','','66512','1234','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1040','Saarbrücken Am Stadtgr ','Am Stadtgraben 2-4','66111','Saarbrücken','0681/30000','0681/3000329','','66009','100952','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Di,Do 7.30-15.30, Mi 7.30-18,Fr 7.30-12','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1055','Saarbrücken MainzerStr ','Mainzer Str.109-111','66121','Saarbrücken','0681/30000','0681/3000762','','66009','100944','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Mi,Fr 8.30-12.00, zus. Mi 13.30 - 15.30','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1060','St. Wendel ','Marienstr. 27','66606','St. Wendel','06851/8040','06851/804189','','66592','1240','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1070','Sulzbach ','Vopeliusstr. 8','66280','Sulzbach','06897/9082-0','06897/9082110','','66272','1164','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo,Mi,Fr 08.30-12.00, zus. Mi 13.30-18.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1075','Homburg ','Schillerstr. 15','66424','Homburg','06841/6970','06841/697199','','66406','1551','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1085','St. Ingbert ','Rentamtstr. 39','66386','St. Ingbert','06894/984-01','06894/984159','','66364','1420','59000000','59001508','BBK SAARBRUECKEN','59010066','2988669','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 7.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('10','1090','Völklingen ','Marktstr.','66333','Völklingen','06898/20301','06898/203133','','66304','101440','59000000','59001502','BBK SAARBRUECKEN','59010066','7766663','POSTBANK SAARBRUECKEN','Mo-Do 7.30-15.30,Mi bis 18.00,Fr 07.30-12.00','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1113','Berlin Charlottenburg','Bismarckstraße 48','10627','Berlin','030 9024-13-0','030 9024-13-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','facharlottenburg@berlin.de','http://www.berlin.de/ofd');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1114','Berlin Kreuzberg','Mehringdamm 22','10961','Berlin','030 9024-14-0','030 9024-14-900','10958','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakreuzberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1115','Berlin Neukölln','','','','','','','','','','','','','','','','faneukoelln@berlin.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1116','Berlin Neukölln','Thiemannstr. 1','12059','Berlin','030 9024-16-0','030 9024-16-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','faneukoelln@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1117','Berlin Reinickendorf','Eichborndamm 208','13403','Berlin','030 9024-17-0','030 9024-17-900','13400','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fareinickendorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1118','Berlin Schöneberg','Bülowstraße 85/88','10783','Berlin','030/9024-18-0','030/9024-18-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Montag und Freitag: 8:00 - 13:00 Uhr Donnerstag: 11:00 - 18:00 Uhr','faschoeneberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1119','Berlin Spandau','Nonnendammallee 15-21','13599','Berlin','030/9024-19-0','030/9024-19-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','faspandau@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1120','Berlin Steglitz','Schloßstr. 58/59','12165','Berlin','030/9024-20-0','030/9024-20-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fasteglitz@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1121','Berlin Tempelhof','Tempelhofer Damm 234/236','12099','Berlin','030 9024-21-0','030 9024-21-900','12096','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fatempelhof@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1123','Berlin Wedding','Osloer Straße 37','13359','Berlin','030 9024-23-0','030 9024-23-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fawedding@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1124','Berlin Wilmersdorf','Blissestr. 5','10713','Berlin','030/9024-24-0','030/9024-24-900','10702','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fawilmersdorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1125','Berlin Zehlendorf','Martin-Buber-Str. 20/21','14163','Berlin','030 9024-25-0','030 9024-25-900','14160','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fazehlendorf@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1127','Berlin für Körperschaften I','Gerichtstr. 27','13347','Berlin','030 9024-27-0','030 9024-27-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoerperschaften1@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1128','Berlin Pankow/Weißennsee - nur KFZ-Steuer -','Berliner Straße 32','13089','Berlin','030/4704-0','030/94704-1777','13083','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','pankow.weissensee@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1129','Berlin für Körperschaften III','Volkmarstr. 13','12099','Berlin','030/70102-0','030/70102-100','','12068','420844','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften3@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1130','Berlin für Körperschaften IV','Magdalenenstr. 25','10365','Berlin','030 9024-30-0','030 9024-30-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften4@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1131','Berlin Friedrichsh./Prenzb.','Pappelallee 78/79','10437','Berlin','030 9024-28-0','030 9024-28-900','10431','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fafriedrichshain.prenzlauerberg@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1132','Berlin Lichtenb./Hohenschh.','Josef-Orlopp-Str. 62','10365','Berlin','030/5501-0','030/55012222','10358','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','falichtenberg.hohenschoenhausen@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1133','Berlin Hellersdorf/Marzahn','Allee der Kosmonauten 29','12681','Berlin','030 9024-26-0','030 9024-26-900','12677','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fahellersdorf.marzahn@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1134','Berlin Mitte/Tiergarten','Neue Jakobstr. 6-7','10179','Berlin','030 9024-22-0','030 9024-22-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','famitte.tiergarten@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1135','Berlin Pankow/Weißensee','Berliner Straße 32','13089','Berlin','030/4704-0','030/47041777','13083','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','pankow.weissensee@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1136','Berlin Treptow/Köpenick','Seelenbinderstr. 99','12555','Berlin','030 9024-12-0','030 9024-12-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fatreptow.koepenick@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1137','Berlin für Körperschaften II','Magdalenenstr. 25','10365','Berlin','030 9024-29-0','030 9024-29-900','','','','10010010','691555100','POSTBANK BERLIN','10050000','6600046463','LBB GZ - BERLINER SPARKASSE','Mo und Fr 8:00 - 13:00, Do 11:00 - 18:00 Uhr und nach Vereinbarung','fakoeperschaften2@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('11','1138','Berlin für Fahndung und Strafsachen','Colditzstr. 41','12099','Berlin','030/70102-777','030/70102-700','','','','','','','','','','Mo - Mi 10:00 - 14:00, Do 10:00 - 18:00, Fr 10:00 - 14:00 Uhr','fafahndung.strafsachen@berlin.de','http://www.berlin.de/oberfinanzdirektion');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2111','Bad Segeberg ','Theodor-Storm-Str. 4-10','23795','Bad Segeberg','04551 54-0','04551 54-303','23792','','','23000000','23001502','BBK LUEBECK','23051030','744','KR SPK SUEDHOLSTEIN BAD SEG','0830-1200 MO, DI, DO, FR, 1330-1630 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2112','Eckernförde ','Bergstr. 50','24340','Eckernförde','04351 756-0','04351 83379','','24331','1180','21000000','21001500','BBK KIEL','21092023','11511260','ECKERNFOERDER BANK VRB','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2113','Elmshorn ','Friedensallee 7-9','25335','Elmshorn','04121 481-0','04121 481-460','25333','','','22200000','22201502','BBK KIEL EH ITZEHOE','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2114','Eutin ','Robert-Schade-Str. 22','23701','Eutin','04521 704-0','04521 704-406','','23691','160','23000000','23001505','BBK LUEBECK','21352240','4283','SPK OSTHOLSTEIN EUTIN','0830-1200 MO-FR, Nebenstelle Janusstr. 5 am Mo., Di, Do und Fr. 0830-1200, Do. 1330-1700','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2115','Flensburg ','Duburger Str. 58-64','24939','Flensburg','0461 813-0','0461 813-254','','24905','1552','21500000','21501500','BBK FLENSBURG','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2116','Heide ','Ernst-Mohr-Str. 34','25746','Heide','0481 92-1','0481 92-690','25734','','','21500000','21701502','BBK FLENSBURG','22250020','60000123','SPK WESTHOLSTEIN','0800-1200 MO, DI, DO, FR, 1400-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2117','Husum ','Herzog-Adolf-Str. 18','25813','Husum','04841 8949-0','04841 8949-200','','25802','1230','21500000','21701500','BBK FLENSBURG','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2118','Itzehoe ','Fehrsstr. 5','25524','Itzehoe','04821 66-0','04821 661-499','','25503','1344','22200000','22201500','BBK KIEL EH ITZEHOE','','','','0800-1200 MO, DI, DO, FR, 1400-1730 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2119','Kiel-Nord ','Holtenauer Str. 183','24118','Kiel','0431 8819-0','0431 8819-1200','24094','','','21000000','21001501','BBK KIEL','21050000','52001500','HSH NORDBANK KIEL','0800-1200 MO-FR 1430-1600 DI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2120','Kiel-Süd ','Hopfenstr. 2a','24114','Kiel','0431 602-0','0431 602-1009','24095','','','21000000','21001502','BBK KIEL','21050000','52001510','HSH NORDBANK KIEL','0800-1200 MO, DI, DO, FR, 1430-1730 DI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2121','Leck ','Eesacker Str. 11 a','25917','Leck','04662 85-0','04662 85-266','','25912','1240','21700000','21701501','BBK FLENSBURG EH HUSUM','21750000','80003569','NORD-OSTSEE SPK SCHLESWIG','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2122','Lübeck ','Possehlstr. 4','23560','Lübeck','0451 132-0','0451 132-501','23540','','','23000000','23001500','BBK LUEBECK','21050000','7052000200','HSH NORDBANK KIEL','0730-1300 MO+DI 0730-1700 Do 0730-1200 Fr','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2123','Meldorf ','Jungfernstieg 1','25704','Meldorf','04832 87-0','04832 87-2508','','25697','850','21500000','21701503','BBK FLENSBURG','21851830','106747','VERB SPK MELDORF','0800-1200 MO, DI, DO, FR, 1400-1700 MO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2124','Neumünster ','Bahnhofstr. 9','24534','Neumünster','04321 496 0','04321 496-189','24531','','','21000000','21001507','BBK KIEL','','','','0800-1200 MO-MI, FR 1400-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2125','Oldenburg ','Lankenstr. 1','23758','Oldenburg','04361 497-0','04361 497-125','','23751','1155','23000000','23001504','BBK LUEBECK','21352240','51000396','SPK OSTHOLSTEIN EUTIN','0900-1200 MO-FR 1400-1600 MI','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2126','Plön ','Fünf-Seen-Allee 1','24306','Plön','04522 506-0','04522 506-2149','','24301','108','21000000','21001503','BBK KIEL','21051580','2600','SPK KREIS PLOEN','0800-1200 MO, Di, Do, Fr, 1400-1700 Di','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2127','Ratzeburg ','Bahnhofsallee 20','23909','Ratzeburg','04541 882-01','04541 882-200','23903','','','23000000','23001503','BBK LUEBECK','23052750','100188','KR SPK LAUENBURG RATZEBURG','0830-1230 MO, DI, DO, FR, 1430-1730 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2128','Rendsburg ','Ritterstr. 10','24768','Rendsburg','04331 598-0','04331 598-2770','','24752','640','21000000','21001504','BBK KIEL','21450000','1113','SPK MITTELHOLSTEIN RENDSBG','0730-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2129','Schleswig ','Suadicanistr. 26-28','24837','Schleswig','04621 805-0','04621 805-290','','24821','1180','21500000','21501501','BBK FLENSBURG','21690020','91111','VOLKSBANK RAIFFEISENBANK','0800-1200 MO, DI, DO, FR, 1430-1700 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2130','Stormarn ','Berliner Ring 25','23843','Bad Oldesloe','04531 507-0','04531 507-399','23840','','','23000000','23001501','BBK LUEBECK','23051610','20503','SPK BAD OLDESLOE','0830-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2131','Pinneberg ','Friedrich-Ebert-Str. 29','25421','Pinneberg','04101 5472-0','04101 5472-680','','25404','1451','22200000','22201503','BBK KIEL EH ITZEHOE','','','','0800-1200 MO-FR','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('1','2132','Bad Segeberg / Außenst.Norderstedt','Europaallee 22','22850','Norderstedt','040 523068-0','040 523068-70','','','','23000000','23001502','BBK LUEBECK','23051030','744','KR SPK SUEDHOLSTEIN BAD SEG','0830-1200 MO, DI, DO, FR, 1330-1630 DO','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2201','Hamburg Steuerkasse','Steinstraße 10','20095','Hamburg','040/42853-03','040/42853-2159','','20041','106026','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerSteuererhebung@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2202','Hamburg-Altona ','Gr. Bergstr. 264/266','22767','Hamburg','040/42811-02','040/42811-2871','','22704','500471','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgAltona@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2203','Hamburg-Bergedorf ','Ludwig-Rosenberg-Ring 41','21031','Hamburg','040/42891-0','040/42891-2243','','21003','800360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgBergedorf@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2206','Hamburg-Harburg ','Harburger Ring 40','21073','Hamburg','040/42871-0','040/42871-2215','','21043','900352','20000000','200 015 30','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgHarburg@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2208','Hamburg-Wandsbek ','Schloßstr.107','22041','Hamburg','040/42881-0','040/42881-2888','','22006','700660','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgWandsbek@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2209','Hamburg-Oberalster ','Hachmannplatz 2','20099','Hamburg','040/42854-90','040/42854-4960','','20015','102248','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgOberalster@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2210','Hamburg f.VerkSt.u.Grundbes-10','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2215','Hamburg-Barmbek-Uhlenhorst 15 ','Lübecker Str. 101-109','22087','Hamburg','040/42860-0','040/42860-730','','22053','760360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgBarmbekUhlenhorst@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2216','Hamburg f.VerkSt.u.Grundbes-16','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2217','Hamburg-Mitte-Altstadt 17 ','Wendenstraße 35 b','20097','Hamburg','040/42853-06','040/42853-6671','','20503','261338','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgMitteAltstadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2220','Hamburg f.VerkSt.u.Grundbes-20','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6599','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2222','Hamburg-Hansa ','Steinstraße 10','20095','Hamburg','040/42853-01','040/42853-2064','','20015','102244','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgHansa@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2224','Hamburg-Mitte-Altstadt ','Wendenstr. 35 b','20097','Hamburg','040/42853-06','040/42853-6671','','20503','261338','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgMitteAltstadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2225','Hamburg-Neustadt-St.Pauli ','Steinstraße 10','20095','Hamburg','040/42853-02','040/42853-2106','','20015','102246','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgNeustadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2226','Hamburg-Nord ','Borsteler Chaussee 45','22453','Hamburg','040/42806-0','040/42806-220','','22207','600707','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','','FAHamburgNord@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2227','Hamburg für Großunternehmen','Amsinckstr. 40','20097','Hamburg','040/42853-05','040/42853-5559','','20015','102205','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerGroßunternehmen@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2228','Hamburg Neust.-St.Pauli-28','Steinstr. 10','20095','Hamburg','040/42853-3589','040/42853-2106','','20015','102246','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgNeustadt@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2230','Hamburg f.Verkehrst.u.Grundbes','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6799','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2235','Hamburg f.VerkSt.u.Grundbes-35','Gorch-Fock-Wall 11','20355','Hamburg','040/42843-60','040/42843-6199','','20306','301721','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAfuerVerkehrsteuern@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2254','Hamburg-Eimsbüttel ','Stresemannstraße 23','22769','Hamburg','040/42807-0','040/42807-220','','22770','570110','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgEimsbuettel@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2257','Hamburg-Am Tierpark ','Hugh-Greene-Weg 6','22529','Hamburg','','','','22520','','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FAHamburgAmTierpark@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('2','2271','Hamburg-Barmbek-Uhlenhorst ','Lübecker Str. 101-109','22087','Hamburg','040/42860-0','040/42860-730','','22053','760360','20000000','20001530','BBK HAMBURG','21050000','101444000','HSH NORDBANK KIEL','',' FABarmbekUhlenhorst@finanzamt.hamburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2311','Alfeld (Leine) ','Ravenstr.10','31061','Alfeld','05181/7050','05181/705240','','31042','1244','25000000','25901505','BBK HANNOVER','25950130','10011102','KR SPK HILDESHEIM','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-alf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2312','Bad Gandersheim ','Alte Gasse 24','37581','Bad Gandersheim','05382/760','(05382) 76-213 + 204','','37575','1180','26000000','26001501','BBK GOETTINGEN','25050000','22801005','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-gan.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2313','Braunschweig-Altewiekring ','Altewiekring 20','38102','Braunschweig','0531/7050','0531/705309','','38022','3229','27000000','27001501','BBK BRAUNSCHWEIG','25050000','2498020','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mo. 14.00 - 17.00 Uhr','Poststelle@fa-bs-a.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2314','Braunschweig-Wilhelmstr. ','Wilhelmstr. 4','38100','Braunschweig','0531/4890','0531/489224','','38022','3249','27000000','27001502','BBK BRAUNSCHWEIG','25050000','811422','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mo. 14.00 - 17.00 Uhr','Poststelle@fa-bs-w.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2315','Buchholz in der Nordheide ','Bgm.-A.-Meyer-Str. 5','21244','Buchholz','04181/2030','(04181) 203-4444','','21232','1262','20000000','20001520','BBK HAMBURG','20750000','3005063','SPK HARBURG-BUXTEHUDE','Mo. - Fr. 8.00 - 12.00 Uhr , Do. 14.00 - 17.00 Uhr','Poststelle@fa-buc.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2316','Burgdorf ','V.d.Hannov. Tor 30','31303','Burgdorf','05136/8060','05136/806144','31300','','','25000000','25001515','BBK HANNOVER','25050180','1040400010','SPARKASSE HANNOVER','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-bu.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2317','Celle ','Sägemühlenstr. 5','29221','Celle','(05141) 915-0','05141/915666','','29201','1107','25000000','25701511','BBK HANNOVER','25750001','59','SPARKASSE CELLE','Mo. - Fr. 8.00 - 12.00 Uhr , Do. 14.00 - 17.00 Uhr','Poststelle@fa-ce.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2318','Cuxhaven ','Poststr. 81','27474','Cuxhaven','(04721) 563-0','04721/563313','','27452','280','29000000','24101501','BBK BREMEN','24150001','100503','ST SPK CUXHAVEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-cux.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2319','Gifhorn ','Braunschw. Str. 6-8','38518','Gifhorn','05371/8000','05371/800241','','38516','1249','27000000','27001503','BBK BRAUNSCHWEIG','26951311','11009958','SPK GIFHORN-WOLFSBURG','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00','Poststelle@fa-gf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2320','Göttingen ','Godehardstr. 6','37073','Göttingen','0551/4070','0551/407449','37070','','','26000000','26001500','BBK GOETTINGEN','26050001','91','SPARKASSE GOETTINGEN','Servicecenter: Mo., Di., Mi. und Fr. 8.00 - 12.00 u. Do. 8.00 - 17.00 Uhr,','Poststelle@fa-goe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2321','Goslar ','Wachtelpforte 40','38644','Goslar','05321/5590','05321/559200','','38604','1440','27000000','27001505','BBK BRAUNSCHWEIG','26850001','2220','SPARKASSE GOSLAR/HARZ','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-gs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2322','Hameln ','Süntelstraße 2','31785','Hameln','05151/2040','05151/204200','','31763','101325','25000000','25401511','BBK HANNOVER','25450001','430','ST SPK HAMELN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2323','Hannover-Land I ','Göttinger Chaus. 83A','30459','Hannover','(0511) 419-1','0511/4192269','','30423','910320','25000000','25001512','BBK HANNOVER','25050000','101342434','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-l1.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2324','Hannover-Mitte ','Lavesallee 10','30169','Hannover','0511/16750','0511/1675277','','30001','143','25000000','25001516','BBK HANNOVER','25050000','101341816','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhrund nach Vereinbarung','Poststelle@fa-h-mi.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2325','Hannover-Nord ','Vahrenwalder Str.206','30165','Hannover','0511/67900','(0511) 6790-6090','','30001','167','25000000','25001514','BBK HANNOVER','25050000','101342426','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-no.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2326','Hannover-Süd ','Göttinger Chaus. 83B','30459','Hannover','0511/4191','0511/4192575','','30423','910355','25000000','25001517','BBK HANNOVER','25050000','101342400','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-su.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2327','Hannover-Land II ','Vahrenwalder Str.208','30165','Hannover','0511/67900','(0511) 6790-6633','','30001','165','25000000','25001520','BBK HANNOVER','25050000','101342517','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-h-l2.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2328','Helmstedt ','Ernst-Koch-Str.3','38350','Helmstedt','05351/1220','(05351) 122-299','','38333','1320','27000000','27101500','BBK BRAUNSCHWEIG','25050000','5801006','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-he.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2329','Herzberg am Harz ','Sieberstr. 1','37412','Herzberg','05521/8570','05521/857220','','37401','1153','26000000','26001502','BBK GOETTINGEN','26351015','1229327','SPARKASSE IM KREIS OSTERODE','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hz.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2330','Hildesheim ','Kaiserstrasse 47','31134','Hildesheim','05121/3020','05121/302480','','31104','100455','25000000','25901500','BBK HANNOVER','25950130','5555','KR SPK HILDESHEIM','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-hi.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2331','Holzminden ','Ernst-August-Str.30','37603','Holzminden','05531/1220','05531/122100','','37601','1251','25000000','25401512','BBK HANNOVER','25050000','27811140','NORD LB HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-hol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2332','Lüchow ','Mittelstr.5','29439','Lüchow','(05841) 963-0','05841/963170','','29431','1144','24000000','25801503','BBK LUENEBURG','25851335','2080000','KR SPK LUECHOW-DANNENBERG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-luw.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2333','Lüneburg ','Am Alt. Eisenwerk 4a','21339','Lüneburg','04131/3050','04131/305915','21332','','','24000000','24001500','BBK LUENEBURG','24050110','18','SPK LUENEBURG','Mo. - Fr. 8.00-12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-lg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2334','Nienburg/Weser ','Schloßplatz 10','31582','Nienburg','05021/8011','05021/801300','','31580','2000','25000000','25601500','BBK HANNOVER','25650106','302224','SPARKASSE NIENBURG','Mo. - Fr. 7.30 - 12.00 Uhr und nach Vereinbarung, zusätzl. Arbeitnehmerbereich: Do. 14 -','Poststelle@fa-ni.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2335','Northeim ','Graf-Otto-Str. 31','37154','Northeim','05551/7040','05551/704221','','37142','1261','26000000','26201500','BBK GOETTINGEN','26250001','208','KR SPK NORTHEIM','Mo. - Fr. 8.30 - 12.30 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nom.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2336','Osterholz-Scharmbeck ','Pappstraße 2','27711','Osterholz-Scharmbeck','04791/3020','04791/302101','','27701','1120','29000000','29001523','BBK BREMEN','29152300','202622','KR SPK OSTERHOLZ','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ohz.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2338','Peine ','Duttenstedt.Str. 106','31224','Peine','05171/4070','05171/407199','31221','','','27000000','27001507','BBK BRAUNSCHWEIG','25250001','75003210','KR SPK PEINE','Mo. - Mi. Fr. 9.00 - 12.00, Do. 13.30 - 16.00 UhrDo. (Infothek) 13.30 -','Poststelle@fa-pe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2340','Rotenburg (Wümme) ','Hoffeldstr. 5','27356','Rotenburg','04261/740','04261/74108','','27342','1260','29000000','29001522','BBK BREMEN','24151235','26106377','SPK ROTENBURG-BREMERVOERDE','Mo. - Mi., Fr. 8.00 - 12.00 Uhr, Do. 8.00 - 17.30','Poststelle@fa-row.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2341','Soltau ','Rühberg 16 - 20','29614','Soltau','05191/8070','05191/807144','','29602','1243','24000000','25801502','BBK LUENEBURG','25851660','100016','KR SPK SOLTAU','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-sol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2342','Hannover-Land I Außenstelle Springe','Bahnhofstr. 28','31832','Springe','05041/7730','05041/77363','','31814','100255','25000000','25001512','BBK HANNOVER','25050180','3001000037','SPARKASSE HANNOVER','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-ast-spr.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2343','Stade ','Harburger Str. 113','21680','Stade','(04141) 536-0','(04141) 536-499','21677','','','24000000','24001560','BBK LUENEBURG','24151005','42507','SPK STADE-ALTES LAND','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-std.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2344','Stadthagen ','Schloß','31655','Stadthagen','05721/7050','05721/705250','31653','','','49000000','49001502','BBK MINDEN, WESTF','25551480','470140401','SPARKASSE SCHAUMBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-shg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2345','Sulingen ','Hindenburgstr. 16','27232','Sulingen','04271/870','04271/87289','','27226','1520','29000000','29001516','BBK BREMEN','25651325','30101430','KR SPK DIEPHOLZ','Mo., Mi., Do. und Fr. 8.00 - 12.00 Uhr, Di. 8.00 - 17.00 Uhr','Poststelle@fa-su.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2346','Syke ','Bürgerm.-Mävers-Str. 15','28857','Syke','04242/1620','04242/162423','','28845','1164','29000000','29001515','BBK BREMEN','29151700','1110044557','KREISSPARKASSE SYKE','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-sy.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2347','Uelzen ','Am Königsberg 3','29525','Uelzen','0581/8030','0581/803404','','29504','1462','24000000','25801501','BBK LUENEBURG','25850110','26','SPARKASSE UELZEN','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ue.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2348','Verden (Aller) ','Bremer Straße 4','27283','Verden','04231/9190','04231/919310','','27263','1340','29000000','29001517','BBK BREMEN','29152670','10000776','KR SPK VERDEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-ver.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2349','Wesermünde ','Borriesstr. 50','27570','Bremerhaven','0471/1830','0471/183119','','27503','100369','29000000','29201501','BBK BREMEN','29250150','100103200','KR SPK WESERMUENDE-HADELN','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-wem.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2350','Winsen (Luhe) ','Von-Somnitz-Ring 6','21423','Winsen','04171/6560','(04171) 656-115','','21413','1329','24000000','24001550','BBK LUENEBURG','20750000','7051519','SPK HARBURG-BUXTEHUDE','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 18.00 Uhr und nach Vereinbarung','Poststelle@fa-wl.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2351','Wolfenbüttel ','Jägerstr. 19','38304','Wolfenbüttel','05331/8030','(05331) 803-113/266 ','38299','','','27000000','27001504','BBK BRAUNSCHWEIG','25050000','9801002','NORD LB HANNOVER','Mo. - Fr. 8.00 - 12.00 Uhr, Mi. 14.00 - 17.00 Uhr','Poststelle@fa-wf.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2352','Zeven ','Kastanienweg 1','27404','Zeven','04281/7530','04281/753290','','27392','1259','29000000','29201503','BBK BREMEN','24151235','404350','SPK ROTENBURG-BREMERVOERDE','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-zev.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2353','Papenburg ','Große Straße 32','26871','Aschendorf','04962/5030','04962/503222','','26883','2264','28000000','28501512','BBK OLDENBURG (OLDB)','26650001','1020007','SPK EMSLAND','Mo. - Fr. 9.00 - 12.00 Uhr, Mi. 14.00 - 17.00 Uhr','Poststelle@fa-pap.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2354','Aurich ','Hasseburger Str. 3','26603','Aurich','04941/1750','04941/175152','','26582','1260','28000000','28501514','BBK OLDENBURG (OLDB)','28350000','90001','SPK AURICH-NORDEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-aur.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2355','Bad Bentheim ','Heinrich-Böll-Str. 2','48455','Bad Bentheim','05922/970-0','05922/970-2000','','48443','1262','26500000','26601501','BBK OSNABRUECK','26750001','1000066','KR SPK NORDHORN','Mo. - Fr. 9.00 - 12.00 Uhr, Do 14.00 - 15.30 Uhr','Poststelle@fa-ben.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2356','Cloppenburg ','Bahnhofstr. 57','49661','Cloppenburg','04471/8870','04471/887477','','49646','1680','28000000','28001501','BBK OLDENBURG (OLDB)','28050100','80402100','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-clp.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2357','Delmenhorst ','Fr.-Ebert-Allee 15','27749','Delmenhorst','04221/1530','04221/153126','27747','','','29000000','29001521','BBK BREMEN','28050100','30475669','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Di. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-del.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2358','Emden ','Ringstr. 5','26721','Emden','(04921) 934-0','(04921) 934-499','','26695','1553','28000000','28401500','BBK OLDENBURG (OLDB)','28450000','26','SPARKASSE EMDEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-emd.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2360','Leer (Ostfriesland) ','Edzardstr. 12/16','26789','Leer','(0491) 9870-0','0491/9870209','26787','','','28000000','28501511','BBK OLDENBURG (OLDB)','28550000','849000','SPARKASSE LEER-WEENER','Mo. - Fr. 8.00 - 12.00 Uhr, nur Infothek: Mo., Do. 14.00 - 17.30 Uhr','Poststelle@fa-ler.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2361','Lingen (Ems) ','Mühlentorstr. 14','49808','Lingen','0591/91490','0591/9149468','','49784','1440','26500000','26601500','BBK OSNABRUECK','26650001','2402','SPK EMSLAND','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr und nach Vereinbarung','Poststelle@fa-lin.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2362','Norden ','Mühlenweg 20','26506','Norden','04931/1880','04931/188196','','26493','100360','28000000','28501515','BBK OLDENBURG (OLDB)','28350000','1115','SPK AURICH-NORDEN','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nor.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2363','Nordenham ','Plaatweg 1','26954','Nordenham','04731/8700','04731/870100','','26942','1264','28000000','28001504','BBK OLDENBURG (OLDB)','28050100','63417000','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 8.30 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-nhm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2364','Oldenburg (Oldenburg) ','91er Straße 4','26121','Oldenburg','0441/2381','(0441) 238-201/2/3','','26014','2445','28000000','28001500','BBK OLDENBURG (OLDB)','28050100','423301','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2365','Osnabrück-Land ','Hannoversche Str. 12','49084','Osnabrück','0541/58420','0541/5842450','','49002','1280','26500000','26501501','BBK OSNABRUECK','26552286','110007','KREISSPARKASSE MELLE','Mo., Mi., Do. u. Fr. 8.00 - 12.00 Uhr, Di. 12.00 - 17.00 Uhr','Poststelle@fa-os-l.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2366','Osnabrück-Stadt ','Süsterstr. 46/48','49074','Osnabrück','0541/3540','(0541) 354-312','','49009','1920','26500000','26501500','BBK OSNABRUECK','26550105','19000','SPARKASSE OSNABRUECK','Mo. - Mi., Fr. 8.00 - 12.00 Uhr, nur Infothek: Do. 12.00 - 17.00 Uhr','Poststelle@fa-os-s.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2367','Quakenbrück ','Lange Straße 37','49610','Quakenbrück','05431/1840','05431/184101','','49602','1261','26500000','26501503','BBK OSNABRUECK','26551540','18837179','KR SPK BERSENBRUECK','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-qua.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2368','Vechta ','Rombergstr. 49','49377','Vechta','04441/180','(04441) 18-100','49375','','','28000000','28001502','BBK OLDENBURG (OLDB)','28050100','70400049','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 8.30 - 12.00 Uhr, Mo. 14.00 - 16.00 Uhr,Mi. 14.00 - 17.00','Poststelle@fa-vec.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2369','Westerstede ','Ammerlandallee 14','26655','Westerstede','04488/5150','04488/515444','26653','','','28000000','28001503','BBK OLDENBURG (OLDB)','28050100','40465007','LANDESSPARKASSE OLDENBURG','Mo. - Fr. 9.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-wst.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2370','Wilhelmshaven ','Rathausplatz 3','26382','Wilhelmshaven','04421/1830','04421/183111','','26354','1462','28000000','28201500','BBK OLDENBURG (OLDB)','28250110','2117000','SPARKASSE WILHELMSHAVEN','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-whv.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2371','Wittmund ','Harpertshausen.Str.2','26409','Wittmund','04462/840','04462/84195','','26398','1153','28000000','28201502','BBK OLDENBURG (OLDB)','','','','Mo. - Fr. 8.00 - 12.00 Uhr, Do. 14.00 - 17.00 Uhr','Poststelle@fa-wtm.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2380','Braunschweig für Großbetriebsprüfung','Theodor-Heuss-Str.4a','38122','Braunschweig','0531/80970','(0531) 8097-333','','38009','1937','','','','','','','nach Vereinbarung','Poststelle@fa-gbp-bs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2381','Göttingen für Großbetriebsprüfung','Godehardstr. 6','37073','Göttingen','0551/4070','(0551) 407-448','','','','','','','','','','','Poststelle@fa-gbp-goe.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2382','Hannover I für Großbetriebsprüfung','Bischofsholer Damm 15','30173','Hannover','(0511) 8563-01','(0511) 8563-195','','','','','','','','','','','Poststelle@fa-gbp-h1.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2383','Hannover II für Großbetriebsprüfung','Bischofsholer Damm 15','30173','Hannover','(0511) 8563-02','(0511) 8563-250','','30019','1927','','','','','','','','Poststelle@fa-gbp-h2.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2384','Stade für Großbetriebsprüfung','Am Ärztehaus 12','21680','Stade','(04141) 602-0','(04141) 602-60','','','','','','','','','','','Poststelle@fa-gbp-std.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2385','Oldenburg für Großbetriebsprüfung','Georgstr. 36','26121','Oldenburg','0441/2381','(0441) 238-522','','26014','2445','','','','','','','','Poststelle@fa-gbp-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2386','Osnabrück für Großbetriebsprüfung','Johann-Domann-Str. 6','49080','Osnabrück','(0541) 503 800','(0541) 503 888','','','','','','','','','','','Poststelle@fa-gbp-os.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2390','Braunschweig für Fahndung und Strafsachen','Rudolf-Steiner-Str. 1','38120','Braunschweig','0531/28510','(0531) 2851-150','','38009','1931','','','','','','','nach Vereinbarung','Poststelle@fa-fust-bs.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2391','Hannover für Fahndung und Strafsachen','Göttinger Chaus. 83B','30459','Hannover','(0511) 419-1','(0511) 419-2988','','30430','911007','','','','','','','','Poststelle@fa-fust-h.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2392','Lüneburg für Fahndung und Strafsachen','Horst-Nickel-Str. 6','21337','Lüneburg','(04131) 8545-600','(04131) 8545-698','','21305','1570','','','','','','','','Poststelle@fa-fust-lg.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('3','2393','Oldenburg für Fahndung und Strafsachen','Cloppenburger Str. 320','26133','Oldenburg','(0441) 9401-0','(0441) 9401-200','','26014','2442','','','','','','','','Poststelle@fa-fust-ol.niedersachsen.de','www.ofd.niedersachsen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2457','Bremen-Mitte Bewertung ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-2725','0421 322-2878','','28079','10 79 67','29050000','1070110002','BREMER LANDESBANK BREMEN','29050101','109 0901','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2471','Bremen-Mitte ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-2725','0421 322-2878','28187','28079','10 79 67','29000000','29001512','BBK BREMEN','29050101','1090646','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2472','Bremen-Ost ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3005','0421 322-3178','','28057','10 57 09','29000000','29001513','BBK BREMEN','29050101','1090612','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtOst.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2473','Bremen-West ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3422','0421 322-3478','','28057','10 57 29','29000000','29001514','BBK BREMEN','29050101','1090638','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtWest.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2474','Bremen-Nord ','Gerhard-Rohlfs-Str. 32','28757','Bremen','0421 6607-1','0421 6607-300','','28734','76 04 34','29000000','29001518','BBK BREMEN','29050101','5016001','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-14:00','office@FinanzamtNord.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2475','Bremerhaven ','Schifferstr. 2-8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2476','Bremen-Mitte KraftfahrzeugSt ','Schillerstr. 22','28195','Bremen','0421 322-2725','0421 322-2878','','28079','107967','29000000','29001512','BBK BREMEN','29050101',' 109 0646','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtMitte.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2477','Bremerhaven Bewertung ','Schifferstr. 2 - 8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08.00-18.00/Di+Mi 08.00-16.00/Fr 08.00-15.00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2478','Bremen für Großbetriebsprüfung','Schillerstr. 6-7','28195','Bremen','0421 322-4019','0421 322-4078','','28057','10 57 69','','','','','','','nach Vereinbarung','','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2482','Bremen-Ost Arbeitnehmerbereich ','Rudolf-Hilferding-Platz 1','28195','Bremen','0421 322-3005','0421 322-3178','','28057','10 57 09','29000000','29001513','BBK BREMEN','29050101','1090612','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtOst.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2484','Bremen-Nord Arbeitnehmerbereic ','Gerhard-Rohlfs-Str. 32','28757','Bremen','0421 6607-1','0421 6607-300','','28734','76 04 34','29000000','29001518','BBK BREMEN','29050101','5016001','SPK BREMEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-14:00','office@FinanzamtNord.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('4','2485','Bremerhaven Arbeitnehmerbereic ','Schifferstr. 2-8','27568','Bremerhaven','0471 486-1','0471 486-370','','27516','12 02 42','29200000','29201500','BBK BREMEN EH BREMERHAVEN','29250000','1100068','STE SPK BREMERHAVEN','Zentrale Informations- und Annahmestelle Mo+Do 08:00-18:00,Di+Mi 08:00-16:00,Fr 08:00-15:00','office@FinanzamtBremerhaven.bremen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2601','Alsfeld-Lauterbach Verwaltungsstelle Alsfeld','In der Rambach 11','36304','Alsfeld','06631/790-0','06631/790-555','','36292','1263','51300000','51301504','BBK GIESSEN','53051130','1022003','SPARKASSE VOGELSBERGKREIS','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Alsfeld-Lauterbach.de','www.Finanzamt-Alsfeld-Lauterbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2602','Hersfeld-Rotenburg Verwaltungsstelle Bad Hersfeld','Im Stift 7','36251','Bad Hersfeld','06621/933-0','06621/933-333','','36224','1451','53200000','53201500','BBK KASSEL EH BAD HERSFELD','53250000','1000016','SPK BAD HERSFELD-ROTENBURG','Mo u. Do 8:00-12:00, Di 14:00-18:00 Uhr','poststelle@Finanzamt-Hersfeld-Rotenburg.de','www.Finanzamt-Hersfeld-Rotenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2603','Bad Homburg v.d. Höhe ','Kaiser-Friedr.-Promenade 8-10 ','61348','Bad Homburg','06172/107-0','06172/107-317','61343','61284','1445','50000000','50001501','BBK FILIALE FRANKFURT MAIN','51250000','1014781','TAUNUS-SPARKASSE BAD HOMBG','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Bad-Homburg.de','www.Finanzamt-Bad-Homburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2604','Rheingau-Taunus Verwaltungsst. Bad Schwalbach ','Emser Str.27a','65307','Bad Schwalbach','06124/705-0','06124/705-400','','65301','1165','51000000','51001502','BBK WIESBADEN','51050015','393000643','NASS SPK WIESBADEN','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Rheingau-Taunus.de','www.Finanzamt-Rheingau-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2605','Bensheim ','Berliner Ring 35','64625','Bensheim','06251/15-0','06251/15-267','','64603','1351','50800000','50801510','BBK DARMSTADT','50950068','1040005','SPARKASSE BENSHEIM','Mo-Mi 8:00-15:30, Do 13:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Bensheim.de','www.Finanzamt-Bensheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2606','Marburg-Biedenkopf Verwaltungsstelle Biedenkopf','Im Feldchen 2','35216','Biedenkopf','06421/698-0','06421/698-109','','','','51300000','51301514','BBK GIESSEN','53350000','110027303','SPK MARBURG-BIEDENKOPF','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06461/709-0','poststelle@Finanzamt-Marburg-Biedenkopf.de','www.Finanzamt-Marburg-Biedenkopf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2607','Darmstadt ','Soderstraße 30','64283','Darmstadt','06151/102-0','06151/102-1262','64287','64219','110465','50800000','50801500','BBK DARMSTADT','50850049','5093005006','LD BK GZ DARMSTADT','Mo-Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Darmstadt.de','www.Finanzamt-Darmstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2608','Dieburg ','Marienstraße 19','64807','Dieburg','06071/2006-0','06071/2006-100','','64802','1209','50800000','50801501','BBK DARMSTADT','50852651','33211004','SPARKASSE DIEBURG','Mo-Mi 7:30-15:30, Do 13:30-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Dieburg.de','www.Finanzamt-Dieburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2609','Dillenburg ','Wilhelmstraße 9','35683','Dillenburg','02771/908-0','02771/908-100','','35663','1362','51300000','51301509','BBK GIESSEN','51650045','18','BEZ SPK DILLENBURG','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Dillenburg.de','www.Finanzamt-Dillenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2610','Eschwege-Witzenhausen Verwaltungsstelle Eschwege','Schlesienstraße 2','37269','Eschwege','05651/926-5','05651/926-720','37267','37252','1280','52000000','52001510','BBK KASSEL','52250030','18','SPARKASSE WERRA-MEISSNER','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Eschwege-Witzenhausen.de','www.Finanzamt-Eschwege-Witzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2611','Korbach-Frankenberg Verwaltungsstelle Frankenberg ','Geismarer Straße 16','35066','Frankenberg','05631/563-0','05631/563-888','','','','51300000','51301513','BBK GIESSEN','52350005','5001557','SPK WALDECK-FRANKENBERG','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Korbach-Frankenberg.de','www.Finanzamt-Korbach-Frankenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2612','Frankfurt am Main II ','Gutleutstraße 122','60327','Frankfurt','069/2545-02','069/2545-2999','','60305','110862','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Frankfurt-2.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2613','Frankfurt am Main I ','Gutleutstraße 124','60327','Frankfurt','069/2545-01','069/2545-1999','','60305','110861','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Frankfurt-1.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2614','Frankfurt am Main IV ','Gutleutstraße 118','60327','Frankfurt','069/2545-04','069/2545-4999','','60305','110864','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-4.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2615','Frankfurt/M. V-Höchst Verwaltungsstelle Höchst','Hospitalstraße 16 a','65929','Frankfurt','069/2545-05','069/2545-5999','','','','50000000','50001502','BBK FILIALE FRANKFURT MAIN','50050201','608604','FRANKFURTER SPK FRANKFURT','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 069/30830-0','poststelle@Finanzamt-Frankfurt-5-Hoechst.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2616','Friedberg (Hessen) ','Leonhardstraße 10 - 12','61169','Friedberg','06031/49-1','06031/49-333','','61143','100362','51300000','51301506','BBK GIESSEN','51850079','50000400','SPARKASSE WETTERAU','Di 8:00-12:00, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Friedberg.de','www.Finanzamt-Friedberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2617','Bensheim Außenstelle Fürth','Erbacher Straße 23','64658','Fürth','06253/206-0','06253/206-10','','64654','1154','50800000','50801510','BBK DARMSTADT','50950068','1040005','SPARKASSE BENSHEIM','','poststelle@Finanzamt-Bensheim.de','www.Finanzamt-Bensheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2618','Fulda ','Königstraße 2','36037','Fulda','0661/924-01','0661/924-1606','','36003','1346','53000000','53001500','BBK KASSEL EH FULDA','53050180','49009','SPARKASSE FULDA','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Fulda.de','www.Finanzamt-Fulda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2619','Gelnhausen ','Frankfurter Straße 14','63571','Gelnhausen','06051/86-0','06051/86-299','63569','63552','1262','50600000','50601502','BBK FRANKFURT EH HANAU','50750094','2008','KREISSPARKASSE GELNHAUSEN','Mo u. Mi 8:00-12:00, Do 14:30-18:00 Uhr','poststelle@Finanzamt-Gelnhausen.de','www.Finanzamt-Gelnhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2620','Gießen ','Schubertstraße 60','35392','Gießen','0641/4800-100','0641/4800-1590','35387','35349','110440','','','','51300000','51301500','BBK GIESSEN','Mo-Mi 8:00-15:30,Do 14:00-18:00, Fr 8:00-12:00 Uhr','info@Finanzamt-Giessen.de','www.Finanzamt-Giessen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2621','Groß-Gerau ','Europaring 11-13','64521','Groß-Gerau','06152/170-01','06152/170-601','64518','64502','1262','50800000','50801502','BBK DARMSTADT','50852553','1685','KR SPK GROSS-GERAU','Mo-Mi 8:00-15.30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Gross-Gerau.de','www.Finanzamt-Gross-Gerau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2622','Hanau ','Am Freiheitsplatz 2','63450','Hanau','06181/101-1','06181/101-501','63446','63404','1452','50600000','50601500','BBK FRANKFURT EH HANAU','50650023','50104','SPARKASSE HANAU','Mo u. Mi 7:30-12:00, Do 14:30-18:00 Uhr','poststelle@Finanzamt-Hanau.de','www.Finanzamt-Hanau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2623','Kassel-Hofgeismar Verwaltungsstelle Hofgeismar','Altstädter Kirchplatz 10','34369','Hofgeismar','0561/7207-0','0561/7207-2500','','','','52000000','52001501','BBK KASSEL','52050353','100009202','KASSELER SPARKASSE','Di, Mi u. Fr 8:00-12:00, Do 15:00-18:00 Uhr Telefon Verwaltungsstelle: 05671/8004-0','poststelle@Finanzamt-Kassel-Hofgeismar.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2624','Schwalm-Eder Verwaltungsstelle Fritzlar','Georgengasse 5','34560','Fritzlar','05622/805-0','05622/805-111','','34551','1161','52000000','52001502','BBK KASSEL','52052154','110007507','KREISSPARKASSE SCHWALM-EDER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2625','Kassel-Spohrstraße ','Spohrstraße 7','34117','Kassel','0561/7208-0','0561/7208-408','34111','34012','101249','52000000','52001500','BBK KASSEL','52050000','4091300006','LANDESKREDITKASSE KASSEL','Mo u. Fr 7:30-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Kassel-Spohrstrasse.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2626','Kassel-Hofgeismar Verwaltungsstelle Kassel','Goethestraße 43','34119','Kassel','0561/7207-0','0561/7207-2500','34111','34012','101229','52000000','52001500','BBK KASSEL','52050000','4091300006','LANDESKREDITKASSE KASSEL','Mo, Mi u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr','poststelle@Finanzamt-Kassel-Hofgeismar.de','www.Finanzamt-Kassel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2627','Korbach-Frankenberg Verwaltungsstelle Korbach','Medebacher Landstraße 29','34497','Korbach','05631/563-0','05631/563-888','34495','34482','1240','52000000','52001509','BBK KASSEL','52350005','19588','SPK WALDECK-FRANKENBERG','Mo, Mi u. Fr 8:00-12:00, Do 15:30-18:00 Uhr','poststelle@Finanzamt-Korbach-Frankenberg.de','www.Finanzamt-Korbach-Frankenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2628','Langen ','Zimmerstraße 27','63225','Langen','06103/591-01','06103/591-285','63222','63202','1280','50000000','50001511','BBK FILIALE FRANKFURT MAIN','50592200','31500','VB DREIEICH','Mo, Mi u. Do 8:00-15:30, Di 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Langen.de','www.Finanzamt-Langen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2629','Alsfeld-Lauterbach Verwaltungsstelle Lauterbach','Bahnhofstraße 69','36341','Lauterbach','06631/790-0','06631/790-555','36339','','','53000000','53001501','BBK KASSEL EH FULDA','53051130','60100509','SPARKASSE VOGELSBERGKREIS','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06641/188-0','poststelle@Finanzamt-Alsfeld-Lauterbach.de','www.Finanzamt-Alsfeld-Lauterbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2630','Limburg-Weilburg Verwaltungsstelle Limburg','Walderdorffstraße 11','65549','Limburg','06431/208-1','06431/208-294','65547','65534','1465','51000000','51001507','BBK WIESBADEN','51050015','535054800','NASS SPK WIESBADEN','Mo-Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Limburg-Weilburg.de','www.Finanzamt-Limburg-Weilburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2631','Marburg-Biedenkopf Verwaltungsstelle Marburg','Robert-Koch-Straße 7','35037','Marburg','06421/698-0','06421/698-109','35034','35004','1469','51300000','51301512','BBK GIESSEN','53350000','11517','SPK MARBURG-BIEDENKOPF','Mo-Mi 8:00-15:30, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Marburg-Biedenkopf.de','www.Finanzamt-Marburg-Biedenkopf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2632','Schwalm-Eder Verwaltungsstelle Melsungen','Kasseler Straße 31 (Schloß)','34212','Melsungen','05622/805-0','05622/805-111','','','','52000000','52001503','BBK KASSEL','52052154','10060002','KREISSPARKASSE SCHWALM-EDER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 05661/706-0','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2633','Michelstadt ','Erbacher Straße 48','64720','Michelstadt','06061/78-0','06061/78-100','','64712','3180','50800000','50801503','BBK DARMSTADT','50851952','40041451','SPK ODENWALDKREIS ERBACH','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Michelstadt.de','www.Finanzamt-Michelstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2634','Nidda ','Schillerstraße 38','63667','Nidda','06043/805-0','06043/805-159','','63658','1180','50600000','50601501','BBK FRANKFURT EH HANAU','51850079','150003652','SPARKASSE WETTERAU','Mo, Di u. Do 7:30-16:00, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Nidda.de','www.Finanzamt-Nidda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2635','Offenbach am Main-Stadt ','Bieberer Straße 59','63065','Offenbach','069/8091-1','069/8091-2400','63063','63005','100563','50000000','50001500','BBK FILIALE FRANKFURT MAIN','50550020','493','STE SPK OFFENBACH','Mo, Di u. Do 7:30-15:30, Mi 13:00-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Offenbach-Stadt.de','www.Finanzamt-Offenbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2636','Hersfeld-Rotenburg Verwaltungsstelle Rotenburg','Dickenrücker Straße 12','36199','Rotenburg','06621/933-0','06621/933-333','','','','52000000','52001504','BBK KASSEL','53250000','50000012','SPK BAD HERSFELD-ROTENBURG','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06623/816-0','poststelle@Finanzamt-Hersfeld-Rotenburg.de','www.Finanzamt-Hersfeld-Rotenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2637','Rheingau-Taunus Verwaltungsstelle Rüdesheim','Hugo-Asbach-Straße 3 - 7','65385','Rüdesheim','06124/705-0','06124/705-400','','','','51000000','51001501','BBK WIESBADEN','51050015','455022800','NASS SPK WIESBADEN','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06722/405-0','poststelle@Finanzamt-Rheingau-Taunus.de','www.Finanzamt-Rheingau-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2638','Limburg-Weilburg Verwaltungsstelle Weilburg','Kruppstraße 1','35781','Weilburg','06431/208-1','06431/208-294','35779','','','51000000','51001511','BBK WIESBADEN','51151919','100000843','KR SPK WEILBURG','Mo-Mi 8:00-16:00, Do 14:00-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Limburg-Weilburg.de','www.Finanzamt-Limburg-Weilburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2639','Wetzlar ','Frankfurter Straße 59','35578','Wetzlar','06441/202-0','06441/202-6810','35573','35525','1520','51300000','51301508','BBK GIESSEN','51550035','46003','SPARKASSE WETZLAR','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Wetzlar.de','www.Finanzamt-Wetzlar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2640','Wiesbaden I ','Dostojewskistraße 8','65187','Wiesbaden','0611/813-0','0611/813-1000','65173','65014','2469','51000000','51001500','BBK WIESBADEN','51050015','100061600','NASS SPK WIESBADEN','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Wiesbaden-1.de','www.Finanzamt-Wiesbaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2641','Eschwege-Witzenhausen Verwaltungsstelle Witzenhausen','Südbahnhofstraße 37','37213','Witzenhausen','05651/926-5','05651/926-720','','','','52000000','52001505','BBK KASSEL','52250030','50000991','SPARKASSE WERRA-MEISSNER','Mo u. Fr 8:00-12:00, Mi 14:00-18:00 Uhr Telefon Verwaltungsstelle: 05542/602-0','poststelle@Finanzamt-Eschwege-Witzenhausen.de','www.Finanzamt-Eschwege-Witzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2642','Schwalm-Eder Verwaltungsstelle Schwalmstadt','Landgraf-Philipp-Straße 15','34613','Schwalmstadt','05622/805-0','05622/805-111','','','','52000000','52001506','BBK KASSEL','52052154','200006641','KREISSPARKASSE SCHWALM-EDER','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr Telefon Verwaltungsstelle: 06691/738-0','poststelle@Finanzamt-Schwalm-Eder.de','www.Finanzamt-Schwalm-Eder.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2643','Wiesbaden II ','Dostojewskistraße 8','65187','Wiesbaden','0611/813-0','0611/813-2000','65173','65014','2469','51000000','51001500','BBK WIESBADEN','51050015','100061600','NASS SPK WIESBADEN','Mo, Di u. Do 8:00-15:30, Mi 13:30-18:00, Fr 7:00-12:00 Uhr','poststelle@Finanzamt-Wiesbaden-2.de','www.Finanzamt-Wiesbaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2644','Offenbach am Main-Land ','Bieberer Straße 59','63065','Offenbach','069/8091-1','069/8091-3400','63063','63005','100552','50000000','50001500','BBK FILIALE FRANKFURT MAIN','50550020','493','STE SPK OFFENBACH','Mo, Di u. Do 7:30-15:30, Mi 13:00-18:00, Fr 7:30-12:00 Uhr','poststelle@Finanzamt-Offenbach-Land.de','www.Finanzamt-Offenbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2645','Frankfurt am Main III ','Gutleutstraße 120','60327','Frankfurt','069/2545-03','069/2545-3999','','60305','110863','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-3.de','wwww.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2646','Hofheim am Taunus ','Nordring 4 - 10','65719','Hofheim','06192/960-0','06192/960-412','65717','65703','1380','50000000','50001503','BBK FILIALE FRANKFURT MAIN','51250000','2000008','TAUNUS-SPARKASSE BAD HOMBG','Mo-Mi 8:00-15:30, Do 13:30-18:00, Fr 8:00-12:00 Uhr','poststelle@Finanzamt-Hofheim-am-Taunus.de','www.Finanzamt-Hofheim-am-Taunus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('6','2647','Frankfurt/M. V-Höchst Verwaltungsstelle Frankfurt','Gutleutstraße 116','60327','Frankfurt','069/2545-05','069/2545-5999','','60305','110865','50000000','50001504','BBK FILIALE FRANKFURT MAIN','50050000','1600006','LD BK HESS-THUER GZ FFM','Mo u. Mi 8:00-12:00, Do 14:00-18:00 Uhr','poststelle@Finanzamt-Frankfurt-5-Hoechst.de','www.Finanzamt-Frankfurt-am-Main.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2701','Bad Neuenahr-Ahrweiler ','Römerstr. 5','53474','Bad Neuenahr-Ahrweiler','02641/3820','02641/38212000','','53457','1209','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-aw.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2702','Altenkirchen-Hachenburg ','Frankfurter Str. 21','57610','Altenkirchen','02681/860','02681/8610090','57609','57602','1260','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ak.fin-rlp.de','www.finanzamt-altenkirchen-hachenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2703','Bingen-Alzey Aussenstelle Alzey','Rochusallee 10','55411','Bingen','06721/7060','06721/70614080','55409','55382','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06731/4000','Poststelle@fa-bi.fin-rlp.de','www.finanzamt-bingen-alzey.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2706','Bad Kreuznach ','Ringstr. 10','55543','Bad Kreuznach','0671/7000','0671/70011702','55541','55505','1552','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-kh.fin-rlp.de','www.finanzamt-bad-kreuznach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2707','Bernkastel-Wittlich Aussenstelle Bernkastel-Kues','Unterer Sehlemet 15','54516','Wittlich','06571/95360','06571/953613400','','54502','1240','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06531/5060','Poststelle@fa-wi.fin-rlp.de','www.finanzamt-bernkastel-wittlich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2708','Bingen-Alzey ','Rochusallee 10','55411','Bingen','06721/7060','06721/70614080','55409','55382','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-bi.fin-rlp.de','www.finanzamt-bingen-alzey.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2709','Idar-Oberstein ','Hauptstraße 199','55743','Idar-Oberstein','06781/680','06781/6818333','','55708','11820','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-io.fin-rlp.de','www.finanzamt-idar-oberstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2710','Bitburg-Prüm ','Kölner Straße 20','54634','Bitburg','06561/6030','06561/60315090','','54622','1252','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-bt.fin-rlp.de','www.finanzamt-bitburg-pruem.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2713','Daun ','Berliner Straße 1','54550','Daun','06592/95790','06592/957916175','','54542','1160','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-da.fin-rlp.de','www.finanzamt-daun.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2714','Montabaur-Diez Aussenstelle Diez','Koblenzer Str. 15','56410','Montabaur','02602/1210','02602/12127099','56409','56404','1461','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06432/5040','Poststelle@fa-mt.fin-rlp.de','www.finanzamt-montabaur-diez.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2715','Frankenthal ','Friedrich-Ebert-Straße 6','67227','Frankenthal','06233/49030','06233/490317082','67225','67203','1324','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ft.fin-rlp.de','www.finanzamt-frankenthal.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2716','Speyer-Germersheim Aussenstelle Germersheim','Johannesstr. 9-12','67346','Speyer','06232/60170','06232/601733431','67343','67323','1309','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 07274/9500','Poststelle@fa-sp.fin-rlp.de','www.finanzamt-speyer-germersheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2718','Altenkirchen-Hachenburg Aussenstelle Hachenburg','Frankfurter Str. 21','57610','Altenkirchen','02681/860','02681/8610090','57609','57602','1260','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 02662/94520','Poststelle@fa-ak.fin-rlp.de','www.finanzamt-altenkirchen-hachenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2719','Kaiserslautern ','Eisenbahnstr. 56','67655','Kaiserslautern','0631/36760','0631/367619500','67653','67621','3360','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-kl.fin-rlp.de','www.finanzamt-kaiserslautern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2721','Worms-Kirchheimbolanden Aussenstelle Kirchheimbolanden','Karlsplatz 6','67549','Worms','06241/30460','06241/304635060','67545','','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06352/4070','Poststelle@fa-wo.fin-rlp.de','www.finanzamt-worms-kirchheimbolanden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2722','Koblenz ','Ferdinand-Sauerbruch-Str. 19','56073','Koblenz','0261/49310','0261/493120090','56060','56007','709','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ko.fin-rlp.de','www.finanzamt-koblenz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2723','Kusel-Landstuhl ','Trierer Str. 46','66869','Kusel','06381/99670','06381/996721060','','66864','1251','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ku.fin-rlp.de','www.finanzamt-kusel-landstuhl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2724','Landau ','Weißquartierstr. 13','76829','Landau','06341/9130','06341/91322100','76825','76807','1760u.1780','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ld.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2725','Kusel-Landstuhl Aussenstelle Landstuhl','Trierer Str. 46','66869','Kusel','06381/99670','06381/996721060','','66864','1251','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06371/61730','Poststelle@fa-ku.fin-rlp.de','www.finanzamt-kusel-landstuhl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2726','Mainz-Mitte ','Schillerstr. 13','55116','Mainz','06131/2510','06131/25124090','','55009','1980','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-mz.fin-rlp.de','www.finanzamt-mainz-mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2727','Ludwigshafen ','Bayernstr. 39','67061','Ludwigshafen','0621/56140','0621/561423051','','67005','210507','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-lu.fin-rlp.de','www.finanzamt-ludwigshafen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2728','Mainz-Süd ','Emy-Roeder-Str. 3','55129','Mainz','06131/5520','06131/55225272','','55071','421365','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ms.fin-rlp.de','www.finanzamt-mainz-sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2729','Mayen ','Westbahnhofstr. 11','56727','Mayen','02651/70260','02651/702626090','','56703','1363','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-my.fin-rlp.de','www.finanzamt-mayen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2730','Montabaur-Diez ','Koblenzer Str. 15','56410','Montabaur','02602/1210','02602/12127099','56409','56404','1461','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-mt.fin-rlp.de','www.finanzamt-montabaur-diez.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2731','Neustadt ','Konrad-Adenauer-Str. 26','67433','Neustadt','06321/9300','06321/93028600','67429','67404','100 465','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-nw.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2732','Neuwied ','Augustastr. 54','56564','Neuwied','02631/9100','02631/91029906','56562','56505','1561','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-nr.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2735','Pirmasens-Zweibrücken ','Kaiserstr. 2','66955','Pirmasens','06331/7110','06331/71130950','66950','66925','1662','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-ps.fin-rlp.de','www.finanzamt-pirmasens-zweibruecken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2736','Bitburg-Prüm Aussenstelle Prüm','Kölner Str. 20','54634','Bitburg','06561/6030','06561/60315093','','54622','1252','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06551/9400','Poststelle@fa-bt.fin-rlp.de','www.finanzamt-bitburg-pruem.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2738','Sankt Goarshausen-Sankt Goar Aussenstelle Sankt Goar','Wellmicher Str. 79','56346','St. Goarshausen','06771/95900','06771/959031090','','56342','','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06741/98100','Poststelle@fa-gh.fin-rlp.de','www.finanzamt-sankt-goarshausen-sankt-goar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2739','Sankt Goarshausen-Sankt Goar ','Wellmicher Str. 79','56346','St. Goarshausen','06771/95900','06771/959031090','','56342','','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-gh.fin-rlp.de','www.finanzamt-sankt-goarshausen-sankt-goar.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2740','Simmern-Zell ','Brühlstraße 3','55469','Simmern','06761/8550','06761/85532053','','55464','440','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-si.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2741','Speyer-Germersheim ','Johannesstr. 9-12','67346','Speyer','06232/60170','06232/601733431','67343','67323','1309','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-sp.fin-rlp.de','www.finanzamt-speyer-germersheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2742','Trier ','Hubert-Neuerburg-Str. 1','54290','Trier','0651/93600','0651/936034900','','54207','1750u.1760','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-tr.fin-rlp.de','www.finanzamt-trier.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2743','Bernkastel-Wittlich ','Unterer Sehlemet 15','54516','Wittlich','06571/95360','06571/953613400','','54502','1240','55050000','902','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-wi.fin-rlp.de','www.finanzamt-bernkastel-wittlich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2744','Worms-Kirchheimbolanden ','Karlsplatz 6','67549','Worms','06241/30460','06241/304635060','67545','','','55050000','901','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR','Poststelle@fa-wo.fin-rlp.de','www.finanzamt-worms-kirchheimbolanden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2745','Simmern-Zell Aussenstelle Zell','Brühlstr. 3','55469','Simmern','06761/8550','06761/85532053','','55464','440','55050000','908','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06542/7090','Poststelle@fa-si.fin-rlp.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('7','2746','Pirmasens-Zweibrücken Aussenstelle Zweibrücken','Kaiserstr. 2','66955','Pirmasens','06331/7110','06331/71130950','66950','66925','1662','55050000','910','LRP GZ MAINZ','','','','8.00-17.00 MO-MI 8.00-18.00 DO 8.00-13.00 FR Telefon-Nr. Aussenstelle: 06332/80680','Poststelle@fa-ps.fin-rlp.de','www.finanzamt-pirmasens-zweibruecken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2801','Achern ','Allerheiligenstr. 10','77855','Achern','07841/6940','07841/694136','77843','77843','1260','66000000','66001518','BBK KARLSRUHE','66450050','88013009','SPARKASSE OFFENBURG-ORTENAU','MO-DO 8-12.30+13.30-15.30,DO-17.30,FR 8-12 H','poststelle@fa-achern.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2804','Donaueschingen ','Käferstr. 25','78166','Donaueschingen','0771/8080','0771/808359','78153','78153','1269','69400000','694 01501','BBK VILLINGEN-SCHWENNINGEN','69421020','6204700600','BW BANK DONAUESCHINGEN','MO-MI 8-16 UHR, DO 8-17.30 UHR, FR 8-12 UHR','poststelle@fa-donaueschingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2805','Emmendingen ','Bahnhofstr. 3','79312','Emmendingen','07641/4500','07641/450350','79305','79305','1520','68000000','680 01507','BBK FREIBURG IM BREISGAU','68050101','20066684','SPK FREIBURG-NOERDL BREISGA','MO-MI 7:30-15:30,DO 7:30-17:00,FR 7:30-12:00','poststelle@fa-emmendingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2806','Freiburg-Stadt ','Sautierstr. 24','79104','Freiburg','0761/2040','0761/2043295','79079','','','68000000','680 01501','BBK FREIBURG IM BREISGAU','68020020','4402818100','BW BANK FREIBURG BREISGAU','MO, DI, DO 7.30-16,MI 7.30-17.30, FR 7.30-12','poststelle@fa-freiburg-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2807','Freiburg-Land ','Stefan-Meier-Str. 133','79104','Freiburg','0761/2040','0761/2043424','79095','','','68000000','680 015 00','BBK FREIBURG IM BREISGAU','68090000','12222300','VOLKSBANK FREIBURG','ZIA: MO,DI,DO 8-16, MI 8-17:30, FR 8-12 UHR','poststelle@fa-freiburg-land.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2808','Kehl ','Ludwig-Trick-Str. 1','77694','Kehl','07851/8640','07851/864108','77676','77676','1640','66400000','664 01501','BBK FREIBURG EH OFFENBURG','66451862','-6008','SPK HANAUERLAND KEHL','MO,DI,MI 7.45-15.30, DO -17.30, FR -12.00UHR','poststelle@fa-kehl.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2809','Konstanz ','Bahnhofplatz 12','78462','Konstanz','07531/2890','07531/289312','78459','','','69400000','69001500','BBK VILLINGEN-SCHWENNINGEN','69020020','6604947900','BW BANK KONSTANZ','MO,DI,DO 7.30-15.30,MI 7.30-17.00,FR 7.30-12','poststelle@fa-konstanz.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2810','Lahr ','Gerichtstr. 5','77933','Lahr','07821/2830','07821/283100','','77904','1466','66000000','66001527','BBK KARLSRUHE','66450050','76103333','SPARKASSE OFFENBURG-ORTENAU','MO,DI,DO 7:30-16:00, MI 7:30-17:30, FR 7:30-12:00','poststelle@fa-lahr.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2811','Lörrach ','Luisenstr. 10 a','79539','Lörrach','07621/1730','07621/173245','79537','','','68000000','68301500','BBK FREIBURG IM BREISGAU','68320020','4602600100','BW BANK LOERRACH','MO-MI 7.00-15.30/DO 7.00-17.30/FR 7.00-12.00','poststelle@fa-loerrach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2812','Müllheim ','Goethestr. 11','79379','Müllheim','07631/18900','(07631)189-190','79374','79374','1461','68000000','680 01511','BBK FREIBURG IM BREISGAU','68351865','802 888 8','SPARKASSE MARKGRAEFLERLAND','MO-MI 7,30-15,30 DO 7,30-17,30 FR 7,30-12,00','poststelle@fa-muellheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2813','Titisee-Neustadt ','Goethestr. 5','79812','Titisee-Neustadt','07651/2030','07651/203110','','79812','12 69','68000000','680 015 10','BBK FREIBURG IM BREISGAU','68051004','4040408','SPK HOCHSCHWARZWALD T-NEUST','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.30','poststelle@fa-titisee-neustadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2814','Offenburg ','Zeller Str. 1- 3','77654','Offenburg','0781/9330','0781/9332444','77604','77604','1440','68000000','664 01500','BBK FREIBURG IM BREISGAU','66420020','4500000700','BW BANK OFFENBURG','MO-DO 7.30-15.30 DURCHGEHEND,MI -18.00,FR-12','poststelle@fa-offenburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2815','Oberndorf ','Brandeckerstr. 4','78727','Oberndorf','07423/8150','07423/815107','78721','78721','1240','69400000','694 01506','BBK VILLINGEN-SCHWENNINGEN','64250040','813 015','KR SPK ROTTWEIL','ZIA:MO,DI,DO 8-16,MI 8-17:30,FR 8-12 UHR','poststelle@fa-oberndorf.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2816','Bad Säckingen ','Werderstr. 5','79713','Bad Säckingen','07761/5660','07761/566126','79702','79702','1148','68000000','683 015 02','BBK FREIBURG IM BREISGAU','','','','MO,DI,DO 8-15.30, MI 8-17.30, FR 8-12 UHR','poststelle@fa-badsaeckingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2818','Singen ','Alpenstr. 9','78224','Singen','07731/8230','07731/823650','','78221','380','69000000','69001507','BBK VILL-SCHWEN EH KONSTANZ','69220020','6402000100','BW BANK SINGEN','MO-DO 7:30-15:30, MI bis 17:30, FR 7:30-12:00','poststelle@fa-singen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2819','Rottweil ','Körnerstr. 28','78628','Rottweil','0741/2430','0741/2432194','78612','78612','1252','69400000','69401505','BBK VILLINGEN-SCHWENNINGEN','64250040','136503','KR SPK ROTTWEIL','MO-MI 8-16, DO 8-18, FR 8-12 UHR','poststelle@fa-rottweil.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2820','Waldshut-Tiengen ','Bahnhofstr. 11','79761','Waldshut-Tiengen','07741/6030','07741/603213','79753','79753','201360','68000000','68301501','BBK FREIBURG IM BREISGAU','68452290','14449','SPARKASSE HOCHRHEIN','MO-MI 8-15.30,DO 8-17.30,FR 8-12 UHR','poststelle@fa-waldshut-tiengen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2821','Tuttlingen ','Zeughausstr. 91','78532','Tuttlingen','07461/980','07461/98303','','78502','180','69400000','69401502','BBK VILLINGEN-SCHWENNINGEN','64350070','251','KR SPK TUTTLINGEN','MO-MI8-15.30,DO8-17.30,FR8-12.00UHR','poststelle@fa-tuttlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2822','Villingen-Schwenningen ','Weiherstr. 7','78050','Villingen-Schwenningen','07721/923-0','07721/923-100','78045','','','69400000','69401500','BBK VILLINGEN-SCHWENNINGEN','','','','MO-MI 8-16UHR,DO 8-17.30UHR,FR 8-12UHR','poststelle@fa-villingen-schwenningen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2823','Wolfach ','Hauptstr. 55','77709','Wolfach','07834/9770','07834/977-169','77705','77705','1160','66400000','664 01502','BBK FREIBURG EH OFFENBURG','66452776','-31956','SPK WOLFACH','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-wolfach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2830','Bruchsal ','Schönbornstr. 1-5','76646','Bruchsal','07251/740','07251/742111','76643','76643','3021','66000000','66001512','BBK KARLSRUHE','66350036','50','SPK KRAICHGAU','SERVICEZENTRUM:MO-MI8-15:30DO8-17:30FR8-1200','poststelle@fa-bruchsal.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2831','Ettlingen ','Pforzheimer Str. 16','76275','Ettlingen','07243/5080','07243/508295','76257','76257','363','66000000','66001502','BBK KARLSRUHE','66051220','1043009','SPARKASSE ETTLINGEN','MO+DI 8-15.30,MI 7-15.30,DO 8-17.30,FR 8-12','poststelle@fa-ettlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2832','Heidelberg ','Kurfürsten-Anlage 15-17','69115','Heidelberg','06221/590','06221/592355','69111','','','67000000','67001510','BBK MANNHEIM','67220020','5302059000','BW BANK HEIDELBERG','ZIA:MO-DO 7.30-15.30, MI - 17.30, FR - 12.00','poststelle@fa-heidelberg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2833','Baden-Baden ','Stephanienstr. 13 + 15','76530','Baden-Baden','07221/3590','07221/359320','76520','','','66000000','66001516','BBK KARLSRUHE','66220020','4301111300','BW BANK BADEN-BADEN','MO,DI,DO 8-16 UHR,MI 8-17.30 UHR,FR 8-12 UHR','poststelle@fa-baden-baden.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2834','Karlsruhe-Durlach ','Prinzessenstr. 2','76227','Karlsruhe','0721/9940','0721/9941235','76225','76203','410326','66000000','66001503','BBK KARLSRUHE','','','','MO-DO 8-15.30,MI 8-17.30,FR 8-12','poststelle@fa-karlsruhe-durlach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2835','Karlsruhe-Stadt ','Schlossplatz 14','76131','Karlsruhe','0721/1560','(0721) 156-1000','','','','66000000','66001501','BBK KARLSRUHE','66020020','4002020800','BW BANK KARLSRUHE','MO-DO 7.30-15.30 MI -17.30 FR 7.30-12.00','poststelle@fa-karlsruhe-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2836','Bühl ','Alban-Stolz-Str. 8','77815','Bühl','07223/8030','07223/3625','77815','','','66000000','66001525','BBK KARLSRUHE','66220020','4301111300','BW BANK BADEN-BADEN','MO,DI,DO=8-16UHR, MI=8-17.30UHR,FR=8-12UHR','poststelle@fa-buehl.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2837','Mannheim-Neckarstadt ','L3, 10','68161','Mannheim','0621/2920','0621/292-1010','68150','','','67000000','67001500','BBK MANNHEIM','67020020','5104719900','BW BANK MANNHEIM','MO,DI,DO7.30-15.30,MI7.30-17.30,FR7.30-12.00','poststelle@fa-mannheim-neckarstadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2838','Mannheim-Stadt ','L3, 10','68161','Mannheim','0621/2920','2923640','68150','','','67000000','670 01500','BBK MANNHEIM','67020020','5104719900','BW BANK MANNHEIM','MO,DI,DO7.30-15.30,MI7.30.17.30,FR7.30-12.00','poststelle@fa-mannheim-stadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2839','Rastatt ','An der Ludwigsfeste 3','76437','Rastatt','07222/9780','07222/978330','76404','76404','1465','66000000','66001519','BBK KARLSRUHE','66020020','4150199000','BW BANK KARLSRUHE','MO-MI 8-15:30 UHR,DO 8-17:30 UHR,FR 8-12 UHR','poststelle@fa-rastatt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2840','Mosbach ','Pfalzgraf-Otto-Str. 5','74821','Mosbach','06261/8070','06261/807200','74819','','','62000000','62001502','BBK HEILBRONN, NECKAR','62030050','5501964000','BW BANK HEILBRONN','MO-DO 08.00-16.00 UHR, DO-17.30,FR-12.00 UHR','poststelle@fa-mosbach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2841','Pforzheim ','Moltkestr. 8','75179','Pforzheim','07231/1830','(07231)183-1111','75090','','','66000000','66001520','BBK KARLSRUHE','66620020','4812000000','BW BANK PFORZHEIM','MO-DO 7:30-15:30, DO bis 17:30, FR 7:30-12:00','poststelle@fa-pforzheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2842','Freudenstadt ','Musbacher Str. 33','72250','Freudenstadt','07441/560','07441/561011','','','','66000000','66001510','BBK KARLSRUHE','64251060','19565','KR SPK FREUDENSTADT','MO-MI 8.00-16.00,DO 8.00-17.30,FR 8.00-12.00','poststelle@fa-freudenstadt.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2843','Schwetzingen ','Schloss','68723','Schwetzingen','06202/810','(06202) 81298','68721','','','67000000','67001501','BBK MANNHEIM','67250020','25008111','SPK HEIDELBERG','ZIA:MO-DO 7.30-15.30,MI-17.30,FR.7.30-12.00','poststelle@fa-schwetzingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2844','Sinsheim ','Bahnhofstr. 27','74889','Sinsheim','07261/6960','07261/696444','74887','','','67000000','67001511','BBK MANNHEIM','','','','MO-DO 7:30-15:30, MI bis 17:30, FR 7:30-12 UHR','poststelle@fa-sinsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2845','Calw ','Klosterhof 1','75365','Calw','07051/5870','07051/587111','75363','','','66000000','66001521','BBK KARLSRUHE','60651070','1996','SPARKASSE PFORZHEIM CALW','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-calw.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2846','Walldürn ','Albert-Schneider-Str. 1','74731','Walldürn','06282/7050','06282/705101','74723','74723','1162','62000000','62001509','BBK HEILBRONN, NECKAR','67450048','8102204','SPK NECKARTAL-ODENWALD','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-wallduern.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2847','Weinheim ','Weschnitzstr. 2','69469','Weinheim','06201/6050','(06201) 605-220/299 ','69443','69443','100353','67000000','67001502','BBK MANNHEIM','67050505','63034444','SPK RHEIN NECKAR NORD','MO-MI 7.30-15.30 DO 7.30-17.30 FR 7.30-12','poststelle@fa-weinheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2848','Mühlacker ','Konrad-Adenauer-Platz 6','75417','Mühlacker','07041/8930','07041/893999','','75415','1153','66000000','660 015 22','BBK KARLSRUHE','66650085','961 000','SPARKASSE PFORZHEIM CALW','ZIA:MO-DO 8-12:30 13:30-15:30 DO bis 17:30 FR 8-12','poststelle@fa-muehlacker.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2849','Neuenbürg ','Wildbader Str. 107','75305','Neuenbürg','07082/7990','07082/799166','75301','75301','1165','66600000','66601503','BBK PFORZHEIM','66650085','998400','SPARKASSE PFORZHEIM CALW','MO-FR 7.30-12UHR,MO-MI 13-16UHR,DO 13-18UHR','poststelle@fa-neuenbuerg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2850','Aalen / Württemberg ','Bleichgartenstr. 17','73431','Aalen','(07361) 9578-0','(07361)9578-440','73428','','','63000000','614 01500','BBK ULM, DONAU','61450050','110036902','KREISSPARKASSE OSTALB','MO-MI 7.30-16.00,DO 7.30-18.00,FR 7.30-12.00','poststelle@fa-aalen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2851','Backnang ','Stiftshof 20','71522','Backnang','07191/120','07191/12221','71522','','','60000000','60201501','BBK STUTTGART','60250010','244','KR SPK WAIBLINGEN','MO,DI,DO7.30-16.00MI7.30-18.00FR7.30-12.00','poststelle@fa-backnang.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2852','Bad Mergentheim ','Schloss 7','97980','Bad Mergentheim','07931/5300','07931/530228','97962','97962','1233','62000000','620 01508','BBK HEILBRONN, NECKAR','67352565','25866','SPK TAUBERFRANKEN','MO-DO 7.30-15.30,MI-17.30 UHR,FR 7.30-12 UHR','poststelle@fa-badmergentheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2853','Balingen ','Jakob-Beutter-Str. 4','72336','Balingen','07433/970','07433/972099','72334','','','64000000','653 01500','BBK REUTLINGEN','65351260','24000110','SPK ZOLLERNALB','Mo-Mi 7:45-16:00,Do 7:45-17:30,Fr 7:45-12:30','poststelle@fa-balingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2854','Biberach ','Bahnhofstr. 11','88400','Biberach','07351/590','07351/59202','88396','','','63000000','63001508','BBK ULM, DONAU','65450070','17','KR SPK BIBERACH','MO,DI,DO 8-15.30, MI 8-17.30, FR 8-12 UHR','poststelle@fa-biberach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2855','Bietigheim-Bissingen ','Kronenbergstr. 13','74321','Bietigheim-Bissingen','07142/5900','07142/590199','74319','','','60000000','604 01501','BBK STUTTGART','60490150','427500001','VOLKSBANK LUDWIGSBURG','MO-MI(DO)7.30-15.30(17.30),FR 7.30-12.00 UHR','poststelle@fa-bietigheim-bissingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2856','Böblingen ','Talstr. 46','71034','Böblingen','(07031)13-01','07031/13-3200','71003','71003','1307','60300000','603 01500','BBK STUTTGART EH SINDELFING','60350130','220','KR SPK BOEBLINGEN','MO-MI 7.30-15.30,DO7.30-17.30,FR7.30-12.30','poststelle@fa-boeblingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2857','Crailsheim ','Schillerstr. 1','74564','Crailsheim','07951/4010','07951/401220','74552','74552','1252','62000000','620 01506','BBK HEILBRONN, NECKAR','62250030','282','SPARKASSE SCHWAEBISCH HALL','MO-DO:7.45-16.00,MI:-17.30,FR:7.45-12.30','poststelle@fa-crailsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2858','Ehingen ','Hehlestr. 19','89584','Ehingen','07391/5080','07391/508260','89572','89572','1251','63000000','630 01502','BBK ULM, DONAU','63050000','9 300 691','SPARKASSE ULM','Mo-Mi 7.30-15.30,Do 7.30-17.30,Fr 7.30-12.00','poststelle@fa-ehingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2859','Esslingen ','Entengrabenstr. 11','73728','Esslingen','0711/39721','0711/3972400','73726','','','61100000','61101500','BBK STUTTGART EH ESSLINGEN','61150020','902139','KR SPK ESSLINGEN-NUERTINGEN','Infothek Mo-Mi 7-15.30,Do-17.30, Fr 7-12 Uhr','poststelle@fa-esslingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2861','Friedrichshafen ','Ehlersstr. 13','88046','Friedrichshafen','07541/7060','07541/706111','88041','','','63000000','65001504','BBK ULM, DONAU','','','','MO-MI 8-15.30, DO 8-17.30, FR 8-12.30 Uhr','poststelle@fa-friedrichshafen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2862','Geislingen ','Schillerstr. 2','73312','Geislingen','07331/220','07331/22200','73302','73302','1253','60000000','61101504','BBK STUTTGART','61050000','6007203','KR SPK GOEPPINGEN','Mo-Mi 7-15:30, Do 7-17:30,Fr 7-12','poststelle@fa-geislingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2863','Göppingen ','Gartenstr. 42','73033','Göppingen','07161/63-0','07161/632935','','73004','420','60000000','61101503','BBK STUTTGART','61050000','1 023','KR SPK GOEPPINGEN','MO-MI.7-15.30 Uhr,DO.7-17.30 Uhr,FR.7-12 Uhr','poststelle@fa-goeppingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2864','Heidenheim ','Marienstr. 15','89518','Heidenheim','07321/380','07321/381528','89503','89503','1320','63000000','61401505','BBK ULM, DONAU','63250030','880433','KR SPK HEIDENHEIM','Mo-Mi 7.30-15.30 Do 7.30-17.30 Fr 7.30-12.30','poststelle@fa-heidenheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2865','Heilbronn ','Moltkestr. 91','74076','Heilbronn','07131/1041','07131/1043000','74064','','','62000000','620 01500','BBK HEILBRONN, NECKAR','62050000','123925','KR SPK HEILBRONN','Mo,Di,Do7:30-15:30,Mi7:30-17:30,Fr7:30-12:00','poststelle@fa-heilbronn.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2869','Kirchheim ','Alleenstr. 120','73230','Kirchheim','07021/5750','575258','73220','73220','1241','61100000','61101501','BBK STUTTGART EH ESSLINGEN','61150020','48317054','KR SPK ESSLINGEN-NUERTINGEN','KUNDENCENTER MO-MI 8-15.30,DO 8-17.30,FR8-12','poststelle@fa-kirchheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2870','Leonberg ','Schlosshof 3','71229','Leonberg','(07152) 15-1','07152/15333','71226','','','60000000','60301501','BBK STUTTGART','60350130','8619864','KR SPK BOEBLINGEN','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.30','poststelle@fa-leonberg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2871','Ludwigsburg ','Alt-Württ.-Allee 40 (Neubau)','71638','Ludwigsburg','07141/180','07141/182105','71631','','','60000000','604 01500','BBK STUTTGART','60450050','7 759','KREISSPARKASSE LUDWIGSBURG','MO-MI 8-15.30,DO 8-18.00,FR 8-12.00','poststelle@fa-ludwigsburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2874','Nürtingen ','Sigmaringer Str. 15','72622','Nürtingen','07022/7090','07022/709-120','72603','72603','1309','60000000','61101502','BBK STUTTGART','','','','MO-Mi 7.30-15.30 Do 7.30-17.30 Fr 7.30-12.00','poststelle@fa-nuertingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2876','Öhringen ','Haagweg 39','74613','Öhringen','07941/6040','07941/604400','74611','','','62000000','62001501','BBK HEILBRONN, NECKAR','62251550','40008','SPARKASSE HOHENLOHEKREIS','MO-DO 7.30-16.00UhrFR 7.30-12.00 Uhr','poststelle@fa-oehringen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2877','Ravensburg ','Broner Platz 12','88250','Weingarten','0751/4030','403-303','88248','','','65000000','650 015 00','BBK ULM EH RAVENSBURG','65050110','86 500 500','KR SPK RAVENSBURG','Mo,Di,Do 8-15.30Uhr,ZIA Mi 8-17.30,Fr8-12Uhr','poststelle@fa-ravensburg.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2878','Reutlingen ','Leonhardsplatz 1','72764','Reutlingen','07121/9400','07121/9401002','72705','72705','1543','64000000','64001500','BBK REUTLINGEN','64050000','64 905','KR SPK REUTLINGEN','Mo-Mi 7-15.30, Do 7-17.30, Fr 7-12.00 Uhr','poststelle@fa-reutlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2879','Riedlingen ','Kirchstr. 30','88499','Riedlingen','07371/1870','07371/1871000','88491','88491','1164','63000000','63001509','BBK ULM, DONAU','65450070','400 600','KR SPK BIBERACH','INFOST. MO-MI 7.30-15.30,DO-17.30,FR-12 UHR','poststelle@fa-riedlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2880','Tauberbischofsheim ','Dr.-Burger-Str. 1','97941','Tauberbischofsheim','09341/8040','09341/804244','97933','97933','1340','62000000','620 01507','BBK HEILBRONN, NECKAR','67332551','8282661100','BW BANK TAUBERBISCHOFSHEIM','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-tauberbischofsheim.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2881','Bad Saulgau ','Schulstr. 5','88348','Bad Saulgau','07581/504-0','07581/504499','88341','88341','1255','65000000','650 01501','BBK ULM EH RAVENSBURG','65351050','210058','LD BK KR SPK SIGMARINGEN','MO,DO,FR 8-12,DO 13.30-15.30UHR','poststelle@fa-badsaulgau.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2882','Schorndorf ','Johann-Philipp-Palm-Str. 28','73614','Schorndorf','07181/6010','07181/601499','73603','73603','1320','60000000','60201502','BBK STUTTGART','60250010','5014008','KR SPK WAIBLINGEN','MO,DI,DO 8-15.30,MI 8-17.30,FR 8-12.00','poststelle@fa-schorndorf.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2883','Schwäbisch Gmünd ','Augustinerstr. 6','73525','Schwäbisch Gmünd','(07171) 602-0','07171/602266','73522','','','63000000','61401501','BBK ULM, DONAU','61450050','440066604','KREISSPARKASSE OSTALB','MO,DI,DO 8-15.30 MI 8-17.30 FR 8-12.00 UHR','poststelle@fa-schwaebischgmuend.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2884','Schwäbisch Hall ','Bahnhofstr. 25','74523','Schwäbisch Hall','0791/752-0','0791/7521115','74502','74502','100260','62000000','62001503','BBK HEILBRONN, NECKAR','62250030','5070 011','SPARKASSE SCHWAEBISCH HALL','MO-MI 7.30-16.00 DO 7.30-17.30 FR 7.30-12.00','poststelle@fa-schwaebischhall.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2885','Sigmaringen ','Karlstr. 31','72488','Sigmaringen','07571/1010','07571/101300','72481','72481','1250','65300000','653 01501','BBK REUTLINGEN EH ALBSTADT','65351050','808 408','LD BK KR SPK SIGMARINGEN','MO-MI 7.45-15.30,DO 7.45-17.30,FR 7.45-12.00','poststelle@fa-sigmaringen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2886','Tübingen ','Steinlachallee 6 - 8','72072','Tübingen','07071/7570','07071/7574500','72005','72005','1520','64000000','64001505','BBK REUTLINGEN','','','','Mo-Do 7.30-15.30,Mi -17.30,Fr 7.30-13.00 Uhr','poststelle@fa-tuebingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2887','Überlingen (Bodensee) ','Mühlenstr. 28','88662','Überlingen','07551/8360','07551/836299','88660','','','69400000','69001501','BBK VILLINGEN-SCHWENNINGEN','69220020','6426155500','BW BANK SINGEN','Mo-Mi 8.00-15.30,Do 8.00-17.30,Fr 8.00-12.00','poststelle@fa-ueberlingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2888','Ulm ','Wagnerstr. 2','89077','Ulm','0731/1030','0731/103800','','89008','1860','63000000','63001500','BBK ULM, DONAU','63050000','30001','SPARKASSE ULM','MO-MI 7.30-15.30,DO 7.30-17.30,FR 7.30-12.00','poststelle@fa-ulm.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2889','Bad Urach ','Graf-Eberhard-Platz 7','72574','Bad Urach','07125/1580','(07125)158-300','72562','72562','1149','64000000','640 01501','BBK REUTLINGEN','64050000','300 346','KR SPK REUTLINGEN','MO-MI 7.30-15.30 DO 7.30-17.30 FR 7.30-12.00','poststelle@fa-badurach.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2890','Waiblingen ','Fronackerstr. 77','71332','Waiblingen','07151/9550','07151/955200','71328','','','60000000','602 01500','BBK STUTTGART','60250010','200 398','KR SPK WAIBLINGEN','INFOTHEK MO-DO 7.30-15.30,MI-17.30,FR-12.00','poststelle@fa-waiblingen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2891','Wangen ','Lindauer Str.37','88239','Wangen','07522/710','07522(714000)','88228','88228','1262','63000000','650 01502','BBK ULM, DONAU','65050110','218 153','KR SPK RAVENSBURG','MO-MI 8-15.30, DO 8-17.30, FR 8-12 UHR','poststelle@fa-wangen.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2892','Stuttgart IV ','Seidenstr.23','70174','Stuttgart','0711/66730','0711/66736060','70049','70049','106052','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','MO,MI,FR 8-12,MI 13.30-16 UHR','poststelle@fa-stuttgart4.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2893','Stuttgart I ','Rotebühlplatz 30','70173','Stuttgart','0711/66730','6673 - 5010','70049','70049','106055','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','Mo,Die,Do: 8-15.30, Mi: 8-17.30, Fr: 8-12.00','poststelle@fa-stuttgart1.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2895','Stuttgart II ','Rotebühlstr. 40','70178','Stuttgart','0711/66730','0711/66735610','','','','60000000','60001503','BBK STUTTGART','60050101','2065854','LANDESBANK BADEN-WUERTT','MO-DO:8-15.30 FR:8-12 MI:15.30-17.30','poststelle@fa-stuttgart2.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2896','Stuttgart Zentrales Konzernprüfungsamt','Hackstr. 86','70190','Stuttgart','0711/9251-6','0711/9251706','','','','','','','','','','','poststelle@zbp-stuttgart.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2897','Stuttgart III ','Rotebühlplatz 30','70173','Stuttgart','0711/66730','0711/66735710','','70049','106053','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','Mo-Do:8-15.30 Mi:8-17.30 Fr:8-12.00 Uhr','poststelle@fa-stuttgart3.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('8','2899','Stuttgart-Körpersch. ','Paulinenstr. 44','70178','Stuttgart','0711/66730','0711/66736525','70049','70049','106051','60000000','600 01503','BBK STUTTGART','60050101','2 065 854','LANDESBANK BADEN-WUERTT','MO-FR 8:00-12:00, MO-DO 13:00-15:30 Uhr','poststelle@fa-stuttgart-koerperschaften.fv.bwl.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3046','Potsdam-Stadt ','Am Bürohochhaus 2','14478','Potsdam','0331 287-0','0331 287-1515','','14429','80 03 22','16000000','16001501','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Potsdam-Stadt@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3047','Potsdam-Land ','Steinstr. 104 - 106','14480','Potsdam','0331 6469-0','0331 6469-200','','14437','90 01 45','16000000','16001502','BBK POTSDAM','','','','täglich außer Mi: 08:00-12:30 Uhr, zusätzlich Di: 14:00-17:00 Uhr','poststelle.FA-Potsdam-Land@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3048','Brandenburg ','Magdeburger Straße 46','14770','Brandenburg','03381 397-100','03381 397-200','','','','16000000','16001503','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Brandenburg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3049','Königs Wusterhausen ','Weg am Kreisgericht 9','15711','Königs Wusterhausen','03375 275-0','03375 275-103','','','','16000000','16001505','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Koenigs-Wusterhausen@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3050','Luckenwalde ','Industriestraße 2','14943','Luckenwalde','03371 606-0','03371 606-200','','','','16000000','16001504','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Luckenwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3051','Nauen ','Ketziner Straße 3','14641','Nauen','03321 412-0','03321 412-888','','14631','11 61','16000000','16001509','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Nauen@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3052','Kyritz ','Perleberger Straße 1 - 2','16866','Kyritz','033971 65-0','033971 65-200','','','','16000000','16001507','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Kyritz@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3053','Oranienburg ','Heinrich-Grüber-Platz 3','16515','Oranienburg','03301 857-0','03301 857-334','','','','16000000','16001508','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Oranienburg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3054','Pritzwalk ','Freyensteiner Chaussee 10','16928','Pritzwalk','03395 757-0','03395 302110','','','','16000000','16001506','BBK POTSDAM','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Pritzwalk@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3056','Cottbus ','Vom-Stein-Straße 29','3050','Cottbus','0355 4991-4100','0355 4991-4150','','3004','10 04 53','18000000','18001501','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Cottbus@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3057','Calau ','Springteichallee 25','3205','Calau','03541 83-0','03541 83-100','','3201','11 71','18000000','18001502','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Calau@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3058','Finsterwalde ','Leipziger Straße 61 - 67','3238','Finsterwalde','03531 54-0','03531 54-180','','3231','11 50','18000000','18001503','BBK COTTBUS','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Finsterwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3061','Frankfurt (Oder) ','Müllroser Chaussee 53','15236','Frankfurt (Oder)','0335 560-1399','0335 560-1202','','','','17000000','17001502','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Frankfurt-Oder@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3062','Angermünde ','Jahnstraße 49','16278','Angermünde','03331 267-0','03331 267-200','','','','17000000','17001500','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Angermuende@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3063','Fürstenwalde ','Beeskower Chaussee 12','15517','Fürstenwalde','03361 595-0','03361 2198','','','','17000000','17001503','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Fuerstenwalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3064','Strausberg ','Prötzeler Chaussee 12 A','15344','Strausberg','03341 342-0','03341 342-127','','','','17000000','17001504','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Strausberg@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('12','3065','Eberswalde ','Tramper Chaussee 5','16225','Eberswalde','03334 66-2000','03334 66-2001','','','','17000000','17001501','BBK FRANKFURT (ODER)','','','','Mo, Mi, Do: 08:00-15:00 Uhr, Di: 08:00-17:00 Uhr, Fr: 08:00-13:30 Uhr','poststelle.FA-Eberswalde@fa.brandenburg.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3101','Magdeburg I ','Tessenowstraße 10','39114','Magdeburg','0391 885-29','0391 885-1400','','39014','39 62','81000000','810 015 06','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-md1.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3102','Magdeburg II ','Tessenowstraße 6','39114','Magdeburg','0391 885-12','0391 885-1000','','39006','16 63','81000000','810 015 07','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-md2.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3103','Genthin ','Berliner Chaussee 29 b','39307','Genthin','03933 908-0','03933 908-499','','39302','13 41','81000000','810 015 08','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 09.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-gtn.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3104','Halberstadt ','R.-Wagner-Straße 51','38820','Halberstadt','03941 33-0','03941 33-199','','38805','15 26','81000000','268 015 01','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-hbs.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3105','Haldensleben ','Jungfernstieg 37','39340','Haldensleben','03904 482-0','03904 482-200','','39332','10 02 09','81000000','810 015 10','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-hdl.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3106','Salzwedel ','Buchenallee 2','29410','Salzwedel','03901 857-0','03901 857-100','','29403','21 51','81000000','810 015 05','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-saw.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3107','Staßfurt ','Atzendorfer Straße 20','39418','Staßfurt','03925 980-0','03925 980-101','','39404','13 55','81000000','810 015 12','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.30 - 18.00 Uhr','poststelle@fa-sft.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3108','Stendal ','Scharnhorststraße 87','39576','Stendal','03931 57-1000','03931 57-2000','','39551','10 11 31','81000000','810 015 13','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-sdl.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3109','Wernigerode ','Gustav-Petri-Straße 14','38855','Wernigerode','03943 657-0','03943 657-150','','38842','10 12 51','81000000','268 015 03','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 09.00 - 12.00 Uhr, Do.: 14.00 - 18.00 Uhr','poststelle@fa-wrg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3110','Halle-Süd ','Blücherstraße 1','6122','Halle','0345 6923-5','0345 6923-600','6103','','','80000000','800 015 02','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00','poststelle@fa-ha-s.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3111','Halle-Nord ','Blücherstraße 1','6122','Halle','0345 6924-0','0345 6924-400','6103','','','80000000','800 015 01','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00','poststelle@fa-ha-n.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3112','Merseburg ','Bahnhofstraße 10','6217','Merseburg','03461 282-0','03461 282-199','','6203','13 51','80000000','800 015 09','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-msb.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3113','Bitterfeld ','Röhrenstraße 33','6749','Bitterfeld','03493 347-0','03493 347-247','','6732','12 64','80000000','805 015 05','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-btf.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3114','Dessau ','Kühnauer Straße 166','6846','Dessau','0340 6513-0','0340 6513-403','','6815','18 25','80000000','805 015 26','BBK HALLE','','','','Mo. - Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-des.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3115','Wittenberg ','Dresdener Straße 40','6886','Wittenberg','03491 430-0','03491 430-113','','6872','10 02 54','80000000','805 015 07','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-wbg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3116','Köthen ','Zeppelinstraße 15','6366','Köthen','03496 44-0','03496 44-2900','','6354','14 52','80000000','805 015 06','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr','poststelle@fa-kot.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3117','Quedlinburg ','Adelheidstraße 2','6484','Quedlinburg','03946 976-0','03946 976-400','','6472','14 20','81000000','268 015 02','BBK MAGDEBURG','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 17.30 Uhr','poststelle@fa-qlb.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3118','Eisleben ','Bahnhofsring 10 a','6295','Eisleben','03475 725-0','03475 725-109','6291','','','80000000','800 015 08','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-eil.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3119','Naumburg ','Oststraße 26/26 a','6618','Naumburg','03445 753-0','03445 753-999','','6602','12 51','80000000','800 015 27','BBK HALLE','','','','Mo., Di., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 13.00 - 18.00 Uhr','poststelle@fa-nbg.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3120','Zeitz ','Friedensstraße 80','6712','Zeitz','03441 864-0','03441 864-480','','6692','12 08','80000000','800 015 04','BBK HALLE','','','','Mo., Do., Fr.: 08.00 - 12.00 Uhr, Di.: 08.00 - 18.00 Uhr','poststelle@fa-ztz.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('15','3121','Sangerhausen ','Alte Promenade 27','6526','Sangerhausen','03464 539-0','03464 539-539','','6512','10 12 24','80000000','800 015 25','BBK HALLE','','','','Di., Do., Fr.: 09.00 - 12.00 Uhr, Di.: 14.00 - 18.00 Uhr, Do.: 14.00 -','poststelle@fa-sgh.ofd.mf.lsa-net.de','http://www.finanzamt.sachsen-anhalt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3201','Dresden I ','Lauensteiner Str. 37','1277','Dresden','0351 2567-0','0351 2567-111','1264','','','85000000','85001502','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-dresden1.smf.sachsen.de','http://www.Finanzamt-Dresden-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3202','Dresden II ','Gutzkowstraße 10','1069','Dresden','0351 4655-0','0351 4655-269','1056','','','85000000','85001503','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr, Di 14:00-18:00, Do 14:00-18:00 Uhr','poststelle@fa-dresden2.smf.sachsen.de','http://www.Finanzamt-Dresden-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3203','Dresden III ','Rabenerstr.1','1069','Dresden','0351 4691-0','0351 4717 369','','1007','120641','85000000','85001504','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-dresden3.smf.sachsen.de','http://www.Finanzamt-Dresden-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3204','Bautzen ','Wendischer Graben 3','2625','Bautzen','03591 488-0','03591 488-888','2621','','','85000000','85001505','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-17:00, Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-bautzen.smf.sachsen.de','http://www.Finanzamt-Bautzen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3205','Bischofswerda ','Kirchstraße 25','1877','Bischofswerda','03594 754-0','03594 754-444','','1871','1111','85000000','85001506','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-17:00, Mi 8:00-15:30, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-bischofswerda.smf.sachsen.de','http://www.Finanzamt-Bischofswerda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3206','Freital ','Coschützer Straße 8-10','1705','Freital','0351 6478-0','0351 6478-428','','1691','1560','85000000','85001507','BBK DRESDEN','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-freital.smf.sachsen.de','http://www.Finanzamt-Freital.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3207','Görlitz ','Sonnenstraße 7','2826','Görlitz','03581 875-0','03581 875-100','','2807','300235','85000000','85001512','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-goerlitz.smf.sachsen.de','http://www.Finanzamt-Goerlitz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3208','Löbau ','Georgewitzer Str.40','2708','Löbau','03585 455-0','03585 455-100','','2701','1165','85000000','85001509','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-loebau.smf.sachsen.de','http://www.Finanzamt-Loebau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3209','Meißen ','Hermann-Grafe-Str.30','1662','Meißen','03521 745-30','03521 745-450','','1651','100151','85000000','85001508','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr Di 13:00-18:00, Do 13:00-17:00 Uhr','poststelle@fa-meissen.smf.sachsen.de','http://www.Finanzamt-Meissen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3210','Pirna ','Emil-Schlegel-Str. 11','1796','Pirna','03501 551-0','03501 551-201','','1781','100143','85000000','85001510','BBK DRESDEN','','','','Mo - Fr 8:00-12:00 Uhr, Di 13:30-18:00, Do 13:30-17:00 Uhr','poststelle@fa-pirna.smf.sachsen.de','http://www.Finanzamt-Pirna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3211','Riesa ','Stahlwerkerstr.3','1591','Riesa','03525 714-0','03525 714-133','','1571','24','85000000','85001511','BBK DRESDEN','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00 , Fr 8:00-12:00 Uhr','poststelle@fa-riesa.smf.sachsen.de','http://www.Finanzamt-Riesa.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3213','Hoyerswerda ','Pforzheimer Platz 1','2977','Hoyerswerda','03571 460-0','03571 460-115','','2961','1161/1162 ','85000000','85001527','BBK DRESDEN','','','','Mo 7:30-15:30, Di 7:30-17:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-hoyerswerda.smf.sachsen.de','http://www.Finanzamt-Hoyerswerda.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3214','Chemnitz-Süd ','Paul-Bertz-Str. 1','9120','Chemnitz','0371 279-0','0371 227065','9097','','','87000000','87001501','BBK CHEMNITZ','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-13:00, Do 8:00-18:00, Fr 8:00-13:00 Uhr','poststelle@fa-chemnitz-sued.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3215','Chemnitz-Mitte ','August-Bebel-Str. 11/13','9113','Chemnitz','0371 467-0','0371 415830','9097','','','87000000','87001502','BBK CHEMNITZ','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-14:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-chemnitz-mitte.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3216','Chemnitz-Land ','Reichenhainer Str. 31-33','9126','Chemnitz','0371 5360-0','0371 5360-317','9097','','','87000000','87001503','BBK CHEMNITZ','','','','täglich 8:00-12:00, Di 13:30-17.00, Do 13:30-18:00 Uhr','poststelle@fa-chemnitz-land.smf.sachsen.de','http://www.Finanzamt-Chemnitz-Land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3217','Annaberg ','Magazingasse 16','9456','Annaberg-B.','03733 4270','03733 427-217','','9453','100631','87000000','87001504','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-annaberg.smf.sachsen.de','http://www.Finanzamt-Annaberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3218','Schwarzenberg ','Karlsbader Str.23','8340','Schwarzenberg','03774 161-0','03774 161-100','','8332','1209','87000000','87001505','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-schwarzenberg.smf.sachsen.de','http://www.Finanzamt-Schwarzenberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3219','Auerbach ','Schulstraße 3, Haus 1','8209','Auerbach','03744 824-0','03744 824-200','','8202','10132','87000000','87001506','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-12:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-aucherbach.smf.sachsen.de','http://www.Finanzamt-Auerbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3220','Freiberg ','Brückenstr.1','9599','Freiberg','03731 379-0','03731 379-999','9596','','','87000000','87001507','BBK CHEMNITZ','','','','Mo - Fr 7:30-12:30, Mo 13:30-15:30, Di 13:00-18:00, Mi 13:30-15:30, Do 13:00-17:00 Uhr','poststelle@fa-freiberg.smf.sachsen.de','http://www.Finanzamt-Freiberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3221','Hohenstein-Ernstthal ','Schulstraße 34','9337','Hohenstein-E.','03723 745-0','03723 745-399','','9332','1246','87000000','87001510','BBK CHEMNITZ','','','','Mo - Fr 8:00-12:00, Mo 12:30-15:30, Di 12:30-18:00, Do 12:30-17:00','poststelle@fa-hohenstein-ernstthal.smf.sachsen.de','http://www.Finanzamt-Hohenstein-Ernstthal.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3222','Mittweida ','Robert-Koch-Str. 17','9648','Mittweida','03727 987-0','03727 987-333','','9641','1157','87000000','87001509','BBK CHEMNITZ','','','','Mo 7:30-15:00, Di 7:30-18:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-mittweida.smf.sachsen.de','http://www.Finanzamt-Mittweida.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3223','Plauen ','Europaratstraße 17','8523','Plauen','03741 10-0','03741 10-2000','','8507','100384','87000000','87001512','BBK CHEMNITZ','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-plauen.smf.sachsen.de','http://www.Finanzamt-Plauen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3224','Stollberg ','HOHENSTEINER STRASSE 54','9366','Stollberg','037296 522-0','037296 522-199','','9361','1107','87000000','87001508','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-17:00, Mi 7:30-13:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-stollberg.smf.sachsen.de','http://www.Finanzamt-Stollberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3226','Zwickau-Stadt ','Dr.-Friedrichs-Ring 21','8056','Zwickau','0375 3529-0','0375 3529-444','','8070','100452','87000000','87001513','BBK CHEMNITZ','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-12:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-zwickau-stadt.smf.sachsen.de','http://www.Finanzamt-Zwickau-Stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3227','Zwickau-Land ','Äußere Schneeberger Str. 62','8056','Zwickau','0375 4440-0','0375 4440-222','','8067','100150','87000000','87001514','BBK CHEMNITZ','','','','Mo 8:00-15:30, Di 8:00-18:00, Mi 8:00-15:30, Do 8:00-17:00, Fr 8:00-12:00 Uhr','poststelle@fa-zwickau-land.smf.sachsen.de','http://www.Finanzamt-Zwickau-Land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3228','Zschopau ','August-Bebel-Str.17','9405','Zschopau','03725 293-0','03725 293-111','','9402','58','87000000','87001515','BBK CHEMNITZ','','','','Mo7:30-12:00/13:00-16:30,Di 7:30-12:00/13:00-18:00Mi u. Fr 7:30-13:00, Do 7:30-12:00/13:00-18:00 Uhr','poststelle@fa-zschopau.smf.sachsen.de','http://www.Finanzamt-Zschopau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3230','Leipzig I ','Wilhelm-Liebknecht-Platz 3/4','4105','Leipzig','0341 559-0','0341 559-1540','','4001','100105','86000000','86001501','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig1.smf.sachsen.de','http://www.Finanzamt-Leipzig-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3231','Leipzig II ','Erich-Weinert-Str. 20','4105','Leipzig','0341 559-0','0341 559-2505','','4001','100145','86000000','86001502','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig2.smf.sachsen.de','http://www.Finanzamt-Leipzig-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3232','Leipzig III ','Wilhelm-Liebknecht-Platz 3/4','4105','Leipzig','0341 559-0','0341 559-3640','','4002','100226','86000000','86001503','BBK LEIPZIG','','','','Mo 7:30-14:00, Di 7:30-18:00, Mi 7:30-14:00, Do 7:30-18:00, Fr 7:30-12:00 Uhr','poststelle@fa-leipzig3.smf.sachsen.de','http://www.Finanzamt-Leipzig-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3235','Borna ','Brauhausstr.8','4552','Borna','03433 872-0','03433 872-255','','4541','1325','86000000','86001509','BBK LEIPZIG','','','','Mo 8:00-15:00, Di 8:00-18:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-borna.smf.sachsen.de','http://www.Finanzamt-Borna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3236','Döbeln ','Burgstr.31','4720','Döbeln','03431 653-30','03431 653-444','','4713','2346','86000000','86001507','BBK LEIPZIG','','','','Mo 7:30-15:30, Di 7:30-18:00, Mi 7:30-13:00, Do 7:30-17:00, Fr 7:30-12:00 Uhr','poststelle@fa-doebeln.smf.sachsen.de','http://www.Finanzamt-Doebeln.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3237','Eilenburg ','Walther-Rathenau-Straße 8','4838','Eilenburg','03423 660-0','03423 660-460','','4831','1133','86000000','86001506','BBK LEIPZIG','','','','Mo 8:00-16:00, Di 8:00-18:00, Mi 8:00-14:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-eilenburg.smf.sachsen.de','http://www.Finanzamt-Eilenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3238','Grimma ','Lausicker Straße 2','4668','Grimma','03437 940-0','03437 940-500','','4661','1126','86000000','86001508','BBK LEIPZIG','','','','Mo 7:30-15:00, Di 7:30-18:00, Mi 7:30-13:30, Do 7:30-17:00, Fr 7:30-12:00 Uhr','poststelle@fa-grimma.smf.sachsen.de','http://www.Finanzamt-Grimma.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('14','3239','Oschatz ','Dresdener Str.77','4758','Oschatz','03435 978-0','03435 978-366','','4752','1265','86000000','86001511','BBK LEIPZIG','','','','Mo 8:00-16:00, Di 8:00-17:00, Mi 8:00-15:00, Do 8:00-18:00, Fr 8:00-12:00 Uhr','poststelle@fa-oschatz.smf.sachsen.de','http://www.Finanzamt-Oschatz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4071','Malchin ','Schratweg 33','17139','Malchin','03994/6340','03994/634322','','17131','1101','15000000','15001511','BBK NEUBRANDENBURG','','','','Mo Di Fr 08-12 Uhr Di 13-17 Uhr und Do 13-16 UhrMittwoch geschlossen','poststelle@fa-mc.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4072','Neubrandenburg ','Neustrelitzer Str. 120','17033','Neubrandenburg','0395/380 1000','0395/3801059','','17041','110164','15000000','15001518','BBK NEUBRANDENBURG','','','','Mo Di Do Fr 08-12 Uhr und Di 13.00-17.30 Uhr Mittwoch geschlossen','poststelle@fa-nb.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4074','Pasewalk ','Torgelower Str. 32','17309','Pasewalk','(03973) 224-0','03973/2241199','','17301','1102','15000000','15001512','BBK NEUBRANDENBURG','','','','Mo bis Fr 09.00-12.00 Uhr Di 14.00-18.00 Uhr','poststelle@fa-pw.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4075','Waren ','Einsteinstr. 15','17192','Waren (Müritz)','03991/1740','(03991)174499','','17183','3154','15000000','15001515','BBK NEUBRANDENBURG','','','','Mo-Mi 08.00-16.00 Uhr Do 08.00-18.00 Uhr Fr 08.-13.00 Uhr','poststelle@fa-wrn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4079','Rostock ','Möllner Str. 13','18109','Rostock','(0381)7000-0','(0381)7000444','','18071','201062','13000000','13001508','BBK ROSTOCK','','','','Mo Di Fr 8.30-12.00 Di 13.30-17.00 Do 13.30-16.00','poststelle@fa-hro.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4080','Wismar ','Philosophenweg 1','23970','Wismar','03841444-0','03841/444222','','','','14000000','14001516','BBK SCHWERIN','','','','Mo Di Fr 08.00-12.00 Uhr Di Do 14.00-17.00 Uhr Mittwoch geschlossen','poststelle@fa-wis.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4081','Ribnitz-Damgarten ','Sandhufe 3','18311','Ribnitz-Damgarten','(03821)884-0','(03821)884140','','18301','1061','13000000','13001510','BBK ROSTOCK','','','','MO Di Mi DO 08.30-12.00 UHR DI 13.00-17.00 UHR Freitag geschlossen','poststelle@fa-rdg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4082','Stralsund ','Lindenstraße 136','18435','Stralsund','03831/3660','(03831)366245 / 188 ','','18409','2241','13000000','13001513','BBK ROSTOCK','','','','Mo Di Do Fr 08.00-12.00 Uhr Di 14.00 - 18.00 UhrMittwoch geschlossen','poststelle@fa-hst.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4083','Bergen ','Wasserstr. 15 d','18528','Bergen (Rügen)','03838/4000','03838/22217','18522','18522','1242','13000000','13001512','BBK ROSTOCK','','','','Mo Di Do Fr 8.30-12.00 Di 13.00-18.00 Mittwoch geschlossen','poststelle@fa-brg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4084','Greifswald ','Am Gorzberg Haus 11','17489','Greifswald','03834/5590','03834-559315/316','17462','17462','3254','15000000','15001528','BBK NEUBRANDENBURG','','','','Mo Di Do Fr 8.30-12.00 Uhr Di 13.00-17.30 Uhr Mittwoch geschlossen','poststelle@fa-hgw.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4085','Wolgast ','Pestalozzistr. 45','17438','Wolgast','03836/254-0','03836/254300 /254100','','17431','1139','15000000','15001529','BBK NEUBRANDENBURG','','','','Mo Di Mi Do Fr 08.00-12.00 Uhr','poststelle@fa-wlg.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4086','Güstrow ','Klosterhof 1','18273','Güstrow','03843/2620','03843/262111','18271','','','13000000','13001501','BBK ROSTOCK','','','','Mo-Do 09.00-12.00 Uhr Do 13.00-18.00 Uhr Freitag geschlossen','poststelle@fa-gue.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4087','Hagenow ','Steegener Chaussee 8','19230','Hagenow','03883/6700','03883 670216 /670217','','19222','1242','14000000','14001504','BBK SCHWERIN','','','','Mo Di Do Fr 08.30-12.00 Di 13.00-17.30 Mittwoch geschlossen','poststelle@fa-hgn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4089','Parchim ','Ludwigsluster Chaussee 5','19370','Parchim','03871/4650','03871/443131','','19363','1351','14000000','14001506','BBK SCHWERIN','','','','Mo Di Mi 08.30-15.00 Uhr Do 08.30-18.00 Uhr Fr 08.30-13.00 Uhr','poststelle@fa-pch.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('13','4090','Schwerin ','Johannes-Stelling-Str.9-11','19053','Schwerin','0385/54000','0385/5400300','','19091','160131','14000000','14001502','BBK SCHWERIN','','','',' Di Do Fr 08.30 - 12.00 Uhr Mo 13.00 - 16.00 Uhr Do 14.00','poststelle@fa-sn.ofd-hro.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4151','Erfurt ','Mittelhäuser Str. 64f','99091','Erfurt','(0361)378-00','0361/3782800','','99001','100121','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','DI. 8- 12/ 13.30 -18 MI./FR. 8 - 12 UHR','poststelle@finanzamt-erfurt.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4152','Sömmerda ','Uhlandstrasse 3','99610','Sömmerda','03634/363-0','03634/363200','','99609','100','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 8-16 UHR DI 8-18,FR 8-12 UHR','poststelle@finanzamt-soemmerda.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4153','Weimar ','Jenaer Str.2a','99425','Weimar','03643/5500','(03643)903811','','99421','3676','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO,MI,DO 8-15.30 UHR DI 8-18,FR 8-12 UHR','poststelle@finanzamt-weimar.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4154','Ilmenau ','Wallgraben 1','98693','Ilmenau','(03677) 861-0','03677/861111','','98686','100754','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO,MI 8-15.30 UHR, DI 8-18 UHR DO 8-16 UHR, FR 8-12 UHR','poststelle@finanzamt-ilmenau.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4155','Eisenach ','Ernst-Thaelmann-Str. 70','99817','Eisenach','03691/687-0','03691/687250','','99804','101454','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO-FR: 8-12 UHR, MO-MI: 13-16 UHR, DO: 13-18 UHR','poststelle@finanzamt-eisenach.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4156','Gotha ','Reuterstr. 2a','99867','Gotha','(03621)33-0','03621/332000','','99853','100301','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO - MI 8-15.30 UHR DO 8-18,FR 8-12 UHR','poststelle@finanzamt-gotha.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4157','Mühlhausen ','Martinistr. 22','99974','Mühlhausen','(03601)456-0','03601/456100','','99961','1155','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 7.30-15 UHR DI.7.30-18,FR.7.30-12','poststelle@finanzamt-muehlhausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4158','Nordhausen ','Gerhart-Hauptmann-Str. 3','99734','Nordhausen','03631/427-0','03631/427174','','99729','1120','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO,DI,MI 8-12, 13.30-16 UHR DO 8-12,14-18 FR 8-12 UHR','poststelle@finanzamt-nordhausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4159','Sondershausen ','Schillerstraße 6','99706','Sondershausen','(03632)742-0','03632/742555','','99702','1265','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO/MI/DO 8-15.30 UHR DI 8-18, FR 8-12 UHR','poststelle@finanzamt-sondershausen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4160','Worbis ','Bahnhofstr. 18','37339','Worbis','036074/37-0','036074/37219','','37334','173','82050000','3001111628','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-worbis.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4161','Gera ','Hermann-Drechsler-Str.1','7548','Gera','0365/639-0','0365/6391491','','7490','3044','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO,MI 7.30-15 DI,DO 7.30- 18 UHR FR 7.30-12 UHR','poststelle@finanzamt-gera.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4162','Jena ','Leutragraben 8','7743','Jena','(03641)378-0','03641/378653','','7740','500','82050000','3001111602','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 8-15.30 DO 8-18 FR 8-12.00UHR','poststelle@finanzamt-jena.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4163','Rudolstadt ','Mörlaer Str. 2','7407','Rudolstadt','(03672)443-0','(03672)443100','','7391','100155','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-12, 13-15 DO 7.30-12, 13-18 UHR FR 7.30-12 UHR','poststelle@finanzamt-rudolstadt.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4164','Greiz ','Rosa-Luxemburg-Str. 23','7973','Greiz','03661/700-0','03661/700300','','7962','1365','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO/DI/MI 8-16UHR DO 8-18,FR 8-12UHR','poststelle@finanzamt-greiz.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4165','Pößneck ','Gerberstr. 65','7381','Pößneck','(03647)446-0','(03647)446430','','7372','1253','82050000','3001111578','LD BK HESS-THUER GZ ERFURT','','','','MO-FR 8-12 MO,MI,DO 13-15 UHR DI 13-18 UHR','poststelle@finanzamt-poessneck.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4166','Altenburg ','Wenzelstr. 45','4600','Altenburg','03447/593-0','03447/593200','','4582','1251','82050000','3001111511','LD BK HESS-THUER GZ ERFURT','','','','MO,MI,DO 7.30-15.30 DI 7.30-18 UHR FR 7.30-12 UHR','poststelle@finanzamt-altenburg.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4168','Bad Salzungen ','August-Bebel-Str.2','36433','Bad Salzungen','(03695)668-0','03695/622496','','36421','1153','82050000','3001111586','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-badsalzungen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4169','Meiningen ','Charlottenstr. 2','98617','Meiningen','03693/461-0','(03693)461322','','98606','100661','82050000','3001111610','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15 UHR DO 7.30-18,FR 7.30-12','poststelle@finanzamt-meiningen.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4170','Sonneberg ','Köppelsdorfer Str.86','96515','Sonneberg','03675/884-0','03675/884254','','96502','100241','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO-MI 7.30-15.00 UHR DO 7.30-18 FR 7.30-12','poststelle@finanzamt-sonneberg.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('16','4171','Suhl ','Karl-Liebknecht-Str. 4','98527','Suhl','03681/73-0','03681/733512','','98490','100153','82050000','3001111685','LD BK HESS-THUER GZ ERFURT','','','','MO - MI 8-16 UHR, DO 8-13 u. 14-18 UHR , FR 8-12 UHR','poststelle@finanzamt-suhl.thueringen.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5101','Dinslaken ','Schillerstr. 71','46535','Dinslaken','02064/445-0','0800 10092675101','','46522','100220','35000000','35201501','BBK DUISBURG','35251000','100123','SPK DINSLAKEN-VOERDE-HUENXE','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5101.fin-nrw.de','www.finanzamt-Dinslaken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5102','Viersen ','Eindhovener Str. 71','41751','Viersen','02162/955-0','0800 10092675102','','41726','110263','31000000','31001503','BBK MOENCHENGLADBACH','32050000','59203406','SPARKASSE KREFELD','Mo-Fr 8:30 bis 12:00 Uhr,Di auch 13:30 bis 15:00 Uhr,und nach Vereinbarung','Service@FA-5102.fin-nrw.de','www.finanzamt-Viersen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5103','Düsseldorf-Altstadt ','Kaiserstr. 52','40479','Düsseldorf','0211/4974-0','0800 10092675103','','40001','101021','30000000','30001504','BBK DUESSELDORF','30050110','10124006','ST SPK DUESSELDORF','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5103.fin-nrw.de','www.finanzamt-Duesseldorf-Altstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5105','Düsseldorf-Nord ','Roßstr. 68','40476','Düsseldorf','0211/4496-0','0800 10092675105','','40403','300314','30000000','30001501','BBK DUESSELDORF','30050110','10124501','ST SPK DUESSELDORF','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5105.fin-nrw.de','www.finanzamt-Duesseldorf-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5106','Düsseldorf-Süd ','Kruppstr.110- 112','40227','Düsseldorf','0211/779-9','0800 10092675106','','40001','101025','30000000','30001502','BBK DUESSELDORF','30050110','10125003','ST SPK DUESSELDORF','Mo-Fr 8.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5106.fin-nrw.de','www.finanzamt-Duesseldorf-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5107','Duisburg-Hamborn ','Hufstr. 25','47166','Duisburg','0203/5445-0','0800 10092675107','','47142','110264','35000000','35001502','BBK DUISBURG','','','','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5107.fin-nrw.de','www.finanzamt-Duisburg-Hamborn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5109','Duisburg-Süd ','Landfermannstr 25','47051','Duisburg','0203/3001-0','0800 10092675109','','47015','101502','35000000','35001500','BBK DUISBURG','35050000','200403020','SPK DUISBURG','Mo-Fr 08:30 Uhr - 12:00 Uhr,Di auch 13:30 Uhr - 15:00 Uhr','Service@FA-5109.fin-nrw.de','www.finanzamt-Duisburg-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5110','Essen-Nord ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675110','','45011','101155','36000000','36001500','BBK ESSEN','36050105','275008','SPARKASSE ESSEN','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5110.fin-nrw.de','www.finanzamt-Essen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5111','Essen-Ost ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675111','45116','45012','101262','36000000','36001501','BBK ESSEN','36050105','261800','SPARKASSE ESSEN','Mo-Fr,Di','Service@FA-5111.fin-nrw.de','www.finanzamt-Essen-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5112','Essen-Süd ','Altendorfer Str. 129','45143','Essen','0201/1894-0','0800 10092675112','','45011','101145','36000000','36001502','BBK ESSEN','36050105','203000','SPARKASSE ESSEN','Mo-Fr 08.30-12.00 Uhr, Di auch 13.30-15.00 Uhr, und nach Vereinbarung','Service@FA-5112.fin-nrw.de','www.finanzamt-Essen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5113','Geldern ','Gelderstr 32','47608','Geldern','02831/127-0','0800 10092675113','','47591','1163','32000000','32001502','BBK MOENCHENGLADBACH EH KRE','32051370','112011','SPARKASSE GELDERN','Montag - Freitag 8:30 - 12:00,Uhr,Dienstag auch 13:00 - 15:00 U,hr und nach Vereinbarung','Service@FA-5113.fin-nrw.de','www.finanzamt-Geldern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5114','Grevenbroich ','Erckensstr. 2','41515','Grevenbroich','02181/607-0','0800 10092675114','','41486','100264','30000000','30001507','BBK DUESSELDORF','30550000','101683','SPARKASSE NEUSS','Mo-Fr 8:30-12:00 Uhr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5114.fin-nrw.de','www.finanzamt-Grevenbroich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5115','Kempen ','Arnoldstr 13','47906','Kempen','02152/919-0','0800 10092675115','','47880','100329','31000000','32001501','BBK MOENCHENGLADBACH','','','','MO.-DO. 8.30-12.00 UHR,FREITAGS GESCHLOSSEN','Service@FA-5115.fin-nrw.de','www.finanzamt-Kempen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5116','Kleve ','Emmericher Str. 182','47533','Kleve','02821/803-1','0800 10092675116','','47512','1251','35000000','32401501','BBK DUISBURG','32450000','5013628','SPARKASSE KLEVE','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr','Service@FA-5116.fin-nrw.de','www.finanzamt-Kleve.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5117','Krefeld ','Grenzstr 100','47799','Krefeld','02151/854-0','0800 10092675117','','47706','100665','31000000','32001500','BBK MOENCHENGLADBACH','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5117.fin-nrw.de','www.finanzamt-Krefeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5119','Moers ','Unterwallstr 1','47441','Moers','02841/208-0','0800 10092675119','47439','47405','101520','35000000','35001505','BBK DUISBURG','35450000','1101000121','SPARKASSE MOERS','Montag-Freitag von 8.30-12.00,Dienstag von 13.30-15.00','Service@FA-5119.fin-nrw.de','www.finanzamt-Moers.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5120','Mülheim an der Ruhr ','Wilhelmstr 7','45468','Mülheim an der Ruhr','0208/3001-1','0800 10092675120','','45405','100551','36000000','36201500','BBK ESSEN','36250000','300007007','SPK MUELHEIM AN DER RUHR','Mo-Fr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5120.fin-nrw.de','www.finanzamt-Muelheim-Ruhr.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5121','Mönchengladbach-Mitte ','Kleiststr. 1','41061','Mönchengladbach','02161/189-0','0800 10092675121','','41008','100813','31000000','31001500','BBK MOENCHENGLADBACH','31050000','8888','ST SPK MOENCHENGLADBACH','Mo - Fr,Di auch,und nach Vereinbarung','Service@FA-5121.fin-nrw.de','www.finanzamt-Moenchengladbach-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5122','Neuss II ','Hammfelddamm 9','41460','Neuss','02131/6656-0','0800 10092675122','','41405','100502','30000000','30001509','BBK DUESSELDORF','30550000','123000','SPARKASSE NEUSS','Mo,Di,Do,Fr von 8.30-12.00,Di von 13.30-15.00','Service@FA-5122.fin-nrw.de','www.finanzamt-Neuss2.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5123','Oberhausen-Nord ','Gymnasialstr. 16','46145','Oberhausen','0208/6499-0','0800 10092675123','','46122','110220','36000000','36501501','BBK ESSEN','36550000','260125','ST SPK OBERHAUSEN','Mo-Fr 08:30-12:00 Uhr,Di auch 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5123.fin-nrw.de','www.finanzamt-Oberhausen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5124','Oberhausen-Süd ','Schwartzstr. 7-9','46045','Oberhausen','0208/8504-0','0800 10092675124','','46004','100447','36000000','36501500','BBK ESSEN','36550000','138156','ST SPK OBERHAUSEN','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5124.fin-nrw.de','www.finanzamt-Oberhausen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5125','Neuss I ','Schillerstr 80','41464','Neuss','02131/943-0','0800 10092675125','41456','41405','100501','30000000','30001508','BBK DUESSELDORF','30550000','129999','SPARKASSE NEUSS','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5125.fin-nrw.de','www.finanzamt-Neuss1.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5126','Remscheid ','Wupperstr 10','42897','Remscheid','02191/961-0','0800 10092675126','','42862','110269','33000000','33001505','BBK WUPPERTAL','34050000','113001','ST SPK REMSCHEID','Mo-Fr 08.30-12.00Uhr,Di auch 13.30-15.00Uhr,und nach Vereinbarung','Service@FA-5126.fin-nrw.de','www.finanzamt-Remscheid.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5127','Mönchengladbach-Rheydt ','Wilhelm-Strauß-Str. 50','41236','Mönchengladbach','02166/450-0','0800 10092675127','','41204','200442','31000000','31001502','BBK MOENCHENGLADBACH','31050000','295600','ST SPK MOENCHENGLADBACH','MO - FR 08.30 - 12.00 Uhr,DI auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5127.fin-nrw.de','www.finanzamt-Moenchengladbach-Rheydt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5128','Solingen-Ost ','Goerdelerstr.24- 26','42651','Solingen','0212/282-1','0800 10092675128','42648','42609','100984','33000000','33001503','BBK WUPPERTAL','34250000','22707','ST SPK SOLINGEN','Mo.-Fr.,Mo. auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5128.fin-nrw.de','www.finanzamt-Solingen-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5129','Solingen-West ','Merscheider Busch 23','42699','Solingen','0212/2351-0','0800 10092675129','','42663','110340','33000000','33001501','BBK WUPPERTAL','34250000','130005','ST SPK SOLINGEN','MO-FR 08.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5129.fin-nrw.de','www.finanzamt-Solingen-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5130','Wesel ','Poppelbaumstr. 5-7','46483','Wesel','0281/105-0','0800 10092675130','','46461','100136','35000000','35601500','BBK DUISBURG','35650000','208660','VERB SPK WESEL','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5130.fin-nrw.de','www.finanzamt-Wesel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5131','Wuppertal-Barmen ','Unterdörnen 96','42283','Wuppertal','0202/9543-0','0800 10092675131','42271','42208','200853','33000000','33001502','BBK WUPPERTAL','','','','Mo - Fr,Do auch,und nach Vereinbarung','Service@FA-5131.fin-nrw.de','www.finanzamt-Wuppertal-Barmen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5132','Wuppertal-Elberfeld ','Kasinostr. 12','42103','Wuppertal','0202/489-0','0800 10092675132','','42002','100209','33000000','33001500','BBK WUPPERTAL','','','','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5132.fin-nrw.de','www.finanzamt-Wuppertal-Elberfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5133','Düsseldorf-Mitte ','Kruppstr. 110','40227','Düsseldorf','0211/779-9','0800 10092675133','','40001','101024','30000000','30001505','BBK DUESSELDORF','30050110','10123008','ST SPK DUESSELDORF','','Service@FA-5133.fin-nrw.de','www.finanzamt-Duesseldorf-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5134','Duisburg-West ','Friedrich-Ebert-Str 133','47226','Duisburg','02065/307-0','0800 10092675134','','47203','141355','35000000','35001503','BBK DUISBURG','','','','Mo - Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5134.fin-nrw.de','www.finanzamt-Duisburg-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5135','Hilden ','Neustr. 60','40721','Hilden','02103/917-0','0800 10092675135','','40710','101046','30000000','30001506','BBK DUESSELDORF','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5135.fin-nrw.de','www.finanzamt-Hilden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5139','Velbert ','Nedderstraße 38','42549','Velbert','02051/47-0','0800 10092675139','','42513','101310','33000000','33001504','BBK WUPPERTAL','33450000','26205500','SPARKASSE HRV','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5139.fin-nrw.de','www.finanzamt-Velbert.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5147','Düsseldorf-Mettmann ','Harkortstr. 2-4','40210','Düsseldorf','0211/3804-0','0800 10092675147','','40001','101023','30000000','30001500','BBK DUESSELDORF','30050000','4051017','WESTLB DUESSELDORF','Montag bis Freitag,08.30 bis 12.00 Uhr,und nach Vereinbarung','Service@FA-5147.fin-nrw.de','www.finanzamt-Duesseldorf-Mettmann.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5149','Rechenzentrum d. FinVew NRW ','Roßstraße 131','40476','Düsseldorf','0211/4572-0','0211/4572-302','','40408','300864','','','','','','','','Service@FA-5149.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5170','Düsseldorf I für Groß- und Konzernbetriebsprüfung','Werftstr. 16','40549','Düsseldorf','0211/56354-01','0800 10092675170','','40525','270264','','','','','','','','Service@FA-5170.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5171','Düsseldorf II für Groß- und Konzernbetriebsprüfung','Werftstr. 16','40549','Düsseldorf','0211/56354-0','0800 10092675171','','40525','270264','','','','','','','','Service@FA-5171.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5172','Essen für Groß- und Konzernbetriebsprüfung','In der Hagenbeck 64','45143','Essen','0201/6300-1','0800 10092675172','','45011','101155','','','','','','','','Service@FA-5172.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5173','Krefeld für Groß- und Konzernbetriebsprüfung','Steinstr. 137','47798','Krefeld','02151/8418-0','0800 10092675173','','','','','','','','','','','Service@FA-5173.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5174','Berg. Land für Groß- und Konzernbetriebsprüfung','Bendahler Str. 29','42285','Wuppertal','0202/2832-0','0800 10092675174','42271','','','','','','','','','','Service@FA-5174.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5176','Mönchengladbach für Groß- und Konzernbetriebsprüfung','Aachener Str. 114','41061','Mönchengladbach','02161/3535-0','0800 10092675176','','41017','101715','','','','','','','','Service@FA-5176.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5181','Düsseldorf f. Steuerfahndung und Steuerstrafsachen','Kruppstr.110 -112','40227','Düsseldorf','0211/779-9','0800 10092675181','','40001','101024','30000000','30001502','BBK DUESSELDORF','30050110','10125003','ST SPK DUESSELDORF','Mo - Di 07.30 - 16.30 Uhr,Mi - Fr 07.30 - 16.00 Uhr','Service@FA-5181.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5182','Essen f. Steuerfahndung und Steuerstrafsachen','In der Hagenbeck 64','45143','Essen','0201/6300-1','0800 10092675182','','45011','101155','36000000','36001502','BBK ESSEN','36050105','203000','SPARKASSE ESSEN','','Service@FA-5182.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5183','Wuppertal f. Steuerfahndung und Steuerstrafsachen','Unterdörnen 96','42283','Wuppertal','0202/9543-0','0800 10092675183','','42205','200553','33000000','33001502','BBK WUPPERTAL','33050000','135004','ST SPK WUPPERTAL','','Service@FA-5183.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5201','Aachen-Innenstadt ','Mozartstr 2-10','52064','Aachen','0241/469-0','0800 10092675201','','52018','101833','39000000','39001501','BBK AACHEN','39050000','26','SPARKASSE AACHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 -15.00 Uhr,und nach Vereinbarung','Service@FA-5201.fin-nrw.de','www.finanzamt-Aachen-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5202','Aachen-Kreis ','Beverstr 17','52066','Aachen','0241/940-0','0800 10092675202','','52018','101829','39000000','39001500','BBK AACHEN','39050000','311118','SPARKASSE AACHEN','Mo.-Fr. 08.30 - 12.00 Uhr,Mo.,und nach Vereinbarung','Service@FA-5202.fin-nrw.de','www.finanzamt-Aachen-Kreis.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5203','Bergheim ','Rathausstrasse 3','50126','Bergheim','02271/82-0','0800 10092675203','','50101','1120','39500000','39501501','BBK AACHEN EH DUEREN','','','','Mo-Fr 08:30-12:00 Uhr,Di 13:30-15:00 Uhr,und nach Vereinbarung','Service@FA-5203.fin-nrw.de','www.finanzamt-Bergheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5204','Bergisch Gladbach ','Refrather Weg 35','51469','Bergisch Gladbach','02202/9342-0','0800 10092675204','','51433','200380','37000000','37001508','BBK KOELN','','','','Mo.-Fr. 8.30-12.00 Uhr','Service@FA-5204.fin-nrw.de','www.finanzamt-Bergisch-Gladbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5205','Bonn-Innenstadt ','Welschnonnenstr. 15','53111','Bonn','0228/718-0','0800 10092675205','','53031','180120','38000000','38001500','BBK BONN','38050000','17079','SPARKASSE BONN','Mo-Mi 08.30-12.00 Uhr,Do 07.00-17.00 Uhr,Freitag geschlossen','Service@FA-5205.fin-nrw.de','www.finanzamt-Bonn-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5206','Bonn-Außenstadt ','Bachstr. 36','53115','Bonn','0228/7268-0','0800 10092675206','','53005','1580','38000000','38001501','BBK BONN','38050000','22004','SPARKASSE BONN','Mo-Do,Do auch 13:30 bis 17:30 Uhr,Freitags geschlossen','Service@FA-5206.fin-nrw.de','www.finanzamt-Bonn-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5207','Düren ','Goethestrasse 7','52349','Düren','02421/947-0','0800 10092675207','','52306','100646','39500000','39501500','BBK AACHEN EH DUEREN','39550110','188300','SPARKASSE DUEREN','Mo-Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5207.fin-nrw.de','www.finanzamt-Dueren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5208','Erkelenz ','Südpromenade 37','41812','Erkelenz','02431/801-0','0800 10092675208','','41806','1651','31000000','31001501','BBK MOENCHENGLADBACH','31251220','402800','KR SPK HEINSBERG ERKELENZ','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5208.fin-nrw.de','www.finanzamt-Erkelenz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5209','Euskirchen ','Thomas-Mann-Str. 2','53879','Euskirchen','02251/982-0','0800 10092675209','','53864','1487','38000000','38001505','BBK BONN','38250110','1000330','KREISSPARKASSE EUSKIRCHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5209.fin-nrw.de','www.finanzamt-Euskirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5210','Geilenkirchen ','H.-Wilh.-Str 45','52511','Geilenkirchen','02451/623-0','0800 10092675210','','52501','1193','39000000','39001502','BBK AACHEN','31251220','5397','KR SPK HEINSBERG ERKELENZ','Mo.-Fr. 8.30 - 12.00 Uhr,nachmittags nur tel. von,13.30 - 15.00 Uhr','Service@FA-5210.fin-nrw.de','www.finanzamt-Geilenkirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5211','Schleiden ','Kurhausstr. 7','53937','Schleiden','02444/85-0','0800 10092675211','','53929','1140','38000000','38001506','BBK BONN','38250110','3200235','KREISSPARKASSE EUSKIRCHEN','Mo-Fr 08.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,sowie nach Vereinbarung','Service@FA-5211.fin-nrw.de','www.finanzamt-Schleiden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5212','Gummersbach ','Mühlenbergweg 5','51645','Gummersbach','02261/86-0','0800 10092675212','51641','','','37000000','37001506','BBK KOELN','','','','Mo - Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr','Service@FA-5212.fin-nrw.de','www.finanzamt-Gummersbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5213','Jülich ','Wilhelmstr 5','52428','Jülich','02461/685-0','0800 10092675213','','52403','2180','39000000','39701500','BBK AACHEN','39550110','25023','SPARKASSE DUEREN','Mo.-Fr. 08.00-12.00 Uhr,Di. 13.30-15.00 Uhr','Service@FA-5213.fin-nrw.de','www.finanzamt-Juelich.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5214','Köln-Altstadt ','Am Weidenbach 2-4','50676','Köln','0221/2026-0','0800 10092675214','','50517','250140','37000000','37001501','BBK KOELN','37050198','70052964','STADTSPARKASSE KOELN','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.00 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5214.fin-nrw.de','www.finanzamt-Koeln-Altstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5215','Köln-Mitte ','Blaubach 7','50676','Köln','0221/92400-0','0800 10092675215','','50524','290208','37000000','37001505','BBK KOELN','37050198','70062963','STADTSPARKASSE KOELN','MO-FR 08.30 - 12.00 UHR','Service@FA-5215.fin-nrw.de','www.finanzamt-Koeln-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5216','Köln-Porz ','Klingerstr. 2-6','51143','Köln','02203/598-0','0800 10092675216','','51114','900469','37000000','37001524','BBK KOELN','','','','Mo-Fr08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5216.fin-nrw.de','www.finanzamt-Koeln-Porz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5217','Köln-Nord ','Innere Kanalstr. 214','50670','Köln','0221/97344-0','0800 10092675217','','50495','130164','37000000','37001502','BBK KOELN','37050198','70102967','STADTSPARKASSE KOELN','Mo - Fr 8.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5217.fin-nrw.de','www.finanzamt-Koeln-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5218','Köln-Ost ','Siegesstrasse 1','50679','Köln','0221/9805-0','0800 10092675218','','50529','210340','37000000','37001503','BBK KOELN','37050198','70082961','STADTSPARKASSE KOELN','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5218.fin-nrw.de','www.finanzamt-Koeln-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5219','Köln-Süd ','Am Weidenbach 6','50676','Köln','0221/2026-0','0800 10092675219','','50517','250160','37000000','37001504','BBK KOELN','37050198','70032966','STADTSPARKASSE KOELN','Mo-Fr,Di auch 13.00-15.00 Uhr','Service@FA-5219.fin-nrw.de','www.finanzamt-Koeln-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5220','Siegburg ','Mühlenstr 19','53721','Siegburg','02241/105-0','0800 10092675220','','53703','1351','38000000','38001503','BBK BONN','','','','Mo.-Fr. 08.30-12.00 Uhr,Mo. auch 13.30-17.00 Uhr,und nach Vereinbarung','Service@FA-5220.fin-nrw.de','www.finanzamt-Siegburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5221','Wipperfürth ','Am Stauweiher 3','51688','Wipperfürth','02267/870-0','0800 10092675221','','51676','1240','37000000','37001513','BBK KOELN','','','','Mo-Fr 08.30-12.00 Uhr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5221.fin-nrw.de','www.finanzamt-Wipperfuerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5222','Sankt Augustin ','Hubert-Minz-Str 10','53757','Sankt Augustin','02241/242-1','0800 10092675222','','53730','1229','38000000','38001504','BBK BONN','','','','Mo - Fr 8.30-12.00 Uhr,Di auch 13.30-15.00 Uhr','Service@FA-5222.fin-nrw.de','www.finanzamt-Sankt-Augustin.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5223','Köln-West ','Haselbergstr 20','50931','Köln','0221/5734-0','0800 10092675223','','50864','410469','37000000','37001523','BBK KOELN','37050198','70022967','STADTSPARKASSE KOELN','','Service@FA-5223.fin-nrw.de','www.finanzamt-Koeln-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5224','Brühl ','Kölnstr. 104','50321','Brühl','02232/703-0','0800 10092675224','50319','','','37000000','37001507','BBK KOELN','','','','Mo-Fr 08.30 - 12.00,Die zusätzlich 13.30 - 15.00 ,und nach Vereinbarung','Service@FA-5224.fin-nrw.de','www.finanzamt-Bruehl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5225','Aachen-Außenstadt ','Beverstraße','52066','Aachen','0241/940-0','0800 10092675225','','52018','101825','39000000','39001503','BBK AACHEN','39050000','1099','SPARKASSE AACHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5225.fin-nrw.de','www.finanzamt-Aachen-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5230','Leverkusen ','Haus-Vorster-Str 12','51379','Leverkusen','02171/407-0','0800 10092675230','51367','','','37000000','37001511','BBK KOELN','37551440','118318500','SPARKASSE LEVERKUSEN','Mo-Do 8.30 - 12.00 Uhr,Di.: 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5230.fin-nrw.de','www.finanzamt-Leverkusen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5270','KonzBP Köln für Groß- und Konzernbetriebsprüfung','Riehler Platz 2','50668','Köln','0221/2021-0','0800 10092675270','','','','','','','','','','','Service@FA-5270.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5271','Aachen für Groß- und Konzernbetriebsprüfung','Beverstr. 17','52066','Aachen','0241/940-0','0800 10092675271','','52017','101744','','','','','','','','Service@FA-5271.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5272','Bonn für Groß- und Konzernbetriebsprüfung','Am Propsthof 17','53121','Bonn','0228/7223-0','0800 10092675272','','','','','','','','','','','Service@FA-5272.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5281','Aachen f. Steuerfahndung und Steuerstrafsachen','Beverstr 17','52066','Aachen','0241/940-0','0800 10092675281','','52017','101722','39000000','39001500','BBK AACHEN','39050000','311118','SPARKASSE AACHEN','','Service@FA-5281.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5282','Bonn f. Steuerfahndung und Steuerstrafsachen','Theaterstr. 1','53111','Bonn','0228/718-0','0800 10092675282','','','','38000000','38001500','BBK BONN','38050000','17079','SPARKASSE BONN','','Service@FA-5282.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5283','Köln f. Steuerfahndung und Steuerstrafsachen','Am Gleisdreieck 7- 9','50823','Köln','0221/5772-0','0800 10092675283','','50774','300451','37000000','37001502','BBK KOELN','37050198','70102967','STADTSPARKASSE KOELN','','Service@FA-5283.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5301','Ahaus ','Vredener Dyk 2','48683','Ahaus','02561/929-0','0800 10092675301','','48662','1251','40000000','40001503','BBK MUENSTER, WESTF','40154530','51027902','SPARKASSE WESTMUENSTERLAND','Mo - Fr 08.30 - 12.00 Uhr,zudem Mo 13.30 - 15.00 Uhr,sowie Do 13.30 -','Service@FA-5301.fin-nrw.de','www.finanzamt-Ahaus.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5302','Altena ','Winkelsen 11','58762','Altena','02352/917-0','0800 10092675302','','58742','1253','45000000','45001501','BBK HAGEN','45851020','80020001','VER SPK PLETTENBERG','Mo,Di-Do,und nach Vereinbarung','Service@FA-5302.fin-nrw.de','www.finanzamt-Altena.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5303','Arnsberg ','Rumbecker Straße 36','59821','Arnsberg','02931/875-0','0800 10092675303','59818','59802','5245','41000000','46401501','BBK HAMM, WESTF','46650005','1020007','SPK ARNSBERG-SUNDERN','Mo-Mi 08.30 - 12.00 Uhr,Fr,und nach Vereinbarung','Service@FA-5303.fin-nrw.de','www.finanzamt-Arnsberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5304','Beckum ','Elisabethstraße 19','59269','Beckum','02521/25-0','0800 10092675304','59267','59244','1452','41000000','41001501','BBK HAMM, WESTF','41250035','1000223','SPK BECKUM-WADERSLOH','MO-FR 08.30-12.00 UHR,MO AUCH 13.30-15.00 UHR,UND NACH VEREINBARUNG','Service@FA-5304.fin-nrw.de','www.finanzamt-Beckum.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5305','Bielefeld-Innenstadt ','Ravensberger Straße 90','33607','Bielefeld','0521/548-0','0800 10092675305','','33503','100371','48000000','48001500','BBK BIELEFELD','48050161','109','SPK BIELEFELD','Mo - Fr 8.30 - 12.00 Uhr,Di auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5305.fin-nrw.de','www.finanzamt-Bielefeld-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5306','Bochum-Mitte ','Castroper Str. 40 - 42','44791','Bochum','0234/514-0','0800 10092675306','','44707','100729','43000000','43001500','BBK BOCHUM','43050001','1300011','SPARKASSE BOCHUM','Mo-Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,Individuelle Terminver-,einbarungen sind möglich','Service@FA-5306.fin-nrw.de','www.finanzamt-Bochum-Mitte.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5307','Borken ','Nordring 184','46325','Borken','02861/938-0','0800 10092675307','46322','46302','1240','40000000','40001514','BBK MUENSTER, WESTF','40154530','51021137','SPARKASSE WESTMUENSTERLAND','Mo-Fr 8.30 - 12.00 Uhr,Mo 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5307.fin-nrw.de','www.finanzamt-Borken.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5308','Bottrop ','Scharnhölzstraße 32','46236','Bottrop','02041/691-0','0800 10092675308','','46205','100553','43000000','42401501','BBK BOCHUM','42451220','10009','SPK BOTTROP','Mo-Mi 08.00-12.00 Uhr,Do 07.30-12.00 u 13.30-15.00 ,Freitags geschlossen','Service@FA-5308.fin-nrw.de','www.finanzamt-Bottrop.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5309','Brilon ','Steinweg 30','59929','Brilon','02961/788-0','0800 10092675309','','59915','1260','48000000','47201502','BBK BIELEFELD','41651770','17004','SPK HOCHSAUERLAND BRILON','Mo - Fr 08:30 - 12:00 Uhr,Di auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5309.fin-nrw.de','www.finanzamt-Brilon.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5310','Bünde ','Lettow-Vorbeck-Str 2-10','32257','Bünde','05223/169-0','0800 10092675310','','32216','1649','48000000','48001502','BBK BIELEFELD','49450120','210003000','SPARKASSE HERFORD','','Service@FA-5310.fin-nrw.de','www.finanzamt-Buende.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5311','Steinfurt ','Ochtruper Straße 2','48565','Steinfurt','02551/17-0','0800 10092675311','48563','48542','1260','40000000','40301500','BBK MUENSTER, WESTF','','','','Mo-Fr 08.00-12.00 Uhr,Mo auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5311.fin-nrw.de','www.finanzamt-Steinfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5312','Coesfeld ','Friedrich-Ebert-Str. 8','48653','Coesfeld','02541/732-0','0800 10092675312','','48633','1344','40000000','40001505','BBK MUENSTER, WESTF','40154530','59001644','SPARKASSE WESTMUENSTERLAND','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5312.fin-nrw.de','www.finanzamt-Coesfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5313','Detmold ','Wotanstraße 8','32756','Detmold','05231/972-0','0800 10092675313','32754','32706','1664','48000000','48001504','BBK BIELEFELD','47650130','4002','SPK DETMOLD','Mo. bis Fr.,Montags,und nach Vereinbarung','Service@FA-5313.fin-nrw.de','www.finanzamt-Detmold.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5314','Dortmund-West ','Märkische Straße 124','44141','Dortmund','0231/9581-0','0800 10092675314','','44047','105041','44000000','44001500','BBK DORTMUND','44050199','301001886','SPARKASSE DORTMUND','Montags geschlossen,Di - Fr 8.30 - 12.00,Do zusätzlich 13.30 - 15.00','Service@FA-5314.fin-nrw.de','www.finanzamt-Dortmund-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5315','Dortmund-Hörde ','Niederhofener Str 3','44263','Dortmund','0231/4103-0','0800 10092675315','','44232','300255','44000000','44001503','BBK DORTMUND','44050199','21003468','SPARKASSE DORTMUND','Mo-Do 8.30-12.00 Uhr,und nach Vereinbarung','Service@FA-5315.fin-nrw.de','www.finanzamt-Dortmund-Hoerde.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5316','Dortmund-Unna ','Rennweg 1','44143','Dortmund','0231/5188-1','0800 10092675316','','44047','105020','44000000','44001501','BBK DORTMUND','44050199','1060600','SPARKASSE DORTMUND','Mo-Fr 08.30-12.00 Uhr,und nach Vereinbarung','Service@FA-5316.fin-nrw.de','www.finanzamt-Dortmund-Unna.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5317','Dortmund-Ost ','Nußbaumweg 210','44143','Dortmund','0231/5188-1','0800 10092675317','','44047','105039','44000000','44001502','BBK DORTMUND','44050199','301001827','SPARKASSE DORTMUND','Mo - Fr 8.30 - 12.00 Uhr,und nach Vereinbarung','Service@FA-5317.fin-nrw.de','www.finanzamt-Dortmund-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5318','Gelsenkirchen-Nord ','Rathausplatz 1','45894','Gelsenkirchen','0209/368-1','0800 10092675318','','45838','200351','43000000','42001501','BBK BOCHUM','42050001','160012007','SPARKASSE GELSENKIRCHEN','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00Uhr','Service@FA-5318.fin-nrw.de','www.finanzamt-Gelsenkirchen-Nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5319','Gelsenkirchen-Süd ','Zeppelinallee 9-13','45879','Gelsenkirchen','0209/173-1','0800 10092675319','','45807','100753','43000000','42001500','BBK BOCHUM','42050001','101050003','SPARKASSE GELSENKIRCHEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr','Service@FA-5319.fin-nrw.de','www.finanzamt-Gelsenkirchen-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5320','Gladbeck ','Jovyplatz 4','45964','Gladbeck','02043/270-1','0800 10092675320','','45952','240','43000000','42401500','BBK BOCHUM','42450040','91','ST SPK GLADBECK','MO-FR 08.30-12.00 UHR,DO AUCH 13.30-15.00 UHR,UND NACH VEREINBARUNG','Service@FA-5320.fin-nrw.de','www.finanzamt-Gladbeck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5321','Hagen ','Schürmannstraße 7','58097','Hagen','02331/180-0','0800 10092675321','','58041','4145','45000000','45001500','BBK HAGEN','45050001','100001580','SPARKASSE HAGEN','Mo-Fr,Mo auch 13.30-15.00 Uhr','Service@FA-5321.fin-nrw.de','www.finanzamt-Hagen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5322','Hamm ','Grünstraße 2','59065','Hamm','02381/918-0','0800 10092675322','59061','59004','1449','41000000','41001500','BBK HAMM, WESTF','41050095','90001','SPARKASSE HAMM','Mo-Do 8.30-12.00 Uhr,Mi auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5322.fin-nrw.de','www.finanzamt-Hamm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5323','Hattingen ','Rathausplatz 19','45525','Hattingen','02324/208-0','0800 10092675323','','45502','800257','43000000','43001501','BBK BOCHUM','','','','Mo-Fr,Di auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5323.fin-nrw.de','www.finanzamt-Hattingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5324','Herford ','Wittekindstraße 5','32051','Herford','05221/188-0','0800 10092675324','','32006','1642','48000000','48001503','BBK BIELEFELD','49450120','36004','SPARKASSE HERFORD','Mo,Di,Fr 7.30-12.00 Uhr,Do 7.30-17.00 Uhr,Mi geschlossen,und nach Vereinbarung','Service@FA-5324.fin-nrw.de','www.finanzamt-Herford.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5325','Herne-Ost ','Markgrafenstraße 12','44623','Herne','02323/598-0','0800 10092675325','','44602','101220','43000000','43001502','BBK BOCHUM','43250030','1012004','HERNER SPARKASSE','Rückfragen bitte nur,telefonisch oder nach,vorheriger Rücksprache mit,dem Bearbeiter','Service@FA-5325.fin-nrw.de','www.finanzamt-Herne-Ost.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5326','Höxter ','Bismarckstraße 11','37671','Höxter','05271/969-0','0800 10092675326','37669','37652','100239','48000000','47201501','BBK BIELEFELD','47251550','3008521','SPK HOEXTER BRAKEL','Mo - Do,Do auch,und nach Vereinbarung','Service@FA-5326.fin-nrw.de','www.finanzamt-Hoexter.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5327','Ibbenbüren ','Uphof 10','49477','Ibbenbüren','05451/920-0','0800 10092675327','','49462','1263','40000000','40301501','BBK MUENSTER, WESTF','40351060','2469','KR SPK STEINFURT','Mo - Fr,Di auch','Service@FA-5327.fin-nrw.de','www.finanzamt-Ibbenbueren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5328','Iserlohn ','Zollernstraße 16','58636','Iserlohn','02371/969-0','0800 10092675328','58634','58585','1554','45000000','45001503','BBK HAGEN','44550045','44008','SPK DER STADT ISERLOHN','Mo - Do 08.30 - 12.00 Uhr,Do auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5328.fin-nrw.de','www.finanzamt-Iserlohn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5329','Lemgo ','Engelb.-Kämpfer Str. 18','32657','Lemgo','05261/253-1','0800 10092675329','','32632','240','48000000','48001505','BBK BIELEFELD','48250110','45005','SPARKASSE LEMGO','Mo - Fr,Do auch,und nach Vereinbarung','Service@FA-5329.fin-nrw.de','www.finanzamt-Lemgo.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5330','Lippstadt ','Im Grünen Winkel 3','59555','Lippstadt','02941/982-0','0800 10092675330','','59525','1580','41000000','46401505','BBK HAMM, WESTF','41650001','15008','ST SPK LIPPSTADT','Mo - Fr 08.30 - 12.00,Do zusätzlich 13.30 - 15.00','Service@FA-5330.fin-nrw.de','www.finanzamt-Lippstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5331','Lübbecke ','Bohlenstraße 102','32312','Lübbecke','05741/334-0','0800 10092675331','','32292','1244','49000000','49001501','BBK MINDEN, WESTF','49050101','141','SPARKASSE MINDEN-LUEBBECKE','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5331.fin-nrw.de','www.finanzamt-Luebbecke.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5332','Lüdenscheid ','Bahnhofsallee 16','58507','Lüdenscheid','02351/155-0','0800 10092675332','58505','58465','1589','45000000','45001502','BBK HAGEN','45850005','18','SPK LUEDENSCHEID','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5332.fin-nrw.de','www.finanzamt-Luedenscheid.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5333','Lüdinghausen ','Bahnhofstraße 32','59348','Lüdinghausen','02591/930-0','0800 10092675333','','59332','1243','40000000','40001506','BBK MUENSTER, WESTF','40154530','1008','SPARKASSE WESTMUENSTERLAND','vormittags: Mo.-Fr.8.30-12.00,nachmittags: Di. 13.30-15.00','Service@FA-5333.fin-nrw.de','www.finanzamt-Luedinghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5334','Meschede ','Fritz-Honsel-Straße 4','59872','Meschede','0291/950-0','0800 10092675334','','59852','1265','41000000','46401502','BBK HAMM, WESTF','46451012','13003','SPK MESCHEDE','Mo-Fr 08:30 - 12:00,und nach Vereinbarung','Service@FA-5334.fin-nrw.de','www.finanzamt-Meschede.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5335','Minden ','Heidestraße 10','32427','Minden','0571/804-1','0800 10092675335','','32380','2340','49000000','49001500','BBK MINDEN, WESTF','49050101','40018145','SPARKASSE MINDEN-LUEBBECKE','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5335.fin-nrw.de','www.finanzamt-Minden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5336','Münster-Außenstadt ','Friedrich-Ebert-Str. 46','48153','Münster','0251/9729-0','0800 10092675336','','48136','6129','40000000','40001501','BBK MUENSTER, WESTF','40050150','95031001','SPK MUENSTERLAND OST','Mo-Fr 08.30-12.00 Uhr,Mo auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5336.fin-nrw.de','www.finanzamt-Muenster-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5337','Münster-Innenstadt ','Münzstr. 10','48143','Münster','0251/416-1','0800 10092675337','','48136','6103','40000000','40001502','BBK MUENSTER, WESTF','40050150','300004','SPK MUENSTERLAND OST','','Service@FA-5337.fin-nrw.de','www.finanzamt-Muenster-Innenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5338','Olpe ','Am Gallenberg 20','57462','Olpe','02761/963-0','0800 10092675338','','57443','1320','45000000','46001501','BBK HAGEN','','','','Mo-Do 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,Freitag keine Sprechzeit','Service@FA-5338.fin-nrw.de','www.finanzamt-Olpe.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5339','Paderborn ','Bahnhofstraße 28','33102','Paderborn','05251/100-0','0800 10092675339','','33045','1520','48000000','47201500','BBK BIELEFELD','47250101','1001353','SPARKASSE PADERBORN','','Service@FA-5339.fin-nrw.de','www.finanzamt-Paderborn.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5340','Recklinghausen ','Westerholter Weg 2','45657','Recklinghausen','02361/583-0','0800 10092675340','','45605','100553','43000000','42601500','BBK BOCHUM','42650150','90034158','SPK RECKLINGHAUSEN','Mo - Fr 08:30 bis 12:00,Mi auch 13:30 bis 15:00,und nach Vereinbarung','Service@FA-5340.fin-nrw.de','www.finanzamt-Recklinghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5341','Schwelm ','Bahnhofplatz 6','58332','Schwelm','02336/803-0','0800 10092675341','','58316','340','45000000','45001520','BBK HAGEN','45451555','80002','ST SPK SCHWELM','Mo-Fr 8.30-12.00 Uhr,Mo,und nach Vereinbarung','Service@FA-5341.fin-nrw.de','www.finanzamt-Schwelm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5342','Siegen ','Weidenauer Straße 207','57076','Siegen','0271/4890-0','0800 10092675342','','57025','210148','45000000','46001500','BBK HAGEN','46050001','1100114','SPK SIEGEN','Mo-Fr,Do auch 13:30 - 17:00 Uhr,und nach Vereinbarung','Service@FA-5342.fin-nrw.de','www.finanzamt-Siegen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5343','Soest ','Waisenhausstraße 11','59494','Soest','02921/351-0','0800 10092675343','59491','59473','1364','41000000','46401504','BBK HAMM, WESTF','41450075','208','SPARKASSE SOEST','Mo-Fr 0830-1200Uhr,und nach Vereinbarung','Service@FA-5343.fin-nrw.de','www.finanzamt-Soest.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5344','Herne-West ','Edmund-Weber-Str. 210','44651','Herne','02325/696-0','0800 10092675344','','44632','200262','43000000','43001503','BBK BOCHUM','43250030','17004','HERNER SPARKASSE','Mo-Fr 08.30-12.00 Uhr,Mo 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5344.fin-nrw.de','www.finanzamt-Herne-West.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5345','Warburg ','Sternstraße 33','34414','Warburg','05641/771-0','0800 10092675345','','34402','1226','48000000','47201503','BBK BIELEFELD','47251550','25005521','SPK HOEXTER BRAKEL','','Service@FA-5345.fin-nrw.de','www.finanzamt-Warburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5346','Warendorf ','Düsternstraße 43','48231','Warendorf','02581/924-0','0800 10092675346','','48205','110361','40000000','40001504','BBK MUENSTER, WESTF','40050150','182','SPK MUENSTERLAND OST','Mo-Fr 08.30-12.00 Uhr,Do auch 13.30-15.00 Uhr,und nach Vereinbarung','Service@FA-5346.fin-nrw.de','www.finanzamt-Warendorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5347','Wiedenbrück ','Hauptstraße 34','33378','Rheda-Wiedenbrück','05242/934-0','0800 10092675347','33372','33342','1429','48000000','47801500','BBK BIELEFELD','47853520','5231','KREISSPARKASSE WIEDENBRUECK','Mo - Fr 08.30 - 12.00 Uhr,Do auch 13.30 - 14.30 Uhr','Service@FA-5347.fin-nrw.de','www.finanzamt-Wiedenbrueck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5348','Witten ','Ruhrstraße 43','58452','Witten','02302/921-0','0800 10092675348','','58404','1420','43000000','43001505','BBK BOCHUM','45250035','6007','ST SPK WITTEN','Mo - Fr 08.30 - 12.00 Uhr,Mo auch 13.30 - 15.00 Uhr,und nach Vereinbarung','Service@FA-5348.fin-nrw.de','www.finanzamt-Witten.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5349','Bielefeld-Außenstadt ','Ravensberger Straße 125','33607','Bielefeld','0521/548-0','0800 10092675349','','33503','100331','48000000','48001501','BBK BIELEFELD','48050161','180000','SPK BIELEFELD','Mo - Fr 08:30 - 12:00 Uhr,Do auch 13:30 - 15:00 Uhr,und nach Vereinbarung','Service@FA-5349.fin-nrw.de','www.finanzamt-Bielefeld-Aussenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5350','Bochum-Süd ','Königsallee 21','44789','Bochum','0234/3337-0','0800 10092675350','','44707','100764','43000000','43001504','BBK BOCHUM','43050001','1307792','SPARKASSE BOCHUM','Mo-Fr 08:30-12:00 Uhr,Di auch 13:30-15:00 Uhr','Service@FA-5350.fin-nrw.de','www.finanzamt-Bochum-Sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5351','Gütersloh ','Neuenkirchener Str. 86','33332','Gütersloh','05241/3071-0','0800 10092675351','','33245','1565','48000000','48001506','BBK BIELEFELD','','','','Mo - Fr 08.30 - 12.00 Uhr,Do auch 13.30 - 15.00 Uhr','Service@FA-5351.fin-nrw.de','www.finanzamt-Guetersloh.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5359','Marl ','Brassertstraße 1','45768','Marl','02365/516-0','0800 10092675359','45765','45744','1420','43000000','42601501','BBK BOCHUM','42650150','40020000','SPK RECKLINGHAUSEN','','Service@FA-5359.fin-nrw.de','www.finanzamt-Marl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5371','Bielefeld für Groß- und Konzernbetriebsprüfung','Ravensberger Str. 90','33607','Bielefeld','0521/548-0','0800 10092675371','','33511','101150','','','','','','','','Service@FA-5371.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5372','Herne für Groß- und Konzernbetriebsprüfung','Hauptstr. 123','44651','Herne','02325/693-0','0800 10092675372','','44636','200620','','','','','','','','Service@FA-5372.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5373','Detmold für Groß- und Konzernbetriebsprüfung','Richthofenstrasse 94','32756','Detmold','05231/974-300','0800 10092675373','','32706','1664','','','','','','','','Service@FA-5373.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5374','Dortmund für Groß- und Konzernbetriebsprüfung','Nußbaumweg 210','44143','Dortmund','0231/5188-8953','0800 10092675374','','44047','105039','','','','','','','','Service@FA-5374.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5375','Hagen für Groß- und Konzernbetriebsprüfung','Hochstr. 43 - 45','58095','Hagen','02331/3760-0','0800 10092675375','','','','','','','','','','','Service@FA-5375.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5376','Münster für Groß- und Konzernbetriebsprüfung','Andreas-Hofer-Straße 50','48145','Münster','0251/934-2115','0800 10092675376','','','','','','','','','','','Service@FA-5376.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5381','Bielefeld f. Steuerfahndung und Steuerstrafsachen','Ravensberger Str. 90','33607','Bielefeld','0521/548-0','0800 10092675381','','33511','101173','48000000','48001500','BBK BIELEFELD','48050161','109','SPK BIELEFELD','','Service@FA-5381.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5382','Bochum f. Steuerfahndung und Steuerstrafsachen','Uhlandstr. 37','44791','Bochum','0234/5878-0','0800 10092675382','','44707','100768','43000000','43001500','BBK BOCHUM','43050001','1300011','SPARKASSE BOCHUM','','Service@FA-5382.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5383','Hagen f. Steuerfahndung und Steuerstrafsachen','Becheltestr. 32','58089','Hagen','02331/3089-0','0800 10092675383','','58041','4143','45000000','145001500','BBK HAGEN','45050001','100001580','SPARKASSE HAGEN','','Service@FA-5383.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('5','5384','Münster f. Steuerfahndung und Steuerstrafsachen','Hohenzollernring 80','48145','Münster','0251/9370-0','0800 10092675384','','','','40000000','40001501','BBK MUENSTER, WESTF','40050150','95031001','SPK MUENSTERLAND OST','','Service@FA-5384.fin-nrw.de','');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9101','Augsburg-Stadt Arbeitnehmerbereich','Prinzregentenpl. 2','86150','Augsburg','0821 506-01','0821 506-2222','','86135','10 00 65','72000000','72001500','BBK AUGSBURG','72050000','24109','ST SPK AUGSBURG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-a-s.bayern.de','www.finanzamt-augsburg-stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9102','Augsburg-Land ','Peutingerstr. 25','86152','Augsburg','0821 506-02','0821 506-3270','86144','86031','11 06 69','72000000','72001501','BBK AUGSBURG','72050101','8003','KR SPK AUGSBURG','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-a-l.bayern.de','www.finanzamt-augsburg-land.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9103','Augsburg-Stadt ','Prinzregentenpl. 2','86150','Augsburg','0821 506-01','0821 506-2222','','86135','10 00 65','72000000','72001500','BBK AUGSBURG','72050000','24109','ST SPK AUGSBURG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-a-s.bayern.de','www.finanzamt-augsburg-stadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9104','Bad Tölz -Außenstelle des Finanzamts Wolfratshausen-','Prof.-Max-Lange-Platz 2','83646','Bad Tölz','08041 8005-0','08041 8005-185','','83634','1420','70000000','70001505','BBK MUENCHEN','70054306','31054','SPK BAD TOELZ-WOLFRATSHAUSE','Servicezentrum: Mo 7:30-18:00 Uhr, Di-Do 7:30-13:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-toel.bayern.de','www.finanzamt-bad-toelz.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9105','Berchtesgaden ','Salzburger Str. 6','83471','Berchtesgaden','08652 960-0','08652 960-100','','83461','1154','71000000','71001500','BBK MUENCHEN EH B REICHENHA','71050000','350009','SPK BERCHTESGADENER LAND','Servicezentrum: Mo-Do 7:30-13:30 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-bgd.bayern.de','www.finanzamt-berchtesgaden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9106','Burghausen ','Tittmoninger Str. 1','84489','Burghausen','08677 8706-0','08677 8706-100','','84480','1257','71000000','71001501','BBK MUENCHEN EH B REICHENHA','71051010','250001','KR SPK ALTOETTING-BURGHAUSE','Servicezentrum: Mo-Mi 7:45-15:00 Uhr Do 7:45-17:00 Uhr, Fr 7:45-12:00 Uhr','poststelle@fa-burgh.bayern.de','www.finanzamt-burghausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9107','Dachau ','Bürgermeister-Zauner-Ring 2','85221','Dachau','08131 701-0','08131 701-111','85219','85202','1280','70000000','70001507','BBK MUENCHEN','70051540','908327','SPARKASSE DACHAU','Servicezentrum: Mo, Di, Do 7:30-15:00 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Mi,Fr 7:30-12:00 Uhr','poststelle@fa-dah.bayern.de','www.finanzamt-dachau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9108','Deggendorf ','Pfleggasse 18','94469','Deggendorf','0991 384-0','0991 384-150','','94453','1355','75000000','75001506','BBK REGENSBURG','74150000','380019950','SPK DEGGENDORF','Servicezentrum: Mo, Di, Do 7:45-15:00 Uhr (Jan-Mai Do 7:45-18:00 Uhr), Mi, Fr 7:45-12:00 Uhr','poststelle@fa-deg.bayern.de','www.finanzamt-deggendorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9109','Dillingen ','Schloßstr. 3','89407','Dillingen','09071 507-0','09071 507-300','89401','','','72000000','72001503','BBK AUGSBURG','72251520','24066','KR U ST SPK DILLINGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-dlg.bayern.de','www.finanzamt-dillingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9110','Dingolfing ','Obere Stadt 44','84130','Dingolfing','08731 504-0','08731 504-190','','84122','1156','74300000','74301501','BBK REGENSBURG EH LANDSHUT','74351310','100017805','SPK DINGOLFING-LANDAU','Servicezentrum: Mo-Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-17:00 Uhr','poststelle@fa-dgf.bayern.de','www.finanzamt-dingolfing.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9111','Donauwörth -Außenstelle des Finanzamts Nördlingen-','Sallingerstr. 2','86609','Donauwörth','0906 77-0','0906 77-150','86607','','','72000000','72001502','BBK AUGSBURG','70010080','1632-809','POSTBANK -GIRO- MUENCHEN','Servicezentrum: Mo-Mi 7:30-13:30 Uhr, Do 7:30-18:00 Uhr, Fr 7:30 -13:00 Uhr','poststelle@fa-don.bayern.de','www.finanzamt-donauwoerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9112','Ebersberg ','Schloßplatz 1-3','85560','Ebersberg','08092 267-0','08092 267-102','','','','70000000','70001508','BBK MUENCHEN','70051805','75','KR SPK EBERSBERG','Servicezentrum: Mo-Do 7:30-13:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ebe.bayern.de','www.finanzamt-ebersberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9113','Eggenfelden ','Pfarrkirchner Str. 71','84307','Eggenfelden','08721 981-0','08721 981-200','','84301','1160','74300000','74301502','BBK REGENSBURG EH LANDSHUT','74351430','5603','SPK ROTTAL-INN EGGENFELDEN','Servicezentrum: Mo, Di, Do 7:45-15:00 Uhr (Jan-Mai Do 7:45-17:00 Uhr), Mi, Fr 7:30-12:00 Uhr','poststelle@fa-eg.bayern.de','www.finanzamt-eggenfelden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9114','Erding ','Münchener Str. 31','85435','Erding','08122 188-0','08122 188-150','','85422','1262','70000000','70001509','BBK MUENCHEN','70051995','8003','SPK ERDING-DORFEN','Servicezentrum: Mo-Mi 7:30-14:00 Uhr Do 7:30-18:00 Uhr, Fr 7:30 -12:00 Uhr','poststelle@fa-ed.bayern.de','www.finanzamt-erding.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9115','Freising ','Prinz-Ludwig-Str. 26','85354','Freising','08161 493-0','08161 493-106','85350','85313','1343','70000000','70001510','BBK MUENCHEN','70021180','4001010','HYPOVEREINSBK FREISING','Servicezentrum: Mo-Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-fs.bayern.de','www.finanzamt-freising.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9117','Fürstenfeldbruck ','Münchner Str.36','82256','Fürstenfeldbruck','08141 60-0','08141 60-150','','82242','1261','70000000','70001511','BBK MUENCHEN','70053070','8007221','SPK FUERSTENFELDBRUCK','Servicezentrum: Mo-Mi 7:30-14:30 Uhr, Do 7:30-17:30 Uhr, Fr 7:30 -12:30 Uhr','poststelle@fa-ffb.bayern.de','www.finanzamt-fuerstenfeldbruck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9118','Füssen -Außenstelle des Finanzamts Kaufbeuren-','Rupprechtstr. 1','87629','Füssen','08362 5056-0','08362 5056-290','','87620','1460','73300000','73301510','BBK AUGSBURG EH KEMPTEN','73350000','310500525','SPARKASSE ALLGAEU','Servicezentrum: Mo-Mi 8:00-15:00 Uhr, Do 8:00-18:00 Uhr, Fr 8:00-13:00 Uhr','poststelle@fa-fues.bayern.de','www.finanzamt-fuessen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9119','Garmisch-Partenkirchen ','Von-Brug-Str. 5','82467','Garmisch-Partenkirchen','08821 700-0','08821 700-111','','82453','1363','70000000','70001520','BBK MUENCHEN','70350000','505','KR SPK GARMISCH-PARTENKIRCH','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-gap.bayern.de','www.finanzamt-garmisch-partenkirchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9120','Bad Griesbach -Außenstelle des Finanzamts Passau-','Schloßhof 5-6','94086','Bad Griesbach','0851 504-0','0851 504-2222','','94083','1222','74000000','74001500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-griesb.bayern.de','www.finanzamt-bad-griesbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9121','Günzburg ','Schloßpl. 4','89312','Günzburg','08221 902-0','08221 902-209','','89302','1241','72000000','72001505','BBK AUGSBURG','72051840','18','SPK GUENZBURG-KRUMBACH','Servicezentrum: Mo-Di 7:45-12:30 u. 13:30-15:30, Mi, Fr 7:45-12:30, Do 7:45-12:30 u. 13:30-18:00','poststelle@fa-gz.bayern.de','www.finanzamt-guenzburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9123','Immenstadt -Außenstelle des Finanzamts Kempten-','Rothenfelsstr. 18','87509','Immenstadt','08323 801-0','08323 801-235','','87502','1251','73300000','73301520','BBK AUGSBURG EH KEMPTEN','73350000','113464','SPARKASSE ALLGAEU','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-immen.bayern.de','www.finanzamt-immenstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9124','Ingolstadt ','Esplanade 38','85049','Ingolstadt','0841 311-0','0841 311-133','','85019','210451','72100000','72101500','BBK MUENCHEN EH INGOLSTADT','72150000','25 080','SPARKASSE INGOLSTADT','Servicezentrum: Mo-Di 7:15-13:30, Mi 7:15-12:30, Do 7:15-17:30, Fr 7:15-12:00','poststelle@fa-in.bayern.de','www.finanzamt-ingolstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9125','Kaufbeuren ','Remboldstr. 21','87600','Kaufbeuren','08341 802-0','08341 802-221','','87572','1260','73300000','73401500','BBK AUGSBURG EH KEMPTEN','73450000','25700','KR U ST SPK KAUFBEUREN','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-kf.bayern.de','www.finanzamt-kaufbeuren.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9126','Kelheim ','Klosterstr. 1','93309','Kelheim','09441 201-0','09441 201-201','','93302','1252','75000000','75001501','BBK REGENSBURG','75051565','190201301','KREISSPARKASSE KELHEIM','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-keh.bayern.de','www.finanzamt-kelheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9127','Kempten (Allgäu) ','Am Stadtpark 3','87435','Kempten','0831 256-0','0831 256-260','','87405','1520','73300000','73301500','BBK AUGSBURG EH KEMPTEN','73350000','117','SPARKASSE ALLGAEU','Servicezentrum: Mo-Do 7:30-14:30 Uhr (Nov-Mai Do 7:20-17:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-ke.bayern.de','www.finanzamt-kempten.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9131','Landsberg ','Israel-Beker-Str. 20','86899','Landsberg','08191 332-0','08191 332-108','86896','','','72000000','72001504','BBK AUGSBURG','70052060','158','SPK LANDSBERG-DIESSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-16:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ll.bayern.de','www.finanzamt-landsberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9132','Landshut ','Maximilianstr. 21','84028','Landshut','0871 8529-000','0871 8529-360','','','','74300000','74301500','BBK REGENSBURG EH LANDSHUT','74350000','10111','SPK LANDSHUT','Servicezentrum: Mo-Di 8:00-15:00 Uhr, Mi, Fr 8:00-12:00 Uhr, Do 8:00-18:00 Uhr','poststelle@fa-la.bayern.de','www.finanzamt-landshut.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9133','Laufen - Außenstelle des Finanzamts Berchtesgaden-','Rottmayrstr. 13','83410','Laufen','08682 918-0','08682 918-100','','83406','1251','71000000','71001502','BBK MUENCHEN EH B REICHENHA','71050000','59998','SPK BERCHTESGADENER LAND','Servicezentrum: Mo-Do 7:30-13:30 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-lauf.bayern.de','www.finanzamt-laufen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9134','Lindau ','Brettermarkt 4','88131','Lindau','08382 916-0','08382 916-100','','88103','1320','73300000','73501500','BBK AUGSBURG EH KEMPTEN','73150000','620018333','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-li.bayern.de','www.finanzamt-lindau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9138','Memmingen ','Bodenseestr. 6','87700','Memmingen','08331 608-0','08331 608-165','','87683','1345','73100000','73101500','BBK AUGSBURG EH MEMMINGEN','73150000','210005','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Nov-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-mm.bayern.de','www.finanzamt-memmingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9139','Miesbach ','Schlierseer Str. 5','83714','Miesbach','08025 709-0','08025 709-500','','83711','302','70000000','70001512','BBK MUENCHEN','71152570','4002','KR SPK MIESBACH-TEGERNSEE','Servicezentrum: Mo, Di, Mi, Fr 7:30-14:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-mb.bayern.de','www.finanzamt-miesbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9140','Mindelheim -Außenstelle des Finanzamts Memmingen-','Bahnhofstr. 16','87719','Mindelheim','08261 9912-0','08261 9912-300','','87711','1165','73100000','73101502','BBK AUGSBURG EH MEMMINGEN','73150000','810004788','SPK MEMMINGEN-LINDAU-MINDEL','Servicezentrum: Mo-Mi 7:30-12:00 u. 13:30-15:30, Do 7:30-12:00 u. 13:30-17:30, Fr 7:30-12:00','poststelle@fa-mn.bayern.de','www.finanzamt-mindelheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9141','Mühldorf ','Katharinenplatz 16','84453','Mühldorf','08631 616-0','08631 616-100','','84445','1369','71100000','71101501','BBK MUENCHEN EH ROSENHEIM','71151020','885','KR SPK MUEHLDORF','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-mue.bayern.de','www.finanzamt-muehldorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9142','München f. Körpersch. Bewertung des Grundbesitzes','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9143','München f. Körpersch. Körperschaftsteuer','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9144','München I ','Karlstr. 9-11','80333','München','089 1252-0','089 1252-1111','80276','80008','20 09 05','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m1.bayern.de','www.finanzamt-muenchen-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9145','München III ','Deroystr. 18','80335','München','089 1252-0','089 1252-3333','80301','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m3.bayern.de','www.finanzamt-muenchen-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9146','München IV ','Deroystr. 4 Aufgang I','80335','München','089 1252-0','089 1252-4000','80302','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m4.bayern.de','www.finanzamt-muenchen-IV.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9147','München II ','Deroystr. 20','80335','München','089 1252-0','089 1252-2222','80269','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m2.bayern.de','www.finanzamt-muenchen-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9148','München V ','Deroystr. 4 Aufgang II','80335','München','089 1252-0','089 1252-5281','80303','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','poststelle@fa-m5.bayern.de','www.finanzamt-muenchen-V.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9149','München-Zentral Erhebung, Vollstreckung','Winzererstr. 47a','80797','München','089 3065-0','089 3065-1900','80784','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-zfa.bayern.de','www.finanzamt-muenchen-zentral.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9150','Neuburg -Außenstelle des Finanzamts Schrobenhausen-','Fünfzehnerstr. 7','86633','Neuburg','08252 918-0','08252 918-222','','86618','1320','72100000','72101505','BBK MUENCHEN EH INGOLSTADT','72151880','104000','ST SPK SCHROBENHAUSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-nd.bayern.de','www.finanzamt-neuburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9151','Neu-Ulm ','Nelsonallee 5','89231','Neu-Ulm','0731 7045-0','0731 7045-500','89229','89204','1460','63000000','63001501','BBK ULM, DONAU','73050000','430008425','SPK NEU-ULM ILLERTISSEN','Servicezentrum: Mo, Di, Mi, Fr 8:00-13:00 Uhr, Do 8:00-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-nu.bayern.de','www.finanzamt-neu-ulm.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9152','Nördlingen ','Tändelmarkt 1','86720','Nördlingen','09081 215-0','09081 215-100','','86715','1521','72000000','72001506','BBK AUGSBURG','72250000','111500','SPARKASSE NOERDLINGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-13:00 Uhr u. 14:00-18:00 Uhr','poststelle@fa-noe.bayern.de','www.finanzamt-noerdlingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9153','Passau mit Außenstellen ','Innstr. 36','94032','Passau','0851 504-0','0851 504-1410','','94030','1450','74000000','740 01500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-pa.bayern.de','www.finanzamt-passau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9154','Pfaffenhofen ','Schirmbeckstr. 5','85276','Pfaffenhofen a. d. Ilm','08441 77-0','08441 77-199','','85265','1543','72100000','72101504','BBK MUENCHEN EH INGOLSTADT','72151650','7302','VER SPK PFAFFENHOFEN','Servicezentrum: Mo-Mi 7:30-14:30 Uhr, Do 7:30-17:30 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-paf.bayern.de','www.finanzamt-pfaffenhofen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9156','Rosenheim m. ASt Wasserburg ','Wittelsbacherstr. 25','83022','Rosenheim','08031 201-0','08031 201-222','','83002','100255','71100000','71101500','BBK MUENCHEN EH ROSENHEIM','71150000','34462','SPK ROSENHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Okt-Mai Do 7:30-17:00 Uhr), Fr 7:30-12.00 Uhr','poststelle@fa-ro.bayern.de','www.finanzamt-rosenheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9157','Grafenau ','Friedhofstr. 1','94481','Grafenau','08552 423-0','08552 423-170','','','','75000000','75001507','BBK REGENSBURG','70010080','1621-806','POSTBANK -GIRO- MUENCHEN','Servicezentrum: Mo, Di 7:30-15:00 Uhr, Mi, Fr 7:30-12:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-gra.bayern.de','www.finanzamt-grafenau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9158','Schongau - Außenstelle des Finanzamts Weilheim-Schongau -','Rentamtstr. 1','86956','Schongau','0881 184-0','0881 184-373','','86951','1147','70000000','70001521','BBK MUENCHEN','70351030','20149','VER SPK WEILHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Jun Do 7:30-17:30 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-sog.bayern.de','www.finanzamt-schongau.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9159','Schrobenhausen m. ASt Neuburg ','Rot-Kreuz-Str. 2','86529','Schrobenhausen','08252 918-0','08252 918-430','','86522','1269','72100000','72101505','BBK MUENCHEN EH INGOLSTADT','72151880','104000','ST SPK SCHROBENHAUSEN','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-sob.bayern.de','www.finanzamt-schrobenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9161','Starnberg ','Schloßbergstr.','82319','Starnberg','08151 778-0','08151 778-250','','82317','1251','70000000','70001513','BBK MUENCHEN','70250150','430064295','KR SPK MUENCHEN STARNBERG','Servicezentrum: Mo-Mi 7:30-15:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-13:00 Uhr','poststelle@fa-sta.bayern.de','www.finanzamt-starnberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9162','Straubing ','Fürstenstr. 9','94315','Straubing','09421 941-0','09421 941-272','','94301','151','75000000','75001502','BBK REGENSBURG','74250000','240017707','SPK STRAUBING-BOGEN','Servicezentrum: Mo, Di, Mi, Fr 7:30-13:00 Uhr, Do 7:30-18:00 Uhr','poststelle@fa-sr.bayern.de','www.finanzamt-straubing.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9163','Traunstein ','Herzog-Otto-Str. 6','83278','Traunstein','0861 701-0','0861 701-338','83276','83263','1309','71000000','71001503','BBK MUENCHEN EH B REICHENHA','71052050','7070','KR SPK TRAUNSTEIN-TROSTBERG','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt.-Mai Do 7:30-18:00 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-ts.bayern.de','www.finanzamt-traunstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9164','Viechtach -Außenstelle des Finanzamts Zwiesel-','Mönchshofstr. 27','94234','Viechtach','09922 507-0','09922 507-399','','94228','1162','75000000','75001508','BBK REGENSBURG','74151450','240001008','SPARKASSE REGEN-VIECHTACH','Servicezentrum: Mo-Di 7:45-15:00 Uhr, Mi, Fr 7:45-12:00 Uhr, Do 7:45-18:00 Uhr','poststelle@fa-viech.bayern.de','www.finanzamt-viechtach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9166','Vilshofen -Außenstelle des Finanzamts Passau-','Kapuzinerstr. 36','94474','Vilshofen','0851 504-0','0851 504-2465','','','','74000000','74001500','BBK REGENSBURG EH PASSAU','74050000','16170','SPK PASSAU','Servicezentrum: Mo-Mi 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-vof.bayern.de','www.finanzamt-vilshofen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9167','Wasserburg -Außenstelle des Finanzamts Rosenheim-','Rosenheimer Str. 16','83512','Wasserburg','08037 201-0','08037 201-150','','83502','1280','71100000','71101500','BBK MUENCHEN EH ROSENHEIM','71150000','34462','SPK ROSENHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr, (Okt-Mai Do 7:30-17:00 Uhr), Fr 7:30-12.00 Uhr','poststelle@fa-ws.bayern.de','www.finanzamt-wasserburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9168','Weilheim-Schongau ','Hofstr. 23','82362','Weilheim','0881 184-0','0881 184-500','','82352','1264','70000000','70001521','BBK MUENCHEN','70351030','20149','VER SPK WEILHEIM','Servicezentrum: Mo-Do 7:30-14:00 Uhr (Okt-Jun Do 7:30-17:30 Uhr), Fr 7:30-12:00 Uhr','poststelle@fa-wm.bayern.de','www.finanzamt-weilheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9169','Wolfratshausen ','Heimgartenstr. 5','82515','Wolfratshausen','08171 25-0','08171 25-150','','82504','1444','70000000','70001514','BBK MUENCHEN','70054306','505','SPK BAD TOELZ-WOLFRATSHAUSE','Servicezentrum: Mo-MI 7:30-14:00 Uhr, Do 7:30-17:00 Uhr, Fr 7:30-12:30 Uhr','poststelle@fa-wor.bayern.de','www.finanzamt-wolfratshausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9170','Zwiesel m. ASt Viechtach ','Stadtplatz 16','94227','Zwiesel','09922 507-0','09922 507-200','','94221','1262','75000000','75001508','BBK REGENSBURG','74151450','240001008','SPARKASSE REGEN-VIECHTACH','Servicezentrum: Mo-Di 7:45-15:00 Uhr, Mi, Fr 7:45-12:00 Uhr, Do 7:45-18:00 Uhr','poststelle@fa-zwi.bayern.de','www.finanzamt-zwiesel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9171','Eichstätt ','Residenzplatz 8','85072','Eichstätt','08421 6007-0','08421 6007-400','85071','85065','1163','72100000','72101501','BBK MUENCHEN EH INGOLSTADT','72151340','1214','SPARKASSE EICHSTAETT','Servicezentrum: Mo, Di, Mi 7:30-14:00 Uhr, Do 7:30-18:00 Uhr, Fr 7:30-12:00 Uhr','poststelle@fa-ei.bayern.de','www.finanzamt-eichstaett.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9180','München f. Körpersch. ','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9181','München I Arbeitnehmerbereich','Karlstr. 9/11','80333','München','089 1252-0','089 1252-1111','80276','80008','20 09 05','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m1-BS.bayern.de','www.finanzamt-muenchen-I.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9182','München II Arbeitnehmerbereich','Deroystr. 20','80335','München','089 1252-0','089 1252-2888','80269','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m2-BS.bayern.de','www.finanzamt-muenchen-II.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9183','München III Arbeitnehmerbereich','Deroystr. 18','80335','München','089 1252-0','089 1252-3788','80301','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m3-BS.bayern.de','www.finanzamt-muenchen-III.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9184','München IV Arbeitnehmerbereich','Deroystr. 4 Aufgang I','80335','München','089 1252-0','089 1252-4820','80302','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m4-BS.bayern.de','www.finanzamt-muenchen-IV.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9185','München V Arbeitnehmerbereich','Deroystr. 4 Aufgang II','80335','München','089 1252-0','089 1252-5799','80303','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Servicezentrum Deroystr. 6: Mo-Mi 7:30-16:00, Do 7:30-18:00, Fr 7:30-12:30 (i. Ü. nach Vereinb.)','Poststelle@fa-m5-BS.bayern.de','www.finanzamt-muenchen-V.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9187','München f. Körpersch. ','Meiserstr. 4','80333','München','089 1252-0','089 1252-7777','80275','80008','20 09 26','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-koe.bayern.de','www.finanzamt-muenchen-koerperschaften.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9189','München-Zentral Kraftfahrzeugsteuer','Winzererstr. 47a','80797','München','089 3065-0','089 3065-1900','80784','','','70050000','24962','BAYERNLB MUENCHEN','70000000','70001506','BBK MUENCHEN','Mo, Di, Do, Fr 8:00-12:00 Uhr, Mi geschlossen','poststelle@fa-m-zfa.bayern.de','www.finanzamt-muenchen-zentral.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9201','Amberg ','Kirchensteig 2','92224','Amberg','09621 36-0','09621 36-413','','92204','1452','75300000','75301503','BBK REGENSBURG EH WEIDEN','75250000','190011122','SPARKASSE AMBERG-SULZBACH','Servicezentrum: Mo, Die, Mi, Fr: 07:30 - 12:00 UhrDo: 07:30 - 17:30 Uhr','poststelle@fa-am.bayern.de','www.finanzamt-amberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9202','Obernburg a. Main mit Außenstelle Amorbach','Schneeberger Str. 1','63916','Amorbach','09373 202-0','09373 202-100','','63912','1160','79500000','79501502','BBK WUERZBURG EH ASCHAFFENB','79650000','620300111','SPK MILTENBERG-OBERNBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-amorb.bayern.de','www.finanzamt-amorbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9203','Ansbach mit Außenstellen','Mozartstr. 25','91522','Ansbach','0981 16-0','0981 16-333','','91511','608','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-an.bayern.de','www.finanzamt-ansbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9204','Aschaffenburg ','Auhofstr. 13','63741','Aschaffenburg','06021 492-0','06021 492-1000','63736','','','79500000','79501500','BBK WUERZBURG EH ASCHAFFENB','79550000','8375','SPK ASCHAFFENBURG ALZENAU','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 8:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-ab.bayern.de','www.finanzamt-aschaffenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9205','Bad Kissingen ','Bibrastr. 10','97688','Bad Kissingen','0971 8021-0','0971 8021-200','','97663','1360','79300000','79301501','BBK WUERZBURG EH SCHWEINFUR','79351010','10009','SPK BAD KISSINGEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kg.bayern.de','/www.finanzamt-bad-kissingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9206','Bad Neustadt a.d.S. ','Meininger Str. 39','97616','Bad Neustadt','09771 9104-0','09771 9104-444','97615','','','79300000','79301502','BBK WUERZBURG EH SCHWEINFUR','79353090','7005','SPK BAD NEUSTADT A D SAALE','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-nes.bayern.de','www.finanzamt-bad-neustadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9207','Bamberg ','Martin-Luther-Str. 1','96050','Bamberg','0951 84-0','0951 84-230','96045','','','77000000','77001500','BBK NUERNBERG EH BAMBERG','77050000','30700','SPK BAMBERG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-ba.bayern.de','www.finanzamt-bamberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9208','Bayreuth ','Maximilianstr. 12/14','95444','Bayreuth','0921 609-0','0921 609-254','','95422','110361','77300000','773 01500','BBK BAYREUTH','77350110','9033333','SPARKASSE BAYREUTH','Servicezentrum: Mo - Mi: 07:30 - 14:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-bt.bayern.de','www.finanzamt-bayreuth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9211','Cham mit Außenstellen ','Reberstr. 2','93413','Cham','09971 488-0','09971 488-199','','93402','1253','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 18:00 Uhr, Fr: 07:30','poststelle@fa-cha.bayern.de','www.finanzamt-cham.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9212','Coburg ','Rodacher Straße 4','96450','Coburg','09561 646-0','09561 646-130','','96406','1653','77000000','78301500','BBK NUERNBERG EH BAMBERG','78350000','7450','VER SPK COBURG','Servicezentrum: Mo - Fr: 08:00 - 13:00 Uhr, Do: 14:00 - 18:00 Uhr','poststelle@fa-co.bayern.de','www.finanzamt-coburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9213','Dinkelsbühl - Außenstelle des Finanzamts Ansbach -','Föhrenberggasse 30','91550','Dinkelsbühl','0981 16-0','09851 5737-607','','','','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00, Do: 08:00 - 18:00 Uhr, Fr: 08:00 -','poststelle@fa-dkb.bayern.de','www.finanzamt-dinkelsbuehl.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9214','Ebern - Außenstelle des Finanzamts Zeil -','Rittergasse 1','96104','Ebern','09524 824-0','09524 824-225','','','','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ebn.bayern.de','www.finanzamt-ebern.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9216','Erlangen ','Schubertstr 10','91052','Erlangen','09131 121-0','09131 121-369','91051','','','76000000','76001507','BBK NUERNBERG','76350000','2929','ST U KR SPK ERLANGEN','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-er.bayern.de','www.finanzamt-erlangen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9217','Forchheim ','Dechant-Reuder-Str. 6','91301','Forchheim','09191 626-0','09191 626-200','91299','','','76000000','76001508','BBK NUERNBERG','76351040','91','SPARKASSE FORCHHEIM','Servicezentrum: Mo - Mi: 08:00 - 13:00 Uhr, Do: 08:00 - 17:30, Fr: 08:00 -','poststelle@fa-fo.bayern.de','www.finanzamt-forchheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9218','Fürth ','Herrnstraße 69','90763','Fürth','0911 7435-0','0911 7435-350','90744','','','76000000','76201500','BBK NUERNBERG','76250000','18200','SPK FUERTH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-fue.bayern.de','www.finanzamt-fuerth.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9220','Gunzenhausen ','Hindenburgplatz 1','91710','Gunzenhausen','09831 8009-0','09831 8009-77','91709','','','76500000','76501502','BBK NUERNBERG EH ANSBACH','76551540','109785','VER SPK GUNZENHAUSEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-gun.bayern.de','www.finanzamt-gunzenhausen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9221','Hersbruck ','Amberger Str. 76 (Haus B)','91217','Hersbruck','09151 731-0','09151 731-200','','91211','273','76000000','76001505','BBK NUERNBERG','76050101','190016618','SPARKASSE NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 15:30 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-heb.bayern.de','www.finanzamt-hersbruck.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9222','Hilpoltstein ','Spitalwinkel 3','91161','Hilpoltstein','09174 469-0','09174 469-100','','91155','1180','76000000','76401520','BBK NUERNBERG','76450000','240000026','SPK MITTELFRANKEN-SUED','Servicezentrum: Mo - Fr: 08:00 - 12:30 Uhr, Do: 14:00 - 18:00 Uhr','poststelle@fa-hip.bayern.de','www.finanzamt-hilpoltstein.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9223','Hof mit Außenstellen ','Ernst-Reuter-Str. 60','95030','Hof','09281 929-0','09281 929-1500','','95012','1368','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ho.bayern.de','www.finanzamt-hof.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9224','Hofheim - Außenstelle des Finanzamts Zeil -','Marktplatz 1','97457','Hofheim','09524 824-0','09524 824-250','','','','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-hoh.bayern.de','www.finanzamt-hofheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9225','Karlstadt - Außenstelle des Finanzamts Lohr -','Gemündener Str. 3','97753','Karlstadt','09353 949-0','09353 949-2250','','','','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kar.bayern.de','www.finanzamt-karlstadt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9227','Kitzingen ','Moltkestr. 24','97318','Kitzingen','09321 703-0','09321 703-444','','97308','660','79000000','79101500','BBK WUERZBURG','79050000','42070557','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-kt.bayern.de','www.finanzamt-kitzingen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9228','Kronach ','Amtsgerichtsstr. 13','96317','Kronach','09261 510-0','09261 510-199','','96302','1262','77300000','77101501','BBK BAYREUTH','77151640','240006007','SPK KRONACH-LUDWIGSSTADT','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08.00 - 17:30 Uhr, Fr: 08:00','poststelle@fa-kc.bayern.de','www.finanzamt-kronach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9229','Kulmbach ','Georg-Hagen-Str. 17','95326','Kulmbach','09221 650-0','09221 650-283','','95304','1420','77300000','77101500','BBK BAYREUTH','77150000','105445','SPARKASSE KULMBACH','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08.00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-ku.bayern.de','www.finanzamt-kulmbach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9230','Lichtenfels ','Kronacher Str. 39','96215','Lichtenfels','09571 764-0','09571 764-420','','96206','1680','77000000','77001502','BBK NUERNBERG EH BAMBERG','77051860','2345','KR SPK LICHTENFELS','Servicezentrum: Mo - Fr: 08:00 - 13:00 Uhr, Do: 14:00 - 17:00 Uhr','poststelle@fa-lif.bayern.de','www.finanzamt-lichtenfels.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9231','Lohr a. Main mit Außenstellen ','Rexrothstr. 14','97816','Lohr','09352 850-0','09352 850-1300','','97804','1465','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-loh.bayern.de','www.finanzamt-lohr.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9232','Marktheidenfeld - Außenstelle des Finanzamts Lohr -','Ringstr. 24/26','97828','Marktheidenfeld','09391 506-0','09391 506-3299','','','','79000000','79001504','BBK WUERZBURG','79050000','2246','SPK MAINFRANKEN WUERZBURG','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-mar.bayern.de','www.finanzamt-marktheidenfeld.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9233','Münchberg - Außenstelle des Finanzamts Hof -','Hofer Str. 1','95213','Münchberg','09281 929-0','09281 929-3505','','','','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-mueb.bayern.de','www.finanzamt-muenchberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9234','Naila - Außenstelle des Finanzamts Hof -','Carl-Seyffert-Str. 3','95119','Naila','09281 929-0','09281 929-2506','','','','78000000','78001500','BBK BAYREUTH EH HOF','78050000','380020750','KR U ST SPK HOF','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-nai.bayern.de','www.finanzamt-naila.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9235','Neumarkt i.d.Opf. ','Ingolstädter Str. 3','92318','Neumarkt','09181 692-0','09181 692-1200','','','','76000000','76001506','BBK NUERNBERG','76052080','6296','SPK NEUMARKT I D OPF-PARSBG','Servicezentrum: Mo - Do: 07:30 - 15:00 Uhr, Fr: 07:30 - 12:00 Uhr','poststelle@fa-nm.bayern.de','/www.finanzamt-neumarkt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9236','Neunburg v. W. - Außenstelle des Finanzamts Schwandorf -','Krankenhausstr. 6','92431','Neunburg vorm Wald','09431 382-0','09431 382-539','','92428','1000','75300000','75301502','BBK REGENSBURG EH WEIDEN','75051040','380019000','SPK IM LANDKREIS SCHWANDORF','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:30,Do: 07:30-12:30 u. 13:30-17:00, Fr: 07:30-12:30 h ','poststelle@fa-nen.bayern.de','www.finanzamt-neunburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9238','Nürnberg-Nord ','Kirchenweg 10','90419','Nürnberg','0911 3998-0','0911 3998-296','90340','','','76000000','76001502','BBK NUERNBERG','76050000','20161','BAYERNLB NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-n-n.bayern.de','www.finanzamt-nuernberg-nord.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9240','Nürnberg-Süd ','Sandstr. 20','90443','Nürnberg','0911 248-0','0911 248-2299/2599','90339','','','76000000','76001503','BBK NUERNBERG','76050101','3648043','SPARKASSE NUERNBERG','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-n-s.bayern.de','www.finanzamt-nuernberg-sued.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9241','Nürnberg-Zentral ','Voigtländerstr. 7/9','90489','Nürnberg','0911 5393-0','0911 5393-2000','','','','76000000','76001501','BBK NUERNBERG','76050101','1025008','SPARKASSE NUERNBERG','Servicezentrum: Mo - Do: 08:00 - 12:30 h, Di und Do: 13:30 - 15:00 h,','poststelle@fa-n-zfa.bayern.de','www.zentralfinanzamt-nuernberg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9242','Ochsenfurt - Außenstelle des Finanzamts Würzburg -','Völkstr.1','97199','Ochsenfurt','09331 904-0','09331 904-200','','97196','1263','79000000','79001500','BBK WUERZBURG','79020076','801283','HYPOVEREINSBK WUERZBURG','Servicezentrum: Mo - Mi: 07:30 - 13:00 Uhr, Do: 07:30 - 17:00 uhr, Fr: 07:30','poststelle@fa-och.bayern.de','www.finanzamt-ochsenfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9244','Regensburg ','Landshuter Str. 4','93047','Regensburg','0941 5024-0','0941 5024-1199','93042','','','75000000','75001500','BBK REGENSBURG','75050000','111500','SPK REGENSBURG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-r.bayern.de','www.finanzamt-regensburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9246','Rothenburg - Außenstelle des Finanzamts Ansbach -','Ludwig-Siebert-Str. 31','91541','Rothenburg o.d.T.','0981 16-0','09861 706-511','','','','76500000','76501500','BBK NUERNBERG EH ANSBACH','76550000','215004','VER SPK ANSBACH','Servicezentrum: Mo - Mi: 08:00 - 14:00 Uhr, Do: 08:00 - 18:00 Uhr, Fr: 08:00','poststelle@fa-rot.bayern.de','www.finanzamt-rothenburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9247','Schwabach ','Theodor-Heuss-Str. 63','91126','Schwabach','09122 928-0','09122 928-100','91124','','','76000000','76401500','BBK NUERNBERG','76450000','55533','SPK MITTELFRANKEN-SUED','Servicezentrum: Mo - Mi: 08:00 - 13:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-sc.bayern.de','www.finanzamt-schwabach.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9248','Schwandorf mit Außenstelle Neunburg v. W.','Friedrich-Ebert-Str.59','92421','Schwandorf','09431 382-0','09431 382-111','92419','','','75300000','75301502','BBK REGENSBURG EH WEIDEN','75051040','380019000','SPK IM LANDKREIS SCHWANDORF','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:30,Do: 07:30-12:30 u. 13:30-17:00, Fr: 07:30-12:30 h ','poststelle@fa-sad.bayern.de','www.finanzamt-schwandorf.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9249','Schweinfurt ','Schrammstr. 3','97421','Schweinfurt','09721 2911-0','09721 2911-5070','97420','','','79300000','79301500','BBK WUERZBURG EH SCHWEINFUR','79350101','15800','KR SPK SCHWEINFURT','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-sw.bayern.de','www.finanzamt-schweinfurt.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9250','Selb - Außenstelle des Finanzamts Wunsiedel -','Wittelsbacher Str. 8','95100','Selb','09232 607-0','09232 607-300','','','','78000000','78101512','BBK BAYREUTH EH HOF','78055050','620006254','SPK FICHTELGEBIRGE','Servicezentrum: Mo-Mi: 07:30-12:30 u. 13:30-15:00,Do: 07:30-12:30 und 13:30-17:00, Fr: 07:30-12:00 h','poststelle@fa-sel.bayern.de','www.finanzamt-selb.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9252','Uffenheim ','Schloßpl.','97215','Uffenheim','09842 200-0','09842 200-345','','97211','1240','76500000','76501504','BBK NUERNBERG EH ANSBACH','76251020','620002006','SPK I LANDKREIS NEUSTADT','Servicezentrum: Mo-Mi: 08:00-12:00 u. 13:00-15:00,Do: 08:00-12:00 u. 13:00-17:00, Fr: 08:00-12:00 h ','poststelle@fa-uff.bayern.de','www.finanzamt-uffenheim.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9253','Waldmünchen - Außenstelle des Finanzamts Cham -','Bahnhofstr. 10','93449','Waldmünchen','09971 488-0','09971 488-550','','','','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-wuem.bayern.de','www.finanzamt-waldmuenchen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9254','Waldsassen ','Johannisplatz 13','95652','Waldsassen','09632 847-0','09632 847-199','','95646','1329','75300000','75301511','BBK REGENSBURG EH WEIDEN','78151080','32367','SPK TIRSCHENREUTH','Servicezentrum: Mo - Fr: 07:30 - 12:30 Uhr, Mo - Mi: 13:30 - 15:30 Uhr,','poststelle@fa-wasa.bayern.de','www.finanzamt-waldsassen.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9255','Weiden i.d.Opf. ','Schlörpl. 2 u. 4','92637','Weiden','0961 301-0','0961 32600','','92604','1460','75300000','75301500','BBK REGENSBURG EH WEIDEN','75350000','172700','ST SPK WEIDEN','Servicezentrum: Mo - Fr: 07:30 - 12:30 Uhr, Mo - Mi: 13:30 - 15:30 Uhr,','poststelle@fa-wen.bayern.de','www.finanzamt-weiden.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9257','Würzburg mit Außenstelle Ochsenfurt','Ludwigstr. 25','97070','Würzburg','0931 387-0','0931 387-4444','97064','','','79000000','79001500','BBK WUERZBURG','79020076','801283','HYPOVEREINSBK WUERZBURG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 17:00 Uhr, Fr: 07:30','poststelle@fa-wue.bayern.de','www.finanzamt-wuerzburg.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9258','Wunsiedel mit Außenstelle Selb','Sonnenstr. 11','95632','Wunsiedel','09232 607-0','09232 607-200','95631','','','78000000','78101512','BBK BAYREUTH EH HOF','78055050','620006254','SPK FICHTELGEBIRGE','Servicezentrum: Mo-Mi: 07:30-12:30 u 13:30-15:00, Do: 07:30-12:30 und 13:30-17:00, Fr: 07:30-12:00 h','poststelle@fa-wun.bayern.de','www.finanzamt-wunsiedel.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9259','Zeil a. Main mit Außenstellen ','Obere Torstr. 9','97475','Zeil','09524 824-0','09524 824-100','','97470','1160','79300000','79301505','BBK WUERZBURG EH SCHWEINFUR','79351730','500900','SPK OSTUNTERFRANKEN','Servicezentrum: Mo - Mi: 08:00 - 15:00 Uhr, Do: 08:00 - 17:00 Uhr, Fr: 08:00','poststelle@fa-zei.bayern.de','www.finanzamt-zeil.de');
+INSERT INTO finanzamt (FA_Land_Nr, FA_BUFA_Nr, FA_Name, FA_Strasse, FA_PLZ, FA_Ort, FA_Telefon, FA_Fax, FA_PLZ_Grosskunden, FA_PLZ_Postfach, FA_Postfach, FA_BLZ_1, FA_Kontonummer_1, FA_Bankbezeichnung_1, FA_BLZ_2, FA_Kontonummer_2, FA_Bankbezeichnung_2, FA_Oeffnungszeiten, FA_Email, FA_Internet) VALUES ('9','9260','Kötzting - Außenstelle des Finanzamts Cham -','Bahnhofstr. 3','93444','Kötzting','09971 488-0','09971 488-450','','','','74221170','344 755 205','HYPOVEREINSBK CHAM, OBERPF','76010085','1735-858','POSTBANK NUERNBERG','Servicezentrum: Mo - Mi: 07:30 - 15:00 Uhr, Do: 07:30 - 18:00 Uhr, Fr: 07:30','poststelle@fa-koez.bayern.de','www.finanzamt-koetzting.de');
+
+
+CREATE FUNCTION "check_department" () RETURNS opaque AS '
+declare
+ dpt_id int;
+begin
+ if new.department_id = 0 then
+ delete from dpt_trans where trans_id = new.id;
+ return NULL;
+ end if;
+ select into dpt_id trans_id from dpt_trans where trans_id = new.id;
+ if dpt_id > 0 then
+ update dpt_trans set department_id = new.department_id where trans_id = dpt_id;
+ else
+ insert into dpt_trans (trans_id, department_id) values (new.id, new.department_id);
+ end if;
+return NULL;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE FUNCTION "del_department" () RETURNS opaque AS '
+begin
+ delete from dpt_trans where trans_id = old.id;
+ return NULL;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE FUNCTION "del_customer" () RETURNS opaque AS '
+begin
+ delete from shipto where trans_id = old.id;
+ delete from customertax where customer_id = old.id;
+ return NULL;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE FUNCTION "del_vendor" () RETURNS opaque AS '
+begin
+ delete from shipto where trans_id = old.id;
+ delete from vendortax where vendor_id = old.id;
+ return NULL;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE FUNCTION "del_exchangerate" () RETURNS opaque AS '
+declare
+ t_transdate date;
+ t_curr char(3);
+ t_id int;
+ d_curr text;
+begin
+ select into d_curr substr(curr,1,3) from defaults;
+ if TG_RELNAME = ''ar'' then
+ select into t_curr, t_transdate curr, transdate from ar where id = old.id;
+ end if;
+ if TG_RELNAME = ''ap'' then
+ select into t_curr, t_transdate curr, transdate from ap where id = old.id;
+ end if;
+ if TG_RELNAME = ''oe'' then
+ select into t_curr, t_transdate curr, transdate from oe where id = old.id;
+ end if;
+ if d_curr != t_curr then
+ select into t_id a.id from acc_trans ac
+ join ar a on (a.id = ac.trans_id)
+ where a.curr = t_curr
+ and ac.transdate = t_transdate
+ except select a.id from ar a where a.id = old.id
+ union
+ select a.id from acc_trans ac
+ join ap a on (a.id = ac.trans_id)
+ where a.curr = t_curr
+ and ac.transdate = t_transdate
+ except select a.id from ap a where a.id = old.id
+ union
+ select o.id from oe o
+ where o.curr = t_curr
+ and o.transdate = t_transdate
+ except select o.id from oe o where o.id = old.id;
+ if not found then
+ delete from exchangerate where curr = t_curr and transdate = t_transdate;
+ end if;
+ end if;
+return old;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE FUNCTION "check_inventory" () RETURNS opaque AS '
+declare
+ itemid int;
+ row_data inventory%rowtype;
+begin
+ if not old.quotation then
+ for row_data in select * from inventory where oe_id = old.id loop
+ select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;
+ if itemid is null then
+ delete from inventory where oe_id = old.id and orderitems_id = row_data.orderitems_id;
+ end if;
+ end loop;
+ end if;
+ return old;
+end;
+' LANGUAGE 'plpgsql';
+-- end function
+
+CREATE INDEX acc_trans_trans_id_key ON acc_trans USING btree (trans_id);
+
+CREATE INDEX acc_trans_chart_id_key ON acc_trans USING btree (chart_id);
+
+CREATE INDEX acc_trans_transdate_key ON acc_trans USING btree (transdate);
+
+CREATE INDEX acc_trans_source_key ON acc_trans USING btree (lower(source));
+
+CREATE INDEX ap_id_key ON ap USING btree (id);
+
+CREATE INDEX ap_transdate_key ON ap USING btree (transdate);
+
+CREATE INDEX ap_invnumber_key ON ap USING btree (lower(invnumber));
+
+CREATE INDEX ap_ordnumber_key ON ap USING btree (lower(ordnumber));
+
+CREATE INDEX ap_vendor_id_key ON ap USING btree (vendor_id);
+
+CREATE INDEX ap_employee_id_key ON ap USING btree (employee_id);
+
+CREATE INDEX ar_id_key ON ar USING btree (id);
+
+CREATE INDEX ar_transdate_key ON ar USING btree (transdate);
+
+CREATE INDEX ar_invnumber_key ON ar USING btree (lower(invnumber));
+
+CREATE INDEX ar_ordnumber_key ON ar USING btree (lower(ordnumber));
+
+CREATE INDEX ar_customer_id_key ON ar USING btree (customer_id);
+
+CREATE INDEX ar_employee_id_key ON ar USING btree (employee_id);
+
+CREATE INDEX assembly_id_key ON assembly USING btree (id);
+
+CREATE INDEX chart_id_key ON chart USING btree (id);
+
+CREATE UNIQUE INDEX chart_accno_key ON chart USING btree (accno);
+
+CREATE INDEX chart_category_key ON chart USING btree (category);
+
+CREATE INDEX chart_link_key ON chart USING btree (link);
+
+CREATE INDEX chart_gifi_accno_key ON chart USING btree (gifi_accno);
+
+CREATE INDEX customer_id_key ON customer USING btree (id);
+
+CREATE INDEX customer_customer_id_key ON customertax USING btree (customer_id);
+
+CREATE INDEX customer_customernumber_key ON customer USING btree (customernumber);
+
+CREATE INDEX customer_name_key ON customer USING btree (name);
+
+CREATE INDEX customer_contact_key ON customer USING btree (contact);
+
+CREATE INDEX employee_id_key ON employee USING btree (id);
+
+CREATE UNIQUE INDEX employee_login_key ON employee USING btree (login);
+
+CREATE INDEX employee_name_key ON employee USING btree (name);
+
+CREATE INDEX exchangerate_ct_key ON exchangerate USING btree (curr, transdate);
+
+CREATE UNIQUE INDEX gifi_accno_key ON gifi USING btree (accno);
+
+CREATE INDEX gl_id_key ON gl USING btree (id);
+
+CREATE INDEX gl_transdate_key ON gl USING btree (transdate);
+
+CREATE INDEX gl_reference_key ON gl USING btree (lower(reference));
+
+CREATE INDEX gl_description_key ON gl USING btree (lower(description));
+
+CREATE INDEX gl_employee_id_key ON gl USING btree (employee_id);
+
+CREATE INDEX invoice_id_key ON invoice USING btree (id);
+
+CREATE INDEX invoice_trans_id_key ON invoice USING btree (trans_id);
+
+CREATE INDEX oe_id_key ON oe USING btree (id);
+
+CREATE INDEX oe_transdate_key ON oe USING btree (transdate);
+
+CREATE INDEX oe_ordnumber_key ON oe USING btree (lower(ordnumber));
+
+CREATE INDEX oe_employee_id_key ON oe USING btree (employee_id);
+
+CREATE INDEX orderitems_trans_id_key ON orderitems USING btree (trans_id);
+
+CREATE INDEX parts_id_key ON parts USING btree (id);
+
+--
+-- TOC Entry ID 82 (OID 319577)
+--
+-- Name: "parts_partnumber_key" Type: INDEX Owner: postgres
+--
+
+CREATE INDEX parts_partnumber_key ON parts USING btree (lower(partnumber));
+
+CREATE INDEX parts_description_key ON parts USING btree (lower(description));
+
+CREATE INDEX partstax_parts_id_key ON partstax USING btree (parts_id);
+
+CREATE INDEX vendor_id_key ON vendor USING btree (id);
+
+CREATE INDEX vendor_name_key ON vendor USING btree (name);
+
+CREATE INDEX vendor_vendornumber_key ON vendor USING btree (vendornumber);
+
+CREATE INDEX vendor_contact_key ON vendor USING btree (contact);
+
+CREATE INDEX vendortax_vendor_id_key ON vendortax USING btree (vendor_id);
+
+CREATE INDEX shipto_trans_id_key ON shipto USING btree (trans_id);
+
+CREATE INDEX project_id_key ON project USING btree (id);
+
+CREATE INDEX ar_quonumber_key ON ar USING btree (lower(quonumber));
+
+CREATE INDEX ap_quonumber_key ON ap USING btree (lower(quonumber));
+
+CREATE INDEX makemodel_parts_id_key ON makemodel USING btree (parts_id);
+
+CREATE INDEX makemodel_make_key ON makemodel USING btree (lower(make));
+
+CREATE INDEX makemodel_model_key ON makemodel USING btree (lower(model));
+
+CREATE INDEX status_trans_id_key ON status USING btree (trans_id);
+
+CREATE INDEX department_id_key ON department USING btree (id);
+
+CREATE INDEX orderitems_id_key ON orderitems USING btree (id);
+
+
+
+
+CREATE TRIGGER "check_department" AFTER INSERT OR UPDATE ON "ar" FOR EACH ROW EXECUTE PROCEDURE "check_department" ();
+-- end trigger
+
+CREATE TRIGGER "check_department" AFTER INSERT OR UPDATE ON "ap" FOR EACH ROW EXECUTE PROCEDURE "check_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "check_department" AFTER INSERT OR UPDATE ON "gl" FOR EACH ROW EXECUTE PROCEDURE "check_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "check_department" AFTER INSERT OR UPDATE ON "oe" FOR EACH ROW EXECUTE PROCEDURE "check_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_department" AFTER DELETE ON "ar" FOR EACH ROW EXECUTE PROCEDURE "del_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_department" AFTER DELETE ON "ap" FOR EACH ROW EXECUTE PROCEDURE "del_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_department" AFTER DELETE ON "gl" FOR EACH ROW EXECUTE PROCEDURE "del_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_department" AFTER DELETE ON "oe" FOR EACH ROW EXECUTE PROCEDURE "del_department" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_customer" AFTER DELETE ON "customer" FOR EACH ROW EXECUTE PROCEDURE "del_customer" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_vendor" AFTER DELETE ON "vendor" FOR EACH ROW EXECUTE PROCEDURE "del_vendor" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_exchangerate" BEFORE DELETE ON "ar" FOR EACH ROW EXECUTE PROCEDURE "del_exchangerate" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_exchangerate" BEFORE DELETE ON "ap" FOR EACH ROW EXECUTE PROCEDURE "del_exchangerate" ();
+-- end trigger
+
+
+CREATE TRIGGER "del_exchangerate" BEFORE DELETE ON "oe" FOR EACH ROW EXECUTE PROCEDURE "del_exchangerate" ();
+-- end trigger
+
+
+CREATE TRIGGER "check_inventory" AFTER UPDATE ON "oe" FOR EACH ROW EXECUTE PROCEDURE "check_inventory" ();
+-- end trigger
+
+CREATE FUNCTION set_datevexport() RETURNS opaque AS '
+ BEGIN
+ IF OLD.datevexport IS NULL THEN
+ NEW.datevexport := 1;
+ END IF;
+ IF OLD.datevexport = 0 THEN
+ NEW.datevexport := 2;
+ END IF;
+ RETURN NEW;
+ END;
+' LANGUAGE plpgsql;
+
+CREATE TRIGGER customer_datevexport BEFORE UPDATE ON customer
+ FOR EACH ROW EXECUTE PROCEDURE set_datevexport();
+
+CREATE TRIGGER vendor_datevexport BEFORE UPDATE ON vendor
+ FOR EACH ROW EXECUTE PROCEDURE set_datevexport();
+
+CREATE FUNCTION set_mtime() RETURNS opaque AS '
+ BEGIN
+ NEW.mtime := ''now'';
+ RETURN NEW;
+ END;
+' LANGUAGE plpgsql;
+
+CREATE TRIGGER mtime_customer BEFORE UPDATE ON customer
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_vendor BEFORE UPDATE ON vendor
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_ar BEFORE UPDATE ON ar
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_ap BEFORE UPDATE ON ap
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_gl BEFORE UPDATE ON gl
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_acc_trans BEFORE UPDATE ON acc_trans
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_oe BEFORE UPDATE ON oe
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_invoice BEFORE UPDATE ON invoice
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_orderitems BEFORE UPDATE ON orderitems
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_chart BEFORE UPDATE ON chart
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_tax BEFORE UPDATE ON tax
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_parts BEFORE UPDATE ON parts
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_status BEFORE UPDATE ON status
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_partsgroup BEFORE UPDATE ON partsgroup
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_inventory BEFORE UPDATE ON inventory
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_department BEFORE UPDATE ON department
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
+
+CREATE TRIGGER mtime_contacts BEFORE UPDATE ON contacts
+ FOR EACH ROW EXECUTE PROCEDURE set_mtime();
--- /dev/null
+#!/bin/bash
+versionDB=""
+PS3="Bitte eine Datenbank auswählen: ";
+db="";
+function do_update {
+ echo "Erstelle db-Backup von $db"
+ pg_dump -U postgres $db > $db.sql
+ echo "Start update"
+ rc=`psql --quiet -t -A -U postgres $db < $1`
+ rc=`psql --quiet -t -A -U postgres $db < liste.sql`
+ echo $rc
+}
+database=`psql -t -A -U postgres -l`
+echo "Folgende Datenbanken wurden gefunden:"
+for i in $database; do
+ dbx=`echo $i | cut -d "|" -f 1 `
+ dbA=$dbx" "$dbA
+done
+select db in ${dbA[*]}; do
+ if [ "!$db!" = "!!" ]; then echo "Falsche Eingabe";
+ else break;
+ fi
+done
+echo $db wird nun getestet
+versionDB=`psql -t -A -U postgres $db -c "select version from defaults" 2>/dev/null`;
+if [ "$versionDB" = "2.1.11" ]; then
+ echo $db ist die Version Lx-ERP 1.0.0
+ do_update update100-200.sql
+ echo Update beendet.
+ exit
+elif [ "$versionDB" = "2.3.9" ]; then
+ echo $db ist die Version SQL-Ledger 2.3.9
+ do_update updateLedger-200.sql
+ echo Update beendet.
+ exit
+elif [ "$versionDB" = "1.0.0" ]; then
+ echo $db ist die Version Lx-ERP 1.0.2/1.0.3
+ do_update update10x-200.sql
+ echo Update beendet.
+ exit
+else
+ echo Diese Version wird nicht unterstützt!
+fi
\ No newline at end of file
--- /dev/null
+-- Updatescript von Version 1.00 auf 2.00
+-- H.Lindemann Lx-System GbR
+-- info@lx-system.de
+-- Version: 2.1.11
+-- echo "select version from defaults" | psql -q -t -U postgres lx2003
+
+--execute ''CREATE SEQUENCE glid start '' || lv.last_value || ''increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1'';
+BEGIN;
+LOCK TABLE gl IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ar IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ap IN ACCESS EXCLUSIVE MODE;
+
+CREATE SEQUENCE glid start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+
+CREATE FUNCTION _glid()
+RETURNS text
+AS 'DECLARE lv record;
+BEGIN
+SELECT INTO lv last_value from id;
+execute ''SELECT pg_catalog.setval(''''glid'''', '' || lv.last_value || '' , true)'';
+return cast(lv.last_value as text);
+END;'
+LANGUAGE 'plpgsql';
+select _glid();
+drop function _glid();
+
+\echo chart
+ALTER TABLE chart ADD COLUMN taxkey_id integer;
+ALTER TABLE chart ADD COLUMN pos_ustva integer;
+ALTER TABLE chart ADD COLUMN pos_bwa integer;
+ALTER TABLE chart ADD COLUMN pos_bilanz integer;
+ALTER TABLE chart ADD COLUMN pos_eur integer;
+
+\echo acc_trans
+ALTER TABLE acc_trans ADD COLUMN taxkey integer;
+ALTER TABLE acc_trans ADD COLUMN gldate date;
+ALTER TABLE acc_trans ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo tax
+ALTER TABLE tax ADD COLUMN taxkey integer;
+ALTER TABLE tax ADD COLUMN taxdescription text;
+
+\echo gl
+ALTER TABLE gl ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE gl ADD COLUMN gldate date;
+ALTER TABLE gl ALTER COLUMN gldate SET DEFAULT date('now'::text);
+ALTER TABLE gl ADD COLUMN taxinxluded boolean;
+
+\echo ar
+ALTER TABLE ar ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ar ADD COLUMN gldate date;
+ALTER TABLE ar ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo ap
+ALTER TABLE ap ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ap ADD COLUMN gldate date;
+ALTER TABLE ap ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+
+\echo parts
+ALTER TABLE parts ADD COLUMN shop boolean;
+ALTER TABLE parts ALTER COLUMN shop SET DEFAULT false;
+
+\echo indexe
+CREATE INDEX contact_name_key ON contacts USING btree (cp_name);
+
+update defaults set version = '2.0.0';
+
+
+end;
--- /dev/null
+-- Updatescript von Version 1.02/1.03 auf 2.00
+-- H.Lindemann Lx-System GbR
+-- info@lx-system.de
+-- Version: 1.0.0
+BEGIN;
+LOCK TABLE gl IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ar IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ap IN ACCESS EXCLUSIVE MODE;
+
+CREATE SEQUENCE glid start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+
+CREATE FUNCTION _glid()
+RETURNS text
+AS 'DECLARE lv record;
+BEGIN
+SELECT INTO lv last_value from id;
+execute ''SELECT pg_catalog.setval(''''glid'''', '' || lv.last_value || '' , true)'';
+return cast(lv.last_value as text);
+END;'
+LANGUAGE 'plpgsql';
+select _glid();
+drop function _glid();
+
+--execute ''CREATE SEQUENCE glid start '' || lv.last_value || ''increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1'';
+--update glid set last_value = (select last_value from id);
+
+\echo acc_trans
+ALTER TABLE acc_trans ADD COLUMN gldate date;
+ALTER TABLE acc_trans ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo gl
+ALTER TABLE gl ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE gl ADD COLUMN gldate date;
+ALTER TABLE gl ALTER COLUMN gldate SET DEFAULT date('now'::text);
+ALTER TABLE gl ADD COLUMN taxincluded boolean;
+
+\echo ar
+ALTER TABLE ar ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ar ADD COLUMN gldate date;
+ALTER TABLE ar ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo ap
+ALTER TABLE ap ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ap ADD COLUMN gldate date;
+ALTER TABLE ap ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo parts
+ALTER TABLE parts ADD COLUMN shop boolean;
+ALTER TABLE parts ALTER COLUMN shop SET DEFAULT false;
+
+update defaults set version = '2.0.0';
+
+
+END;
+
+\echo idexes
+CREATE INDEX acc_trans_trans_id_key ON acc_trans USING btree (trans_id);
+
+CREATE INDEX acc_trans_chart_id_key ON acc_trans USING btree (chart_id);
+
+CREATE INDEX acc_trans_transdate_key ON acc_trans USING btree (transdate);
+
+CREATE INDEX acc_trans_source_key ON acc_trans USING btree (lower(source));
+
+CREATE INDEX ap_id_key ON ap USING btree (id);
+
+CREATE INDEX ap_transdate_key ON ap USING btree (transdate);
+
+CREATE INDEX ap_invnumber_key ON ap USING btree (lower(invnumber));
+
+CREATE INDEX ap_ordnumber_key ON ap USING btree (lower(ordnumber));
+
+CREATE INDEX ap_vendor_id_key ON ap USING btree (vendor_id);
+
+CREATE INDEX ap_employee_id_key ON ap USING btree (employee_id);
+
+CREATE INDEX ar_id_key ON ar USING btree (id);
+
+CREATE INDEX ar_transdate_key ON ar USING btree (transdate);
+
+CREATE INDEX ar_invnumber_key ON ar USING btree (lower(invnumber));
+
+CREATE INDEX ar_ordnumber_key ON ar USING btree (lower(ordnumber));
+
+CREATE INDEX ar_customer_id_key ON ar USING btree (customer_id);
+
+CREATE INDEX ar_employee_id_key ON ar USING btree (employee_id);
+
+CREATE INDEX assembly_id_key ON assembly USING btree (id);
+
+CREATE INDEX chart_id_key ON chart USING btree (id);
+
+CREATE UNIQUE INDEX chart_accno_key ON chart USING btree (accno);
+
+CREATE INDEX chart_category_key ON chart USING btree (category);
+
+CREATE INDEX chart_link_key ON chart USING btree (link);
+
+CREATE INDEX chart_gifi_accno_key ON chart USING btree (gifi_accno);
+
+CREATE INDEX customer_id_key ON customer USING btree (id);
+
+CREATE INDEX customer_customer_id_key ON customertax USING btree (customer_id);
+
+CREATE INDEX customer_customernumber_key ON customer USING btree (customernumber);
+
+CREATE INDEX customer_name_key ON customer USING btree (name);
+
+CREATE INDEX customer_contact_key ON customer USING btree (contact);
+
+CREATE INDEX employee_id_key ON employee USING btree (id);
+
+CREATE UNIQUE INDEX employee_login_key ON employee USING btree (login);
+
+CREATE INDEX employee_name_key ON employee USING btree (name);
+
+CREATE INDEX exchangerate_ct_key ON exchangerate USING btree (curr, transdate);
+
+CREATE UNIQUE INDEX gifi_accno_key ON gifi USING btree (accno);
+
+CREATE INDEX gl_id_key ON gl USING btree (id);
+
+CREATE INDEX gl_transdate_key ON gl USING btree (transdate);
+
+CREATE INDEX gl_reference_key ON gl USING btree (lower(reference));
+
+CREATE INDEX gl_description_key ON gl USING btree (lower(description));
+
+CREATE INDEX gl_employee_id_key ON gl USING btree (employee_id);
+
+CREATE INDEX invoice_id_key ON invoice USING btree (id);
+
+CREATE INDEX invoice_trans_id_key ON invoice USING btree (trans_id);
+
+CREATE INDEX oe_id_key ON oe USING btree (id);
+
+CREATE INDEX oe_transdate_key ON oe USING btree (transdate);
+
+CREATE INDEX oe_ordnumber_key ON oe USING btree (lower(ordnumber));
+
+CREATE INDEX oe_employee_id_key ON oe USING btree (employee_id);
+
+CREATE INDEX orderitems_trans_id_key ON orderitems USING btree (trans_id);
+
+CREATE INDEX parts_id_key ON parts USING btree (id);
+
+CREATE INDEX parts_partnumber_key ON parts USING btree (lower(partnumber));
+
+CREATE INDEX parts_description_key ON parts USING btree (lower(description));
+
+CREATE INDEX partstax_parts_id_key ON partstax USING btree (parts_id);
+
+CREATE INDEX vendor_id_key ON vendor USING btree (id);
+
+CREATE INDEX vendor_name_key ON vendor USING btree (name);
+
+CREATE INDEX vendor_vendornumber_key ON vendor USING btree (vendornumber);
+
+CREATE INDEX vendor_contact_key ON vendor USING btree (contact);
+
+CREATE INDEX vendortax_vendor_id_key ON vendortax USING btree (vendor_id);
+
+CREATE INDEX shipto_trans_id_key ON shipto USING btree (trans_id);
+
+CREATE INDEX project_id_key ON project USING btree (id);
+
+CREATE INDEX ar_quonumber_key ON ar USING btree (lower(quonumber));
+
+CREATE INDEX ap_quonumber_key ON ap USING btree (lower(quonumber));
+
+CREATE INDEX makemodel_parts_id_key ON makemodel USING btree (parts_id);
+
+CREATE INDEX makemodel_make_key ON makemodel USING btree (lower(make));
+
+CREATE INDEX makemodel_model_key ON makemodel USING btree (lower(model));
+
+CREATE INDEX status_trans_id_key ON status USING btree (trans_id);
+
+CREATE INDEX department_id_key ON department USING btree (id);
+
+CREATE INDEX orderitems_id_key ON orderitems USING btree (id);
+
+CREATE INDEX contact_name_key ON contacts USING btree (cp_name);
+
+\echo functions
+SET check_function_bodies = false;
+
+CREATE FUNCTION del_yearend() RETURNS "trigger"
+ AS '
+begin
+ delete from yearend where trans_id = old.id;
+ return NULL;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION del_department() RETURNS "trigger"
+ AS '
+begin
+ delete from dpt_trans where trans_id = old.id;
+ return NULL;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION del_customer() RETURNS "trigger"
+ AS '
+begin
+ delete from shipto where trans_id = old.id;
+ delete from customertax where customer_id = old.id;
+ return NULL;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION del_vendor() RETURNS "trigger"
+ AS '
+begin
+ delete from shipto where trans_id = old.id;
+ delete from vendortax where vendor_id = old.id;
+ return NULL;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION del_exchangerate() RETURNS "trigger"
+ AS '
+declare
+ t_transdate date;
+ t_curr char(3);
+ t_id int;
+ d_curr text;
+begin
+ select into d_curr substr(curr,1,3) from defaults;
+ if TG_RELNAME = ''ar'' then
+ select into t_curr, t_transdate curr, transdate from ar where id = old.id;
+ end if;
+ if TG_RELNAME = ''ap'' then
+ select into t_curr, t_transdate curr, transdate from ap where id = old.id;
+ end if;
+ if TG_RELNAME = ''oe'' then
+ select into t_curr, t_transdate curr, transdate from oe where id = old.id;
+ end if;
+ if d_curr != t_curr then
+ select into t_id a.id from acc_trans ac
+ join ar a on (a.id = ac.trans_id)
+ where a.curr = t_curr
+ and ac.transdate = t_transdate
+ except select a.id from ar a where a.id = old.id
+ union
+ select a.id from acc_trans ac
+ join ap a on (a.id = ac.trans_id)
+ where a.curr = t_curr
+ and ac.transdate = t_transdate
+ except select a.id from ap a where a.id = old.id
+ union
+ select o.id from oe o
+ where o.curr = t_curr
+ and o.transdate = t_transdate
+ except select o.id from oe o where o.id = old.id;
+ if not found then
+ delete from exchangerate where curr = t_curr and transdate = t_transdate;
+ end if;
+ end if;
+return old;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION check_inventory() RETURNS "trigger"
+ AS '
+declare
+ itemid int;
+ row_data inventory%rowtype;
+begin
+ if not old.quotation then
+ for row_data in select * from inventory where oe_id = old.id loop
+ select into itemid id from orderitems where trans_id = old.id and id = row_data.orderitems_id;
+ if itemid is null then
+ delete from inventory where oe_id = old.id and orderitems_id = row_data.orderitems_id;
+ end if;
+ end loop;
+ end if;
+ return old;
+end;
+'
+LANGUAGE plpgsql;
+
+CREATE FUNCTION check_department() RETURNS "trigger"
+ AS '
+declare
+ dpt_id int;
+begin
+ if new.department_id = 0 then
+ delete from dpt_trans where trans_id = new.id;
+ return NULL;
+ end if;
+ select into dpt_id trans_id from dpt_trans where trans_id = new.id;
+ if dpt_id > 0 then
+ update dpt_trans set department_id = new.department_id where trans_id = dpt_id;
+ else
+ insert into dpt_trans (trans_id, department_id) values (new.id, new.department_id);
+ end if;
+return NULL;
+end;
+'
+LANGUAGE plpgsql;
+
+\echo trigger
+CREATE TRIGGER del_yearend
+ AFTER DELETE ON gl
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_yearend();
+
+CREATE TRIGGER del_department
+ AFTER DELETE ON ar
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_department();
+
+CREATE TRIGGER del_department
+ AFTER DELETE ON ap
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_department();
+
+CREATE TRIGGER del_department
+ AFTER DELETE ON gl
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_department();
+
+CREATE TRIGGER del_department
+ AFTER DELETE ON oe
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_department();
+
+CREATE TRIGGER del_customer
+ AFTER DELETE ON customer
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_customer();
+
+CREATE TRIGGER del_vendor
+ AFTER DELETE ON vendor
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_vendor();
+
+CREATE TRIGGER del_exchangerate
+ BEFORE DELETE ON ar
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_exchangerate();
+
+CREATE TRIGGER del_exchangerate
+ BEFORE DELETE ON ap
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_exchangerate();
+
+CREATE TRIGGER del_exchangerate
+ BEFORE DELETE ON oe
+ FOR EACH ROW
+ EXECUTE PROCEDURE del_exchangerate();
+
+CREATE TRIGGER check_inventory
+ AFTER UPDATE ON oe
+ FOR EACH ROW
+ EXECUTE PROCEDURE check_inventory();
+
+CREATE TRIGGER check_department
+ AFTER INSERT OR UPDATE ON ar
+ FOR EACH ROW
+ EXECUTE PROCEDURE check_department();
+
+CREATE TRIGGER check_department
+ AFTER INSERT OR UPDATE ON ap
+ FOR EACH ROW
+ EXECUTE PROCEDURE check_department();
+
+CREATE TRIGGER check_department
+ AFTER INSERT OR UPDATE ON gl
+ FOR EACH ROW
+ EXECUTE PROCEDURE check_department();
+
+CREATE TRIGGER check_department
+ AFTER INSERT OR UPDATE ON oe
+ FOR EACH ROW
+ EXECUTE PROCEDURE check_department();
--- /dev/null
+-- Updatescript von Version SQLedger 2.x auf 2.00
+-- H.Lindemann Lx-System GbR
+-- info@lx-system.de
+-- Version: 2.3.9
+
+BEGIN;
+LOCK TABLE gl IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ar IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE ap IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE vendor IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE customer IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE employee IN ACCESS EXCLUSIVE MODE;
+LOCK TABLE shipto IN ACCESS EXCLUSIVE MODE;
+
+CREATE SEQUENCE glid start 1 increment 1 maxvalue 9223372036854775807 minvalue 1 cache 1;
+
+CREATE FUNCTION _glid()
+RETURNS text
+AS 'DECLARE lv record;
+BEGIN
+SELECT INTO lv last_value from id;
+execute ''SELECT pg_catalog.setval(''''glid'''', '' || lv.last_value || '' , true)'';
+return cast(lv.last_value as text);
+END;'
+LANGUAGE 'plpgsql';
+select _glid();
+drop function _glid();
+
+\echo gl
+ALTER TABLE gl ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE gl ADD COLUMN gldate date;
+ALTER TABLE gl ALTER COLUMN gldate SET DEFAULT date('now'::text);
+ALTER TABLE gl ADD COLUMN taxinxluded boolean;
+
+\echo chart
+ALTER TABLE chart ADD COLUMN taxkey_id integer;
+ALTER TABLE chart ADD COLUMN pos_ustva integer;
+ALTER TABLE chart ADD COLUMN pos_bwa integer;
+ALTER TABLE chart ADD COLUMN pos_bilanz integer;
+ALTER TABLE chart ADD COLUMN pos_eur integer;
+
+\echo defaults
+--ALTER TABLE defaults drop COLUMN audittrail;
+
+\echo acc_trans
+ALTER TABLE acc_trans ADD COLUMN taxkey integer;
+ALTER TABLE acc_trans ADD COLUMN gldate date;
+ALTER TABLE acc_trans ALTER COLUMN gldate SET DEFAULT date('now'::text);
+
+\echo vendor
+CREATE TABLE newvendor (
+ id integer DEFAULT nextval('id'::text),
+ name character varying(75),
+ street character varying(75),
+ zipcode character varying(10),
+ city character varying(75),
+ country character varying(75),
+ contact character varying(75),
+ phone character varying(30),
+ fax character varying(30),
+ homepage text,
+ email text,
+ notes text,
+ terms smallint DEFAULT 0,
+ taxincluded boolean,
+ vendornumber text,
+ cc text,
+ bcc text,
+ gifi_accno text,
+ business_id integer,
+ taxnumber text,
+ sic_code text,
+ discount real,
+ creditlimit double precision
+);
+INSERT INTO newvendor (
+id, name, street,zipcode,city,country,contact,phone,fax,homepage,email,notes,terms,taxincluded,
+vendornumber,cc,bcc,gifi_accno,business_id,taxnumber,sic_code,discount,creditlimit)
+SELECT
+id, name, address1,zipcode,city,country,contact,phone, fax,null,email,notes,terms,taxincluded,
+vendornumber,cc,bcc,gifi_accno,business_id,taxnumber,sic_code,discount,creditlimit
+FROM vendor;
+--address2, state, iban, bic, employee_id, language_code, pricegroup_id, curr
+DROP TABLE vendor;
+ALTER TABLE newvendor RENAME TO vendor;
+
+\echo customer
+CREATE TABLE newcustomer (
+ id integer DEFAULT nextval('id'::text),
+ name character varying(75),
+ street character varying(75),
+ zipcode character varying(10),
+ city character varying(75),
+ country character varying(75),
+ contact character varying(75),
+ phone character varying(30),
+ fax character varying(30),
+ homepage text,
+ email text,
+ notes text,
+ discount real,
+ taxincluded boolean,
+ creditlimit double precision DEFAULT 0,
+ terms smallint DEFAULT 0,
+ customernumber text,
+ cc text,
+ bcc text,
+ business_id integer,
+ taxnumber text,
+ sic_code text
+);
+INSERT INTO newcustomer (
+id,name,street,zipcode,city,country,contact,phone,fax,homepage,email,notes,discount,taxincluded,creditlimit,
+terms,customernumber,cc,bcc,business_id,taxnumber,sic_code)
+SELECT
+id,name,address1,zipcode,city,country,contact,phone,fax,null,email,notes,discount,taxincluded,creditlimit,
+terms,customernumber,cc,bcc,business_id,taxnumber,sic_code
+FROM customer;
+--address2, state, iban, bic, employee_id, language_code, pricegroup_id, curr
+DROP TABLE customer;
+ALTER TABLE newcustomer RENAME TO customer;
+
+\echo contacts
+CREATE TABLE contacts (
+ cp_id integer DEFAULT nextval('id'::text),
+ cp_cv_id integer,
+ cp_greeting character varying(75),
+ cp_title character varying(75),
+ cp_givenname character varying(75),
+ cp_name character varying(75),
+ cp_email text,
+ cp_phone1 character varying(75),
+ cp_phone2 character varying(75)
+);
+
+\echo parts
+ALTER TABLE parts ADD COLUMN shop boolean;
+ALTER TABLE parts ALTER COLUMN shop SET DEFAULT false;
+
+\echo ar
+ALTER TABLE ar ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ar ADD COLUMN gldate date;
+ALTER TABLE ar ALTER COLUMN gldate SET DEFAULT date('now'::text);
+--ALTER TABLE ar DROP COLUMN language_code;
+--ALTER TABLE ar DROP COLUMN till;
+
+\echo ap
+ALTER TABLE ap ALTER COLUMN id SET DEFAULT nextval('glid'::text);
+ALTER TABLE ap ADD COLUMN gldate date;
+ALTER TABLE ap ALTER COLUMN gldate SET DEFAULT date('now'::text);
+--ALTER TABLE ap DROP COLUMN language_code;
+--ALTER TABLE ap DROP COLUMN till;
+
+\echo tax
+ALTER TABLE tax ADD COLUMN taxkey integer;
+ALTER TABLE tax ADD COLUMN taxdescription text;
+
+\echo oe
+ALTER TABLE oe DROP COLUMN language_code;
+
+\echo employee
+CREATE TABLE newemployee (
+ id integer DEFAULT nextval('id'::text),
+ login text,
+ name character varying(35),
+ addr1 character varying(35),
+ addr2 character varying(35),
+ addr3 character varying(35),
+ addr4 character varying(35),
+ workphone character varying(20),
+ homephone character varying(20),
+ startdate date DEFAULT date('now'::text),
+ enddate date,
+ notes text,
+ role text,
+ sales boolean DEFAULT true
+);
+INSERT INTO newemployee (
+id,login,name,addr1,addr2,addr3,addr4,workphone,homephone,startdate,enddate,notes,role,sales)
+SELECT
+id,login,name,address1,zipcode,city,address2, workphone,homephone,startdate,enddate,notes,role,sales
+FROM employee;
+--address2,state, country, email, sin, iban, bic, managerid
+DROP TABLE employee;
+ALTER TABLE newemployee RENAME TO employee;
+
+\echo shipto
+CREATE TABLE newshipto (
+ trans_id integer,
+ shiptoname character varying(75),
+ shiptostreet character varying(75),
+ shiptozipcode character varying(75),
+ shiptocity character varying(75),
+ shiptocountry character varying(75),
+ shiptocontact character varying(75),
+ shiptophone character varying(30),
+ shiptofax character varying(30),
+ shiptoemail text
+);
+INSERT INTO newshipto(
+trans_id,shiptoname,shiptostreet,shiptozipcode,shiptocity,shiptocountry,shiptocontact,shiptophone,shiptofax,shiptoemail)
+SELECT
+trans_id,shiptoname,shiptoaddress1,shiptozipcode,shiptocity,shiptocountry,shiptocontact,shiptophone,shiptofax,shiptoemail
+FROM shipto;
+-- shiptoaddress2,shiptostate,
+DROP TABLE shipto;
+ALTER TABLE newshipto RENAME TO shipto;
+
+\echo sic
+ALTER TABLE sic ADD COLUMN newcode text;
+UPDATE sic set newcode=code;
+ALTER TABLE sic drop COLUMN code;
+ALTER TABLE sic RENAME COLUMN newcode TO code;
+
+\echo yearend
+--DROP TABLE yearend;
+
+\echo partsvendor
+--DROP TABLE partsvendor;
+
+\echo pricegroup
+--DROP TABLE pricegroup;
+
+\echo partscustomer
+--DROP TABLE partscustomer;
+
+\echo language
+--DROP TABLE language;
+
+\echo autittrail
+--DROP TABLE audittrail;
+
+\echo translation;
+--DROP TABLE translation;
+
+\echo indexe
+CREATE INDEX contact_name_key ON contacts USING btree (cp_name);
+
+update defaults set version = '2.0.0';
+
+
+end;
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>BALANCE SHEET
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL ASSETS</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>LIABILITIES<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Liabilities</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>SHAREHOLDER'S EQUITY<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Equity</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL LIABILITIES & EQUITY</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B I N L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>From</th>
+ <th align=left width=50%><font color=ffffff>Ship To</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+
+ <%if contact%>
+ <br>Attn: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Order #</th>
+ <th width=17% align=left nowrap>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%> </td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%> </td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%> </td>
+ <td><%shipvia%> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Serialnumber</th>
+ <th> </th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Recd</th>
+ <th> </th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{From}
+\vspace{0.7cm}
+
+<%name%> \\
+<%street%> \\
+<%zipcode%> \\
+<%city%> \\
+<%country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%> \\
+<%shiptostreet%> \\
+<%shiptozipcode%> \\
+<%shiptocity%> \\
+<%shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{B I N} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>INCOME STATEMENT
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2>INCOME<br><hr width=300 size=5 align=left noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Income</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2>EXPENSES<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Expenses</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>INCOME / (LOSS)</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+
+
+
+
+
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telephone: <%tel%>
+ <br>Facsimile: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>I N V O I C E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Invoice Date</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Due Date</th><td width=10> </td><td><%duedate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td> </td><td><%invnumber%></td></tr>
+ </tr>
+
+<!--
+ <tr>
+ <th align=right>Clerk:</th><td> </td><td><%employee%></td>
+ </tr>
+-->
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ <th align=left><font color=ffffff>Ship To:</th>
+ </tr>
+
+<!--
+ other variables which can be use:
+ contact, shiptocontact, shiptophone, shiptofax
+-->
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+<!--
+you can also use netprice instead of sellprice if you
+don't want to show the discount
+netprice = sellprice - discount
+-->
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+<%if not taxincluded%>
+ <th colspan=5 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=5 align=right>Paid</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=3> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Terms Net <b><%terms%></b> days</td>
+ <th colspan=2 align=right>Outstanding</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<%if paid%>
+<tr>
+ <td colspan=7>
+ <table width=60%>
+ <tr>
+ <th align=left>Payments</th>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <hr noshade>
+ </td>
+ </tr>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Account</th>
+ <th align=left>Source</th>
+ <th align=left>Amount</th>
+ </tr>
+<%end paid%>
+
+<%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%payment%></td>
+ </tr>
+<%end payment%>
+
+<%if paid%>
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td> </td>
+</tr>
+<%end paid%>
+
+<tr>
+ <th colspan=7>
+ <br>Thank you for your valued business!
+ </th>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+<%end tax%>
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=7 align=left><font size=-2>Taxes shown are included in price.</th>
+ </tr>
+<%end taxincluded%>
+
+<!-- business number
+ <tr>
+ <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
+ </tr>
+-->
+
+<!-- banking information
+ <tr>
+ <th colspan=7 align=left>Banking Information:
+ <br>Bank
+ <br>Transit No.
+ <br>Account No.
+ </td>
+ </tr>
+-->
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+ & carried forward from page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+ \parbox[t]{10.5cm}{
+ \textbf{To}
+ \vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+%<%if contact%>
+%Attn: <%contact%>
+%\vspace{0.3cm}
+%<%end contact%>
+\vspace{0.5cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Ship To}
+\vspace{0.5cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{I N V O I C E}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Number} & <%invnumber%> \\
+ \textbf{Order} & <%ordnumber%> \\
+ \textbf{Clerk} & <%employee%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%> \\
+<%end tax%>
+<%if paid%>
+ \textbf{Paid} & - <%paid%> \\
+<%end paid%>
+ \hline
+ \textbf{Balance Owing} & \textbf{<%total%>} \\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+<%if paid%>
+\begin{tabularx}{10cm}{@{}lXlr@{}}
+ \textbf{Payments} & & & \\
+ \hline
+ \textbf{Date} & \textbf{Account} & \textbf{Source} & \textbf{Amount} \\
+<%end paid%>
+<%foreach payment%>
+ <%paymentdate%> & <%paymentaccount%> & <%paymentsource%> & <%payment%> \\
+<%end payment%>
+<%if paid%>
+\end{tabularx}
+<%end paid%>
+
+\vspace{1cm}
+
+\centerline{\textbf{Thank You for your valued business!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Payment due NET <%terms%> Days from date of Invoice. Interest on overdue
+amounts will acrue at the rate of 1.5\% per month starting <%duedate%>
+until paid in full. Items returned are subject to a 10\% restocking charge.
+A return authorization must be obtained from <%company%> before goods are
+returned. Returns must be shipped prepaid and properly insured.
+<%company%> will not be responsible for damages during transit.}
+
+\end{document}
+
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>P A C K I N G L I S T</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+<%if shiptocontact%>
+ <p>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{3.5cm}
+
+\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Number} & <%invnumber%> \\
+ \textbf{Customer} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Bin} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Thank You for your valued business!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Items returned are subject to a 10\% restocking charge.
+A return authorization must be obtained from <%company%> before goods are
+returned. Returns must be shipped prepaid and properly insured.
+<%company%> will not be responsible for damages during transit.}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P I C K L I S T</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Ship To:</th>
+ <th width=50%> </th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Attn: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>Order #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <%if warehouse%>
+ <th width=17% align=left>Warehouse</th>
+ <%end warehouse%>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%> </td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%> </td>
+
+ <%if warehouse%>
+ <td><%warehouse%> </td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%> </td>
+ <td><%shipvia%> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qty</th>
+ <th><font color=ffffff>Ship</th>
+ <th> </th>
+ <th><font color=ffffff>Bin</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[ ]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Ship To}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%> \\
+<%shiptostreet%> \\
+<%shiptozipcode%> \\
+<%shiptocity%> \\
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P I C K} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Order \#} & \textbf{Date} & \textbf{Contact}
+ <%if warehouse%>
+ & \textbf{Warehouse}
+ <%end warehouse%>
+ & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5em]
+ \hline
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}rlp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+ \textbf{Pos} & \textbf{Number} & \textbf{Description} &
+ \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telephone: <%tel%>
+ <br>Facsimile: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P U R C H A S E O R D E R</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Order Date</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Required by</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Terms Net <b><%terms%></b> days</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+\textbf{To}
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+Attn: <%contact%>
+\vspace{0.3cm}
+<%end contact%>
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{7.5cm}{
+\textbf{Ship To}
+\vspace{0.5cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+Attn: <%shiptocontact%>
+\vspace{0.3cm}
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{P U R C H A S E} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Required by} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Number} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E Q U E S T F O R Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>To:</th>
+ <th align=left width=50%><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td> </td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>RFQ #</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Required by</th>
+ <th width=17% align=left>Contact</th>
+ <th width=17% align=left>Shipping Point</th>
+ <th width=15% align=left>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%></td>
+ <td><%shipvia%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Please provide price and delivery time for the following items:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>Number</th>
+ <th align=left>Description</th>
+ <th>Qt'y</th>
+ <th> </th>
+ <th>Delivery</th>
+ <th>Unit Price</th>
+ <th>Extended</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%> </td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Extended} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Ship To}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{R E Q U E S T for Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{5}{|X}|} \hline
+ \textbf{RFQ \#} & \textbf{Date} & \textbf{Required by} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Please provide price and delivery time for the following items:
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rllrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & &
+ \textbf{Delivery} & \textbf{Unit Price} & \textbf{Extended} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telephone: <%tel%>
+ <br>Facsimile: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>S A L E S O R D E R</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Order Date</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Required by</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ <th align=left><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%ordtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=5 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Terms Net <b><%terms%></b> days</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>Tax is included in Total</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ A 10% order cancellation fee will be applied for any special order
+ products or products that have been customized, enhanced or
+ upgraded at customers request.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{S A L E S} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Order Date} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Required by} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Number} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+A 10\% order cancellation fee will be applied for any special order products or
+products that have been customized, enhanced or upgraded at customers request.
+Items which are non-returnable are indicated above.
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3> </td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>Q U O T A T I O N</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+<br>
+<%if contact%>
+<br>Attn: <%contact%>
+<%end contact%>
+
+<%if customerphone%>
+<br>Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+<br>Fax: <%customerfax%>
+<%end customerfax%>
+
+<%if email%>
+<br><%email%>
+<%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td> </td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Number</th>
+ <th width=17% align=left>Date</th>
+ <th width=17% align=left>Valid until</th>
+ <th width=17% align=left nowrap>Contact</th>
+ <th width=17% align=left nowrap>Shipping Point</th>
+ <th width=15% align=left nowrap>Ship via</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%></td>
+ <td><%shipvia%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>No.</th>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Disc</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> on <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>
+<%if terms%>
+ Terms Net <b><%terms%></b> days
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Special order items are subject to a 10% cancellation fee.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \parbox[b]{.2\textwidth}{
+ \includegraphics[scale=0.3]{sql-ledger}
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%quonumber%>}{<%company%>\hfill <%quonumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+
+\vspace{1cm}
+
+\textbf{Q U O T A T I O N}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Disc} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ Subtotal & <%subtotal%> \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ Total & <%quototal%>\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>S T A T E M E N T</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+<%if customerphone%>
+ <br>Tel: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Invoice #</th>
+ <th width=15%>Date</th>
+ <th width=15%>Due</th>
+ <th width=10%>Current</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Total Outstanding</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>Please make check payable to <b><%company%></b>.
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{S T A T E M E N T} \hfill \textbf{<%statementdate%>}
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{0.5cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Total outstanding} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Please make check payable to <%company%>
+
+\end{document}
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>Bilan</title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>BILAN DE VÉRIFICATION
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>ACTIF<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>Total Actif</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>PASSIF<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Passif</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>BENEFICES NON DISTRIBUÉS<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Capital</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL PASSIF & CAPITAL</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+</body>
+</html>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>Compte de Résultat</title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>Compte de Résultat
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2>RECETTES<br><hr width=300 size=5 align=left noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Recettes</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2>DÉPENSES<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Dépenses</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>BENEFICES / PERTES (en <%currency%> )</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>A2A <%invnumber%> <%name%></title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor="ffffff">
+
+<table width="100%">
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width="100%">
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tél : <%tel%>
+ <br>Fax : <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>F A C T U R E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width="100%" cellspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date de facture</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Date d'échéance</th><td width=10> </td><td><%duedate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>N° de facture</th><td> </td><td><%invnumber%></td></tr>
+ </tr>
+
+<!--
+ <tr>
+ <th align=right>Correspondant</th><td>&nbsp;</td><td><%employee%></td>
+ </tr>
+-->
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width="100%">
+ <tr bgcolor="000000">
+ <th align=left><font color=ffffff>Adresse de facturation</font></th>
+ <th align=left><font color=ffffff>Adresse d'envoi</font></th>
+ </tr>
+
+<!--
+ d'autres variables pouvant être utilisées ici :
+ contact, shiptocontact, shiptophone, shiptofax
+-->
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width="100%">
+ <tr bgcolor="000000">
+<!-- <th align=right><font color="ffffff">N°</font></th> -->
+ <th align=left><font color="ffffff">N°</font></th>
+ <th align=left><font color="ffffff">Description</font></th>
+ <th><font color="ffffff">Qté</font></th>
+ <th> </th>
+ <th><font color="ffffff">Prix</font></th>
+ <th><font color="ffffff">Remise</font></th>
+ <th><font color="ffffff">Montant</font></th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+veuillez adapter le colspan si vous comptez inclure ce poste.
+ceci permettra de décaler le poste sous-total vers la gauche.
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+<!--
+vous pouvez également utiliser netprice à la place de sellprice
+si vous ne voulez pas afficher la remise
+netprice = sellprice - discount
+-->
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+<%if not taxincluded%>
+ <th colspan=5 align=right>Sous-total</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=5 align=right>Déjà payé</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=3> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>À régler dans <b><%terms%></b> jours au plus tard.</td>
+ <th colspan=2 align=right>Solde à régler</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+<%if notes%>
+ <td>À noter :</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Tous prix indiqués en <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<%if paid%>
+<tr>
+ <td colspan=7>
+ <table width="60%">
+ <tr>
+ <th align=left>Détail règlements</th>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <hr noshade>
+ </td>
+ </tr>
+ <tr>
+ <th align=left>Date</th>
+ <th align=left>Compte</th>
+ <th align=left>Source</th>
+ <th align=left>Montant</th>
+ </tr>
+<%end paid%>
+
+<%foreach payment%>
+ <tr>
+ <td><%paymentdate%></td>
+ <td><%paymentaccount%></td>
+ <td><%paymentsource%></td>
+ <td><%payment%></td>
+ </tr>
+<%end payment%>
+
+<%if paid%>
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td> </td>
+</tr>
+<%end paid%>
+
+<tr>
+ <th colspan=7>
+ <!-- <br>Merci beaucoup&nbsp;! -->
+ </th>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+ <td><font size=-3>
+
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<!-- <%foreach tax%>
+ <tr>
+ <th colspan=7 align=left><font size=-2><%taxdescription%> Numéro de TVA <%taxnumber%></font></th>
+ </tr>
+<%end tax%> -->
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=7 align=left><font size=-2>Les taxes affichés sont inclus dans le prix.</font></th>
+ </tr>
+<%end taxincluded%>
+
+<!-- business number
+ <tr>
+ <th colspan=7 align=left><font size=-2>Régistre de Commerce&nbsp;: <%businessnumber%></font></th>
+ </tr>
+-->
+
+<!-- information banquaire -->
+ <tr><td>
+ <h6><center>N° TVA : Banque : N° de compte : Code SWIFT : </center>
+ </h6>
+ </td>
+ </tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage[frenchb]{babel}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Téléphone & <%tel%>\\
+ Télécopieur & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
+ & reporté de la page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{F A C T U R E}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date de facturation} & <%invdate%> \\
+ \textbf{Numéro de facture} & <%invnumber%> \\
+ \textbf{Numéro de client} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> de <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%total%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tous les prix indiqués sont en \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Merci de faire affaire avec nous!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Le paiement doit être acquitté au plus tard <%terms%> jours à partir de
+la date de facturation. Des intérêts seront perçus à raison de 1.5\% par
+mois après <%duedate%> jusqu'à ce que le paiement soit complet. Les
+éléments retournés seront sujets à un supplément de remmagasinnage de
+10\%. Une autorisation de renvoi doit être obtenue au préalable auprès de
+<%company%>. Les frais de transports et d'assurance sur les éléments
+retournés devront être couvert par le client de façon appropriée.
+<%company%> ne peut être tenue responsable des dommages survenus pendant
+le transit.}
+
+\end{document}
--- /dev/null
+CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>A2A <%invnumber%> <%name%></title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>L I S T E D ' E N V O I</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date de facture :</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Numéro de facture :</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Adresse d'envoi</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>N°</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qté</th>
+ <th> </th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=center><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>À noter :</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right><b>EXPÉDIÉ PAR :
+ <%shippingpoint%></b>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3><!--
+ Conditions d'envoi :
+ Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit. -->
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+</body>
+</html>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage[frenchb]{babel}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Téléphone & <%tel%>\\
+ Télécopieur & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Bin} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{3.5cm}
+
+\textbf{L I S T E} \parbox{0.3cm}{\hfill} \textbf{D E}
+\parbox{0.3cm}{\hfill} \textbf{P A Q U E T A G E}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date de facture} & <%invdate%> \\
+ \textbf{Numéro de facture} & <%invnumber%> \\
+ \textbf{Numéro de client} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Bin} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Merci de faire affaire avec nous!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Les éléments retournés seront sujets à un supplément de remmagasinnage de
+10\%. Une autorisation de renvoi doit être obtenue au préalable auprès de
+<%company%>. Les frais de transports et d'assurance sur les éléments
+retournés devront être couvert par le client de façon appropriée.
+<%company%> ne peut être tenue responsable des dommages survenus pendant
+le transit.}
+
+\end{document}
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>Commande <%ordnumber%> <%name%></title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tél : <%tel%>
+ <br>Fax : <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B O N D E C O M M A N D E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% cellspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date commande</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Requis pour</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>N° commande</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Commandé par</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>N°</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qté</th>
+ <th> </th>
+ <th><font color=ffffff>Prix</th>
+ <th><font color=ffffff>Montant</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+veuillez ajuster le colspan si vous voulez inclure ce poste pour décaler le sous-total vers la droite.
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Sous-total</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>À régler dans <b><%terms%></b> jours au plus tard</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>À noter :</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ Tous prix indiqués en <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>
+<!--
+<font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+-->
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage[frenchb]{babel}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Téléphone & <%tel%>\\
+ Télécopieur & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+ & reporté de la page <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{B O N} \parbox{0.3cm}{\hfill} \textbf{D E} \parbox{0.3cm}{\hfill}
+\textbf{C O M M A N D E}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date de la commande} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Livrable le} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Numéro de commande} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Prix} & \textbf{Montant} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> de <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tous les prix indiqués sont en \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>Commande <%ordnumber%> <%name%></title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+<body bgcolor="ffffff">
+
+<table width="100%">
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width="100%">
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tél : <%tel%>
+ <br>Fax : <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B O N D E C O M M A N D E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% cellspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date commande</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Requis pour</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>N° commande</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width="100%">
+ <tr bgcolor="000000">
+ <th align=left><font color="ffffff">Commandé par</th>
+ <th align=left><font color="ffffff">Adresse d'envoi</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width="100%">
+ <tr bgcolor="000000">
+<!-- <th align=right><font color="ffffff">N°</th> -->
+ <th align=left><font color="ffffff">N°</th>
+ <th align=left><font color="ffffff">Description</th>
+ <th><font color="ffffff">Qté</th>
+ <th> </th>
+ <th><font color="ffffff">Prix</th>
+ <th><font color="ffffff">Remise</th>
+ <th><font color="ffffff">Montant</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%ordtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=5 align=right>Sous-total</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>À régler dans <b><%terms%></b> jours au plus tard</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>Taxe comprise dans Total</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+<%if notes%>
+ <td>À noter :</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Tous prix indiqués en <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width="100%">
+ <tr valign=top>
+ <td><font size=-3>
+<!--
+ A 10% order cancellation fee will be applied for any special order
+ products or products that have been customized, enhanced or
+ upgraded at customers request.
+-->
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=5>
+ <h6><center>N° TVA : Banque : N° de compte : Code SWIFT : </center>
+ </h6>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage[frenchb]{babel}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Téléphone & <%tel%>\\
+ Télécopieur & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
+ & reporté de la page <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{C O M M A N D E} \parbox{0.3cm}{\hfill} \textbf{C L I E N T}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date de la commande} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Livrable le} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Numéro de commande} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Numéro} & \textbf{Description} & \textbf{Qté} &
+ \textbf{Unité} & \textbf{Prix} & \textbf{Remise} & \textbf{Montant} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Sous-total} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> de <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Tous les prix indiqués sont en \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Un supplément de 10% sera appliqué à toute commande spécifique et à tout
+produit adapté, amélioré ou mis-à-jour à la demande du client. Les
+éléments non-retournables sont indiqués ci-dessus.
+}
+
+\end{document}
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
+
+<html>
+
+<head>
+
+<title>Extrait de compte pour <%name%></title>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-15">
+
+</head>
+
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th></th>
+ <td align=right>
+ <h4>
+ Tél : <%tel%>
+ <br>Fax : <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>E X T R A I T D E C O M P T E</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+<%if customerphone%>
+ <br>Tél : <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax : <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Facture n°</th>
+ <th width=15%>Date</th>
+ <th width=15%>Echeance</th>
+ <th width=10%>Actuel</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Solde impayé</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>Tout paiement au nom de <b><%company%></b>
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+</body>
+</html>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{S T A T E M E N T} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Total outstanding} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Please make check payable to <%company%>
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>BILANZ
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>AKTIVA<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>PASSIVA<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>TOTAL</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>EIGENTUM<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>TOTAL</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL PASSIVA & EIGETNTUM</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
--- /dev/null
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <th align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>L A G E R L I S T E</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% cellspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>Absender</th>
+ <th align=left width=50%><font color=ffffff>Lieferanschrift</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+
+ <%if contact%>
+ <br>Kontakt: <%contact%>
+ <%end contact%>
+
+ <%if vendorphone%>
+ <br>Tel: <%vendorphone%>
+ <%end vendorphone%>
+
+ <%if vendorfax%>
+ <br>Fax: <%vendorfax%>
+ <%end vendorfax%>
+
+ <%if email%>
+ <br><%email%>
+ <%end email%>
+
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+
+ <br>
+ <%if shiptocontact%>
+ <br>Kontakt: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>BestellNr. #</th>
+ <th width=17% align=left nowrap>Datum</th>
+ <th width=17% align=left nowrap>Kontakt</th>
+ <%if warehouse%>
+ <th width=17% align=left nowrap>Lager</th>
+ <%end warehouse%>
+ <th width=17% align=left>Versandort</th>
+ <th width=15% align=left>Lieferung durch</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%> </td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%> </td>
+
+ <%if warehouse%>
+ <td><%warehouse%></td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%> </td>
+ <td><%shipvia%> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>ArtNr.</th>
+ <th align=left><font color=ffffff>Beschreibung</th>
+ <th><font color=ffffff>Seriennummer</th>
+ <th> </th>
+ <th><font color=ffffff>Menge</th>
+ <th><font color=ffffff>Erh</th>
+ <th> </th>
+ <th><font color=ffffff>Lagerplatz</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%></td>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td><%serialnumber%></td>
+ <td><%deliverydate%></td>
+ <td align=right><%qty%></td>
+ <td align=right><%ship%></td>
+ <td><%unit%></td>
+ <td><%bin%></td>
+ </tr>
+ <%end number%>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{%
+ <%company%>
+
+ <%address%>
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Seriennummer} & & \textbf{Menge} & \textbf{Erh} & & \textbf{Lagerplatz} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+\textbf{Von}
+\vspace{0.7cm}
+
+<%name%> \\
+<%street%> \\
+<%zipcode%> \\
+<%city%> \\
+<%country%>
+}
+\parbox[t]{.4\textwidth}{
+\textbf{Lieferanschrift}
+\vspace{0.7cm}
+
+<%shiptoname%> \\
+<%shiptostreet%> \\
+<%shiptozipcode%> \\
+<%shiptocity%> \\
+<%shiptocountry%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{L A G E R L I S T E}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
+ <%if warehouse%>
+ & \textbf{Lager}
+ <%end warehouse%>
+ & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
+ \hline
+
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}}
+ \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Seriennumner} & & \textbf{Menge} & \textbf{Erh} & & \textbf{Lagerplatz} \\
+
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
+ <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabularx}
+
+
+\rule{\textwidth}{2pt}
+
+\end{document}
+
--- /dev/null
+<body>
+<style type="text/css">
+<!--
+/* Allgemeine Schriftdefinition */
+th,td {
+ font-family: Arial, Verdana, Helvetica, Sans-serif;
+ font-size:small;
+}
+
+@page {
+ size: landscape;
+ margin: 0.5cm;
+}
+
+/* Definition Tabellenüberschrift */
+
+.left { text-align:left; }
+.center { text-align:center; }
+.right { text-align:right; }
+
+tr.headline { border:0; }
+tr.headline td { border:0; }
+h1 { font-size:120%; }
+h2 { font-size:100%; }
+
+/* Tabellenkopf */
+th {
+ font-weight: bold;
+ border-bottom: solid thin black;
+ padding:0 10px;
+ text-align:right;
+}
+
+th.left { border-left: solid thin black; }
+th.right { border-right: solid thin black; }
+
+.querkopf th.right { text-align:center; }
+.querkopf th {
+ border-top: solid thin black;
+ border-bottom:0;
+}
+
+/* Tabelleninhalt */
+td {
+ text-align:right;
+ padding:0 0.5em;
+}
+td.left { border-left: solid thin black; }
+td.right { border-right: solid thin black; }
+
+
+/* jede zweite Zeile grau hinterlegen */
+tr.grey {
+ background:#f0f0f0;
+}
+
+/* letzte Zeile in der Tabelle */
+#last td{ border-bottom: solid thin black; }
+
+/* Zwischensumme/-überschriften */
+tr.subtotal td { font-weight: bold; }
+
+/* Fußzeile unter der Tabelle */
+td.footer {
+ text-align:right;
+ font-size:smaller;
+}
+//-->
+</style>
+
+<table border=0 cellpadding=0 cellspacing=0>
+<tr class="headline">
+ <td class="left"><%company%></td>
+ <td class=center colspan="9">
+ <h1>Kurzfristige Erfolgsrechnung <%period%></h1>
+ <h2>SKR3 BWA</h2>
+ </td>
+ <td class="right">Blatt 1</td>
+</tr>
+
+
+</tr>
+<tr class="querkopf">
+ <th class="left"> </th>
+ <th class="center" colspan="5">Im Betrachtungszeitraum</th>
+ <th class="right" colspan="5">Kumuliert seit Jahresanfang</th>
+</tr>
+
+<tr>
+ <th class="left">Bezeichnung</th>
+ <th>Wert</th>
+ <th>% Ges.- Leistg.</th>
+ <th>% Ges.- Kosten</th>
+ <th>% Pers.- Kosten</th>
+ <th>Aufschlag</th>
+ <th>Wert</th>
+ <th>% Ges.- Leistg.</th>
+ <th>% Ges.- Kosten</th>
+ <th>% Pers.- Kosten</th>
+ <th class="right">Aufschlag</th>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Umsatzerlöse</nobr></td>
+ <td><nobr><%jetzt1%></nobr></td>
+ <td><nobr><%jetztgl1%></nobr></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td><nobr><%kumm1%></nobr></td>
+ <td><nobr><%kummgl1%></nobr></td>
+ <td></td>
+ <td></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Best.Verdg. FE/UE</nobr></td>
+ <td><nobr><%jetzt2%></nobr></td>
+ <td><nobr><%jetztgl2%></nobr></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td><nobr><%kumm2%></nobr></td>
+ <td><nobr><%kummgl2%></nobr></td>
+ <td></td>
+ <td></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Akt.Eigenleistungen</nobr></td>
+ <td><nobr><%jetzt3%></nobr></td>
+ <td><nobr><%jetztgl3%></nobr></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td><nobr><%kumm3%></nobr></td>
+ <td><nobr><%kummgl3%></nobr></td>
+ <td></td>
+ <td></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey subtotal">
+ <td class="left"><nobr>Gesamtleistung</nobr></td>
+ <td><nobr><%jetztgesamtleistung%></nobr></td>
+ <td><nobr><%jetztglgesamtleistung%></nobr></td>
+ <td><nobr><%jetztgkgesamtleistung%></nobr></td>
+ <td><nobr><%jetztpkgesamtleistung%></nobr></td>
+ <td></td>
+ <td><nobr><%kummgesamtleistung%></nobr></td>
+ <td><nobr><%kummglgesamtleistung%></nobr></td>
+ <td><nobr><%kummgkgesamtleistung%></nobr></td>
+ <td><nobr><%kummpkgesamtleistung%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Mat./Wareneinkauf</nobr></td>
+ <td><nobr><%jetzt4%></nobr></td>
+ <td><nobr><%jetztgl4%></nobr></td>
+ <td><nobr><%jetztgk4%></nobr></td>
+ <td><nobr><%jetztpk4%></nobr></td>
+ <td><nobr><%jetztauf4%></nobr></td>
+ <td><nobr><%kumm4%></nobr></td>
+ <td><nobr><%kummgl4%></nobr></td>
+ <td><nobr><%kummgk4%></nobr></td>
+ <td><nobr><%kummpk4%></nobr></td>
+ <td class="right"><nobr><%kummauf4%></nobr></td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey subtotal">
+ <td class="left"><nobr>Rohertrag</nobr></td>
+ <td><nobr><%jetztrohertrag%></nobr></td>
+ <td><nobr><%jetztglrohertrag%></nobr></td>
+ <td><nobr><%jetztgkrohertrag%></nobr></td>
+ <td><nobr><%jetztpkrohertrag%></nobr></td>
+ <td><nobr><%jetztaufrohertrag%></nobr></td>
+ <td><nobr><%kummrohertrag%></nobr></td>
+ <td><nobr><%kummglrohertrag%></nobr></td>
+ <td><nobr><%kummgkrohertrag%></nobr></td>
+ <td><nobr><%kummpkrohertrag%></nobr></td>
+ <td class="right"><nobr><%kummaufrohertrag%></nobr></td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey">
+ <td class="left"><nobr>So.betr.Erlöse</nobr></td>
+ <td><nobr><%jetzt5%></nobr></td>
+ <td><nobr><%jetztgl5%></nobr></td>
+ <td><nobr><%jetztgk5%></nobr></td>
+ <td><nobr><%jetztpk5%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm5%></nobr></td>
+ <td><nobr><%kummgl5%></nobr></td>
+ <td><nobr><%kummgk5%></nobr></td>
+ <td><nobr><%kummpk5%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey subtotal">
+ <td class="left"><nobr>Betriebl. Rohertrag</nobr></td>
+ <td><nobr><%jetztbetriebrohertrag%></nobr></td>
+ <td><nobr><%jetztglbetriebrohertrag%></nobr></td>
+ <td><nobr><%jetztgkbetriebrohertrag%></nobr></td>
+ <td><nobr><%jetztpkbetriebrohertrag%></nobr></td>
+ <td><nobr><%jetztaufbetriebrohertrag%></nobr></td>
+ <td><nobr><%kummbetriebrohertrag%></nobr></td>
+ <td><nobr><%kummglbetriebrohertrag%></nobr></td>
+ <td><nobr><%kummgkbetriebrohertrag%></nobr></td>
+ <td><nobr><%kummpkbetriebrohertrag%></nobr></td>
+ <td class="right"><nobr><%kummaufbetriebrohertrag%></nobr></td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey subtotal">
+ <td class="left">Kostenarten:</td>
+ <td class="right" colspan="10"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Personalkosten</nobr></td>
+ <td><nobr><%jetzt10%></nobr></td>
+ <td><nobr><%jetztgl10%></nobr></td>
+ <td><nobr><%jetztgk10%></nobr></td>
+ <td><nobr><%jetztpk10%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm10%></nobr></td>
+ <td><nobr><%kummgl10%></nobr></td>
+ <td><nobr><%kummgk10%></nobr></td>
+ <td><nobr><%kummpk10%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Raumkosten</nobr></td>
+ <td><nobr><%jetzt11%></nobr></td>
+ <td><nobr><%jetztgl11%></nobr></td>
+ <td><nobr><%jetztgk11%></nobr></td>
+ <td><nobr><%jetztpk11%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm11%></nobr></td>
+ <td><nobr><%kummgl11%></nobr></td>
+ <td><nobr><%kummgk11%></nobr></td>
+ <td><nobr><%kummpk11%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Betriebl.Steuern</nobr></td>
+ <td><nobr><%jetzt12%></nobr></td>
+ <td><nobr><%jetztgl12%></nobr></td>
+ <td><nobr><%jetztgk12%></nobr></td>
+ <td><nobr><%jetztpk12%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm12%></nobr></td>
+ <td><nobr><%kummgl12%></nobr></td>
+ <td><nobr><%kummgk12%></nobr></td>
+ <td><nobr><%kummpk12%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Versich./Beiträge</nobr></td>
+ <td><nobr><%jetzt13%></nobr></td>
+ <td><nobr><%jetztgl13%></nobr></td>
+ <td><nobr><%jetztgk13%></nobr></td>
+ <td><nobr><%jetztpk13%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm13%></nobr></td>
+ <td><nobr><%kummgl13%></nobr></td>
+ <td><nobr><%kummgk13%></nobr></td>
+ <td><nobr><%kummpk13%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Kfz-Kosten (o.St.)</nobr></td>
+ <td><nobr><%jetzt14%></nobr></td>
+ <td><nobr><%jetztgl14%></nobr></td>
+ <td><nobr><%jetztgk14%></nobr></td>
+ <td><nobr><%jetztpk14%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm14%></nobr></td>
+ <td><nobr><%kummgl14%></nobr></td>
+ <td><nobr><%kummgk14%></nobr></td>
+ <td><nobr><%kummpk14%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Werbe-/Reisekosten</nobr></td>
+ <td><nobr><%jetzt15%></nobr></td>
+ <td><nobr><%jetztgl15%></nobr></td>
+ <td><nobr><%jetztgk15%></nobr></td>
+ <td><nobr><%jetztpk15%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm15%></nobr></td>
+ <td><nobr><%kummgl15%></nobr></td>
+ <td><nobr><%kummgk15%></nobr></td>
+ <td><nobr><%kummpk15%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Kosten Warenabgabe</nobr></td>
+ <td><nobr><%jetzt16%></nobr></td>
+ <td><nobr><%jetztgl16%></nobr></td>
+ <td><nobr><%jetztgk16%></nobr></td>
+ <td><nobr><%jetztpk16%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm16%></nobr></td>
+ <td><nobr><%kummgl16%></nobr>
+</td>
+ <td><nobr><%kummgk16%></nobr></td>
+ <td><nobr><%kummpk16%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Abschreibungen</nobr></td>
+ <td><nobr><%jetzt17%></nobr></td>
+ <td><nobr><%jetztgl17%></nobr></td>
+ <td><nobr><%jetztgk17%></nobr></td>
+ <td><nobr><%jetztpk17%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm17%></nobr></td>
+ <td><nobr><%kummgl17%></nobr></td>
+ <td><nobr><%kummgk17%></nobr></td>
+ <td><nobr><%kummpk17%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Reparatur/Instandh.</nobr></td>
+ <td><nobr><%jetzt18%></nobr></td>
+ <td><nobr><%jetztgl18%></nobr></td>
+ <td><nobr><%jetztgk18%></nobr></td>
+ <td><nobr><%jetztpk18%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm18%></nobr></td>
+ <td><nobr><%kummgl18%></nobr></td>
+ <td><nobr><%kummgk18%></nobr></td>
+ <td><nobr><%kummpk18%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Sonstige Kosten</nobr></td>
+ <td><nobr><%jetzt20%></nobr></td>
+ <td><nobr><%jetztgl20%></nobr></td>
+ <td><nobr><%jetztgk20%></nobr></td>
+ <td><nobr><%jetztpk20%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm20%></nobr></td>
+ <td><nobr><%kummgl20%></nobr></td>
+ <td><nobr><%kummgk20%></nobr></td>
+ <td><nobr><%kummpk20%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey subtotal">
+ <td class="left"><nobr>Gesamtkosten</nobr></td>
+ <td><nobr><%jetztgesamtkosten%></nobr></td>
+ <td><nobr><%jetztglgesamtkosten%></nobr></td>
+ <td><nobr><%jetztgkgesamtkosten%></nobr></td>
+ <td><nobr><%jetztpkgesamtkosten%></nobr></td>
+ <td></td>
+ <td><nobr><%kummgesamtkosten%></nobr></td>
+ <td><nobr><%kummglgesamtkosten%></nobr></td>
+ <td><nobr><%kummgkgesamtkosten%></nobr></td>
+ <td><nobr><%kummpkgesamtkosten%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+
+<tr class="grey subtotal">
+<td class="left"><nobr>Betriebsergebnis</nobr></td>
+ <td><nobr><%jetztbetriebsergebnis%></nobr></td>
+ <td><nobr><%jetztglbetriebsergebnis%></nobr>
+</td>
+ <td><nobr><%jetztgkbetriebsergebnis%></nobr></td>
+ <td><nobr><%jetztpkbetriebsergebnis%></nobr></td>
+ <td></td>
+ <td><nobr><%kummbetriebsergebnis%></nobr></td>
+ <td><nobr><%kummglbetriebsergebnis%></nobr>
+</td>
+ <td><nobr><%kummgkbetriebsergebnis%></nobr></td>
+ <td><nobr><%kummpkbetriebsergebnis%></nobr></td>
+ <td class="right"> </td>
+ </tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Zinsaufwand</nobr></td>
+ <td><nobr><%jetzt30%></nobr></td>
+ <td><nobr><%jetztgl30%></nobr></td>
+ <td><nobr><%jetztgk30%></nobr></td>
+ <td><nobr><%jetztpk30%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm30%></nobr></td>
+ <td><nobr><%kummgl30%></nobr></td>
+ <td><nobr><%kummgk30%></nobr></td>
+ <td><nobr><%kummpk30%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Sonst. neutr. Aufwand</nobr></td>
+ <td><nobr><%jetzt31%></nobr></td>
+ <td><nobr><%jetztgl31%></nobr></td>
+ <td><nobr><%jetztgk31%></nobr></td>
+ <td><nobr><%jetztpk31%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm31%></nobr></td>
+ <td><nobr><%kummgl31%></nobr></td>
+ <td><nobr><%kummgk31%></nobr></td>
+ <td><nobr><%kummpk31%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey subtotal">
+<td class="left"><nobr>Neutraler Aufwand</nobr></td>
+ <td><nobr><%jetztneutraleraufwand%></nobr></td>
+ <td><nobr><%jetztglneutraleraufwand%></nobr></td>
+ <td><nobr><%jetztgkneutraleraufwand%></nobr></td>
+ <td><nobr><%jetztpkneutraleraufwand%></nobr></td>
+ <td></td>
+ <td><nobr><%kummneutraleraufwand%></nobr></td>
+ <td><nobr><%kummglneutraleraufwand%></nobr></td>
+ <td><nobr><%kummgkneutraleraufwand%></nobr></td>
+ <td><nobr><%kummpkneutraleraufwand%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Zinserträge</nobr></td>
+ <td><nobr><%jetzt32%></nobr></td>
+ <td><nobr><%jetztgl32%></nobr></td>
+ <td><nobr><%jetztgk32%></nobr></td>
+ <td><nobr><%jetztpk32%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm32%></nobr></td>
+ <td><nobr><%kummgl32%></nobr></td>
+ <td><nobr><%kummgk32%></nobr></td>
+ <td><nobr><%kummpk32%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Sonst. neutr. Ertr.</nobr></td>
+ <td><nobr><%jetzt33%></nobr></td>
+ <td><nobr><%jetztgl33%></nobr></td>
+ <td><nobr><%jetztgk33%></nobr></td>
+ <td><nobr><%jetztpk33%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm33%></nobr></td>
+ <td><nobr><%kummgl33%></nobr></td>
+ <td><nobr><%kummgk33%></nobr></td>
+ <td><nobr><%kummpk33%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey">
+ <td class="left"><nobr>Verr.kalk.Kosten</nobr></td>
+ <td><nobr><%jetzt34%></nobr></td>
+ <td><nobr><%jetztgl34%></nobr>
+ <td><nobr><%jetztgk34%></nobr></td>
+ <td><nobr><%jetztpk34%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm34%></nobr></td>
+ <td><nobr><%kummgl34%></nobr></td>
+ <td><nobr><%kummgk34%></nobr></td>
+ <td><nobr><%kummpk34%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white">
+ <td class="left"><nobr>Neutraler Ertrag</nobr></td>
+ <td><nobr><%jetztneutralerertrag%></nobr></td>
+ <td><nobr><%jetztglneutralerertrag%></nobr></td>
+ <td><nobr><%jetztgkneutralerertrag%></nobr></td>
+ <td><nobr><%jetztpkneutralerertrag%></nobr></td>
+ <td></td>
+ <td><nobr><%kummneutralerertrag%></nobr></td>
+ <td><nobr><%kummglneutralerertrag%></nobr></td>
+ <td><nobr><%kummgkneutralerertrag%></nobr></td>
+ <td><nobr><%kummpkneutralerertrag%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="white subtotal">
+ <td class="left"><nobr>Ergebnis vor Steuern</nobr></td>
+ <td><nobr><%jetztergebnisvorsteuern%></nobr></td>
+ <td><nobr><%jetztglergebnisvorsteuern%></nobr></td>
+ <td><nobr><%jetztgkergebnisvorsteuern%></nobr></td>
+ <td><nobr><%jetztpkergebnisvorsteuern%></nobr></td>
+ <td></td>
+ <td><nobr><%kummergebnisvorsteuern%></nobr></td>
+ <td><nobr><%kummglergebnisvorsteuern%></nobr></td>
+ <td><nobr><%kummgkergebnisvorsteuern%></nobr></td>
+ <td><nobr><%kummpkergebnisvorsteuern%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="white">
+ <td class="left"><nobr>Steuern Eink.u.Ertr.</nobr></td>
+ <td><nobr><%jetzt35%></nobr></td>
+ <td><nobr><%jetztgl35%></nobr></td>
+ <td><nobr><%jetztgk35%></nobr></td>
+ <td><nobr><%jetztpk35%></nobr></td>
+ <td></td>
+ <td><nobr><%kumm35%></nobr></td>
+ <td><nobr><%kummgl35%></nobr></td>
+ <td><nobr><%kummgk35%></nobr></td>
+ <td><nobr><%kummpk35%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="grey"><td class="left right" colspan="11"> </td></tr>
+
+<tr class="white subtotal">
+ <td class="left"><nobr>Vorläufiges Ergebnis</nobr></td>
+ <td><nobr><%jetztergebnis%></nobr></td>
+ <td><nobr><%jetztglergebnis%></nobr></td>
+ <td><nobr><%jetztgkergebnis%></nobr></td>
+ <td><nobr><%jetztpkergebnis%></nobr></td>
+ <td></td>
+ <td><nobr><%kummergebnis%></nobr></td>
+ <td><nobr><%kummglergebnis%></nobr></td>
+ <td><nobr><%kummgkergebnis%></nobr></td>
+ <td><nobr><%kummpkergebnis%></nobr></td>
+ <td class="right"> </td>
+</tr>
+
+<tr class="white" id=last><td class="left right" colspan="11"> </td></tr>
+
+<tr>
+ <td colspan=11 class=footer>Währung: Euro FiBu 0/2003*FD6</td>
+</tr>
+
+</table>
+</body>
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Rechnung} & \textbf{Ausgestellt}
+ & \textbf{Fällig} & \textbf{Verrechnet} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+<body>
+
+<h2 align=center>
+Einnahmenüberschußrechnung</h2>
+<h3 align=center>-EÜR- (Gewinnermittlung nach §4 Abs. 3 EStG)
+<br><%period%>
+</h3>
+
+<table width=100% border=0>
+<tr>
+ <td width=75% align=left colspan=2><font size="+1"><b>A. Betriebseinnahmen</font></b><br></td>
+ <td></td>
+</tr>
+
+<tr>
+ <td>
+ Umsatzerlöse
+ </td>
+ <td>
+ <%eur1%>
+ </td>
+</tr>
+<tr>
+ <td>
+ sonstige Erlöse
+ </td>
+ <td>
+ <%eur2%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Privatanteile
+ </td>
+ <td>
+ <%eur3%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Zinserträge
+ </td>
+ <td>
+ <%eur4%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Außerordentliche Erträge
+ </td>
+ <td>
+ <%eur5%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Vereinnahmte Umsatzsteuer
+ </td>
+ <td>
+ <%eur6%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Umsatzsteuererstattungen
+ </td>
+ <td>
+ <%eur7%>
+ </td>
+</tr>
+
+
+<tr>
+ <td> </td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left><b>Summe Einnahmen</b></th>
+ <td align=right><%sumeura%><hr noshade size=2></td>
+</tr>
+<tr>
+ <td></td>
+ <td><br><br></td>
+</tr>
+<tr>
+ <td align=left><font size="+1"><b>B. Betriebsaussgaben</font></b><br></td>
+ <td></td>
+</tr>
+
+<tr>
+ <td>
+ Wareneingänge
+ </td>
+ <td>
+ <%eur8%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Löhne und Gehälter
+ </td>
+ <td>
+ <%eur9%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Gesetzlicher sozialer Aufwand
+ </td>
+ <td>
+ <%eur10%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Mieten
+ </td>
+ <td>
+ <%eur11%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Gas, Strom, Wasser
+ </td>
+ <td>
+ <%eur12%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Instandhaltung
+ </td>
+ <td>
+ <%eur13%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Steuern, Versicherungen, Beiträge
+ </td>
+ <td>
+ <%eur14%>
+ </td>
+</tr>
+<tr>
+ <td>
+ Kfz-Steuern
+ </td>
+ <td>
+ <%eur15%>
+ </td>
+</tr><tr>
+ <td>
+ Kfz-Versicherungen
+ </td>
+ <td>
+ <%eur16%>
+ </td>
+</tr><tr>
+ <td>
+ Sonstige Fahrzeugkosten
+ </td>
+ <td>
+ <%eur17%>
+ </td>
+</tr><tr>
+ <td>
+ Werbe- und Reisekosten
+ </td>
+ <td>
+ <%eur18%>
+ </td>
+</tr><tr>
+ <td>
+ Instandhaltung und Werkzeuge
+ </td>
+ <td>
+ <%eur19%>
+ </td>
+</tr><tr>
+ <td>
+ Fachzeitschriften, Bücher
+ </td>
+ <td>
+ <%eur20%>
+ </td>
+</tr><tr>
+ <td>
+ Miete füer Einrichtungen
+ </td>
+ <td>
+ <%eur21%>
+ </td>
+</tr><tr>
+ <td>
+ Rechts- und Beratungskosten
+ </td>
+ <td>
+ <%eur22%>
+ </td>
+</tr><tr>
+ <td>
+ Bürobedarf, Porto, Telefon
+ </td>
+ <td>
+ <%eur23%>
+ </td>
+</tr><tr>
+ <td>
+ Sonstige Aufwendungen
+ </td>
+ <td>
+ <%eur24%>
+ </td>
+</tr><tr>
+ <td>
+ Abschreibungen auf Anlagevermögen
+ </td>
+ <td>
+ <%eur25%>
+ </td>
+</tr><tr>
+ <td>
+ Abschreibungen auf GWG
+ </td>
+ <td>
+ <%eur26%>
+ </td>
+</tr><tr>
+ <td>
+ Vorsteuer
+ </td>
+ <td>
+ <%eur27%>
+ </td>
+</tr><tr>
+ <td>
+ Umsatzsteuerzahlungen
+ </td>
+ <td>
+ <%eur28%>
+ </td>
+</tr><tr>
+ <td>
+ Zinsaufwand
+ </td>
+ <td>
+ <%eur29%>
+ </td>
+</tr><tr>
+ <td>
+ Außerordentlicher Aufwand
+ </td>
+ <td>
+ <%eur30%>
+ </td>
+</tr><tr>
+ <td>
+ Betriebliche Steuern
+ </td>
+ <td>
+ <%eur31%>
+ </td>
+</tr>
+
+
+<tr>
+ <td> </td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left><b>Summe Ausgaben</b></th>
+ <td align=right><%sumeurb%> <br><hr noshade size=2</td>
+</tr>
+<tr>
+ <td></td>
+ <td><br><br></td>
+</tr>
+<tr valign=top>
+ <td align=left>GEWINN / VERLUST</td>
+ <td align=right><%guvsumme%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+</body>
+</html>
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon <%tel%>
+ <br>Telefax <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>R E C H N U N G</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Ausgestellt am</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Bezahlbar bis</th><td width=10> </td><td><%duedate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Nummer</th><td> </td><td><%invnumber%></td></tr>
+ </tr>
+
+<!--
+ <tr>
+ <th align=right>Clerk:</th><td> </td><td><%username%></td>
+ </tr>
+-->
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>An:</th>
+ <th align=left><font color=ffffff>Lieferaddresse:</th>
+ </tr>
+
+<!--
+ other variables which can be use:
+ contact, shiptocontact, shiptophone, shiptofax
+-->
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beschreibung</th>
+ <th><font color=ffffff>Anz.</th>
+ <th> </th>
+ <th><font color=ffffff>Preis</th>
+ <th><font color=ffffff>Rab</th>
+ <th><font color=ffffff>Total</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+<!--
+you can also use netprice instead of sellprice if you
+don't want to show the discount
+netprice = sellprice - discount
+-->
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%invtotal%></td>
+ </tr>
+<%end taxincluded%>
+<%if not taxincluded%>
+ <tr>
+ <th colspan=5 align=right>Zwischensumme</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+<%end taxincluded%>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> auf <%taxbase%></th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<%if paid%>
+ <tr>
+ <th colspan=5 align=right>Bezahlt</th>
+ <td colspan=2 align=right>- <%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td colspan=3> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Bezahlbar innerhalb von <b><%terms%></b> Tagen</td>
+<%if total%>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+<%end total%>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Bemerkungen:</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Alle Preise in <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Rechnung ist bezahlbar innerhalb von <%terms%> Tagen.
+ Nach dem <%duedate%> werden Zinsen zu einem
+ monatlichen Satz von 1.5% verrechnet.
+ Waren bleiben im Besitz von <%company%> bis die Rechnung voll bezahlt ist.
+ Rückgaben werden mit 10% Lagergebühren belastet. Beschädigte Waren
+ und Waren ohne eine Rückgabenummer werden nicht entgegengenommen.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+<%end tax%>
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=7 align=left><font size=-2>Steuern sind im Preis inbegriffen.</th>
+ </tr>
+<%end taxincluded%>
+
+<!-- business number
+ <tr>
+ <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
+ </tr>
+-->
+
+ <tr>
+ <th colspan=7 align=left>
+ <hr>
+ <br>Bankverbindung
+ <br>Bank
+ <br>Bankleitzahl
+ <br>Konto No.
+ </td>
+ </tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Rab} & \textbf{Total} \\
+ & Übertrag von Seite <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{R E C H N U N G}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Datum} & <%invdate%> \\
+ \textbf{Nummer} & <%invnumber%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Rab} & \textbf{Total} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischensumme} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> auf <%taxbase%> & <%tax%> \\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%invtotal%>} \\
+<%if paid%>
+ \textbf{Bezahlt} & <%paid%> \\
+<%end paid%>
+<%if total%>
+ \textbf{Bezahlbar} & \textbf{<%total%>} \\
+<%end total%>
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle Preise in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+%\vfill
+%\centerline{\textbf{salute}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Rechnung ist bezahlbar innerhalb von <%terms%> Tagen.
+Nach dem <%duedate%> werden Zinsen zu einem
+monatlichen Satz von 1.5\% verrechnet.
+Waren bleiben im Besitz von <%company%> bis die Rechnung voll bezahlt ist.
+Rückgaben werden mit 10 Prozent Lagergebühren belastet. Beschädigte Waren
+und Waren ohne eine Rückgabenummer werden nicht entgegengenommen.
+}
+
+\end{document}
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>V E R P P A C K U N G S L I S T E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Datum</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Nummer</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Zustellung an:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+<%if shiptocontact%>
+ <p>An: <%shiptocontact%>
+<%end shiptocontact%>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Artikel</th>
+ <th><font color=ffffff>Anz</th>
+ <th> </th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Bemerkungen</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Beschädigte Waren und Waren ohne Rückgabenummer werden nicht
+ entgegengenommen. Lagerkosten werden mit 10% berrechnet.
+ Waren müssen ausreichended verpackt und versichert sein.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Steige} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{3.5cm}
+
+\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Datum} & <%invdate%> \\
+ \textbf{Nummer} & <%invnumber%> \\
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Steige} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Beschädigte Waren und Waren ohne Rückgabenummer werden nicht
+entgegengenommen. Lagerkosten werden mit 10\% berrechnet.
+Waren müssen ausreichended verpackt und versichert sein.
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>S A M M E L L I S T E</h4>
+ </th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% callspacing=0 cellpadding=0>
+ <tr bgcolor=000000>
+ <th width=50% align=left><font color=ffffff>Lieferanschrift:</th>
+ <th width=50%> </th>
+ </tr>
+
+ <tr valign=top>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+
+ <td>
+ <%if shiptocontact%>
+ <br>Kontakt: <%shiptocontact%>
+ <%end shiptocontact%>
+
+ <%if shiptophone%>
+ <br>Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ <br>Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height=5></tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>BestellNr. #</th>
+ <th width=17% align=left>Datum</th>
+ <th width=17% align=left nowrap>Kontakt</th>
+ <%if warehouse%>
+ <th width=17% align=left>Lager</th>
+ <%end warehouse%>
+ <th width=17% align=left>Versandort</th>
+ <th width=15% align=left>Transportmittel</th>
+ </tr>
+
+ <tr>
+ <td><%ordnumber%> </td>
+
+ <%if shippingdate%>
+ <td><%shippingdate%></td>
+ <%end shippingdate%>
+
+ <%if not shippingdate%>
+ <td><%orddate%></td>
+ <%end shippingdate%>
+
+ <td><%employee%> </td>
+
+ <%if warehouse%>
+ <td><%warehouse%> </td>
+ <%end warehouse%>
+
+ <td><%shippingpoint%> </td>
+ <td><%shipvia%> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Pos</th>
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Beschreibung</th>
+ <th><font color=ffffff>Menge</th>
+ <th><font color=ffffff>geliefert</th>
+ <th> </th>
+ <th><font color=ffffff>Lagerplatz</th>
+ </tr>
+
+ <%foreach number%>
+ <tr valign=top>
+ <td><%runningnumber%>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td align=right>[ ]</td>
+ <td><%unit%></td>
+ <td align=right><%bin%></td>
+ </tr>
+ <%end number%>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+
+ <td><hr noshade></td>
+ </tr>
+
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 37%>
+\end{tabular*}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+ \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} &
+ \textbf{Menge} & \textbf{Lagerausgang} & & \textbf{Lagerplatz} \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+ \textbf{Lieferanschrift}
+} \hfill
+
+\vspace{0.7cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.5\textwidth}{
+
+<%shiptoname%> \\
+<%shiptostreet%> \\
+<%shiptozipcode%> \\
+<%shiptocity%> \\
+<%shiptocountry%>
+}
+\parbox[t]{.4\textwidth}{
+ <%shiptocontact%>
+
+ <%if shiptophone%>
+ Tel: <%shiptophone%>
+ <%end shiptophone%>
+
+ <%if shiptofax%>
+ Fax: <%shiptofax%>
+ <%end shiptofax%>
+
+ <%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{S A M M E L L I S T E}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
+ \textbf{BestellNr. \#} & \textbf{Datum} & \textbf{Kontakt}
+ <%if warehouse%>
+ & \textbf{Lager}
+ <%end warehouse%>
+ & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5em]
+ \hline
+ <%ordnumber%>
+ <%if shippingdate%>
+ & <%shippingdate%>
+ <%end shippingdate%>
+ <%if not shippingdate%>
+ & <%orddate%>
+ <%end shippingdate%>
+ & <%employee%>
+ <%if warehouse%>
+ & <%warehouse%>
+ <%end warehouse%>
+ & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}rlp{\descrwidth}@{\extracolsep\fill}rcll@{}}
+ \textbf{Pos} & \textbf{Nummer} & \textbf{Beschreibung} &
+ \textbf{Menge} & \textbf{Lagerausgang} & & \textbf{Lagerplatz} \\
+<%foreach number%>
+ <%runningnumber%> & <%number%> & <%description%> &
+ <%qty%> & [\hspace{1cm}] & <%unit%> & <%bin%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon <%tel%>
+ <br>Telefax <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B E S T E L L U N G</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Bestellungsdatum</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Lieferbar bis</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Bestellnummer</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>An:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Artikel</th>
+ <th><font color=ffffff>Anz</th>
+ <th> </th>
+ <th><font color=ffffff>Preis</th>
+ <th><font color=ffffff>Total</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Zwischensumme</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Netto <b><%terms%></b> Tage</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Bemerkungen</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Alle Preise in <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischensumme} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Total} \\
+ & Übertrag von <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{B E S T E L L U N G}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Datum} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Lieferung bis} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Nummer} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Total} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischensumme} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle Preise in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Rechnung} & \textbf{Ausgestellt}
+ & \textbf{Fällig} & \textbf{Verrechnet} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58>
+ </td>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>A N F R A G E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left width=50%><font color=ffffff>Rechnungsanschrift:</th>
+ <th align=left width=50%><font color=ffffff>Lieferanschrift:</th>
+ </tr>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+<br>
+<%if contact%>
+<br>Kontakt: <%contact%>
+<%end contact%>
+<%if vendorphone%>
+<br>Tel: <%vendorphone%>
+<%end vendorphone%>
+<%if vendorfax%>
+<br>Fax: <%vendorfax%>
+<%end vendorfax%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+<br>
+<%if shiptocontact%>
+<br>Kontakt: <%shiptocontact%>
+<%end shiptocontact%>
+<%if shiptophone%>
+<br>Tel: <%shiptophone%>
+<%end shiptophone%>
+<%if shiptofax%>
+<br>Fax: <%shiptofax%>
+<%end shiptofax%>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td> </td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left>AnfrageNr. #</th>
+ <th width=17% align=left>Datum</th>
+ <th width=17% align=left>Erforderlich am</th>
+ <th width=17% align=left>Kontakt</th>
+ <th width=17% align=left>Lagerplatz</th>
+ <th width=15% align=left>Versand mit:</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%></td>
+ <td><%shipvia%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>Bitte teilen Sie uns Preise und Lieferzeit für folgende Artikel mit:</td>
+ </tr>
+
+ <tr height="10"></tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr>
+<!-- <th align=right>No.</th> -->
+ <th align=left>ArtNr.</th>
+ <th align=left>Beschreibung</th>
+ <th>Menge</th>
+ <th> </th>
+ <th>Lieferung</th>
+ <th>Stückpreis</th>
+ <th>Gesamtpreis</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+other per line item variables available <%reqdate%>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+<%if notes%>
+ <tr valign=top>
+ <td>Bemerkungen</td>
+ <td><%notes%></td>
+ </tr>
+<%end notes%>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=70%> </td>
+
+ <td width=30%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage{graphicx}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.7cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+
+\vspace*{-1.3cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }\hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischenzumme} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markboth{<%company%>\hfill <%ordnumber%>}{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Menge} &
+ \textbf{Einheit} & \textbf{Preis} & \textbf{Gesamt} \\
+ & Übertrag <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\vspace*{0.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{.45\textwidth}{
+\textbf{To}
+\vspace{0.7cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{0.3cm}
+
+<%if contact%>
+<%contact%>
+<%end contact%>
+
+\vspace{0.2cm}
+
+<%if vendorphone%>
+Tel: <%vendorphone%>
+<%end vendorphone%>
+
+<%if vendorfax%>
+Fax: <%vendorfax%>
+<%end vendorfax%>
+
+<%email%>
+}
+\parbox[t]{.45\textwidth}{
+\textbf{Lieferanschrift}
+\vspace{0.7cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{0.3cm}
+
+<%if shiptocontact%>
+<%shiptocontact%>
+<%end shiptocontact%>
+
+<%if shiptophone%>
+Tel: <%shiptophone%>
+<%end shiptophone%>
+
+<%if shiptofax%>
+Fax: <%shiptofax%>
+<%end shiptofax%>
+
+<%shiptoemail%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{A N F R A G E}
+\hfill
+
+\vspace{1cm}
+
+\begin{tabularx}{\textwidth}{*{5}{|X}|} \hline
+ \textbf{AnfrageNr. \#} & \textbf{Datum} & \textbf{Benötigt am} & \textbf{Kontakt} & \textbf{Lagerplatz} & \textbf{Lieferung mit} \\ [0.5ex]
+ \hline
+ <%quonumber%> & <%quodate%> & <%reqdate%> & <%employee%> & <%shippingpoint%> & <%shipvia%> \\
+ \hline
+\end{tabularx}
+
+\vspace{1cm}
+
+Bitte nennen Sie uns für folgende Artikel Preis und Liefertermin:
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rllrr@{}}
+ \textbf{Nummer} & \textbf{Beschreibung} & \textbf{Menge} & &
+ \textbf{Lieferung} & \textbf{Stückpreis} & \textbf{Gesamtpreis} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\hfill
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telefon <%tel%>
+ <br>Telefax <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>B E S T E L L U N G</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Bestelldatum</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Lieferbar bei</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Bestellnummer</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Verrechnet An:</th>
+ <th align=left><font color=ffffff>Lieferaddresse:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Nummer</th>
+ <th align=left><font color=ffffff>Artikel</th>
+ <th><font color=ffffff>Anz</th>
+ <th> </th>
+ <th><font color=ffffff>Preis</th>
+ <th><font color=ffffff>Rab</th>
+ <th><font color=ffffff>Total</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=7><hr noshade></td>
+ </tr>
+
+<%if taxincluded%>
+ <tr>
+ <th colspan=5 align=right>Total</th>
+ <td colspan=2 align=right><%ordtotal%></td>
+ </tr>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <tr>
+ <th colspan=5 align=right>Zwischensumme</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+<%end taxincluded%>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=5 align=right><%taxdescription%> auf <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=5><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=3>Netto <b><%terms%></b> Tage</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%ordtotal%></th>
+ </tr>
+<%if taxincluded%>
+ <tr>
+ <td colspan=3>Steuern sind im Preis inbegriffen</td>
+ </tr>
+<%end taxincluded%>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Bemerkungen</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Alle Preise in <b><%currency%></b>
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Spezialprodukte werden nicht zurückgenommen. Für alle anderen Waren
+ wird eine 10% Stornogebühr verrechnet.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telefon & <%tel%>\\
+ Telefax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischensumme} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Rab} & \textbf{Total} \\
+ & Übertrag von Seite <%lastpage%> & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{B E S T E L L U N G}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Bestelldatum} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Lieferbar bei} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Bestellnummer} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
+ \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
+ \textbf{Einh} & \textbf{Preis} & \textbf{Rab} & \textbf{Total} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%discount%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Zwischensumme} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> auf <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ Alle Preise in \textbf{<%currency%>}.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Spezialprodukte werden nicht zurückgenommen. Für alle anderen Waren
+wird eine 10\% Stornogebühr verrechnet.
+}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr valign=top>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th><img src=http://localhost/lx-erp/lx-office-erp.png border=0 width=64 height=58></th>
+
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+<tr><td colspan=3> </td></tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>A N G E B O T</h4>
+ </th>
+ </tr>
+
+ </table>
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td>
+ <table width=100%>
+
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+<br>
+<%if contact%>
+<br>Kontakt: <%contact%>
+<%end contact%>
+
+<%if customerphone%>
+<br>Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+<br>Fax: <%customerfax%>
+<%end customerfax%>
+
+<%if email%>
+<br><%email%>
+<%end email%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr><td> </td></tr>
+
+ <tr>
+ <td colspan=2>
+ <table width=100% border=1>
+ <tr>
+ <th width=17% align=left nowrap>Nummer</th>
+ <th width=17% align=left>Datum</th>
+ <th width=17% align=left>Gültig bis</th>
+ <th width=17% align=left nowrap>Kontakt</th>
+ <th width=17% align=left nowrap>Lagerplatz</th>
+ <th width=15% align=left nowrap>Lieferung mit</th>
+ </tr>
+
+ <tr>
+ <td><%quonumber%></td>
+ <td><%quodate%></td>
+ <td><%reqdate%></td>
+ <td><%employee%></td>
+ <td><%shippingpoint%></td>
+ <td><%shipvia%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=right><font color=ffffff>Nr.</th>
+ <th align=left><font color=ffffff>Artikelnummer</th>
+ <th align=left><font color=ffffff>Beschreibung</th>
+ <th><font color=ffffff>Menge</th>
+ <th> </th>
+ <th><font color=ffffff>Preis</th>
+ <th><font color=ffffff>Rabatt</th>
+ <th><font color=ffffff>Gesamtpreis</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td align=right><%runningnumber%></td>
+
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%discount%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=8><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <th colspan=6 align=right>Gesamtbetrag netto</th>
+ <td colspan=2 align=right><%invtotal%></td>
+<%end taxincluded%>
+
+<%if not taxincluded%>
+ <th colspan=6 align=right>Zwischensumme</th>
+ <td colspan=2 align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=6 align=right><%taxdescription%> von <%taxbase%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=4> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=4>
+<%if terms%>
+ Zahlungsziel <b><%terms%></b> Tage
+<%end terms%>
+ </td>
+ <th colspan=2 align=right>Gesamtbetrag brutto</th>
+ <th colspan=2 align=right><%quototal%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Bemerkungen</td>
+ <td><%notes%></td>
+<%end notes%>
+ <td align=right>
+ Alle Preise in <b><%currency%></b> Euro
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td width=60%><font size=-3>
+ Spezialanfertigungen können nicht zurückgenommen werden.
+ </font>
+ </td>
+ <td width=40%>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
+
--- /dev/null
+\documentclass{scrartcl}
+\usepackage[latin1]{inputenc}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\setlength{\voffset}{0cm}
+\setlength{\hoffset}{-2.5cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{0.5cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{2cm}
+\setlength{\evensidemargin}{2cm}
+\setlength{\textwidth}{16,4cm}
+\setlength{\textheight}{23.5cm}
+\setlength{\footskip}{0.5cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{8.75cm}
+
+\parbox{\textwidth}{
+ \parbox[b]{.42\textwidth}{
+ <%company%>
+
+ <%address%>
+ }
+ \hfill
+ \begin{tabular}[b]{rr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+}
+
+
+<%pagebreak 50 30 52%>
+ \multicolumn{5}{l}{\rule{\linewidth}{2pt}}\\
+ \multicolumn{4}{r}{Zwischensumme:} & <%sumcarriedforward%>
+\end{tabular}
+
+\newpage
+
+\vspace*{-12pt}
+%\newlength{\dlpos}\settowidth{\dlpos}{\textbf{Pos.}}
+%\newlength{\dlanz}\settowidth{\dlanz}{\textbf{Anzahl}}
+%\newlength{\dlein}\settowidth{\dlein}{\textbf{Einzelpreis}}
+%\newlength{\dlpre}\settowidth{\dlpre}{\textbf{Preis in Euro}}
+
+\begin{tabular}{lp{\descrwidth}rrr}
+ \textbf{Pos.} & \textbf{Beschreibung} & \textbf{Anzahl} &
+ \textbf{Einzelpreis} & \textbf{Preis in Euro} \\
+% \hspace*{\dlpos} & & \hspace*{\dlanz} &
+% \hspace*{\dlein} & \hspace*{\dlpre}\\
+% & \textbf{\"Ubertrag von Seite <%lastpage%>} & & &
+% \textbf{<%sumcarriedforward%>}\\
+ & \"Ubertrag von Seite <%lastpage%> & & & <%sumcarriedforward%>\\
+<%end pagebreak%>
+
+\markright{%
+\fontfamily{cmss}\fontshape{n}\selectfont%
+}
+
+\pagestyle{myheadings}
+\thispagestyle{empty}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+
+
+\vspace*{1.6cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%> <%city%>
+
+<%addr4%>
+\vspace{1.5cm}
+
+\textbf{A N G E B O T}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0,3cm}}l}
+ \textbf{Angebotsdatum} & <%quodate%>\\
+ \textbf{Angebotsnummer} & <%quonumber%>\\
+ \textbf{Kundennummer} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular}{lp{\descrwidth}rrr}
+ \textbf{Pos.} & \textbf{Beschreibung} & \textbf{Anzahl} &
+ \textbf{Einzelpreis} & \textbf{Preis in Euro} \\
+<%foreach number%>
+ <%runningnumber%> & <%description%> & <%qty%> & <%sellprice%> &
+ <%linetotal%>\\
+<%end number%>
+\end{tabular}
+
+\parbox{\linewidth}{%
+\rule{\linewidth}{2pt}
+
+\vspace{0,2cm}
+
+Das Angebot ist gültig bis <%reqdate%>
+
+\hfill
+\begin{tabularx}{7cm}{Xr}
+ \textbf{Nettobetrag} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ MwSt. 16\% & <%tax%>\\\hline
+<%end tax%>
+ \textbf{Gesamtbetrag in Euro} & \textbf{<%ordtotal%>}
+\end{tabularx}
+
+\vspace{12pt}
+
+Wir danken für Ihre Anfrage und hoffen, Ihnen hiermit ein interessantes Angebot
+gemacht zu haben. Sollten Sie noch Fragen oder Änderungswünsche haben,
+können Sie uns gerne jederzeit unter den oben genannten Telefonnummern kontaktieren.
+
+Bei der Durchführung des Auftrags gelten unsere AGB, die wir Ihnen gerne
+zuschicken.
+
+
+}
+
+\end{document}
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>S T A T E M E N T</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+<%if customerphone%>
+ <br>Tel: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Invoice #</th>
+ <th width=15%>Date</th>
+ <th width=15%>Due</th>
+ <th width=10%>Current</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Total Outstanding</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>Please make check payable to <b><%company%></b>.
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{S T A T E M E N T} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Total outstanding} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Please make check payable to <%company%>
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
--- /dev/null
+% German USTVA template for taxreports
+%
+% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
+%
+%
+\documentclass[twoside]{scrartcl}
+\usepackage{a4,german}
+\usepackage[frame]{xy}
+\usepackage[latin1]{inputenc}
+\usepackage[german]{babel}
+\usepackage{graphicx}
+\usepackage{tabularx}
+\usepackage{times, german}
+\usepackage{german}
+\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getätigt
+\setlength{\hoffset}{-1cm} %und hier die Verschiebung seitwärts
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0cm}
+\setlength{\headsep}{0cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{0cm}
+\setlength{\evensidemargin}{0cm}
+\setlength{\textwidth}{20.9cm}
+\setlength{\textheight}{29.6cm}
+\setlength{\footskip}{-0cm}
+\setlength{\parindent}{0pt}
+
+\begin{document}
+
+\fontfamily{cmss}\fontshape{n}\large\selectfont
+\pagestyle{myheadings}
+\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva-2004-2.pdf}}
+{\protect\includegraphics[viewport = 60 700 700 790]{ustva-2004-1.pdf}}
+\hspace{1mm}
+\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
+\multicolumn{7}{c}{}\\[-2mm]
+ & \multicolumn{6}{l}{<%steuernummer%>}\\
+\multicolumn{7}{c}{}\\[15mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
+\multicolumn{2}{p{7.5cm}}{} & & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{
+<%if tel%>
+\small{Tel: <%tel%>}~--~
+<%end tel%>
+<%if fax%>
+\small{Fax: <%fax%>}
+<%end fax%>
+}& & & &<%FA_10%> &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
+\end{tabular}\\[28.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\[42mm]
+\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
+\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
+\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
+%\multicolumn{2}{||r|}{1000} & & & \\
+%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
+%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
+\end{tabular}
+
+\newpage
+
+\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[39.8mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[26.5mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
+\end{tabular}\\[35mm]
+<%if FA_steuerberater%>
+\vspace{11mm}
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item <%FA_steuerberater_name%>
+\item <%FA_steuerberater_street%>
+\item <%FA_steuerberater_city%>
+\item Tel:~<%FA_steuerberater_tel%>
+\end{small}\\[15mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+<%if not FA_steuerberater%>
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item ~
+\item ~
+\item ~
+\item ~
+\end{small}\\[26mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+\end{document}
--- /dev/null
+% German USTVA template for taxreports
+%
+% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
+%
+%
+\documentclass[twoside]{scrartcl}
+\usepackage{a4,german}
+\usepackage[frame]{xy}
+\usepackage[latin1]{inputenc}
+\usepackage[german]{babel}
+\usepackage{graphicx}
+\usepackage{tabularx}
+\usepackage{times, german}
+\usepackage{german}
+\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getätigt
+\setlength{\hoffset}{-1cm} %und hier die Verschiebung seitwärts
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0cm}
+\setlength{\headsep}{0cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{0cm}
+\setlength{\evensidemargin}{0cm}
+\setlength{\textwidth}{20.9cm}
+\setlength{\textheight}{29.6cm}
+\setlength{\footskip}{-0cm}
+\setlength{\parindent}{0pt}
+
+\begin{document}
+
+\fontfamily{cmss}\fontshape{n}\large\selectfont
+\pagestyle{myheadings}
+\markboth{\protect\scalebox{1.06}[1.07]{\protect\includegraphics[viewport = 64 700 700 743]{ustva-2005-2.pdf}}}
+{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790]{ustva-2005-1.pdf}}}
+\hspace{1mm}
+\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
+\multicolumn{7}{c}{}\\[-2mm]
+ & \multicolumn{6}{l}{<%steuernummer%>}\\
+\multicolumn{7}{c}{}\\[15mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
+\multicolumn{2}{p{7.5cm}}{} & & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{
+<%if tel%>
+\small{Tel: <%tel%>}~--~
+<%end tel%>
+<%if fax%>
+\small{Fax: <%fax%>}
+<%end fax%>
+}& & & &<%FA_10%> &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
+\end{tabular}\\[28.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\[35mm]
+\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[39mm]
+\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
+\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
+%\multicolumn{2}{||r|}{1000} & & & \\
+%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
+%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
+\end{tabular}
+
+\newpage
+
+\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[40mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[26.5mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
+\end{tabular}\\[35mm]
+<%if FA_steuerberater%>
+\vspace{11mm}
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item <%FA_steuerberater_name%>
+\item <%FA_steuerberater_street%>
+\item <%FA_steuerberater_city%>
+\item Tel:~<%FA_steuerberater_tel%>
+\end{small}\\[15mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+<%if not FA_steuerberater%>
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item ~
+\item ~
+\item ~
+\item ~
+\end{small}\\[26mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+\end{document}
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
+ <title>Vorschau: UStVa</title>
+<!--
+Optik an Formulare angepasst: Hartmut Goebel <h.goebel@goebel-consult.de>
+Variablen hinzugefügt: Udo Spallek <udono@gmx.net>
+-->
+ <style>
+table {
+ text-align: right;
+ border:0;
+ border-collapse:collapse;
+}
+td {
+ font-size:100%;
+ vertical-align:top;
+}
+td.text {
+ text-align: left;
+ background-color:#BDBEBD;
+}
+td.spalte,
+td.zeile,
+td.betrag {
+ border:solid thin black;
+}
+td.spalte { font-weight:bold; font-size:120%; }
+td.zeile { font-weight:bold; }
+td.betrag { width:10em; }
+td.summe { border:solid medium black; }
+td.spacer { border:0 }
+
+tr.uebertrag td { border-top:solid medium black; }
+b.h3 { font-size:120%; }
+.ausfuellen { background-color:#FFFFC0; }
+.nodis { display:none; }
+ </style>
+</head>
+<body>
+<h1>Vorschau Umsatzsteuer-Voranmeldung</h1>
+
+<p><small>Wenn ein (selbstrechnendes) Formular verwendet wird, genügt es, die
+gelb hinterlegten Felder auszufüllen. Die anderen Felder werden dann
+automatisch berechnet.</small></p>
+<table width="100%">
+<tr align="left">
+ <td class="text">Steuernummer: <%steuernummer%></td>
+ <td class="text" width="100px"> </td>
+ <td class="text" align="right">Datum (<%Datum_heute%>)</td>
+</tr>
+<tr>
+ <td class="text" colspan="3"><br /></td>
+</tr>
+<tr align="left">
+ <td class="text">
+ Finanzamt <%FA_Name%><br />
+ <%FA_Strasse%><br />
+ <%FA_PLZ%> <%FA_Ort%><br />
+ Fax: <%FA_FAX%>
+ </td>
+ <td class="text"> </td>
+ <td class="text">
+ Firma <%company%><br />
+ <%if company_street%>
+ <%company_street%><br />
+ <%company_city%><br />
+ <%end company_street%>
+ <%if not company_street%>
+ <%address%><!--used Address-->
+ <%end company_street%>
+ </td>
+</tr>
+<tr>
+ <td class="text" colspan="3"><br />
+ </td>
+</tr>
+</table>
+<table border="0" cellspacing="2" cellpadding="2">
+ <tbody>
+ <tr>
+ <td class="text"><b class="h3">Steuerpflichtige Umsätze</b></td>
+ <td colspan="4"></td>
+ </tr>
+ <tr>
+ <td class="text">zum Steuersatz von 16 v.H.</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>51<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen" width="70"><%51%><br></td>
+ <td class="spalte"><span class="nodis">(Spalte 51 rechts)</span></td>
+ <td class="betrag"><%51r%></td>
+ </tr>
+ <tr>
+ <td class="text">zum Steuersatz von 7 v.H.</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>86<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen"><%86%></td>
+ <td class="spalte"><span class="nodis">(Spalte 86 rechts)</span></td>
+ <td class="betrag"><%86r%></td>
+ </tr>
+
+ <tr><td class="text"> </td><td class="spacer" colspan="4"></td></tr>
+
+ <tr>
+ <td class="text"><b class="h3">Steuerpflichtige innergemeinsachftliche Erwerbe</b></td>
+ <td colspan="4"></td>
+ </tr>
+ <tr>
+ <td class="text">zum Steuersatz von 16 v.H.</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>97<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen"><%97%><br></td>
+ <td class="spalte"><span class="nodis">(Spalte 97 rechts)</span></td>
+ <td class="betrag"><%97r%></td>
+ </tr>
+ <tr>
+ <td class="text">zum Steuersatz von 7 v.H.</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>93<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen"><%93%></td>
+ <td class="spalte"><span class="nodis">(Spalte 93 rechts)</span></td>
+ <td class="betrag"><%93r%></td>
+ </tr>
+
+ <tr><td class="text"> </td><td colspan="4"></td></tr>
+
+ <tr>
+ <td class="text"><b class="h3">neuer Fahrzeuge von Lieferern</b><br/>
+ von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
+ zum allgemeinen Steuersatz</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen"><%94%></td>
+ <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>
+ <td class="betrag"><%96%></td>
+ </tr>
+
+ <tr><td class="text"> </td><td class="spacer" colspan="2"></td><td colspan="2"></td></tr>
+
+ <tr>
+ <td class="text" colspan="3"><b class="h3">Übertrag</td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 43<span class="nodis">)</span></td>
+ <td class="betrag"><%43%></td>
+ </tr>
+ <tr class="uebertrag">
+ <td class="text" colspan="3"><b class="h3">Übertrag</td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 45<span class="nodis">)</span></td>
+ <td class="betrag"><%45%></td>
+ </tr>
+
+ <tr><td class="text" colspan="3"> </td><td class="spacer" colspan="4"></td></tr>
+
+ <tr>
+ <td class="text" colspan="3"><b class="h3">Umsatzsteuer</td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 53<span class="nodis">)</span></td>
+ <td class="betrag"><%43%></td>
+ </tr>
+
+ <tr><td class="text" colspan="3"> </td><td class="spacer" colspan="4"></td></tr>
+
+ <tr>
+ <td class="text" colspan="3"><b class="h3">Abziehbare Vorsteuerbeträge</b></td>
+ <td colspan="2"></td></tr>
+ </tr>
+
+ <tr>
+ <td class="text" colspan="3">Vorsteuerbeträge von Rechnungen von<br/>
+ anderen Unternehmern</td>
+ <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>66<span class="nodis">)</span></td>
+ <td class="betrag ausfuellen"><%66%></td>
+ </tr>
+
+ <tr><td class="text" colspan="3"> </td><td colspan="2"></td></tr>
+
+ <tr>
+ <td class="text" colspan="3">Verbleibender Betrag</td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 62<span class="nodis">)</span></td>
+ <td class="betrag"><%62%></td>
+ </tr>
+
+ <tr><td class="text" colspan="3"> </td><td colspan="4"></td></tr>
+
+ <tr>
+ <td class="text" colspan="3"><b class="h3">Umsatzsteuer-Vorauszahlung/Überschuss</b></td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 65<span class="nodis">)</span></td>
+ <td class="betrag"><%65%></td>
+ </tr>
+
+ <tr><td class="text" colspan="3"> </td><td colspan="4"></td></tr>
+
+ <tr class="noborder">
+ <td class="text" colspan="3"><u>Verbleibende Umsatzsteuer-Vorauszahlung</u><br/>
+ Verbleibender Überschuss</td>
+ <td class="zeile"><span class="nodis">(</span>Zeile 67<span class="nodis">)</span></td>
+ <td class="summe"><%67%></td>
+ </tr>
+
+ </tbody>
+</table>
+<%if FA_steuerberater%>
+<p>
+Steuerberater:<br />
+<%FA_steuerberater_name%><br />
+<%FA_steuerberater_street%><br />
+<%FA_steuerberater_city%><br />
+Tel: <%FA_steuerberater_tel%></p>
+<%end FA_steuerberater%>>
+</body>
+</html>
--- /dev/null
+% German USTVA template for taxreports
+%
+% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
+%
+%
+\documentclass[twoside]{scrartcl}
+\usepackage{a4,german}
+\usepackage[frame]{xy}
+\usepackage[latin1]{inputenc}
+\usepackage[german]{babel}
+\usepackage{graphicx}
+\usepackage{tabularx}
+\usepackage{times, german}
+\usepackage{german}
+\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getätigt
+\setlength{\hoffset}{-1cm} %und hier die Verschiebung seitwärts
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0cm}
+\setlength{\headsep}{0cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{0cm}
+\setlength{\evensidemargin}{0cm}
+\setlength{\textwidth}{20.9cm}
+\setlength{\textheight}{29.6cm}
+\setlength{\footskip}{-0cm}
+\setlength{\parindent}{0pt}
+
+\begin{document}
+
+\fontfamily{cmss}\fontshape{n}\large\selectfont
+\pagestyle{myheadings}
+\markboth{\hspace{7mm}\protect\includegraphics[viewport = 60 700 700 790]{ustva2.pdf}}
+{\protect\includegraphics[viewport = 60 700 700 790]{ustva1.pdf}}
+\hspace{1mm}
+\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{5mm}p{27mm}p{3mm}}
+\multicolumn{7}{c}{}\\[-2mm]
+ & \multicolumn{6}{l}{<%steuernummer%>}\\
+\multicolumn{7}{c}{}\\[15mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
+\multicolumn{2}{p{7.5cm}}{} & & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_street%>}}& & & & &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company_city%>}}& & & & &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{
+<%if tel%>
+\small{Tel: <%tel%>}~--~
+<%end tel%>
+<%if fax%>
+\small{Fax: <%fax%>}
+<%end fax%>
+}& & & &<%FA_10%> &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
+\end{tabular}\\[28.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\[42mm]
+\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%51r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%86r%>}\\[46mm]
+\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%97r%>}\\[1.5mm]
+\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%93r%>}\\[7.9mm]
+\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[14mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\
+%\multicolumn{2}{||r|}{1000} & & & \\
+%\multicolumn{2}{||r|}{1000} & & \multicolumn{2}{r}{100.000.000~~00}\\
+%\multicolumn{3}{||r|}{1.000.000.000~~00} & \multicolumn{2}{r}{100.000.000~~00}\\
+\end{tabular}
+
+\newpage
+
+\vspace*{-10mm}\hspace{27mm}<%steuernummer%>\\[-2.5mm]
+\begin{tabular}[b]{p{95mm}p{28mm}p{2.55mm}p{4mm}p{35mm}}
+&&&&\\
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%45%>}\\[46mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%43%>}\\[7.9mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[7.9mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%62%>}\\[58.5mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%67%>}}\\[26mm]
+\end{tabular}\\[35mm]
+<%if FA_steuerberater%>
+\vspace{11mm}
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item <%FA_steuerberater_name%>
+\item <%FA_steuerberater_street%>
+\item <%FA_steuerberater_city%>
+\item Tel:~<%FA_steuerberater_tel%>
+\end{small}\\[15mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+<%if not FA_steuerberater%>
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item ~
+\item ~
+\item ~
+\item ~
+\end{small}\\[26mm]
+\item <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+\end{document}
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>BALANCE SHEET
+<br><%period%>
+</h2>
+
+<table border=0>
+<tr>
+ <th align=left width=400 colspan=2>ASSETS<br><hr align=left width=250 size=5 noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach asset_account%>
+<tr>
+ <td> </td>
+ <td><%asset_account%></td>
+ <td align=right><%asset_this_period%></td>
+ <td align=right><%asset_last_period%></td>
+</tr>
+<%end asset_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL ASSETS</th>
+ <td align=right><%total_assets_this_period%><hr noshade size=2></td>
+ <td align=right><%total_assets_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>LIABILITIES<b><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach liability_account%>
+<tr>
+ <td></td>
+ <td><%liability_account%></td>
+ <td align=right><%liability_this_period%></td>
+ <td align=right><%liability_last_period%></td>
+</tr>
+<%end liability_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Liabilities</th>
+ <td align=right><%total_liabilities_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_liabilities_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr>
+ <th align=left colspan=4>SHAREHOLDER'S EQUITY<br><hr align=left width=250 size=5 noshade></th>
+</tr>
+
+<%foreach equity_account%>
+<tr>
+ <td></td>
+ <td><%equity_account%></td>
+ <td align=right><%equity_this_period%></td>
+ <td align=right><%equity_last_period%></td>
+</tr>
+<%end equity_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td></td>
+ <th align=left>Total Equity</th>
+ <td align=right><%total_equity_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_equity_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>TOTAL LIABILITIES & EQUITY</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+</table>
+
+
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<h2 align=center>
+<%company%>
+<br><%address%>
+
+<p>INCOME STATEMENT
+<br><%period%>
+</h2>
+
+
+<table width=100% border=0>
+<tr>
+ <th width=400 align=left colspan=2>INCOME<br><hr width=300 size=5 align=left noshade></th>
+ <th><%this_period%></th>
+ <th><%last_period%></th>
+</tr>
+
+<%foreach income_account%>
+<tr>
+ <td width=4> </td>
+ <td><%income_account%></td>
+ <td align=right><%income_this_period%></td>
+ <td align=right><%income_last_period%></td>
+</tr>
+<%end income_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Income</th>
+ <td align=right><%total_income_this_period%><hr noshade size=2></td>
+ <td align=right><%total_income_last_period%><hr noshade size=2></td>
+</tr>
+
+<tr>
+ <th align=left colspan=2>EXPENSES<br><hr width=300 size=5 align=left noshade></th>
+</tr>
+
+<%foreach expense_account%>
+<tr>
+ <td> </td>
+ <td><%expense_account%></td>
+ <td align=right><%expenses_this_period%></td>
+ <td align=right><%expenses_last_period%></td>
+</tr>
+<%end expense_account%>
+
+<tr>
+ <td colspan=2> </td>
+ <td><hr noshade size=1></td>
+ <td><hr noshade size=1></td>
+</tr>
+
+<tr valign=top>
+ <td> </td>
+ <th align=left>Total Expenses</th>
+ <td align=right><%total_expenses_this_period%><br><hr noshade size=2</td>
+ <td align=right><%total_expenses_last_period%><br><hr noshade size=2</td>
+</tr>
+
+<tr valign=top>
+ <th align=left colspan=2>INCOME / (LOSS)</th>
+ <td align=right><%total_this_period%><br><hr noshade size=2></td>
+ <td align=right><%total_last_period%><br><hr noshade size=2></td>
+</tr>
+
+</table>
+
+
+
+
+
+
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ <br>Tel/Fax <%tel%> / <%fax%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>I N V O I C E</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+<!-- prepared by: <%username%>
+-->
+
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Description</th>
+ <th> </th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%description%></td>
+ <td> </td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=3><hr noshade></td>
+ </tr>
+
+ <tr>
+<%if taxincluded%>
+ <td> </td>
+ <th align=right>Total</th>
+ <td align=right><%invtotal%></td>
+<%end taxincluded%>
+<%if not taxincluded%>
+ <td> </td>
+ <th align=right>Subtotal</th>
+ <td align=right><%subtotal%></td>
+<%end taxincluded%>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=2 align=right><%taxdescription%></th>
+ <td align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+<!--
+ <%taxbase%> = total netamount for each tax bracket
+ <%taxrate%> = taxrate in percent
+-->
+
+<%if paid%>
+ <tr>
+ <td> </td>
+ <th align=right>Paid</th>
+ <td align=right><%paid%></td>
+ </tr>
+<%end paid%>
+
+ <tr>
+ <td> </td>
+ <td colspan=2><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td>
+<%if terms%>
+Terms Net <b><%terms%></b> days
+<%end terms%>
+</td>
+ <th align=right>Total</th>
+ <th align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<%if notes%>
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+ <td align=right>
+
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+<%end notes%>
+
+<tr><td> </td></tr>
+
+<tr>
+ <th colspan=3>
+ Please make check payable to <%company%>
+ <br>Thank you for your valued business!
+ </th>
+</tr>
+
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=3 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
+ </tr>
+<%end tax%>
+
+<!--
+ %username% = user name
+ %businessnumber% = business number
+-->
+
+<!-- banking information
+ <tr>
+ <th colspan=3 align=left><font size=-2>Banking Information:
+ <br>Bank
+ <br>Transit No.
+ <br>Account No.
+ </th>
+ </tr>
+-->
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{I N V O I C E}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Number} & <%invnumber%> \\
+ \textbf{Customer} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+<%foreach number%>
+ <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%> \\
+<%end tax%>
+<%if paid%>
+ \textbf{Paid} & - <%paid%> \\
+<%end paid%>
+ \hline
+ \textbf{Balance Owing} & \textbf{<%total%>} \\
+
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+\vfill
+\centerline{\textbf{Thank You for your valued business!}}
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+Payment due NET <%terms%> Days from date of Invoice. Interest on overdue
+amounts will acrue at the rate of 1.5\% per month starting <%duedate%>
+until paid in full.
+}
+
+\end{document}
+
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr>
+ <td width=10>
+ </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <th colspan=2>
+ <h4 align=center>P A C K I N G L I S T</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Date</th><td width=10> </td><td><%invdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td></td><td><%invnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Ship To:</th>
+ </tr>
+
+ <tr>
+ <td><%shiptoname%>
+ <br><%shiptostreet%>
+ <br><%shiptozipcode%>
+ <br><%shiptocity%>
+ <br><%shiptocountry%>
+<%if shiptocontact%>
+ <p>Attn: <%shiptocontact%>
+<%end shiptocontact%>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ <%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+\newpage
+
+\markright{<%company%>\hfill <%invnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rl@{}}
+ \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%shiptoname%>
+
+<%shiptostreet%>
+
+<%shiptozipcode%>
+
+<%shiptocity%>
+
+<%shiptocountry%>
+
+\vspace{3.5cm}
+
+\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T}
+
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%invdate%> \\
+ \textbf{Number} & <%invnumber%> \\
+ \textbf{Customer} & <%customer_id%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rl@{}}
+ \textbf{Description} & \textbf{Qt'y} & \textbf{Unit} \\
+<%foreach number%>
+ <%description%> & <%qty%> & <%unit%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+%\vfill
+%\centerline{\textbf{Thank You for your valued business!}}
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny
+%Items returned are subject to a 10\% restocking charge.
+%A return authorization must be obtained from <%company%> before goods are
+%returned. Returns must be shipped prepaid and properly insured.
+%<%company%> will not be responsible for damages during transit.}
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telephone: <%tel%>
+ <br>Facsimile: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>P U R C H A S E O R D E R</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Order Date</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Required by</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Terms Net <b><%terms%></b> days</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{P U R C H A S E} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Required by} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Number} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+<%foreach number%>
+ <%number%> & <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.4cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.0cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+
+\fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont
+
+\parbox[t]{12cm}{
+ <%company%>
+
+ <%address%>}
+\hfill
+\parbox[t]{6cm}{\hfill <%source%>}
+
+\vspace*{0.6cm}
+
+<%text_amount%> \dotfill <%decimal%>/100 \makebox[0.5cm]{\hfill}
+
+\vspace{0.5cm}
+
+\hfill <%datepaid%> \makebox[2cm]{\hfill} <%amount%>
+
+\vspace{0.5cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{2.8cm}
+
+<%company%>
+
+\vspace{0.5cm}
+
+<%name%> \hfill <%datepaid%> \hfill <%source%>
+
+\vspace{0.5cm}
+\begin{tabularx}{\textwidth}{lXrr@{}}
+\textbf{Invoice No.} & \textbf{Invoice Date}
+ & \textbf{Due} & \textbf{Applied} \\
+<%foreach invnumber%>
+<%invnumber%> & <%invdate%> \dotfill
+ & <%due%> & <%paid%> \\
+<%end invnumber%>
+\end{tabularx}
+
+\vfill
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+<tr valign=bottom>
+ <td width=10> </td>
+ <td>
+
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+
+ <td align=right>
+ <h4>
+ Telelephone: <%tel%>
+ <br>Facsimile: <%fax%>
+ </h4>
+ </td>
+ </tr>
+
+ <tr>
+ <th colspan=3>
+ <h4>S A L E S O R D E R</h4>
+ </th>
+ </tr>
+
+ </table>
+
+
+ <table width=100% callspacing=0 cellpadding=0>
+
+ <tr>
+ <td align=right>
+ <table>
+ <tr>
+ <th align=right>Order Date</th><td width=10> </td><td><%orddate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Required by</th><td width=10> </td><td><%reqdate%></td>
+ </tr>
+
+ <tr>
+ <th align=right>Number</th><td> </td><td><%ordnumber%></td></tr>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+ </td>
+ </table>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+ <th align=left><font color=ffffff>To:</th>
+ </tr>
+
+ <tr>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+<%if contact%>
+ <p>Attn: <%contact%>
+%end contact%>
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td>
+ <table width=100%>
+ <tr bgcolor=000000>
+<!-- <th align=right><font color=ffffff>No.</th> -->
+ <th align=left><font color=ffffff>Number</th>
+ <th align=left><font color=ffffff>Description</th>
+ <th><font color=ffffff>Qt'y</th>
+ <th> </th>
+ <th><font color=ffffff>Price</th>
+ <th><font color=ffffff>Amount</th>
+ </tr>
+
+<%foreach number%>
+ <tr valign=top>
+<!-- <td align=right><%runningnumber%>.</td>
+adjust the colspan if you include this to shift subtotal one to the right
+-->
+ <td><%number%></td>
+ <td><%description%></td>
+ <td align=right><%qty%></td>
+ <td><%unit%></td>
+ <td align=right><%sellprice%></td>
+ <td align=right><%linetotal%></td>
+ </tr>
+<%end number%>
+
+ <tr>
+ <td colspan=6><hr noshade></td>
+ </tr>
+
+ <tr>
+ <th colspan=4 align=right>Subtotal</th>
+ <td colspan=2 align=right><%subtotal%></td>
+ </tr>
+
+<%foreach tax%>
+ <tr>
+ <th colspan=4 align=right><%taxdescription%> @ <%taxrate%> %</th>
+ <td colspan=2 align=right><%tax%></td>
+ </tr>
+<%end tax%>
+
+ <tr>
+ <td colspan=2> </td>
+ <td colspan=4><hr noshade></td>
+ </tr>
+
+ <tr>
+ <td colspan=2>Terms Net <b><%terms%></b> days</td>
+ <th colspan=2 align=right>Total</th>
+ <th colspan=2 align=right><%total%></th>
+ </tr>
+
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+<%if notes%>
+ <td>Notes</td>
+ <td><pre><%notes%></pre></td>
+<%end notes%>
+ <td align=right>
+ All prices in <b><%currency%></b> Funds
+ <br><%shippingpoint%>
+ </td>
+ </tr>
+
+ </table>
+ </td>
+</tr>
+
+<tr><td> </td></tr>
+
+<tr>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><font size=-3>
+ Payment due NET <%terms%> Days from date of Invoice.
+ Interest on overdue amounts will acrue at the rate of 1.5% per month
+ from due date until paid in full. Items returned are subject to
+ a 10% restocking charge. A return authorization must be obtained
+ from <%company%> before goods are returned. Returns must be shipped
+ prepaid and properly insured. <%company%> will not be responsible
+ for damages during transit.
+ </font>
+ </td>
+ <td width=150>
+ X <hr noshade>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+
+</table>
+
+</td>
+</tr>
+</table>
+
+</body>
+</html>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rr@{}}
+ Telephone & <%tel%>\\
+ Facsimile & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%ordnumber%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%ordnumber%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+ & carried forward from <%lastpage%> & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{2cm}
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+\vspace{3.5cm}
+
+\textbf{S A L E S} \parbox{0.3cm}{\hfill} \textbf{O R D E R}
+\hfill
+\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
+ \textbf{Date} & <%orddate%> \\
+<%if reqdate%>
+ \textbf{Required by} & <%reqdate%> \\
+<%end reqdate%>
+ \textbf{Number} & <%ordnumber%>
+\end{tabular}
+
+\vspace{1cm}
+
+\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rlrr@{}}
+ \textbf{Description} & \textbf{Qt'y} &
+ \textbf{Unit} & \textbf{Price} & \textbf{Amount} \\
+<%foreach number%>
+ <%description%> & <%qty%> &
+ <%unit%> & <%sellprice%> & <%linetotal%> \\
+<%end number%>
+\end{tabular*}
+
+
+\parbox{\textwidth}{
+\rule{\textwidth}{2pt}
+
+\vspace{0.2cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%subtotal%>} \\
+<%foreach tax%>
+ <%taxdescription%> on <%taxbase%> & <%tax%>\\
+<%end tax%>
+ \hline
+ \textbf{Total} & \textbf{<%ordtotal%>}\\
+\end{tabularx}
+
+\vspace{0.3cm}
+
+\hfill
+ All prices in \textbf{<%currency%>} funds.
+
+\vspace{12pt}
+
+<%if notes%>
+ <%notes%>
+<%end if%>
+
+}
+
+
+%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%\footnotetext[1]{\tiny }
+
+\end{document}
+
--- /dev/null
+
+<body bgcolor=ffffff>
+
+<table width=100%>
+ <tr>
+ <td width=10> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <td>
+ <h4>
+ <%company%>
+ <br><%address%>
+ </h4>
+ </td>
+ <th><img src=http://www.sql-ledger.org/images/sql-ledger.png border=0 width=64 height=58></th>
+ <td align=right>
+ <h4>
+ Tel: <%tel%>
+ <br>Fax: <%fax%>
+ </h4>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=3><h4>S T A T E M E N T</h4></th>
+ </tr>
+ <tr>
+ <td colspan=3 align=right><%statementdate%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr valign=top>
+ <td><%name%>
+ <br><%street%>
+ <br><%zipcode%>
+ <br><%city%>
+ <br><%country%>
+ <br>
+<%if customerphone%>
+ <br>Tel: <%customerphone%>
+<%end customerphone%>
+<%if customerfax%>
+ <br>Fax: <%customerfax%>
+<%end customerfax%>
+<%if email%>
+ <br><%email%>
+<%end email%>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td>
+ <table width=100%>
+ <tr>
+ <th align=left>Invoice #</th>
+ <th width=15%>Date</th>
+ <th width=15%>Due</th>
+ <th width=10%>Current</th>
+ <th width=10%>30</th>
+ <th width=10%>60</th>
+ <th width=10%>90+</th>
+ </tr>
+<%foreach invnumber%>
+ <tr>
+ <td><%invnumber%></td>
+ <td><%invdate%></td>
+ <td><%duedate%></td>
+ <td align=right><%c0%></td>
+ <td align=right><%c30%></td>
+ <td align=right><%c60%></td>
+ <td align=right><%c90%></td>
+ </tr>
+<%end invnumber%>
+ <tr>
+ <td colspan=7><hr size=1></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th align=right><%c0total%></td>
+ <th align=right><%c30total%></td>
+ <th align=right><%c60total%></td>
+ <th align=right><%c90total%></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height=10></tr>
+ <tr>
+ <td> </td>
+ <td align=right>
+ <table width=50%>
+ <tr>
+ <th>Total Outstanding</th>
+ <th align=right><%total%></th>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><hr noshade></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>Please make check payable to <b><%company%></b>.
+ </td>
+ </tr>
+ <tr height=20></tr>
+</table>
+
--- /dev/null
+\documentclass[twoside]{scrartcl}
+\usepackage[frame]{xy}
+\usepackage{tabularx}
+\usepackage[latin1]{inputenc}
+\setlength{\voffset}{0.5cm}
+\setlength{\hoffset}{-2.0cm}
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0.5cm}
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{1.0cm}
+\setlength{\evensidemargin}{1.0cm}
+\setlength{\textwidth}{19.2cm}
+\setlength{\textheight}{24.5cm}
+\setlength{\footskip}{1cm}
+\setlength{\parindent}{0pt}
+\renewcommand{\baselinestretch}{1}
+\begin{document}
+
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
+
+\newsavebox{\hdr}
+\sbox{\hdr}{
+ \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+ \parbox{\textwidth}{
+ \parbox[b]{12cm}{
+ <%company%>
+
+ <%address%>}\hfill
+ \begin{tabular}[b]{rrr@{}}
+ Tel & <%tel%>\\
+ Fax & <%fax%>
+ \end{tabular}
+
+ \rule[1.5ex]{\textwidth}{0.5pt}
+ }
+}
+
+\fontfamily{cmss}\fontshape{n}\selectfont
+
+\markboth{<%company%>\hfill <%statementdate%>}{\usebox{\hdr}}
+
+\pagestyle{myheadings}
+%\thispagestyle{empty} use this with letterhead paper
+
+<%pagebreak 90 27 48%>
+\end{tabular*}
+
+ \rule{\textwidth}{2pt}
+
+ \hfill
+ \begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
+ \end{tabularx}
+
+\newpage
+
+\markright{<%company%>\hfill <%statementdate%>}
+
+\vspace*{-12pt}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+ carried forward from <%lastpage%> & & & & & & <%sumcarriedforward%> \\
+<%end pagebreak%>
+
+
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+
+\vspace*{1.5cm}
+
+\parbox[t]{1cm}{\hfill}
+\parbox[t]{10.5cm}{
+
+<%name%>
+
+<%street%>
+
+<%zipcode%>
+
+<%city%>
+
+<%country%>
+
+}
+\parbox[t]{7.5cm}{
+<%if customerphone%>
+Tel: <%customerphone%>
+<%end customerphone%>
+
+<%if customerfax%>
+Fax: <%customerfax%>
+<%end customerfax%>
+
+<%email%>
+}
+\hfill
+
+\vspace{1cm}
+
+\textbf{S T A T E M E N T} \hfill
+
+\hfill <%statementdate%>
+
+\vspace{2cm}
+
+\begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}ccrrrr@{}}
+ \textbf{Invoice \#} & \textbf{Date} & \textbf{Due} &
+ \textbf{Current} & \textbf{30} & \textbf{60} & \textbf{90+} \\
+<%foreach invnumber%>
+ <%invnumber%> & <%invdate%> & <%duedate%> &
+ <%c0%> & <%c30%> & <%c60%> & <%c90%> \\
+<%end invnumber%>
+\textbf{Subtotal} & & & <%c0total%> & <%c30total%> & <%c60total%> & <%c90total%>
+\end{tabular*}
+\rule{\textwidth}{1pt}
+
+\vspace{1cm}
+
+\hfill
+\begin{tabularx}{7cm}{Xr@{}}
+ \textbf{Total outstanding} & <%total%>
+\end{tabularx}
+
+\vfill
+
+Please make check payable to <%company%>
+
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+\footnotetext[1]{\tiny
+}
+
+\end{document}
+
--- /dev/null
+\ProvidesFile{lsletter.sty}
+ [2002/07/12 LINET-Services-Brief-Style]
+\usepackage[pdftex]{graphicx}
+\DeclareGraphicsExtensions{.pdf,.png}
+\graphicspath{{PNG/}}
+\firsthead{%
+ \hspace*{-0.1cm}
+ \includegraphics{header}}
+\firstfoot{%
+ \hspace*{-0.1cm}
+ \parbox[b]{\textwidth}{
+ \hfil Seite \thepage\hfil\\[0.3cm]
+ \includegraphics{lsbp-footer}}}
+\nexthead{}
+\nextfoot{%
+ \hspace*{-0.1cm}
+ \parbox[b]{\textwidth}{
+ \hfil Seite \thepage\hfil\\[0.3cm]
+ \includegraphics{footer}}}
+\name{Lx-System GbR}
+\address{Ensingerstraße 19\\ 89073 Ulm}
+\backaddress{Lx-System GbR, Ensingerstraße 19, 89073 Ulm}
+\place{Ulm, }
+
+\setlength{\voffset}{-2.5cm}
+\setlength{\topmargin}{1.2cm}
+\setlength{\headheight}{0cm}
+\setlength{\headsep}{0.5cm}
+\setlength{\topskip}{0pt}
+
+\setlength{\textheight}{24.2cm}
+\setlength{\textwidth}{17.6cm}
+
+\setlength{\footskip}{1.7cm}
+
+\setlength{\hoffset}{-2.5cm}
+\setlength{\oddsidemargin}{1.6cm}
+\setlength{\evensidemargin}{1.6cm}
+
+\setlength{\parindent}{0pt}
+
+\pagestyle{headings}