package AM;
+use Data::Dumper;
+
sub get_account {
$main::lxdebug->enter_sub();
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
+ c.category, c.link, c.taxkey_id, c.pos_ustva, c.pos_bwa, c.pos_bilanz,c.pos_eur, c.new_chart_id, c.valid_from
FROM chart c
WHERE c.id = $form->{id}|;
}
$sth->finish;
+ if ($form->{id}) {
+ $where = " WHERE link='$form->{link}'";
+
+
+ # get new accounts
+ $query = qq|SELECT id, accno,description
+ FROM chart $where|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{NEWACCOUNT} }, $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}|;
$form->{orphaned} = !$form->{orphaned};
$sth->finish;
+ # check if new account is active
+ $form->{new_chart_valid} = 0;
+ if ($form->{new_chart_id}) {
+ $query = qq|SELECT current_date-valid_from FROM chart
+ WHERE id = $form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($count) = $sth->fetchrow_array;
+ if ($count >=0) {
+ $form->{new_chart_valid} = 1;
+ }
+ $sth->finish;
+ }
+
$dbh->disconnect;
$main::lxdebug->leave_sub();
}
map({ $form->{$_} = "NULL" unless ($form->{$_}); }
- qw(pos_ustva pos_bwa pos_bilanz pos_eur));
+ qw(pos_ustva pos_bwa pos_bilanz pos_eur new_chart_id));
- if ($form->{id}) {
+ $form->{valid_from} = ($form->{valid_from}) ? "'$form->{valid_from}'" : "NULL";
+
+ if ($form->{id} && $form->{orphaned}) {
$query = qq|UPDATE chart SET
accno = '$form->{accno}',
description = '$form->{description}',
pos_ustva = $form->{pos_ustva},
pos_bwa = $form->{pos_bwa},
pos_bilanz = $form->{pos_bilanz},
- pos_eur = $form->{pos_eur}
+ pos_eur = $form->{pos_eur},
+ new_chart_id = $form->{new_chart_id},
+ valid_from = $form->{valid_from}
+ WHERE id = $form->{id}|;
+ } elsif ($form->{id} && !$form->{new_chart_valid}) {
+ $query = qq|UPDATE chart SET
+ new_chart_id = $form->{new_chart_id},
+ valid_from = $form->{valid_from}
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)
+ (accno, description, charttype, gifi_accno, category, link, taxkey_id, pos_ustva, pos_bwa, pos_bilanz,pos_eur, new_chart_id, valid_from)
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})|;
+ '$form->{category}', '$form->{link}', $form->{taxkey_id}, $form->{pos_ustva}, $form->{pos_bwa}, $form->{pos_bilanz}, $form->{pos_eur}, $form->{new_chart_id}, $form->{valid_from})|;
}
$dbh->do($query) || $form->dberror($query);
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}|;
+ $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 language {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT id, description, template_code, article_code
+ FROM language
+ 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_language {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query =
+ qq|SELECT l.description, l.template_code, l.article_code
+ FROM language l
+ WHERE l.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_language {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $form->{description} =~ s/\'/\'\'/g;
+ $form->{article_code} =~ s/\'/\'\'/g;
+ $form->{template_code} =~ s/\'/\'\'/g;
+
+
+ # id is the old record
+ if ($form->{id}) {
+ $query = qq|UPDATE language SET
+ description = '$form->{description}',
+ template_code = '$form->{template_code}',
+ article_code = '$form->{article_code}'
+ WHERE id = $form->{id}|;
+ } else {
+ $query = qq|INSERT INTO language
+ (description, template_code, article_code)
+ VALUES ('$form->{description}', '$form->{template_code}', '$form->{article_code}')|;
+ }
+ $dbh->do($query) || $form->dberror($query);
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub delete_language {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $query = qq|DELETE FROM language
+ WHERE 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 {
+
+sub buchungsgruppe {
$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|;
+ my $query = qq|SELECT id, description, inventory_accno_id, (select accno from chart where id=inventory_accno_id) as inventory_accno, income_accno_id_0, (select accno from chart where id=income_accno_id_0) as income_accno_0, expense_accno_id_0, (select accno from chart where id=expense_accno_id_0) as expense_accno_0, income_accno_id_1, (select accno from chart where id=income_accno_id_1) as income_accno_1, expense_accno_id_1, (select accno from chart where id=expense_accno_id_1) as expense_accno_1, income_accno_id_2, (select accno from chart where id=income_accno_id_2) as income_accno_2, expense_accno_id_2, (select accno from chart where id=expense_accno_id_2) as expense_accno_2, income_accno_id_3, (select accno from chart where id=income_accno_id_3) as income_accno_3, expense_accno_id_3, (select accno from chart where id=expense_accno_id_3) as expense_accno_3
+ FROM buchungsgruppen
+ ORDER BY id|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub get_gifi {
+sub get_buchungsgruppe {
$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);
+ if ($form->{id}) {
+ my $query =
+ qq|SELECT description, inventory_accno_id, (select accno from chart where id=inventory_accno_id) as inventory_accno, income_accno_id_0, (select accno from chart where id=income_accno_id_0) as income_accno_0, expense_accno_id_0, (select accno from chart where id=expense_accno_id_0) as expense_accno_0, income_accno_id_1, (select accno from chart where id=income_accno_id_1) as income_accno_1, expense_accno_id_1, (select accno from chart where id=expense_accno_id_1) as expense_accno_1, income_accno_id_2, (select accno from chart where id=income_accno_id_2) as income_accno_2, expense_accno_id_2, (select accno from chart where id=expense_accno_id_2) as expense_accno_2, income_accno_id_3, (select accno from chart where id=income_accno_id_3) as income_accno_3, expense_accno_id_3, (select accno from chart where id=expense_accno_id_3) as expense_accno_3
+ FROM buchungsgruppen
+ WHERE 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;
+
+ my $query =
+ qq|SELECT count(id) as anzahl
+ FROM parts
+ WHERE buchungsgruppen_id = $form->{id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $ref = $sth->fetchrow_hashref(NAME_lc);
+ if (!$ref->{anzahl}) {
+ $form->{orphaned} = 1;
+ }
+ $sth->finish;
- map { $form->{$_} = $ref->{$_} } keys %$ref;
+ }
+ my $module = "IC";
+ $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|;
- $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);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
-
- ($form->{orphaned}) = $sth->fetchrow_array;
+ 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",
+ id => $ref->{id} };
+ } else {
+ push @{ $form->{"${module}_links"}{$key} },
+ { accno => $ref->{accno},
+ description => $ref->{description},
+ selected => "",
+ id => $ref->{id} };
+ }
+ }
+ }
+ }
$sth->finish;
- $form->{orphaned} = !$form->{orphaned};
+
$dbh->disconnect;
$main::lxdebug->leave_sub();
}
-sub save_gifi {
+sub save_buchungsgruppe {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
$form->{description} =~ s/\'/\'\'/g;
- # id is the old account number!
+
+ # id is the old record
if ($form->{id}) {
- $query = qq|UPDATE gifi SET
- accno = '$form->{accno}',
- description = '$form->{description}'
- WHERE accno = '$form->{id}'|;
+ $query = qq|UPDATE buchungsgruppen SET
+ description = '$form->{description}',
+ inventory_accno_id = '$form->{inventory_accno_id}',
+ income_accno_id_0 = '$form->{income_accno_id_0}',
+ expense_accno_id_0 = '$form->{expense_accno_id_0}',
+ income_accno_id_1 = '$form->{income_accno_id_1}',
+ expense_accno_id_1 = '$form->{expense_accno_id_1}',
+ income_accno_id_2 = '$form->{income_accno_id_2}',
+ expense_accno_id_2 = '$form->{expense_accno_id_2}',
+ income_accno_id_3 = '$form->{income_accno_id_3}',
+ expense_accno_id_3 = '$form->{expense_accno_id_3}'
+ WHERE id = $form->{id}|;
} else {
- $query = qq|INSERT INTO gifi
- (accno, description)
- VALUES ('$form->{accno}', '$form->{description}')|;
+ $query = qq|INSERT INTO buchungsgruppen
+ (description, inventory_accno_id, income_accno_id_0, expense_accno_id_0, income_accno_id_1, expense_accno_id_1, income_accno_id_2, expense_accno_id_2, income_accno_id_3, expense_accno_id_3)
+ VALUES ('$form->{description}', '$form->{inventory_accno_id}', '$form->{income_accno_id_0}', '$form->{expense_accno_id_0}', '$form->{income_accno_id_1}', '$form->{expense_accno_id_1}', '$form->{income_accno_id_2}', '$form->{expense_accno_id_2}', '$form->{income_accno_id_3}', '$form->{expense_accno_id_3}')|;
}
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub delete_gifi {
+sub delete_buchungsgruppe {
$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}'|;
+ $query = qq|DELETE FROM buchungsgruppe
+ WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
$dbh->disconnect;
$main::lxdebug->leave_sub();
}
-sub warehouses {
+sub printer {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- my $query = qq|SELECT id, description
- FROM warehouse
+ my $query = qq|SELECT id, printer_description, template_code, printer_command
+ FROM printers
ORDER BY 2|;
$sth = $dbh->prepare($query);
$main::lxdebug->leave_sub();
}
-sub get_warehouse {
+sub get_printer {
$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 $query =
+ qq|SELECT p.printer_description, p.template_code, p.printer_command
+ FROM printers p
+ WHERE p.id = $form->{id}|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$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 {
+sub save_printer {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $form->{description} =~ s/\'/\'\'/g;
+ $form->{printer_description} =~ s/\'/\'\'/g;
+ $form->{printer_command} =~ s/\'/\'\'/g;
+ $form->{template_code} =~ s/\'/\'\'/g;
+
+ # id is the old record
if ($form->{id}) {
- $query = qq|UPDATE warehouse SET
- description = '$form->{description}'
+ $query = qq|UPDATE printers SET
+ printer_description = '$form->{printer_description}',
+ template_code = '$form->{template_code}',
+ printer_command = '$form->{printer_command}'
WHERE id = $form->{id}|;
} else {
- $query = qq|INSERT INTO warehouse
- (description)
- VALUES ('$form->{description}')|;
+ $query = qq|INSERT INTO printers
+ (printer_description, template_code, printer_command)
+ VALUES ('$form->{printer_description}', '$form->{template_code}', '$form->{printer_command}')|;
}
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub delete_warehouse {
+sub delete_printer {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $query = qq|DELETE FROM warehouse
+ $query = qq|DELETE FROM printers
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub departments {
+sub adr {
$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|;
+ my $query = qq|SELECT id, adr_description, adr_code
+ FROM adr
+ ORDER BY adr_code|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub get_department {
+sub get_adr {
$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 $query =
+ qq|SELECT a.adr_description, a.adr_code
+ FROM adr a
+ WHERE a.id = $form->{id}|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$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 {
+sub save_adr {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $form->{description} =~ s/\'/\'\'/g;
+ $form->{adr_description} =~ s/\'/\'\'/g;
+ $form->{adr_code} =~ s/\'/\'\'/g;
+
+ # id is the old record
if ($form->{id}) {
- $query = qq|UPDATE department SET
- description = '$form->{description}',
- role = '$form->{role}'
+ $query = qq|UPDATE adr SET
+ adr_description = '$form->{adr_description}',
+ adr_code = '$form->{adr_code}'
WHERE id = $form->{id}|;
} else {
- $query = qq|INSERT INTO department
- (description, role)
- VALUES ('$form->{description}', '$form->{role}')|;
+ $query = qq|INSERT INTO adr
+ (adr_description, adr_code)
+ VALUES ('$form->{adr_description}', '$form->{adr_code}')|;
}
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub delete_department {
+sub delete_adr {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $query = qq|DELETE FROM department
+ $query = qq|DELETE FROM adr
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub business {
+sub payment {
$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|;
+ my $query = qq|SELECT *
+ FROM payment_terms
+ ORDER BY id|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{percent_skonto} = $form->format_amount($myconfig,($ref->{percent_skonto} * 100));
push @{ $form->{ALL} }, $ref;
}
$main::lxdebug->leave_sub();
}
-sub get_business {
+sub get_payment {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
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}|;
+ qq|SELECT *
+ FROM payment_terms
+ WHERE id = $form->{id}|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
my $ref = $sth->fetchrow_hashref(NAME_lc);
+ $ref->{percent_skonto} = $form->format_amount($myconfig,($ref->{percent_skonto} * 100));
map { $form->{$_} = $ref->{$_} } keys %$ref;
$main::lxdebug->leave_sub();
}
-sub save_business {
+sub save_payment {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
my $dbh = $form->dbconnect($myconfig);
$form->{description} =~ s/\'/\'\'/g;
- $form->{discount} /= 100;
- $form->{salesman} *= 1;
+ $form->{description_long} =~ s/\'/\'\'/g;
+ $percentskonto = $form->parse_amount($myconfig, $form->{percent_skonto}) /100;
+ $form->{ranking} *= 1;
+ $form->{terms_netto} *= 1;
+ $form->{terms_skonto} *= 1;
+ $form->{percent_skonto} *= 1;
+
+
# id is the old record
if ($form->{id}) {
- $query = qq|UPDATE business SET
+ $query = qq|UPDATE payment_terms SET
description = '$form->{description}',
- discount = $form->{discount},
- customernumberinit = '$form->{customernumberinit}',
- salesman = '$form->{salesman}'
+ ranking = $form->{ranking},
+ description_long = '$form->{description_long}',
+ terms_netto = $form->{terms_netto},
+ terms_skonto = $form->{terms_skonto},
+ percent_skonto = $percentskonto
WHERE id = $form->{id}|;
} else {
- $query = qq|INSERT INTO business
- (description, discount, customernumberinit, salesman)
- VALUES ('$form->{description}', $form->{discount}, '$form->{customernumberinit}', '$form->{salesman}')|;
+ $query = qq|INSERT INTO payment_terms
+ (description, ranking, description_long, terms_netto, terms_skonto, percent_skonto)
+ VALUES ('$form->{description}', $form->{ranking}, '$form->{description_long}', $form->{terms_netto}, $form->{terms_skonto}, $percentskonto)|;
}
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
}
-sub delete_business {
+sub delete_payment {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $query = qq|DELETE FROM business
+ $query = qq|DELETE FROM payment_terms
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
(SELECT c.id FROM chart c
WHERE c.accno = '$form->{fxloss_accno}'),
invnumber = '$form->{invnumber}',
+ cnnumber = '$form->{cnnumber}',
sonumber = '$form->{sonumber}',
ponumber = '$form->{ponumber}',
sqnumber = '$form->{sqnumber}',
$main::lxdebug->leave_sub();
}
+sub get_base_unit {
+ my ($self, $units, $unit_name, $factor) = @_;
+
+ $factor = 1 unless ($factor);
+
+ my $unit = $units->{$unit_name};
+
+ if (!defined($unit) || !$unit->{"base_unit"} ||
+ ($unit_name eq $unit->{"base_unit"})) {
+ return ($unit_name, $factor);
+ }
+
+ return AM->get_base_unit($units, $unit->{"base_unit"}, $factor * $unit->{"factor"});
+}
+
+sub retrieve_units {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $type, $prefix) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = "SELECT *, base_unit AS original_base_unit FROM units";
+ my @values;
+ if ($type) {
+ $query .= " WHERE (type = ?)";
+ @values = ($type);
+ }
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute(@values) || $form->dberror($query . " (" . join(", ", @values) . ")");
+
+ my $units = {};
+ while (my $ref = $sth->fetchrow_hashref()) {
+ $units->{$ref->{"name"}} = $ref;
+ }
+ $sth->finish();
+
+ foreach my $unit (keys(%{$units})) {
+ ($units->{$unit}->{"${prefix}base_unit"}, $units->{$unit}->{"${prefix}factor"}) = AM->get_base_unit($units, $unit);
+ }
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $units;
+}
+
+sub units_in_use {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $units) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ foreach my $unit (values(%{$units})) {
+ my $base_unit = $unit->{"original_base_unit"};
+ while ($base_unit) {
+ $units->{$base_unit}->{"DEPENDING_UNITS"} = [] unless ($units->{$base_unit}->{"DEPENDING_UNITS"});
+ push(@{$units->{$base_unit}->{"DEPENDING_UNITS"}}, $unit->{"name"});
+ $base_unit = $units->{$base_unit}->{"original_base_unit"};
+ }
+ }
+
+ foreach my $unit (values(%{$units})) {
+ $unit->{"in_use"} = 0;
+ map({ $_ = $dbh->quote($_); } @{$unit->{"DEPENDING_UNITS"}});
+
+ foreach my $table (qw(parts invoice orderitems)) {
+ my $query = "SELECT COUNT(*) FROM $table WHERE unit ";
+
+ if (0 == scalar(@{$unit->{"DEPENDING_UNITS"}})) {
+ $query .= "= " . $dbh->quote($unit->{"name"});
+ } else {
+ $query .= "IN (" . $dbh->quote($unit->{"name"}) . "," . join(",", @{$unit->{"DEPENDING_UNITS"}}) . ")";
+ }
+
+ my ($count) = $dbh->selectrow_array($query);
+ $form->dberror($query) if ($dbh->err);
+
+ if ($count) {
+ $unit->{"in_use"} = 1;
+ last;
+ }
+ }
+ }
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+}
+
+sub unit_select_data {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $units, $selected, $empty_entry) = @_;
+
+ my $select = [];
+
+ if ($empty_entry) {
+ push(@{$select}, { "name" => "", "base_unit" => "", "factor" => "", "selected" => "" });
+ }
+
+ foreach my $unit (sort({ lc($a) cmp lc($b) } keys(%{$units}))) {
+ push(@{$select}, { "name" => $unit,
+ "base_unit" => $units->{$unit}->{"base_unit"},
+ "factor" => $units->{$unit}->{"factor"},
+ "selected" => ($unit eq $selected) ? "selected" : "" });
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $select;
+}
+
+sub unit_select_html {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $units, $name, $selected, $convertible_into) = @_;
+
+ my $select = "<select name=${name}>";
+
+ foreach my $unit (sort({ lc($a) cmp lc($b) } keys(%{$units}))) {
+ if (!$convertible_into ||
+ ($units->{$convertible_into} &&
+ ($units->{$convertible_into}->{"base_unit"} eq $units->{$unit}->{"base_unit"}))) {
+ $select .= "<option" . (($unit eq $selected) ? " selected" : "") . ">${unit}</option>";
+ }
+ }
+ $select .= "</select>";
+
+ $main::lxdebug->leave_sub();
+
+ return $select;
+}
+
+sub add_unit {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $name, $base_unit, $factor, $type) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = "INSERT INTO units (name, base_unit, factor, type) VALUES (?, ?, ?, ?)";
+ $dbh->do($query, undef, $name, $base_unit, $factor, $type) || $form->dberror($query . " ($name, $base_unit, $factor, $type)");
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_units {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $type, $units, $delete_units) = @_;
+
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ my ($base_unit, $unit, $sth, $query);
+
+ if ($delete_units && (0 != scalar(@{$delete_units}))) {
+ $query = "DELETE FROM units WHERE name = ?";
+ $sth = $dbh->prepare($query);
+ map({ $sth->execute($_) || $form->dberror($query . " ($_)"); } @{$delete_units});
+ $sth->finish();
+ }
+
+ $query = "UPDATE units SET name = ?, base_unit = ?, factor = ? WHERE name = ?";
+ $sth = $dbh->prepare($query);
+
+ foreach $unit (values(%{$units})) {
+ $unit->{"depth"} = 0;
+ my $base_unit = $unit;
+ while ($base_unit->{"base_unit"}) {
+ $unit->{"depth"}++;
+ $base_unit = $units->{$base_unit->{"base_unit"}};
+ }
+ }
+
+ foreach $unit (sort({ $a->{"depth"} <=> $b->{"depth"} } values(%{$units}))) {
+ next if ($unit->{"unchanged_unit"});
+
+ my @values = ($unit->{"name"}, $unit->{"base_unit"}, $unit->{"factor"}, $unit->{"old_name"});
+ $sth->execute(@values) || $form->dberror($query . " (" . join(", ", @values) . ")");
+ }
+
+ $sth->finish();
+ $dbh->commit();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+}
+
1;
$form->{exchangerate} * -1,
2);
$amount += ($form->{"amount_$i"} * -1);
-
- # parse tax_$i for later
- $form->{"tax_$i"} = $form->parse_amount($myconfig, $form->{"tax_$i"}) * -1;
}
# this is for ap
$form->{AP_amounts}{"amount_$i"}{taxkey} = $form->{"taxkey_$i"};
$sth->finish;
- if ($form->{taxincluded} *= 1) {
- if (!$form->{"korrektur_$i"}) {
+ if (!$form->{"korrektur_$i"}) {
+ if ($form->{taxincluded} *= 1) {
$tax =
$form->{"amount_$i"} -
($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
+ $amount = $form->{"amount_$i"} - $tax;
+ $form->{"amount_$i"} = $form->round_amount($amount, 2);
+ $diff += $amount - $form->{"amount_$i"};
+ $form->{"tax_$i"} = $form->round_amount($tax, 2);
+ $form->{netamount} += $form->{"amount_$i"};
} else {
- $tax = $form->{"tax_$i"};
- }
- $amount = $form->{"amount_$i"} - $tax;
- $form->{"amount_$i"} = $form->round_amount($amount, 2);
- $diff += $amount - $form->{"amount_$i"};
- $form->{"tax_$i"} = $form->round_amount($tax, 2);
- $form->{netamount} += $form->{"amount_$i"};
- } else {
- if (!$form->{"korrektur_$i"}) {
$form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
- } else {
- $tax = $form->{"tax_$i"};
+ $form->{"tax_$i"} =
+ $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
+ $form->{netamount} += $form->{"amount_$i"};
}
- $form->{"tax_$i"} =
- $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
- $form->{netamount} += $form->{"amount_$i"};
}
$form->{total_tax} += $form->{"tax_$i"} * -1;
}
$form->{AR_amounts}{"amount_$i"}{taxkey} = $form->{"taxkey_$i"};
$sth->finish;
- if ($form->{taxincluded} *= 1) {
- if (!$form->{"korrektur_$i"}) {
- $tax =
- $form->{"amount_$i"} -
- ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
+ if (!$form->{"korrektur_$i"}) {
+ if ($form->{taxincluded} *= 1) {
+ $tax =
+ $form->{"amount_$i"} -
+ ($form->{"amount_$i"} / ($form->{"taxrate_$i"} + 1));
+ $amount = $form->{"amount_$i"} - $tax;
+ $form->{"amount_$i"} = $form->round_amount($amount, 2);
+ $diff += $amount - $form->{"amount_$i"};
+ $form->{"tax_$i"} = $form->round_amount($tax, 2);
+ $form->{netamount} += $form->{"amount_$i"};
} else {
- $tax = $form->{"tax_$i"};
- }
- $amount = $form->{"amount_$i"} - $tax;
- $form->{"amount_$i"} = $form->round_amount($amount, 2);
- $diff += $amount - $form->{"amount_$i"};
- $form->{"tax_$i"} = $form->round_amount($tax, 2);
- $form->{netamount} += $form->{"amount_$i"};
- } else {
- if (!$form->{"korrektur_$i"}) {
$form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
+ $form->{"tax_$i"} =
+ $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
+ $form->{netamount} += $form->{"amount_$i"};
}
- $form->{"tax_$i"} =
- $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
- $form->{netamount} += $form->{"amount_$i"};
}
-
$form->{total_tax} += $form->{"tax_$i"};
}
$query .= " AND lower(a.quonumber) LIKE '$quonumber'";
}
- if ($form->{type} =~ /(invoice|sales_order|sales_quotation|packing_list|puchase_order|request_quotation)$/) {
- $query .= " AND a.transdate >= '$form->{transdatefrom}'" if $form->{transdatefrom};
- $query .= " AND a.transdate <= '$form->{transdateto}'" if $form->{transdateto};
- }
+ # $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);
$pth->finish;
$amount += $form->{"paid_$i"};
-
- # BUG 324
- if ($form->{arap} eq 'ap') {
- $paid = "paid = paid + $amount";
- } else {
- $paid = "paid = $amount";
- }
# update AR/AP transaction
$query = qq|UPDATE $form->{arap} set
- $paid,
+ paid = $amount,
datepaid = '$form->{datepaid}'
WHERE id = $form->{"id_$i"}|;
$dbh->do($query) || $form->dberror($query);
#======================================================================
package CT;
+use Data::Dumper;
+
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.*
+ my $query = qq|SELECT ct.*, b.id AS business, 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->finish;
+ # get tax zones
+ $query = qq|SELECT id, description
+ FROM tax_zones|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAXZONE} }, $ref;
+ }
+ $sth->finish;
+
+
+ # get shipto address
+ $query = qq|SELECT id, shiptoname
+ FROM shipto WHERE trans_id=$form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{SHIPTO} }, $ref;
+ }
+ $sth->finish;
+
+
+ # get contacts
+ $query = qq|SELECT cp_id, cp_name
+ FROM contacts WHERE cp_cv_id=$form->{id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{CONTACTS} }, $ref;
+ }
+ $sth->finish;
+
+ # get languages
+ $query = qq|SELECT id, description
+ FROM language
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{languages} }, $ref;
+ }
+ $sth->finish;
+
+ # get languages
+ $query = qq|SELECT id, description
+ FROM payment_terms
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{payment_terms} }, $ref;
+ }
+ $sth->finish;
+
$dbh->disconnect;
$main::lxdebug->leave_sub();
%tmp = ();
+ $query =
+ "SELECT greeting FROM customer UNION select greeting FROM vendor";
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ next unless ($ref->{greeting} =~ /[a-zA-Z]/);
+ $tmp{ $ref->{greeting} } = 1;
+ }
+ $sth->finish();
+
+ @{ $form->{COMPANY_GREETINGS} } = sort(keys(%tmp));
+
+ %tmp = ();
+
$query =
"SELECT DISTINCT(c.cp_title) FROM contacts c WHERE c.cp_title LIKE '%'";
$sth = $dbh->prepare($query);
@{ $form->{TITLES} } = sort(keys(%tmp));
+ %tmp = ();
+
+ $query =
+ "SELECT DISTINCT(c.cp_abteilung) FROM contacts c WHERE c.cp_abteilung LIKE '%'";
+ $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query);
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $tmp{ $ref->{cp_abteilung} } = 1;
+ }
+ $sth->finish();
+
+ @{ $form->{DEPARTMENT} } = sort(keys(%tmp));
+
$dbh->disconnect();
$main::lxdebug->leave_sub();
}
push @{ $form->{all_business} }, $ref;
}
$sth->finish;
+ # get languages
+ $query = qq|SELECT id, description
+ FROM language
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{languages} }, $ref;
+ }
+ $sth->finish;
+
+ # get payment terms
+ $query = qq|SELECT id, description
+ FROM payment_terms
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{payment_terms} }, $ref;
+ }
+ $sth->finish;
+
+ # get taxkeys and description
+ $query = qq|SELECT id, description
+ FROM tax_zones|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAXZONE} }, $ref;
+ }
+ $sth->finish;
+
$dbh->disconnect;
map({
$form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
if ($form->{"selected_cp_${_}"});
- } qw(title greeting));
-
+ } qw(title greeting abteilung));
+ $form->{"greeting"} = $form->{"selected_company_greeting"}
+ if ($form->{"selected_company_greeting"});
#
# escape '
map { $form->{$_} =~ s/\'/\'\'/g }
$form->{obsolete} *= 1;
$form->{business} *= 1;
$form->{salesman_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{taxzone_id} *= 1;
$form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
- my ($query, $sth, $f_id);
+ my ($query, $sth);
if ($form->{id}) {
-
- $query = qq|SELECT id FROM customer
- WHERE customernumber = '$form->{customernumber}'|;
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
- (${f_id}) = $sth->fetchrow_array;
- $sth->finish;
- if ((${f_id} ne $form->{id}) and (${f_id} ne "")) {
-
- $main::lxdebug->leave_sub();
- return 3;
- }
$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);
+# $query = qq|DELETE FROM shipto
+# WHERE trans_id = $form->{id} AND module = 'CT'|;
+# $dbh->do($query) || $form->dberror($query);
} else {
-
my $uid = rand() . time;
$uid .= $form->{login};
$uid = substr($uid, 2, 75);
- 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|SELECT c.id FROM customer c
- WHERE c.customernumber = '$form->{customernumber}'|;
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
- (${f_id}) = $sth->fetchrow_array;
- $sth->finish;
- if (${f_id} ne "") {
- $main::lxdebug->leave_sub();
- return 3;
- }
$query = qq|INSERT INTO customer (name)
VALUES ('$uid')|;
($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}',
+ greeting = '$form->{greeting}',
department_1 = '$form->{department_1}',
department_2 = '$form->{department_2}',
street = '$form->{street}',
ustid = '$form->{ustid}',
username = '$form->{username}',
salesman_id = '$form->{salesman_id}',
+ language_id = '$form->{language_id}',
+ payment_id = '$form->{payment_id}',
+ taxzone_id = '$form->{taxzone_id}',
user_password = | . $dbh->quote($form->{user_password}) . qq|,
c_vendor_id = '$form->{c_vendor_id}',
klass = '$form->{klass}'
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}|;
+ cp_phone2 = '$form->{cp_phone2}',
+ cp_abteilung = | . $dbh->quote($form->{cp_abteilung}) . qq|,
+ cp_fax = | . $dbh->quote($form->{cp_fax}) . qq|,
+ cp_mobile1 = | . $dbh->quote($form->{cp_mobile1}) . qq|,
+ cp_mobile2 = | . $dbh->quote($form->{cp_mobile2}) . qq|,
+ cp_satphone = | . $dbh->quote($form->{cp_satphone}) . qq|,
+ cp_satfax = | . $dbh->quote($form->{cp_satfax}) . qq|,
+ cp_project = | . $dbh->quote($form->{cp_project}) . qq|,
+ cp_privatphone = | . $dbh->quote($form->{cp_privatphone}) . qq|,
+ cp_privatemail = | . $dbh->quote($form->{cp_privatemail}) . qq|,
+ cp_birthday = | . $dbh->quote($form->{cp_birthday}) . qq|
+ 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}')|;
+ qq|INSERT INTO contacts ( cp_cv_id, cp_greeting, cp_title, cp_givenname, cp_name, cp_email, cp_phone1, cp_phone2, cp_abteilung, cp_fax, cp_mobile1, cp_mobile2, cp_satphone, cp_satfax, cp_project, cp_privatphone, cp_privatemail, cp_birthday)
+ VALUES ($form->{id}, '$form->{cp_greeting}','$form->{cp_title}','$form->{cp_givenname}','$form->{cp_name}','$form->{cp_email}','$form->{cp_phone1}','$form->{cp_phone2}', '$form->{cp_abteilung}', | . $dbh->quote($form->{cp_fax}) . qq|,| . $dbh->quote($form->{cp_mobile1}) . qq|,| . $dbh->quote($form->{cp_mobile2}) . qq|,| . $dbh->quote($form->{cp_satphone}) . qq|,| . $dbh->quote($form->{cp_satfax}) . qq|,| . $dbh->quote($form->{cp_project}) . qq|,| . $dbh->quote($form->{cp_privatphone}) . qq|,| . $dbh->quote($form->{cp_privatemail}) . qq|,| . $dbh->quote($form->{cp_birthday}) . qq|)|;
}
$dbh->do($query) || $form->dberror($query);
$dbh->do($query) || $form->dberror($query);
}
}
-
+ print(STDERR "SHIPTO_ID $form->{shipto_id}\n");
# add shipto
- $form->add_shipto($dbh, $form->{id});
+ $form->add_shipto($dbh, $form->{id}, "CT");
$rc = $dbh->disconnect;
map({
$form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
if ($form->{"selected_cp_${_}"});
- } qw(title greeting));
-
+ } qw(title greeting abteilung));
+ $form->{"greeting"} = $form->{"selected_company_greeting"}
+ if ($form->{"selected_company_greeting"});
# escape '
map { $form->{$_} =~ s/\'/\'\'/g }
qw(vendornumber name street zipcode city country homepage contact notes cp_title cp_greeting language);
$form->{taxincluded} *= 1;
$form->{obsolete} *= 1;
$form->{business} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{taxzone_id} *= 1;
$form->{creditlimit} = $form->parse_amount($myconfig, $form->{creditlimit});
my $query;
$dbh->do($query) || $form->dberror($query);
$query = qq|DELETE FROM shipto
- WHERE trans_id = $form->{id}|;
+ WHERE trans_id = $form->{id} AND module = 'CT'|;
$dbh->do($query) || $form->dberror($query);
} else {
my $uid = time;
$query = qq|UPDATE vendor SET
vendornumber = '$form->{vendornumber}',
name = '$form->{name}',
+ greeting = '$form->{greeting}',
department_1 = '$form->{department_1}',
department_2 = '$form->{department_2}',
street = '$form->{street}',
bank = '$form->{bank}',
obsolete = '$form->{obsolete}',
ustid = '$form->{ustid}',
+ payment_id = '$form->{payment_id}',
+ taxzone_id = '$form->{taxzone_id}',
+ language_id = '$form->{language_id}',
username = '$form->{username}',
user_password = '$form->{user_password}',
v_customer_id = '$form->{v_customer_id}'
$main::lxdebug->leave_sub();
}
+sub get_contact {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $dbh = $form->dbconnect($myconfig);
+ my $query = qq|SELECT c.*
+ FROM contacts c
+ WHERE c.cp_id = $form->{cp_id} order by c.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;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+
+sub get_shipto {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $dbh = $form->dbconnect($myconfig);
+ my $query = qq|SELECT s.*
+ FROM shipto s
+ WHERE s.id = $form->{shipto_id} order by s.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;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_delivery {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $dbh = $form->dbconnect($myconfig);
+ $where = " WHERE 1=1 ";
+ if ($form->{shipto_id}) {
+ $where .= "AND ar.shipto_id=$form->{shipto_id} ";
+ }
+ if ($form->{from}) {
+ $where .= "AND ar.transdate >= '$form->{from}' ";
+ }
+ if ($form->{to}) {
+ $where .= "AND ar.transdate <= '$form->{to}' ";
+ }
+
+ my $query = qq|select shiptoname, adr_code, ar.transdate, ar.invnumber, ar.ordnumber, invoice.description, qty, invoice.unit FROM ar LEFT join shipto ON (ar.shipto_id=shipto.id) LEFT join invoice on (ar.id=invoice.trans_id) LEFT join parts ON (parts.id=invoice.parts_id) LEFT join adr ON (parts.adr_id=adr.id) $where ORDER BY ar.transdate DESC LIMIT 15|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{DELIVERY} }, $ref;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub adr {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+ my $dbh = $form->dbconnect($myconfig);
+ $where = " WHERE 1=1 ";
+ if ($form->{from}) {
+ $where .= "AND ar.transdate >= '$form->{from}' ";
+ }
+ if ($form->{to}) {
+ $where .= "AND ar.transdate <= '$form->{to}' ";
+ }
+ if ($form->{year}) {
+ $where = " WHERE ar.transdate >= '$form->{year}-01-01' AND ar.transdate <= '$form->{year}-12-31' ";
+ }
+
+ my $query = qq|select adr_code, adr_description, sum(base_qty), parts.unit from ar LEFT join invoice on (ar.id=invoice.trans_id) LEFT join parts ON (invoice.parts_id=parts.id) LEFT join adr ON (adr.id=parts.adr_id) $where GROUP BY adr_code,adr_description,parts.unit|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ADR} }, $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
+#
+#====================================================================
+
+package Common;
+
+sub retrieve_parts {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $order_by, $order_dir) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my (@filter_values, $filter);
+ if ($form->{"partnumber"}) {
+ $filter .= " AND (partnumber ILIKE ?)";
+ push(@filter_values, '%' . $form->{"partnumber"} . '%');
+ }
+ if ($form->{"description"}) {
+ $filter .= " AND (description ILIKE ?)";
+ push(@filter_values, '%' . $form->{"description"} . '%');
+ }
+ substr($filter, 1, 3) = "WHERE" if ($filter);
+
+ $order_by =~ s/[^a-zA-Z_]//g;
+ $order_dir = $order_dir ? "ASC" : "DESC";
+
+ my $query = "SELECT id, partnumber, description FROM parts $filter ORDER BY $order_by $order_dir";
+ my $sth = $dbh->prepare($query);
+ $sth->execute(@filter_values) || $form->dberror($query . " (" . join(", ", @filter_values) . ")");
+ my $parts = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@{$parts}, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $parts;
+}
+
+sub retrieve_projects {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $order_by, $order_dir) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my (@filter_values, $filter);
+ if ($form->{"projectnumber"}) {
+ $filter .= " AND (projectnumber ILIKE ?)";
+ push(@filter_values, '%' . $form->{"projectnumber"} . '%');
+ }
+ if ($form->{"description"}) {
+ $filter .= " AND (description ILIKE ?)";
+ push(@filter_values, '%' . $form->{"description"} . '%');
+ }
+ substr($filter, 1, 3) = "WHERE" if ($filter);
+
+ $order_by =~ s/[^a-zA-Z_]//g;
+ $order_dir = $order_dir ? "ASC" : "DESC";
+
+ my $query = "SELECT id, projectnumber, description FROM project $filter ORDER BY $order_by $order_dir";
+ my $sth = $dbh->prepare($query);
+ $sth->execute(@filter_values) || $form->dberror($query . " (" . join(", ", @filter_values) . ")");
+ my $projects = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@{$projects}, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $projects;
+}
+
+sub retrieve_employees {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $order_by, $order_dir) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my (@filter_values, $filter);
+ if ($form->{"name"}) {
+ $filter .= " AND (name ILIKE ?)";
+ push(@filter_values, '%' . $form->{"name"} . '%');
+ }
+ substr($filter, 1, 3) = "WHERE" if ($filter);
+
+ $order_by =~ s/[^a-zA-Z_]//g;
+ $order_dir = $order_dir ? "ASC" : "DESC";
+
+ my $query = "SELECT id, name FROM employee $filter ORDER BY $order_by $order_dir";
+ my $sth = $dbh->prepare($query);
+ $sth->execute(@filter_values) || $form->dberror($query . " (" . join(", ", @filter_values) . ")");
+ my $employees = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@{$employees}, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $employees;
+}
+
+sub retrieve_delivery_customer {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $order_by, $order_dir) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my (@filter_values, $filter);
+ if ($form->{"name"}) {
+ $filter .= " (name ILIKE '%$form->{name}%') AND";
+ push(@filter_values, '%' . $form->{"name"} . '%');
+ }
+ #substr($filter, 1, 3) = "WHERE" if ($filter);
+
+ $order_by =~ s/[^a-zA-Z_]//g;
+ $order_dir = $order_dir ? "ASC" : "DESC";
+
+ my $query = "SELECT id, name, customernumber, (street || ', ' || zipcode || city) as address FROM customer WHERE $filter business_id=(SELECT id from business WHERE description='Endkunde') ORDER BY $order_by $order_dir";
+ my $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query . " (" . join(", ", @filter_values) . ")");
+ my $delivery_customers = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@{$delivery_customers}, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $delivery_customers;
+}
+
+sub retrieve_vendor {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $order_by, $order_dir) = @_;
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ my (@filter_values, $filter);
+ if ($form->{"name"}) {
+ $filter .= " (name ILIKE '%$form->{name}%') AND";
+ push(@filter_values, '%' . $form->{"name"} . '%');
+ }
+ #substr($filter, 1, 3) = "WHERE" if ($filter);
+
+ $order_by =~ s/[^a-zA-Z_]//g;
+ $order_dir = $order_dir ? "ASC" : "DESC";
+
+ my $query = "SELECT id, name, customernumber, (street || ', ' || zipcode || city) as address FROM customer WHERE $filter business_id=(SELECT id from business WHERE description='Händler') ORDER BY $order_by $order_dir";
+ my $sth = $dbh->prepare($query);
+ $sth->execute() || $form->dberror($query . " (" . join(", ", @filter_values) . ")");
+ my $vendors = [];
+ while (my $ref = $sth->fetchrow_hashref()) {
+ push(@{$vendors}, $ref);
+ }
+ $sth->finish();
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $vendors;
+}
+
+1;
}
}
if (abs($absumsatz) > 0.01) {
- $form->error("Datev-Export fehlgeschlagen!");
+ $form->error("Datev-Export fehlgeschlagen! Bei Transaktion $i->[0]->{trans_id}\n");
}
} else {
push @{ $form->{DATEV} }, \@{$i};
--- /dev/null
+#======================================================================
+# LX-Office ERP
+# Copyright (C) 2006
+# 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.
+#======================================================================
+#
+# Dunning process module
+#
+#======================================================================
+
+package DN;
+
+use SL::Template;
+use SL::IS;
+use Data::Dumper;
+
+sub get_config {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ my $query = qq|SELECT dn.*
+ FROM dunning_config dn
+ ORDER BY dn.dunning_level|;
+
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{fee} = $form->format_amount($myconfig, $ref->{fee}, 2);
+ $ref->{interest} = $form->format_amount($myconfig, ($ref->{interest} * 100));
+ push @{ $form->{DUNNING} }, $ref;
+ }
+
+ $sth->finish;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+
+sub save_config {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ for my $i (1 .. $form->{rowcount}) {
+ $form->{"active_$i"} *= 1;
+ $form->{"auto_$i"} *= 1;
+ $form->{"email_$i"} *= 1;
+ $form->{"terms_$i"} *= 1;
+ $form->{"payment_terms_$i"} *= 1;
+ $form->{"email_attachment_$i"} *= 1;
+ $form->{"fee_$i"} = $form->parse_amount($myconfig, $form->{"fee_$i"}) * 1;
+ $form->{"interest_$i"} = $form->parse_amount($myconfig, $form->{"interest_$i"})/100;
+
+ if (($form->{"dunning_level_$i"} ne "") && ($form->{"dunning_description_$i"} ne "")) {
+ if ($form->{"id_$i"}) {
+ my $query = qq|UPDATE dunning_config SET
+ dunning_level = | . $dbh->quote($form->{"dunning_level_$i"}) . qq|,
+ dunning_description = | . $dbh->quote($form->{"dunning_description_$i"}) . qq|,
+ email_subject = | . $dbh->quote($form->{"email_subject_$i"}) . qq|,
+ email_body = | . $dbh->quote($form->{"email_body_$i"}) . qq|,
+ template = | . $dbh->quote($form->{"template_$i"}) . qq|,
+ fee = '$form->{"fee_$i"}',
+ interest = '$form->{"interest_$i"}',
+ active = '$form->{"active_$i"}',
+ auto = '$form->{"auto_$i"}',
+ email = '$form->{"email_$i"}',
+ email_attachment = '$form->{"email_attachment_$i"}',
+ payment_terms = $form->{"payment_terms_$i"},
+ terms = $form->{"terms_$i"}
+ WHERE id=$form->{"id_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+ } else {
+ my $query = qq|INSERT INTO dunning_config (dunning_level, dunning_description, email_subject, email_body, template, fee, interest, active, auto, email, email_attachment, terms, payment_terms) VALUES (| . $dbh->quote($form->{"dunning_level_$i"}) . qq|,| . $dbh->quote($form->{"dunning_description_$i"}) . qq|,| . $dbh->quote($form->{"email_subject_$i"}) . qq|,| . $dbh->quote($form->{"email_body_$i"}) . qq|,| . $dbh->quote($form->{"template_$i"}) . qq|,'$form->{"fee_$i"}','$form->{"interest_$i"}','$form->{"active_$i"}','$form->{"auto_$i"}','$form->{"email_$i"}','$form->{"email_attachment_$i"}',$form->{"terms_$i"},$form->{"payment_terms_$i"})|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ if (($form->{"dunning_description_$i"} eq "") && ($form->{"id_$i"})) {
+ my $query = qq|DELETE FROM dunning_config WHERE id=$form->{"id_$i"}|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+
+ $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub save_dunning {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $rows, $userspath,$spool, $sendmail) = @_;
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ foreach my $row (@{ $rows }) {
+
+ $form->{"interest_$row"} = $form->parse_amount($myconfig,$form->{"interest_$row"});
+ $form->{"fee_$row"} = $form->parse_amount($myconfig,$form->{"fee_$row"});
+ $form->{send_email} = $form->{"email_$row"};
+
+ my $query = qq| UPDATE ar set dunning_id = '$form->{"next_dunning_id_$row"}' WHERE id='$form->{"inv_id_$row"}'|;
+ $dbh->do($query) || $form->dberror($query);
+ my $query = qq| INSERT into dunning (dunning_id,dunning_level,trans_id,fee,interest,transdate,duedate) VALUES ($form->{"next_dunning_id_$row"},(select dunning_level from dunning_config WHERE id=$form->{"next_dunning_id_$row"}),$form->{"inv_id_$row"},'$form->{"fee_$row"}', '$form->{"interest_$row"}',current_date, |.$dbh->quote($form->{"next_duedate_$row"}) . qq|)|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+
+ my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id) where ar.id IN $form->{inv_ids}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ my $first = 1;
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if ($first) {
+ map({ $form->{"dn_$_"} = []; } keys(%{$ref}));
+ $first = 0;
+ }
+ map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2) } qw(amount netamount paid open_amount fee interest);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ #print(STDERR Dumper($ref));
+ map { push @{ $form->{"dn_$_"} }, $ref->{$_}} keys %$ref;
+ }
+ $sth->finish;
+
+ IS->customer_details($myconfig,$form);
+ #print(STDERR Dumper($form->{dn_invnumber}));
+ $form->{templates} = "$myconfig->{templates}";
+
+
+
+ $form->{language} = $form->get_template_language(\%myconfig);
+ $form->{printer_code} = $form->get_printer_code(\%myconfig);
+
+ if ($form->{language} ne "") {
+ $form->{language} = "_" . $form->{language};
+ }
+
+ if ($form->{printer_code} ne "") {
+ $form->{printer_code} = "_" . $form->{printer_code};
+ }
+
+ $form->{IN} = "$form->{formname}$form->{language}$form->{printer_code}.html";
+ if ($form->{format} eq 'postscript') {
+ $form->{postscript} = 1;
+ $form->{IN} =~ s/html$/tex/;
+ } elsif ($form->{"format"} =~ /pdf/) {
+ $form->{pdf} = 1;
+ if ($form->{"format"} =~ /opendocument/) {
+ $form->{IN} =~ s/html$/odt/;
+ } else {
+ $form->{IN} =~ s/html$/tex/;
+ }
+ } elsif ($form->{"format"} =~ /opendocument/) {
+ $form->{"opendocument"} = 1;
+ $form->{"IN"} =~ s/html$/odt/;
+ }
+
+ if ($form->{"send_email"} && $form->{email}) {
+ $form->{media} = 'email';
+ }
+
+ $form->{keep_tmpfile} = 0;
+ if ($form->{media} eq 'email') {
+ $form->{subject} = qq|$form->{label} $form->{"${inv}number"}|
+ unless $form->{subject};
+ if (!$form->{email_attachment}) {
+ $form->{do_not_attach} = 1;
+ } else {
+ $form->{do_not_attach} = 0;
+ }
+ $form->{subject} = parse_strings($myconfig, $form, $userspath, $form->{email_subject});
+ $form->{message} = parse_strings($myconfig, $form, $userspath, $form->{email_body});
+
+ $form->{OUT} = "$sendmail";
+
+ } else {
+
+ my $uid = rand() . time;
+
+ $uid .= $form->{login};
+
+ $uid = substr($uid, 2, 75);
+ $filename = $uid;
+
+ $filename .= '.pdf';
+ $form->{OUT} = ">$spool/$filename";
+ push(@{ $form->{DUNNING_PDFS} }, $filename);
+ $form->{keep_tmpfile} = 1;
+ }
+
+ $form->parse_template($myconfig, $userspath);
+
+ $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
+sub get_invoices {
+
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $where = qq| WHERE 1=1 AND a.paid < a.amount AND a.duedate < current_date AND dnn.id = (select id from dunning_config WHERE dunning_level>(select case when a.dunning_id is null then 0 else (select dunning_level from dunning_config where id=a.dunning_id order by dunning_level limit 1 ) end from dunning_config limit 1) limit 1) |;
+
+ if ($form->{"$form->{vc}_id"}) {
+ $where .= qq| AND a.$form->{vc}_id = $form->{"$form->{vc}_id"}|;
+ } else {
+ if ($form->{ $form->{vc} }) {
+ $where .= " AND lower(ct.name) LIKE '$name'";
+ }
+ }
+
+ my $sortorder = join ', ',
+ ("a.id", $form->sort_columns(transdate, duedate, name));
+ $sortorder = $form->{sort} if $form->{sort};
+
+ $where .= " AND lower(ordnumber) LIKE '$form->{ordnumber}'" if $form->{ordnumber};
+ $where .= " AND lower(invnumber) LIKE '$form->{invnumber}'" if $form->{invnumber};
+
+
+ $form->{minamount} = $form->parse_amount($myconfig,$form->{minamount});
+ $where .= " AND a.dunning_id='$form->{dunning_level}'"
+ if $form->{dunning_level};
+ $where .= " AND a.ordnumber ilike '%$form->{ordnumber}%'"
+ if $form->{ordnumber};
+ $where .= " AND a.invnumber ilike '%$form->{invnumber}%'"
+ if $form->{invnumber};
+ $where .= " AND a.notes ilike '%$form->{notes}%'"
+ if $form->{notes};
+ $where .= " AND ct.name ilike '%$form->{customer}%'"
+ if $form->{customer};
+
+ $where .= " AND a.amount-a.paid>'$form->{minamount}'"
+ if $form->{minamount};
+
+ $where .= " ORDER by $sortorder";
+
+ $paymentdate = ($form->{paymentuntil}) ? "'$form->{paymentuntil}'" : current_date;
+
+ $query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.customer_id, a.duedate,da.fee AS old_fee, dnn.fee as fee, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, a.duedate + dnn.terms - current_date AS nextlevel, $paymentdate - a.duedate AS pastdue, dn.dunning_level, current_date + dnn.payment_terms AS next_duedate, dnn.dunning_description AS next_dunning_description, dnn.id AS next_dunning_id, dnn.interest AS interest_rate, dnn.terms
+ FROM dunning_config dnn, ar a
+ JOIN customer ct ON (a.customer_id = ct.id)
+ LEFT JOIN dunning_config dn ON (dn.id = a.dunning_id)
+ LEFT JOIN dunning da ON (da.trans_id=a.id)
+ $where|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ $ref->{fee} += $ref->{old_fee};
+ $ref->{interest} = ($ref->{amount} * $ref->{pastdue} * $ref->{interest_rate}) /360;
+ $ref->{interest} = $form->round_amount($ref->{interest},2);
+ map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2)} qw(amount fee interest);
+ if ($ref->{pastdue} >= $ref->{terms}) {
+ push @{ $form->{DUNNINGS} }, $ref;
+ }
+ }
+
+ $sth->finish;
+
+ $query = qq|select id, dunning_description FROM dunning_config order by dunning_level|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{DUNNING_CONFIG} }, $ref;
+ }
+
+ $sth->finish;
+
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+sub get_dunning {
+
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ $where = qq| WHERE 1=1 AND da.trans_id=a.id|;
+
+ if ($form->{"$form->{vc}_id"}) {
+ $where .= qq| AND a.$form->{vc}_id = $form->{"$form->{vc}_id"}|;
+ } else {
+ if ($form->{ $form->{vc} }) {
+ $where .= " AND lower(ct.name) LIKE '$name'";
+ }
+ }
+
+ my $sortorder = join ', ',
+ ("a.id", $form->sort_columns(transdate, duedate, name));
+ $sortorder = $form->{sort} if $form->{sort};
+
+ $where .= " AND lower(ordnumber) LIKE '$form->{ordnumber}'" if $form->{ordnumber};
+ $where .= " AND lower(invnumber) LIKE '$form->{invnumber}'" if $form->{invnumber};
+
+
+ $form->{minamount} = $form->parse_amount($myconfig,$form->{minamount});
+ $where .= " AND a.dunning_id='$form->{dunning_level}'"
+ if $form->{dunning_level};
+ $where .= " AND a.ordnumber ilike '%$form->{ordnumber}%'"
+ if $form->{ordnumber};
+ $where .= " AND a.invnumber ilike '%$form->{invnumber}%'"
+ if $form->{invnumber};
+ $where .= " AND a.notes ilike '%$form->{notes}%'"
+ if $form->{notes};
+ $where .= " AND ct.name ilike '%$form->{customer}%'"
+ if $form->{customer};
+ $where .= " AND a.amount > a.paid AND da.dunning_id=a.dunning_id " unless ($form->{showold});
+
+ $where .= " AND a.transdate >='$form->{transdatefrom}' " if ($form->{transdatefrom});
+ $where .= " AND a.transdate <='$form->{transdateto}' " if ($form->{transdateto});
+ $where .= " AND da.transdate >='$form->{dunningfrom}' " if ($form->{dunningfrom});
+ $where .= " AND da.transdate <='$form->{dunningto}' " if ($form->{dunningto});
+
+ $where .= " ORDER by $sortorder";
+
+
+ $query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.duedate,da.fee ,da.interest, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate
+ FROM ar a
+ JOIN customer ct ON (a.customer_id = ct.id),
+ dunning da LEFT JOIN dunning_config dn ON (da.dunning_id=dn.id)
+ $where|;
+
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+
+ map { $ref->{$_} = $form->format_amount($myconfig, $ref->{$_}, 2)} qw(amount fee interest);
+ push @{ $form->{DUNNINGS} }, $ref;
+ }
+
+ $sth->finish;
+
+
+
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+
+sub parse_strings {
+
+ $main::lxdebug->enter_sub();
+
+ my ($myconfig, $form, $userspath, $string) = @_;
+
+ my $format = $form->{format};
+ $form->{format} = "html";
+
+ $tmpstring = "parse_string.html";
+ $tmpfile = "$myconfig->{templates}/$tmpstring";
+ open(OUT, ">$tmpfile") or $form->error("$tmpfile : $!");
+ print(OUT $string);
+ close(OUT);
+
+ my $in = $form->{IN};
+ $form->{IN} = $tmpstring;
+ $template = HTMLTemplate->new($tmpstring, $form, $myconfig, $userspath);
+
+ my $fileid = time;
+ $form->{tmpfile} = "$userspath/${fileid}.$tmpstring";
+ $out = $form->{OUT};
+ $form->{OUT} = ">$form->{tmpfile}";
+
+ if ($form->{OUT}) {
+ open(OUT, "$form->{OUT}") or $form->error("$form->{OUT} : $!");
+ }
+ if (!$template->parse(*OUT)) {
+ $form->cleanup();
+ $form->error("$form->{IN} : " . $template->get_error());
+ }
+
+ close(OUT);
+ my $result = "";
+ open(IN, $form->{tmpfile}) or $form->error($form->cleanup . "$form->{tmpfile} : $!");
+
+ while (<IN>) {
+ $result .= $_;
+ }
+
+ close(IN);
+# unlink($tmpfile);
+# unlink($form->{tmpfile});
+ $form->{IN} = $in;
+ $form->{format} = $format;
+
+ $main::lxdebug->leave_sub();
+ return $result;
+}
+
+sub melt_pdfs {
+
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $userspath) = @_;
+
+ foreach my $file (@{ $form->{DUNNING_PDFS} }) {
+ $inputfiles .= " $userspath/$file ";
+ }
+
+ my $outputfile = "$userspath/dunning.pdf";
+ system("gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$outputfile $inputfiles");
+ foreach my $file (@{ $form->{DUNNING_PDFS} }) {
+ unlink("$userspath/$file");
+ }
+ $out="";
+
+
+ $form->{OUT} = $out;
+
+ my $numbytes = (-s $outputfile);
+ open(IN, $outputfile)
+ or $form->error($self->cleanup . "$outputfile : $!");
+
+ $form->{copies} = 1 unless $form->{media} eq 'printer';
+
+ chdir("$self->{cwd}");
+
+ for my $i (1 .. $form->{copies}) {
+ if ($form->{OUT}) {
+ open(OUT, $form->{OUT})
+ or $form->error($form->cleanup . "$form->{OUT} : $!");
+ } else {
+
+ # launch application
+ print qq|Content-Type: Application/PDF
+Content-Disposition: attachment; filename="$outputfile"
+Content-Length: $numbytes
+
+|;
+
+ open(OUT, ">-") or $form->error($form->cleanup . "$!: STDOUT");
+
+ }
+
+ while (<IN>) {
+ print OUT $_;
+ }
+
+ close(OUT);
+
+ seek IN, 0, 0;
+ }
+
+ close(IN);
+ unlink("$userspath/$outputfile");
+
+ $main::lxdebug->leave_sub();
+}
+
+1;
#======================================================================
package Form;
+use Data::Dumper;
+use Cwd;
use HTML::Template;
+use SL::Template;
+use CGI::Ajax;
use SL::Menu;
+use CGI;
sub _input_to_hash {
$main::lxdebug->enter_sub(2);
$self->{menubar} = 1 if $self->{path} =~ /lynx/i;
$self->{action} = lc $self->{action};
- $self->{action} =~ s/( |-|,|#)/_/g;
+ $self->{action} =~ s/( |-|,|\#)/_/g;
- $self->{version} = "2.3.0";
+ $self->{version} = "2.4.0";
$main::lxdebug->leave_sub();
$main::lxdebug->enter_sub();
my ($self, $msg) = @_;
-
if ($ENV{HTTP_USER_AGENT}) {
$msg =~ s/\n/<br>/g;
$self->show_generic_error($msg);
($self->{title})
? "$self->{title} - $self->{titlebar}"
: $self->{titlebar};
-
+ $ajax = "";
+ foreach $item (@ { $self->{AJAX} }) {
+ $ajax .= $item->show_javascript();
+ }
print qq|Content-Type: text/html
<html>
$favicon
$charset
$jsscript
+ $ajax
$fokus
+ <script type="text/javascript" src="js/highlight_input.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/tabcontent.css" />
+
+ <script type="text/javascript" src="js/tabcontent.js">
+
+ /***********************************************
+ * Tab Content script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
+ * This notice MUST stay intact for legal use
+ * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
+ ***********************************************/
+
+ </script>
+
</head>
|;
$menu->generate_acl("", $additional_params);
my @additional_param_names = keys(%{$additional_params});
-
foreach my $key ($template->param()) {
if (grep(/^${key}$/, @additional_param_names)) {
$template->param($key => $additional_params->{$key});
$template->param($key => $self->{$key});
}
}
-
my $output = $template->output();
$main::lxdebug->leave_sub();
return @columns;
}
-#
+
sub format_amount {
$main::lxdebug->enter_sub(2);
my ($self, $myconfig, $amount, $places, $dash) = @_;
- my $neg = ($amount =~ s/-//);
- $amount = $self->round_amount($amount, $places) if ($places =~ /\d/);
+ #Workaround for $format_amount calls without $places
+ if (!defined $places) {
+ (my $dec) = ($amount =~ /\.(\d+)/);
+ $places = length $dec;
+ }
- my @d = map { s/\d//g; reverse split // } my $tmp = $myconfig->{numberformat}; # get delim chars
- my @p = split /\./, $amount ; # split amount at decimal point
+ if ($places =~ /\d/) {
+ $amount = $self->round_amount($amount, $places);
+ }
- $p[0] =~ s/\B(?=(...)*$)/$d[1]/g if $d[1]; # add 1,000 delimiters
+ # is the amount negative
+ my $negative = ($amount < 0);
+ my $fillup = "";
+
+ if ($amount != 0) {
+ if ($myconfig->{numberformat} && ($myconfig->{numberformat} ne '1000.00'))
+ {
+ my ($whole, $dec) = split /\./, "$amount";
+ $whole =~ s/-//;
+ $amount = join '', reverse split //, $whole;
+ $fillup = "0" x ($places - length($dec));
+
+ if ($myconfig->{numberformat} eq '1,000.00') {
+ $amount =~ s/\d{3,}?/$&,/g;
+ $amount =~ s/,$//;
+ $amount = join '', reverse split //, $amount;
+ $amount .= "\.$dec" . $fillup if ($places ne '' && $places * 1 != 0);
+ }
+
+ if ($myconfig->{numberformat} eq '1.000,00') {
+ $amount =~ s/\d{3,}?/$&./g;
+ $amount =~ s/\.$//;
+ $amount = join '', reverse split //, $amount;
+ $amount .= ",$dec" . $fillup if ($places ne '' && $places * 1 != 0);
+ }
+
+ if ($myconfig->{numberformat} eq '1000,00') {
+ $amount = "$whole";
+ $amount .= ",$dec" . $fillup if ($places ne '' && $places * 1 != 0);
+ }
+
+ 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";
+ }
+ }
- $amount = $p[0];
- $amount .= $d[0].$p[1].(0 x ($places - length $p[1])) if ($places || $p[1] ne '');
-
- $amount = do {
- ($dash =~ /-/) ? ($neg ? "($amount)" : "$amount" ) :
- ($dash =~ /DRCR/) ? ($neg ? "$amount DR" : "$amount CR" ) :
- ($neg ? "-$amount" : "$amount" ) ;
- };
-
$main::lxdebug->leave_sub(2);
+
return $amount;
}
-#
+
sub parse_amount {
$main::lxdebug->enter_sub(2);
$main::lxdebug->enter_sub();
my ($self, $myconfig, $userspath) = @_;
+ my $template;
- # { 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, $current_row) = (1, 1, 0);
- my $pagebreak = "";
- my $sum = 0;
- # } Moritz Bunkus
-
- # The old fixed notation of <%variable%> is changed to a new dynamic one.
- my ${pre} = '<%'; # Variable Prefix, must be regex save!
- my ${suf} = '%>'; # Variable Suffix, must be regex save!
+ $self->{"cwd"} = getcwd();
+ $self->{"tmpdir"} = $self->{cwd} . "/${userspath}";
-
- # Make sure that all *notes* (intnotes, partnotes_*, notes etc) are converted to markup correctly.
- $self->format_string(grep(/notes/, keys(%{$self})));
+ if ($self->{"format"} =~ /(opendocument|oasis)/i) {
+ $template = OpenDocumentTemplate->new($self->{"IN"}, $self, $myconfig, $userspath);
+ } elsif ($self->{"format"} =~ /(postscript|pdf)/i) {
+ $ENV{"TEXINPUTS"} = ".:" . getcwd() . "/" . $myconfig->{"templates"} . ":" . $ENV{"TEXINPUTS"};
+ $template = LaTeXTemplate->new($self->{"IN"}, $self, $myconfig, $userspath);
+ } elsif (($self->{"format"} =~ /html/i) ||
+ (!$self->{"format"} && ($self->{"IN"} =~ /html$/i))) {
+ $template = HTMLTemplate->new($self->{"IN"}, $self, $myconfig, $userspath);
+ }
# 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 company address businessnumber));
- 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') {
+ if ($template->uses_temp_file() || $self->{media} eq 'email') {
$out = $self->{OUT};
$self->{OUT} = ">$self->{tmpfile}";
}
$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 ${pre}variable${suf}
- while ($_ = shift) {
-
- $par = "";
- $var = $_;
-
- # Switch ${pre}analyse${suf} for template checking
- # If ${pre}analyse${suf} is set in the template, you'll find the
- # parsed output in the user Directory for analysing
- # Latex errors
- # ${pre}analyse${suf} is a switch (allways off, on if set), not a Variable
- # Set $form->{analysing}="" for system state: never analyse.
- # Set $form->{analysing}="1" for system state: ever analyse.
- $self->{analysing} = "1" if (/${pre}analyse${suf}/ && !defined $self->{analysing});
-
- $two_passes = 1 if (/\\pageref/);
-
- # { Moritz Bunkus
- # detect pagebreak block and its parameters
- if (/\s*${pre}pagebreak ([0-9]+) ([0-9]+) ([0-9]+)${suf}/) {
- $chars_per_line = $1;
- $lines_on_first_page = $2;
- $lines_on_second_page = $3;
-
- while ($_ = shift) {
- last if (/\s*${pre}end pagebreak${suf}/);
- $pagebreak .= $_;
- }
- }
-
- # } Moritz Bunkus
-
- if (/\s*${pre}foreach /) {
-
- # this one we need for the count
- chomp $var;
- $var =~ s/\s*${pre}foreach (.+?)${suf}/$1/;
- while ($_ = shift) {
- last if (/\s*${pre}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 ${pre}pagebreak ...${suf} 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 -- or the user has forced one
- if (
- (($current_line + $lines) > $lpp)
- || ($self->{"_forced_pagebreaks"}
- && grep(/^${current_row}$/, @{ $self->{"_forced_pagebreaks"} }))
- ) {
- my $pb = $pagebreak;
-
- # replace the special variables ${pre}sumcarriedforward${suf}
- # and ${pre}lastpage${suf}
-
- my $psum = $self->format_amount($myconfig, $sum, 2);
- $pb =~ s/${pre}sumcarriedforward${suf}/$psum/g;
- $pb =~ s/${pre}lastpage${suf}/$current_page/g;
-
- # only "normal" variables are supported here
- # (no ${pre}if, no ${pre}foreach, no ${pre}include)
-
- $pb =~ s/${pre}(.+?)${suf}/$self->{$1}/g;
-
- # page break block is ready to rock
- print(OUT $pb);
- $current_page++;
- $current_line = 1;
- }
- $current_line += $lines;
- $current_row++;
- }
- $sum += $self->parse_amount($myconfig, $self->{"linetotal"}[$i]);
-
- # } Moritz Bunkus
-
- # don't parse par, we need it for each line
- $_ = $par;
- s/${pre}(.+?)${suf}/$self->{$1}[$i]/mg;
- print OUT;
- }
- next;
- }
-
- # if not comes before if!
- if (/\s*${pre}if not /) {
-
- # check if it is not set and display
- chop;
- s/\s*${pre}if not (.+?)${suf}/$1/;
-
- unless ($self->{$_}) {
- while ($_ = shift) {
- last if (/\s*${pre}end /);
-
- # store line in $par
- $par .= $_;
- }
-
- $_ = $par;
-
- } else {
- while ($_ = shift) {
- last if (/\s*${pre}end /);
- }
- next;
- }
- }
-
- if (/\s*${pre}if /) {
-
- # check if it is set and display
- chop;
- s/\s*${pre}if (.+?)${suf}/$1/;
-
- if ($self->{$_}) {
- while ($_ = shift) {
- last if (/\s*${pre}end /);
-
- # store line in $par
- $par .= $_;
- }
-
- $_ = $par;
-
- } else {
- while ($_ = shift) {
- last if (/\s*${pre}end /);
- }
- next;
- }
- }
-
- # check for ${pre}include filename${suf}
- if (/\s*${pre}include /) {
-
- # get the directory/filename
- chomp $var;
- $var =~ s/\s*${pre}include (.+?)${suf}/$1/;
-
- # mangle filename on basedir
- $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/${pre}(.+?)${suf}/$self->{$1}/g;
- s/<nobr><\/nobr>/ /g;
- print OUT;
+ if (!$template->parse(*OUT)) {
+ $self->cleanup();
+ $self->error("$self->{IN} : " . $template->get_error());
}
close(OUT);
+
+ use Data::Dumper;
+ #print(STDERR Dumper($self));
- # { 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 ($template->uses_temp_file() || $self->{media} eq 'email') {
if ($self->{media} eq 'email') {
} else {
- @{ $mail->{attachments} } = ($self->{tmpfile});
+ @{ $mail->{attachments} } = ($self->{tmpfile}) unless ($form->{do_not_attach});
$myconfig->{signature} =~ s/\\n/\r\n/g;
$mail->{message} .= "\r\n--\r\n$myconfig->{signature}";
$self->{copies} = 1 unless $self->{media} eq 'printer';
chdir("$self->{cwd}");
-
+ #print(STDERR "Kopien $self->{copies}\n");
+ #print(STDERR "OUT $self->{OUT}\n");
for my $i (1 .. $self->{copies}) {
if ($self->{OUT}) {
open(OUT, $self->{OUT})
} else {
# launch application
- print qq|Content-Type: application/$self->{format}
+ print qq|Content-Type: | . $template->get_mime_type() . qq|
Content-Disposition: attachment; filename="$self->{tmpfile}"
Content-Length: $numbytes
close(FH);
}
- if ($self->{analysing} eq "") {
- if ($self->{tmpfile}) {
-
- # strip extension
- $self->{tmpfile} =~ s/\.\w+$//g;
- my $tmpfile = $self->{tmpfile};
- unlink(<$tmpfile.*>);
- }
+ if ($self->{tmpfile}) {
+ $self->{tmpfile} =~ s|.*/||g;
+ # strip extension
+ $self->{tmpfile} =~ s/\.\w+$//g;
+ my $tmpfile = $self->{tmpfile};
+ unlink(<$tmpfile.*>);
}
chdir("$self->{cwd}");
return "@err";
}
-sub format_string {
- $main::lxdebug->enter_sub();
-
- my ($self, @fields) = @_;
- my %unique_fields;
-
- %unique_fields = map({ $_ => 1 } @fields);
- @fields = keys(%unique_fields);
-
- foreach my $field (@fields) {
- next unless ($self->{$field} =~ /\<pagebreak\>/);
- $self->{$field} =~ s/\<pagebreak\>//g;
- if ($field =~ /.*_(\d+)$/) {
- if (!$self->{"_forced_pagebreaks"}) {
- $self->{"_forced_pagebreaks"} = [];
- }
- push(@{ $self->{"_forced_pagebreaks"} }, "$1");
- }
- }
-
- 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 ',
- '²' => '$^2$',
- "\r" => ""
- });
-
- foreach my $key (@{ $replace{order}{$format} }) {
- map { $self->{$_} =~ s/$key/$replace{$format}{$key}/g; } @fields;
- }
-
- # Allow some HTML markup to be converted into the output format's
- # corresponding markup code, e.g. bold or italic.
- if ('html' eq $format) {
- my @markup_replace = ('b', 'i', 's', 'u');
-
- foreach my $key (@markup_replace) {
- map({ $self->{$_} =~ s/\<(\/?)${key}\>/<$1${key}>/g } @fields);
- }
-
- } elsif ('tex' eq $format) {
- my %markup_replace = ('b' => 'textbf',
- 'i' => 'textit',
- 'u' => 'underline');
-
- foreach my $field (@fields) {
- foreach my $key (keys(%markup_replace)) {
- my $new = $markup_replace{$key};
- $self->{$field} =~
- s/\$\<\$${key}\$\>\$(.*?)\$<\$\/${key}\$>\$/\\${new}\{$1\}/gi;
- }
- }
- }
-
- $main::lxdebug->leave_sub();
-}
-
sub datetonum {
$main::lxdebug->enter_sub();
my ($exchangerate) = $sth->fetchrow_array;
$sth->finish;
+ if ($exchangerate == 0) {
+ $exchangerate = 1;
+ }
+
$main::lxdebug->leave_sub();
return $exchangerate;
}
+sub set_payment_options {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $transdate) = @_;
+
+ if ($self->{payment_id}) {
+
+ my $dbh = $self->dbconnect($myconfig);
+
+
+ my $query = qq|SELECT p.terms_netto, p.terms_skonto, p.percent_skonto, p.description_long FROM payment_terms p
+ WHERE p.id = $self->{payment_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($self->{terms_netto}, $self->{terms_skonto}, $self->{percent_skonto}, $self->{payment_terms}) = $sth->fetchrow_array;
+
+ $sth->finish;
+ my $query = qq|SELECT date '$transdate' + $self->{terms_netto} AS netto_date,date '$transdate' + $self->{terms_skonto} AS skonto_date FROM payment_terms
+ LIMIT 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ ($self->{netto_date}, $self->{skonto_date}) = $sth->fetchrow_array;
+ $sth->finish;
+
+ $self->{skonto_amount} = $self->format_amount($myconfig, ($self->parse_amount($myconfig, $self->{subtotal}) * $self->{percent_skonto}), 2);
+
+ $self->{payment_terms} =~ s/<%netto_date%>/$self->{netto_date}/g;
+ $self->{payment_terms} =~ s/<%skonto_date%>/$self->{skonto_date}/g;
+ $self->{payment_terms} =~ s/<%skonto_amount%>/$self->{skonto_amount}/g;
+
+ $dbh->disconnect;
+ }
+
+ $main::lxdebug->leave_sub();
+
+}
+
sub check_exchangerate {
$main::lxdebug->enter_sub();
return $exchangerate;
}
+sub get_template_language {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ my $template_code = "";
+
+ if ($self->{language_id}) {
+
+ my $dbh = $self->dbconnect($myconfig);
+
+
+ my $query = qq|SELECT l.template_code FROM language l
+ WHERE l.id = $self->{language_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($template_code) = $sth->fetchrow_array;
+ $sth->finish;
+ $dbh->disconnect;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $template_code;
+}
+
+sub get_printer_code {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ my $template_code = "";
+
+ if ($self->{printer_id}) {
+
+ my $dbh = $self->dbconnect($myconfig);
+
+
+ my $query = qq|SELECT p.template_code,p.printer_command FROM printers p
+ WHERE p.id = $self->{printer_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ ($template_code, $self->{printer_command}) = $sth->fetchrow_array;
+ $sth->finish;
+ $dbh->disconnect;
+ }
+
+ $main::lxdebug->leave_sub();
+
+ return $template_code;
+}
+
+sub get_shipto {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+
+ my $template_code = "";
+
+ if ($self->{shipto_id}) {
+
+ my $dbh = $self->dbconnect($myconfig);
+
+
+ my $query = qq|SELECT s.* FROM shipto s
+ WHERE s.id = $self->{shipto_id}|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+ $dbh->disconnect;
+ }
+
+ $main::lxdebug->leave_sub();
+
+}
+
sub add_shipto {
$main::lxdebug->enter_sub();
- my ($self, $dbh, $id) = @_;
+ my ($self, $dbh, $id, $module) = @_;
##LINET
my $shipto;
foreach my $item (
}
if ($shipto) {
- my $query =
+ if ($self->{shipto_id}) {
+ my $query = qq| UPDATE shipto set
+ shiptoname = '$self->{shiptoname}',
+ shiptodepartment_1 = '$self->{shiptodepartment_1}',
+ shiptodepartment_2 = '$self->{shiptodepartment_2}',
+ shiptostreet = '$self->{shiptostreet}',
+ shiptozipcode = '$self->{shiptozipcode}',
+ shiptocity = '$self->{shiptocity}',
+ shiptocountry = '$self->{shiptocountry}',
+ shiptocontact = '$self->{shiptocontact}',
+ shiptophone = '$self->{shiptophone}',
+ shiptofax = '$self->{shiptofax}',
+ shiptoemail = '$self->{shiptoemail}'
+ WHERE id = $self->{shipto_id}|;
+ $dbh->do($query) || $self->dberror($query);
+ } else {
+ my $query =
qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, shiptostreet,
shiptozipcode, shiptocity, shiptocountry, shiptocontact,
- shiptophone, shiptofax, shiptoemail) VALUES ($id,
+ shiptophone, shiptofax, shiptoemail, module) VALUES ($id,
'$self->{shiptoname}', '$self->{shiptodepartment_1}', '$self->{shiptodepartment_2}', '$self->{shiptostreet}',
'$self->{shiptozipcode}', '$self->{shiptocity}',
'$self->{shiptocountry}', '$self->{shiptocontact}',
'$self->{shiptophone}', '$self->{shiptofax}',
- '$self->{shiptoemail}')|;
- $dbh->do($query) || $self->dberror($query);
+ '$self->{shiptoemail}', '$module')|;
+ $dbh->do($query) || $self->dberror($query);
+ }
}
##/LINET
$main::lxdebug->leave_sub();
my ($self, $dbh, $id) = @_;
- my $query = qq|SELECT c.cp_id, c.cp_cv_id, c.cp_name, c.cp_givenname
+ my $query = qq|SELECT c.cp_id, c.cp_cv_id, c.cp_name, c.cp_givenname, c.cp_abteilung
FROM contacts c
WHERE cp_cv_id=$id|;
my $sth = $dbh->prepare($query);
}
if ($i == 0) {
- push @{ $self->{all_contacts} }, { { "", "", "", "", "" } };
+ push @{ $self->{all_contacts} }, { { "", "", "", "", "", "" } };
}
$sth->finish;
$main::lxdebug->leave_sub();
}
$sth->finish;
+ # get languages
+ $query = qq|SELECT id, description
+ FROM language
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{languages} }, $ref;
+ }
+ $sth->finish;
+
+ # get printer
+ $query = qq|SELECT printer_description, id
+ FROM printers
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{printers} }, $ref;
+ }
+ $sth->finish;
+
+
+ # get payment terms
+ $query = qq|SELECT id, description
+ FROM payment_terms
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{payment_terms} }, $ref;
+ }
+ $sth->finish;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+}
+
+
+sub language_payment {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig) = @_;
+ undef $self->{languages};
+ undef $self->{payment_terms};
+ undef $self->{printers};
+
+ my $ref;
+ my $dbh = $self->dbconnect($myconfig);
+ # get languages
+ my $query = qq|SELECT id, description
+ FROM language
+ ORDER BY 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{languages} }, $ref;
+ }
+ $sth->finish;
+
+ # get printer
+ $query = qq|SELECT printer_description, id
+ FROM printers
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{printers} }, $ref;
+ }
+ $sth->finish;
+
+ # get payment terms
+ $query = qq|SELECT id, description
+ FROM payment_terms
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{payment_terms} }, $ref;
+ }
+ $sth->finish;
+
+ # get buchungsgruppen
+ $query = qq|SELECT id, description
+ FROM buchungsgruppen|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $self->{BUCHUNGSGRUPPEN} = [];
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{BUCHUNGSGRUPPEN} }, $ref;
+ }
+ $sth->finish;
+
+ # get adr
+ $query = qq|SELECT id, adr_description, adr_code
+ FROM adr|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ $self->{ADR} = [];
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{ADR} }, $ref;
+ }
+ $sth->finish;
$dbh->disconnect;
$main::lxdebug->leave_sub();
}
}
$sth->finish;
+ # get taxkeys and description
+ $query = qq|SELECT taxkey, taxdescription
+ FROM tax|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $self->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{TAXKEY} }, $ref;
+ }
+
+ $sth->finish;
+
+
+ # get tax zones
+ $query = qq|SELECT id, description
+ FROM tax_zones|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{TAXZONE} }, $ref;
+ }
+ $sth->finish;
+
if (($module eq "AP") || ($module eq "AR")) {
# get tax rates and description
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
+ a.employee_id, e.name AS employee, a.gldate, a.type
FROM $arap a
JOIN $table c ON (a.${table}_id = c.id)
LEFT JOIN employee e ON (e.id = a.employee_id)
if (!($xkeyref{ $ref->{accno} } =~ /tax/)) {
$index++;
}
+ if (($xkeyref{ $ref->{accno} } =~ /paid/) && ($self->{type} eq "credit_note")) {
+ $ref->{amount} *= -1;
+ }
$ref->{index} = $index;
push @{ $self->{acc_trans}{ $xkeyref{ $ref->{accno} } } }, $ref;
}
my $query =
- qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, c.link,
+ 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
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, c.link,
+ 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
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, c.link,
+ 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
AND ac.chart_id = c.id
AND a.vendor_id = ct.id
AND a.id = ac.trans_id
- ORDER BY $sortorder transdate, trans_id, taxkey DESC, oid|;
-
- # Show all $query in Debuglevel LXDebug::QUERY
- $callingdetails = (caller (0))[3];
- $main::lxdebug->message(LXDebug::QUERY, "$callingdetails \$query=\n $query");
-
+ ORDER BY $sortorder transdate, trans_id, taxkey DESC, sorttax DESC,oid|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
my $trans_id = "";
my $trans_id2 = "";
-
while (my $ref0 = $sth->fetchrow_hashref(NAME_lc)) {
-
$trans_id = $ref0->{id};
-
- if ($trans_id != $trans_id2) { # first line of a booking
-
+ if ($trans_id != $trans_id2) {
if ($trans_id2) {
push @{ $form->{GL} }, $ref;
$balance = 0;
}
-
$ref = $ref0;
$trans_id2 = $ref->{id};
$ref->{module} = "ar";
}
}
-
$balance = $ref->{amount};
-
- # Linenumbers of General Ledger
- $k = 0; # Debit # AP # Soll
- $l = 0; # Credit # AR # Haben
- $i = 0; # Debit Tax # AP_tax # VSt
- $j = 0; # Credit Tax # AR_tax # USt
-
-
- if ($ref->{chart_id} > 0) { # all tax accounts first line, no line increasing
- if ($ref->{amount} < 0) {
- if ($ref->{link} =~ /AR_tax/) {
- $ref->{credit_tax}{$j} = $ref->{amount};
- $ref->{credit_tax_accno}{$j} = $ref->{accno};
- }
- if ($ref->{link} =~ /AP_tax/) {
- $ref->{debit_tax}{$i} = $ref->{amount} * -1;
- $ref->{debit_tax_accno}{$i} = $ref->{accno};
- }
+ $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 {
- if ($ref->{link} =~ /AR_tax/) {
- $ref->{credit_tax}{$j} = $ref->{amount};
- $ref->{credit_tax_accno}{$j} = $ref->{accno};
- }
- if ($ref->{link} =~ /AP_tax/) {
- $ref->{debit_tax}{$i} = $ref->{amount} * -1;
- $ref->{debit_tax_accno}{$i} = $ref->{accno};
- }
- }
- } else { #all other accounts first line
- if ($ref->{amount} < 0) {
$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} * 1;
+ $ref->{credit}{$l} = $ref->{amount};
$ref->{credit_accno}{$l} = $ref->{accno};
$ref->{credit_taxkey}{$l} = $ref->{taxkey};
-
-
}
}
-
- } else { # following lines of a booking, line increasing
-
+ } else {
$ref2 = $ref0;
- $trans_old =$trans_id2;
$trans_id2 = $ref2->{id};
-
+
+ # if ($form->{accno} eq ''){ # flo & udo: if general report,
+ # then check balance
+ # 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;
-
-
- if ($ref2->{chart_id} > 0) { # all tax accounts, following lines
- if ($ref2->{amount} < 0) {
- if ($ref2->{link} =~ /AR_tax/) {
- if ($ref->{credit_tax_accno}{$j} ne "") {
- $j++;
- }
- $ref->{credit_tax}{$j} = $ref2->{amount};
- $ref->{credit_tax_accno}{$j} = $ref2->{accno};
- }
- if ($ref2->{link} =~ /AP_tax/) {
- if ($ref->{debit_tax_accno}{$i} ne "") {
- $i++;
- }
- $ref->{debit_tax}{$i} = $ref2->{amount} * -1;
- $ref->{debit_tax_accno}{$i} = $ref2->{accno};
+ 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 ($ref2->{link} =~ /AR_tax/) {
- if ($ref->{credit_tax_accno}{$j} ne "") {
- $j++;
- }
- $ref->{credit_tax}{$j} = $ref2->{amount};
- $ref->{credit_tax_accno}{$j} = $ref2->{accno};
- }
- if ($ref2->{link} =~ /AP_tax/) {
- if ($ref->{debit_tax_accno}{$i} ne "") {
- $i++;
- }
- $ref->{debit_tax}{$i} = $ref2->{amount} * -1;
- $ref->{debit_tax_accno}{$i} = $ref2->{accno};
- }
- }
- } else { # all other accounts, following lines
- if ($ref2->{amount} < 0) {
if ($ref->{debit_accno}{$k} ne "") {
$k++;
}
- $ref->{debit}{$k} = $ref2->{amount} * - 1;
+ $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_taxkey}{$l} = $ref2->{taxkey};
}
}
+
+ # }
+ # } else {
+ # # if account-report, then calculate the Balance?!
+ # # ToDo: Calculate the Balance
+ # 1;
+ # }
}
+
}
push @{ $form->{GL} }, $ref;
$sth->finish;
}
}
+ # get translations
+ $form->{language_values} = "";
+ $query = qq|SELECT language_id, translation FROM translation WHERE parts_id = $form->{id}|;
+ $trq = $dbh->prepare($query);
+ $trq->execute || $form->dberror($query);
+ while ($tr = $trq->fetchrow_hashref(NAME_lc)) {
+ $form->{language_values} .= "---+++---".$tr->{language_id}."--++--".$tr->{translation};
+ }
+ $trq->finish;
+
# now get accno for taxes
$query = qq|SELECT c.accno
FROM chart c, partstax pt
$form->{orphaned} = !$form->{orphaned};
$sth->finish;
+ $form->{"unit_changeable"} = 1;
+ foreach my $table (qw(invoice assembly orderitems inventory license)) {
+ $query = "SELECT COUNT(*) FROM $table WHERE parts_id = ?";
+ my ($count) = $dbh->selectrow_array($query, undef, $form->{"id"});
+ $form->dberror($query . " (" . $form->{"id"} . ")") if ($dbh->err);
+
+ if ($count) {
+ $form->{"unit_changeable"} = 0;
+ last;
+ }
+ }
+
$dbh->disconnect;
$main::lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
+sub retrieve_buchungsgruppen {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ my ($query, $sth);
+
+ my $dbh = $form->dbconnect($myconfig);
+
+ # get buchungsgruppen
+ $query = qq|SELECT id, description
+ FROM buchungsgruppen|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $form->{BUCHUNGSGRUPPEN} = [];
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $form->{BUCHUNGSGRUPPEN} }, $ref);
+ }
+ $sth->finish;
+
+ $main::lxdebug->leave_sub();
+}
+
sub save {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ $form->{IC_expense} = "1000";
+ $form->{IC_income} = "2000";
- if ($form->{eur} && ($form->{item} ne 'service')) {
+ if ($form->{item} ne 'service') {
$form->{IC} = $form->{IC_expense};
}
$form->{onhand} *= 1;
$form->{ve} *= 1;
$form->{ge} *= 1;
+ $form->{alu} *= 1;
+ $form->{buchungsgruppen_id} *= 1;
+ $form->{adr_id} *= 1;
+ $form->{not_discountable} *= 1;
+ $form->{payment_id} *= 1;
my ($query, $sth);
WHERE parts_id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
+ # delete translations
+ $query = qq|DELETE FROM translation
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
} else {
my $uid = rand() . time;
$uid .= $form->{login};
priceupdate = $form->{priceupdate},
unit = '$form->{unit}',
notes = '$form->{notes}',
+ formel = '$form->{formel}',
rop = $form->{rop},
bin = '$form->{bin}',
+ buchungsgruppen_id = '$form->{buchungsgruppen_id}',
+ adr_id = '$form->{adr_id}',
+ payment_id = '$form->{payment_id}',
inventory_accno_id = (SELECT c.id FROM chart c
WHERE c.accno = '$form->{inventory_accno}'),
income_accno_id = (SELECT c.id FROM chart c
shop = '$form->{shop}',
ve = '$form->{ve}',
gv = '$form->{gv}',
+ alu = '$form->{alu}',
+ not_discountable = '$form->{not_discountable}',
microfiche = '$form->{microfiche}',
partsgroup_id = $partsgroup_id
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
+ # delete translation records
+ $query = qq|DELETE FROM translation
+ WHERE parts_id = $form->{id}|;
+ $dbh->do($query) || $form->dberror($query);
+
+ if ($form->{language_values} ne "") {
+ split /---\+\+\+---/,$form->{language_values};
+ foreach $item (@_) {
+ my ($language_id, $translation, $longdescription) = split /--\+\+--/, $item;
+ if ($translation ne "") {
+ $query = qq|INSERT into translation (parts_id, language_id, translation, longdescription) VALUES
+ ($form->{id}, $language_id, | . $dbh->quote($translation) . qq|, | . $dbh->quote($longdescription) . qq| )|;
+ $dbh->do($query) || $form->dberror($query);
+ }
+ }
+ }
# delete price records
$query = qq|DELETE FROM prices
WHERE parts_id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
-
# insert price records only if different to sellprice
for my $i (1 .. $form->{price_rows}) {
if ($form->{"price_$i"} eq "0") {
# connect to database, turn off AutoCommit
my $dbh = $form->dbconnect_noauto($myconfig);
- # first delete prices of pricegroup
- my $query = qq|DELETE FROM prices
- WHERE parts_id = $form->{id}|;
- $dbh->do($query) || $form->dberror($query);
-
my $query = qq|DELETE FROM parts
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
my $group;
my $limit;
- foreach my $item (qw(partnumber drawing microfiche)) {
+ foreach my $item (qw(partnumber drawing microfiche make model)) {
if ($form->{$item}) {
$var = $form->like(lc $form->{$item});
- $where .= " AND lower(p.$item) LIKE '$var'";
+
+ # make will build later Bugfix 145
+ if ($item ne 'make') {
+ $where .= " AND lower(p.$item) LIKE '$var'";
+ }
}
}
p.priceupdate, p.image, p.drawing, p.microfiche,
pg.partsgroup,
a.invnumber, a.ordnumber, a.quonumber, i.trans_id,
- ct.name, i.deliverydate|;
+ ct.name|;
if ($form->{bought}) {
$query = qq|
$main::lxdebug->leave_sub();
}
+sub update_prices {
+ $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'";
+ }
+ }
+
+
+ # 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'";
+ }
+
+
+ # connect to database
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ if ($form->{"sellprice"} ne "") {
+ my $update = "";
+ my $faktor = $form->parse_amount($myconfig,$form->{"sellprice"});
+ if ($form->{"sellprice_type"} eq "percent") {
+ my $faktor = $form->parse_amount($myconfig,$form->{"sellprice"})/100 +1;
+ $update = "sellprice* $faktor";
+ } else {
+ $update = "sellprice+$faktor";
+ }
+
+ $query = qq|UPDATE parts set sellprice=$update WHERE id IN (SELECT p.id
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $where)|;
+ $dbh->do($query);
+ }
+
+ if ($form->{"listprice"} ne "") {
+ my $update = "";
+ my $faktor = $form->parse_amount($myconfig,$form->{"listprice"});
+ if ($form->{"listprice_type"} eq "percent") {
+ my $faktor = $form->parse_amount($myconfig,$form->{"sellprice"})/100 +1;
+ $update = "listprice* $faktor";
+ } else {
+ $update = "listprice+$faktor";
+ }
+
+ $query = qq|UPDATE parts set listprice=$update WHERE id IN (SELECT p.id
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $where)|;
+
+ $dbh->do($query);
+ }
+
+
+
+
+ for my $i (1 .. $form->{price_rows}) {
+
+ my $query = "";
+
+
+ if ($form->{"price_$i"} ne "") {
+ my $update = "";
+ my $faktor = $form->parse_amount($myconfig,$form->{"price_$i"});
+ if ($form->{"pricegroup_type_$i"} eq "percent") {
+ my $faktor = $form->parse_amount($myconfig,$form->{"sellprice"})/100 +1;
+ $update = "price* $faktor";
+ } else {
+ $update = "price+$faktor";
+ }
+
+ $query = qq|UPDATE prices set price=$update WHERE parts_id IN (SELECT p.id
+ FROM parts p
+ LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
+ WHERE $where) AND pricegroup_id=$form->{"pricegroup_id_$i"}|;
+
+ $dbh->do($query);
+ }
+ }
+
+
+
+ my $rc= $dbh->commit;
+ $dbh->disconnect;
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
sub create_links {
$main::lxdebug->enter_sub();
{ accno => $ref->{accno},
description => $ref->{description},
selected => "selected" };
+ $form->{"${key}_default"} = "$ref->{accno}--$ref->{description}";
} else {
push @{ $form->{"${module}_links"}{$key} },
{ accno => $ref->{accno},
}
$sth->finish;
+ # get buchungsgruppen
+ $query = qq|SELECT id, description
+ FROM buchungsgruppen|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $form->{BUCHUNGSGRUPPEN} = [];
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{BUCHUNGSGRUPPEN} }, $ref;
+ }
+ $sth->finish;
+
+ # get adr
+ $query = qq|SELECT id, adr_description, adr_code
+ FROM adr|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ $form->{ADR} = [];
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{ADR} }, $ref;
+ }
+ $sth->finish;
+
+ # get payment terms
+ $query = qq|SELECT id, description
+ FROM payment_terms
+ ORDER BY 1|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $self->{payment_terms} }, $ref;
+ }
+ $sth->finish;
+
if ($form->{id}) {
$query = qq|SELECT weightunit
FROM defaults|;
$main::lxdebug->leave_sub();
}
+sub retrieve_languages {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ # connect to database
+ my $dbh = $form->dbconnect($myconfig);
+
+ if ($form->{id}) {
+ $where .= "tr.parts_id=$form->{id}";
+ }
+
+
+ if ($form->{language_values} ne "") {
+ $query = qq|SELECT l.id, l.description, tr.translation, tr.longdescription
+ FROM language l LEFT OUTER JOIN translation tr ON (tr.language_id=l.id AND $where)|;
+ } else {
+ $query = qq|SELECT l.id, l.description
+ FROM language l|;
+ }
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{$languages}, $ref);
+ }
+ $sth->finish;
+
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+ return $languages;
+
+}
+
1;
package IR;
+use SL::AM;
+
sub post_invoice {
$main::lxdebug->enter_sub();
my $taxdiff;
my $item;
+ my $service_units = AM->retrieve_units($myconfig,$form,"service");
+ my $part_units = AM->retrieve_units($myconfig,$form,"dimension");
+
if ($form->{id}) {
&reverse_invoice($dbh, $form);
for my $i (1 .. $form->{rowcount}) {
$form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
-
+
+ if ($form->{storno}) {
+ $form->{"qty_$i"} *= -1;
+ }
+
if ($form->{"qty_$i"} != 0) {
+ # get item baseunit
+ $query = qq|SELECT p.unit
+ FROM parts p
+ WHERE p.id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($item_unit) = $sth->fetchrow_array();
+ $sth->finish;
+
+ if ($form->{"inventory_accno_$i"}) {
+ if (defined($part_units->{$item_unit}->{factor}) && $part_units->{$item_unit}->{factor} ne '' && $part_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $part_units->{$form->{"unit_$i"}}->{factor} / $part_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ } else {
+ if (defined($service_units->{$item_unit}->{factor}) && $service_units->{$item_unit}->{factor} ne '' && $service_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $service_units->{$form->{"unit_$i"}}->{factor} / $service_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ }
+
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
qw(partnumber description unit);
$form->update_balance($dbh, "parts", "onhand",
qq|id = $form->{"id_$i"}|,
- $form->{"qty_$i"})
+ $baseqty)
unless $form->{shipped};
# check if we sold the item already and
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.base_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"};
+ my $totalqty = $base_qty;
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
- my $qty = $ref->{qty} + $ref->{allocated};
+ my $qty = $ref->{base_qty} + $ref->{allocated};
if (($qty - $totalqty) > 0) {
$qty = $totalqty;
}
- $linetotal = $form->round_amount($form->{"sellprice_$i"} * $qty, 2);
+ $linetotal = $form->round_amount(($form->{"sellprice_$i"} * $qty) / $basefactor, 2);
if ($ref->{allocated} < 0) {
: "NULL";
# save detail record in invoice table
- $query = qq|INSERT INTO invoice (trans_id, parts_id, description, qty,
+ $query = qq|INSERT INTO invoice (trans_id, parts_id, description, qty, base_qty,
sellprice, fxsellprice, allocated, unit, deliverydate,
project_id, serialnumber)
VALUES ($form->{id}, $form->{"id_$i"},
- '$form->{"description_$i"}', | . ($form->{"qty_$i"} * -1) . qq|,
+ '$form->{"description_$i"}', | . ($form->{"qty_$i"} * -1) . qq|, | . ($baseqty * -1) . qq|,
$form->{"sellprice_$i"}, $fxsellprice, $allocated,
'$form->{"unit_$i"}', $deliverydate, (SELECT id FROM project WHERE projectnumber = '$project_id'),
'$form->{"serialnumber_$i"}')|;
($null, $form->{department_id}) = split(/--/, $form->{department});
$form->{department_id} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{taxzone_id} *= 1;
+ $form->{storno} *= 1;
+
$form->{invnumber} = $form->{id} unless $form->{invnumber};
datepaid = $datepaid,
duedate = $duedate,
invoice = '1',
+ taxzone_id = '$form->{taxzone_id}',
taxincluded = '$form->{taxincluded}',
notes = '$form->{notes}',
intnotes = '$form->{intnotes}',
curr = '$form->{currency}',
department_id = $form->{department_id},
+ storno = '$form->{storno}',
cp_id = $form->{contact_id}
WHERE id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
+ if ($form->{storno}) {
+ $query = qq| update ap set paid=paid+amount where id=$form->{storno_id}|;
+ $dbh->do($query) || $form->dberror($query);
+ $query = qq| update ap set storno='$form->{storno}' where id=$form->{storno_id}|;
+ $dbh->do($query) || $form->dberror($query);
+ $query = qq§ update ap set intnotes='Rechnung storniert am $form->{invdate} ' || intnotes where id=$form->{storno_id}§;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq| update ap set paid=amount 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});
+ $form->add_shipto($dbh, $form->{id}, "AP");
# delete zero entries
$query = qq|DELETE FROM acc_trans
$dbh->do($query) || $form->dberror($query);
$query = qq|DELETE FROM shipto
- WHERE trans_id = $form->{id}|;
+ WHERE trans_id = $form->{id} AND module = 'AP'|;
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
# 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.ordnumber, a.quonumber, a.paid, a.taxincluded, a.notes, a.taxzone_id, a.storno,
a.intnotes, a.curr AS currency
FROM ap a
WHERE a.id = $form->{id}|;
# get shipto
$query = qq|SELECT s.* FROM shipto s
- WHERE s.trans_id = $form->{id}|;
+ WHERE s.trans_id = $form->{id} AND s.module = 'AP'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$ref = $sth->fetchrow_hashref(NAME_lc);
+ delete($ref->{id});
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
+ my $transdate = "current_date";
+ if($form->{invdate}) {
+ $transdate = "'$form->{invdate}'";
+ }
+ if(!$form->{taxzone_id}) {
+ $form->{taxzone_id} = 0;
+ }
# 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,
+ $query = qq|SELECT c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from as inventory_valid,
+ c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from as income_valid,
+ c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from as expense_valid,
+ p.partnumber, i.description, i.qty, i.fxsellprice AS sellprice, p.inventory_accno_id AS part_inventory_accno_id,
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 chart c1 ON ((select inventory_accno_id from buchungsgruppen where id=p.buchungsgruppen_id) = c1.id)
+ LEFT JOIN chart c2 ON ((select income_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c2.id)
+ LEFT JOIN chart c3 ON ((select expense_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_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}
$sth->execute || $form->dberror($query);
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if (!$ref->{"part_inventory_accno_id"}) {
+ map({ delete($ref->{$_}); } qw(inventory_accno inventory_new_chart inventory_valid));
+ }
+ delete($ref->{"part_inventory_accno_id"});
+
+ while ($ref->{inventory_new_chart} && ($ref->{inventory_valid} >=0)) {
+ my $query = qq| SELECT accno AS inventory_accno, new_chart_id AS inventory_new_chart, date($transdate) - valid_from AS inventory_valid FROM chart WHERE id = $ref->{inventory_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{inventory_accno}, $ref->{inventory_new_chart}, $ref->{inventory_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{income_new_chart} && ($ref->{income_valid} >=0)) {
+ my $query = qq| SELECT accno AS income_accno, new_chart_id AS income_new_chart, date($transdate) - valid_from AS income_valid FROM chart WHERE id = $ref->{income_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{income_accno}, $ref->{income_new_chart}, $ref->{income_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{expense_new_chart} && ($ref->{expense_valid} >=0)) {
+ my $query = qq| SELECT accno AS expense_accno, new_chart_id AS expense_new_chart, date($transdate) - valid_from AS expense_valid FROM chart WHERE id = $ref->{expense_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{expense_accno}, $ref->{expense_new_chart}, $ref->{expense_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+
#set expense_accno=inventory_accno if they are different => bilanz
$vendor_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')
+ $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber
+ FROM tax t LEFT join chart c ON (c.id=t.chart_id)
+ WHERE 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} = "";
+ my $i = 0;
while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
# if ($customertax{$ref->{accno}}) {
+ if (($ptr->{accno} eq "") && ($ptr->{rate} == 0)) {
+ $i++;
+ $ptr->{accno} = $i;
+ }
$ref->{taxaccounts} .= "$ptr->{accno} ";
if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
$form->{"$ptr->{accno}_rate"} = $ptr->{rate};
- $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_description"} = $ptr->{taxdescription};
$form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
$form->{taxaccounts} .= "$ptr->{accno} ";
}
# 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
+ v.email, v.cc, v.bcc, v.language_id, v.payment_id,
+ v.street, v.zipcode, v.city, v.country, v.taxzone_id,
+ $duedate + v.terms AS duedate
FROM vendor v
WHERE v.id = $form->{vendor_id}|;
my $sth = $dbh->prepare($query);
qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
$query = qq|SELECT s.* FROM shipto s
- WHERE s.trans_id = $form->{vendor_id}|;
+ WHERE s.trans_id = $form->{vendor_id} AND s.module= 'CT'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$where .= " ORDER BY p.partnumber";
}
+ my $transdate = "";
+ if ($form->{type} eq "invoice") {
+ $transdate = "'$form->{invdate}'";
+ } elsif ($form->{type} eq "purchase_order") {
+ $transdate = "'$form->{transdate}'";
+ } elsif ($form->{type} eq "request_quotation") {
+ $transdate = "'$form->{transdate}'";
+ }
+
+ if ($transdate eq "") {
+ $transdate = "current_date";
+ }
+
# 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
+ my $query = qq|SELECT p.id, p.partnumber, p.description, p.sellprice,
+ p.listprice, p.inventory_accno_id,
+ c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from as inventory_valid,
+ c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from as income_valid,
+ c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from as expense_valid,
+ p.unit, p.assembly, p.bin, p.onhand, p.notes AS partnotes, p.notes AS longdescription, p.not_discountable,
+ pg.partsgroup, p.formel, p.alu
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 chart c1 ON ((select inventory_accno_id from buchungsgruppen where id=p.buchungsgruppen_id) = c1.id)
+ LEFT JOIN chart c2 ON ((select income_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c2.id)
+ LEFT JOIN chart c3 ON ((select expense_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c3.id)
LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
WHERE $where|;
my $sth = $dbh->prepare($query);
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ # In der Buchungsgruppe ist immer ein Bestandskonto verknuepft, auch wenn
+ # es sich um eine Dienstleistung handelt. Bei Dienstleistungen muss das
+ # Buchungskonto also aus dem Ergebnis rausgenommen werden.
+ if (!$ref->{inventory_accno_id}) {
+ map({ delete($ref->{"inventory_${_}"}); } qw(accno new_chart valid));
+ }
+ delete($ref->{inventory_accno_id});
+
#set expense_accno=inventory_accno if they are different => bilanz
$vendor_accno =
($ref->{expense_accno} != $ref->{inventory_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')
+ $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber
+ FROM tax t LEFT JOIN chart c ON (c.id=t.chart_id)
+ WHERE 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} = "";
+ my $i = 0;
while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
# if ($customertax{$ref->{accno}}) {
+ if (($ptr->{accno} eq "") && ($ptr->{rate} == 0)) {
+ $i++;
+ $ptr->{accno} = $i;
+ }
$ref->{taxaccounts} .= "$ptr->{accno} ";
if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
$form->{"$ptr->{accno}_rate"} = $ptr->{rate};
- $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_description"} = $ptr->{taxdescription};
$form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
$form->{taxaccounts} .= "$ptr->{accno} ";
}
$main::lxdebug->leave_sub();
}
+sub post_payment {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $locale) = @_;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ $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"});
+ }
+
+ $form->{exchangerate} =
+ $form->get_exchangerate($dbh, $form->{currency}, $form->{invdate},
+ "buy");
+
+ # 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"};
+
+ $exchangerate = 0;
+ if (($form->{currency} eq $form->{defaultcurrency}) || ($form->{defaultcurrency} eq "")) {
+ $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 AP
+ $amount =
+ $form->round_amount($form->{"paid_$i"} * $form->{"exchangerate"},
+ 2) * -1;
+
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AP}') AND amount=$amount AND transdate='$form->{"datepaid_$i"}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $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);
+
+
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$accno') AND amount=$form->{"paid_$i"} AND transdate='$form->{"datepaid_$i"}' AND source='$form->{"source_$i"}' AND memo='$form->{"memo_$i"}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $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);
+
+
+ # 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|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$accno') AND amount=$form->{fx}{$accno}{$transdate} AND transdate='$transdate' AND cleared='0' AND fx_transaction='1'|;
+ $dbh->do($query) || $form->dberror($query);
+ $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);
+ }
+ }
+ }
+ my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
+
+ # save AP record
+ my $query = qq|UPDATE ap set
+ paid = $form->{paid},
+ datepaid = $datepaid
+ WHERE id=$form->{id}|;
+
+ $dbh->do($query) || $form->dberror($query);
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
1;
package IS;
use Data::Dumper;
+use SL::AM;
sub invoice_details {
$main::lxdebug->enter_sub();
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 $taxamount;
my $taxbase;
my $taxdiff;
+ my $nodiscount;
+ my $yesdiscount;
+ my $nodiscount_subtotal = 0;
+ my $discount_subtotal = 0;
+ my $position = 0;
+ my $subtotal_header = 0;
+ my $subposition = 0;
+
foreach $item (sort { $a->[1] cmp $b->[1] } @partsgroup) {
$i = $item->[0];
if ($form->{"qty_$i"} != 0) {
- # add number, description and qty to $form->{number}, ....
- push(@{ $form->{runningnumber} }, $i);
+ # add number, description and qty to $form->{number},
+ if ($form->{"subtotal_$i"} && !$subtotal_header) {
+ $subtotal_header = $i;
+ $position = int($position);
+ $subposition = 0;
+ $position++;
+ } elsif ($subtotal_header) {
+ $subposition += 1;
+ $position = int($position);
+ $position = $position.".".$subposition;
+ } else {
+ $position = int($position);
+ $position++;
+ }
+ push(@{ $form->{runningnumber} }, $position);
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->{longdescription} }, qq|$form->{"longdescription_$i"}|);
push(@{ $form->{qty} },
$form->format_amount($myconfig, $form->{"qty_$i"}));
push(@{ $form->{unit} }, qq|$form->{"unit_$i"}|);
push(@{ $form->{sellprice} }, $form->{"sellprice_$i"});
push(@{ $form->{ordnumber_oe} }, qq|$form->{"ordnumber_$i"}|);
push(@{ $form->{transdate_oe} }, qq|$form->{"transdate_$i"}|);
+ push(@{ $form->{invnumber} }, qq|$form->{"invnumber"}|);
+ push(@{ $form->{invdate} }, qq|$form->{"invdate"}|);
if ($form->{lizenzen}) {
if ($form->{"licensenumber_$i"}) {
my $linetotal =
$form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);
+ my $nodiscount_linetotal =
+ $form->round_amount($form->{"qty_$i"} * $sellprice, 2);
+
$discount =
($discount != 0)
? $form->format_amount($myconfig, $discount * -1, $decimalplaces)
push(@{ $form->{discount} }, $discount);
push(@{ $form->{p_discount} }, $form->{"discount_$i"});
-
+ if (($form->{"discount_$i"} ne "") && ($form->{"discount_$i"} != 0)) {
+ $form->{discount_p} = $form->{"discount_$i"};
+ }
$form->{total} += $linetotal;
+ $discount_subtotal += $linetotal;
+ $form->{nodiscount_total} += $nodiscount_linetotal;
+ $nodiscount_subtotal += $nodiscount_linetotal;
+ $form->{discount_total} += $form->parse_amount($myconfig, $discount);
+
+ if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) {
+ $discount_subtotal = $form->format_amount($myconfig, $discount_subtotal, 2);
+ push(@{ $form->{discount_sub} }, $discount_subtotal);
+ $nodiscount_subtotal = $form->format_amount($myconfig, $nodiscount_subtotal, 2);
+ push(@{ $form->{nodiscount_sub} }, $nodiscount_subtotal);
+ $discount_subtotal = 0;
+ $nodiscount_subtotal = 0;
+ $subtotal_header = 0;
+ } else {
+ push(@{ $form->{discount_sub} }, "");
+ push(@{ $form->{nodiscount_sub} }, "");
+ }
+
+ if ($linetotal == $netto_linetotal) {
+ $nodiscount += $linetotal;
+ }
push(@{ $form->{linetotal} },
$form->format_amount($myconfig, $linetotal, 2));
+ push(@{ $form->{nodiscount_linetotal} },
+ $form->format_amount($myconfig, $nodiscount_linetotal, 2));
+
+
@taxaccounts = split / /, $form->{"taxaccounts_$i"};
$taxrate = 0;
$taxdiff = 0;
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);
+ qw(runningnumber number serialnumber unit qty bin sellprice listprice netprice discount linetotal nodiscount_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);
+ qw(number unit qty runningnumber serialnumber bin sellprice listprice netprice discount linetotal nodiscount_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));
+ push(@{ $form->{taxbase} },
+ $form->format_amount($myconfig, $taxbase{$item}, 2));
- $tax += $taxamount = $form->round_amount($taxaccounts{$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"});
- }
+ 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"});
}
for my $i (1 .. $form->{paidaccounts}) {
}
$form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2);
+ $yesdiscount = $form->{nodiscount_total} - $nodiscount;
+ $form->{nodiscount_subtotal} = $form->format_amount($myconfig, $form->{nodiscount_total}, 2);
+ $form->{discount_total} = $form->format_amount($myconfig, $form->{discount_total}, 2);
+ $form->{nodiscount} = $form->format_amount($myconfig, $nodiscount, 2);
+ $form->{yesdiscount} = $form->format_amount($myconfig, $yesdiscount, 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->set_payment_options($myconfig, $form->{invdate});
$form->{paid} = $form->format_amount($myconfig, $form->{paid}, 2);
$form->{username} = $myconfig->{name};
my $dbh = $form->dbconnect($myconfig);
# get contact id, set it if nessessary
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
$contact = "";
if ($form->{cp_id}) {
$ref = $sth->fetchrow_hashref(NAME_lc);
- # remove notes, id and taxincluded before copy back
- delete @$ref{qw(id taxincluded notes)};
+ # remove id and taxincluded before copy back
+ delete @$ref{qw(id taxincluded)};
map { $form->{$_} = $ref->{$_} } keys %$ref;
-
$sth->finish;
+
+ if ($form->{delivery_customer_id}) {
+ my $query = qq|SELECT ct.*, ct.notes as customernotes
+ FROM customer ct
+ WHERE ct.id = $form->{delivery_customer_id} limit 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ $sth->finish;
+ map { $form->{"dc_$_"} = $ref->{$_} } keys %$ref;
+ }
+
+ if ($form->{delivery_vendor_id}) {
+ my $query = qq|SELECT ct.*, ct.notes as customernotes
+ FROM customer ct
+ WHERE ct.id = $form->{delivery_vendor_id} limit 1|;
+ my $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ $sth->finish;
+ map { $form->{"dv_$_"} = $ref->{$_} } keys %$ref;
+ }
$dbh->disconnect;
$main::lxdebug->leave_sub();
$form->get_employee($dbh);
}
- ($null, $form->{contact_id}) = split /--/, $form->{contact};
+ $form->{contact_id} = $form->{cp_id};
$form->{contact_id} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{taxzone_id} *= 1;
+ $form->{delivery_customer_id} *= 1;
+ $form->{delivery_vendor_id} *= 1;
+ $form->{storno} *= 1;
+ $form->{shipto_id} *= 1;
+
($null, $form->{department_id}) = split(/--/, $form->{department});
$form->{department_id} *= 1;
+ my $service_units = AM->retrieve_units($myconfig,$form,"service");
+ my $part_units = AM->retrieve_units($myconfig,$form,"dimension");
+
+
+
if ($form->{id}) {
&reverse_invoice($dbh, $form);
$form->{expense_inventory} = "";
foreach my $i (1 .. $form->{rowcount}) {
- $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+ if ($form->{type} eq "credit_note") {
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"}) * -1;
+ $form->{shipped} = 1;
+ } else {
+ $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
+ }
+ my $basefactor;
+ my $basqty;
+
+ if ($form->{storno}) {
+ $form->{"qty_$i"} *= -1;
+ }
if ($form->{"qty_$i"} != 0) {
+ # get item baseunit
+ $query = qq|SELECT p.unit
+ FROM parts p
+ WHERE p.id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($item_unit) = $sth->fetchrow_array();
+ $sth->finish;
+
+ if ($form->{"inventory_accno_$i"}) {
+ if (defined($part_units->{$item_unit}->{factor}) && $part_units->{$item_unit}->{factor} ne '' && $part_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $part_units->{$form->{"unit_$i"}}->{factor} / $part_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ } else {
+ if (defined($service_units->{$item_unit}->{factor}) && $service_units->{$item_unit}->{factor} ne '' && $service_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $service_units->{$form->{"unit_$i"}}->{factor} / $service_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ }
+
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
(qw(partnumber description unit));
if ($sth->fetchrow_array) {
$form->update_balance($dbh, "parts", "onhand",
qq|id = $form->{"id_$i"}|,
- $form->{"qty_$i"} * -1)
+ $baseqty * -1)
unless $form->{shipped};
}
$sth->finish;
# record assembly item as allocated
- &process_assembly($dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"});
+ &process_assembly($dbh, $form, $form->{"id_$i"}, $baseqty);
} else {
$form->update_balance($dbh, "parts", "onhand",
qq|id = $form->{"id_$i"}|,
- $form->{"qty_$i"} * -1)
+ $baseqty * -1)
unless $form->{shipped};
- $allocated = &cogs($dbh, $form, $form->{"id_$i"}, $form->{"qty_$i"});
+ $allocated = &cogs($dbh, $form, $form->{"id_$i"}, $baseqty, $basefactor);
}
}
# get pricegroup_id and save ist
($null, my $pricegroup_id) = split /--/, $form->{"sellprice_drag_$i"};
$pricegroup_id *= 1;
+ my $subtotal = $form->{"subtotal_$i"} * 1;
# save detail record in invoice table
- $query = qq|INSERT INTO invoice (trans_id, parts_id, description, qty,
+ $query = qq|INSERT INTO invoice (trans_id, parts_id, description,longdescription, qty,
sellprice, fxsellprice, discount, allocated, assemblyitem,
unit, deliverydate, project_id, serialnumber, pricegroup_id,
- ordnumber, transdate, cusordnumber)
+ ordnumber, transdate, cusordnumber, base_qty, subtotal)
VALUES ($form->{id}, $form->{"id_$i"},
- '$form->{"description_$i"}', $form->{"qty_$i"},
+ '$form->{"description_$i"}', '$form->{"longdescription_$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"}', '$pricegroup_id',
- '$form->{"ordnumber_$i"}', '$form->{"transdate_$i"}', '$form->{"cusordnumber_$i"}')|;
+ '$form->{"ordnumber_$i"}', '$form->{"transdate_$i"}', '$form->{"cusordnumber_$i"}', $baseqty, '$subtotal')|;
$dbh->do($query) || $form->dberror($query);
if ($form->{lizenzen}) {
# 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"});
+ if ($form->{type} eq "credit_note") {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"}) * -1;
+ } else {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
+ }
$form->{paid} += $form->{"paid_$i"};
$form->{datepaid} = $form->{"datepaid_$i"} if ($form->{"datepaid_$i"});
}
# $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"}')|;
+ if (!$form->{storno}) {
+ 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);
- }
-
- # 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);
+
+ # 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);
+ }
}
}
}
taxincluded = '$form->{taxincluded}',
curr = '$form->{currency}',
department_id = $form->{department_id},
+ payment_id = $form->{payment_id},
+ type = '$form->{type}',
+ language_id = $form->{language_id},
+ taxzone_id = $form->{taxzone_id},
+ shipto_id = $form->{shipto_id},
+ delivery_customer_id = $form->{delivery_customer_id},
+ delivery_vendor_id = $form->{delivery_vendor_id},
employee_id = $form->{employee_id},
+ storno = '$form->{storno}',
cp_id = $form->{contact_id}
WHERE id = $form->{id}
|;
$dbh->do($query) || $form->dberror($query);
+ if ($form->{storno}) {
+ $query = qq| update ar set paid=paid+amount where id=$form->{storno_id}|;
+ $dbh->do($query) || $form->dberror($query);
+ $query = qq| update ar set storno='$form->{storno}' where id=$form->{storno_id}|;
+ $dbh->do($query) || $form->dberror($query);
+ $query = qq§ update ar set intnotes='Rechnung storniert am $form->{invdate} ' || intnotes where id=$form->{storno_id}§;
+ $dbh->do($query) || $form->dberror($query);
+
+ $query = qq| update ar set paid=amount 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});
+
+ if (!$form->{shipto_id}) {
+ $form->add_shipto($dbh, $form->{id}, "AR");
+ }
# save printed, emailed and queued
$form->save_status($dbh);
return $rc;
}
+sub post_payment {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $locale) = @_;
+
+ # connect to database, turn off autocommit
+ my $dbh = $form->dbconnect_noauto($myconfig);
+
+ $form->{datepaid} = $form->{invdate};
+
+ # total payments, don't move we need it here
+ for my $i (1 .. $form->{paidaccounts}) {
+ if ($form->{type} eq "credit_note") {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"}) * -1;
+ } else {
+ $form->{"paid_$i"} = $form->parse_amount($myconfig, $form->{"paid_$i"});
+ }
+ $form->{paid} += $form->{"paid_$i"};
+ $form->{datepaid} = $form->{"datepaid_$i"} if ($form->{"datepaid_$i"});
+ }
+
+ $form->{exchangerate} =
+ $form->get_exchangerate($dbh, $form->{currency}, $form->{invdate},
+ "buy");
+
+ # 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->{defaultcurrency} eq "")) {
+ $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"},
+ 2);
+
+
+ $query = qq|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$form->{AR}') AND amount=$amount AND transdate='$form->{"datepaid_$i"}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $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|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$accno') AND amount=$form->{"paid_$i"} AND transdate='$form->{"datepaid_$i"}' AND source='$form->{"source_$i"}' AND memo='$form->{"memo_$i"}'|;
+ $dbh->do($query) || $form->dberror($query);
+
+ $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);
+
+
+ # 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|DELETE FROM acc_trans WHERE trans_id=$form->{id} AND chart_id=(SELECT c.id FROM chart c
+ WHERE c.accno = '$accno') AND amount=$form->{fx}{$accno}{$transdate} AND transdate='$transdate' AND cleared='0' AND fx_transaction='1'|;
+ $dbh->do($query) || $form->dberror($query);
+ $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);
+ }
+ }
+ }
+ my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
+
+ # save AR record
+ my $query = qq|UPDATE ar set
+ paid = $form->{paid},
+ datepaid = $datepaid
+ WHERE id=$form->{id}|;
+
+ $dbh->do($query) || $form->dberror($query);
+
+ my $rc = $dbh->commit;
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+
+ return $rc;
+}
+
sub process_assembly {
$main::lxdebug->enter_sub();
sub cogs {
$main::lxdebug->enter_sub();
- my ($dbh, $form, $id, $totalqty) = @_;
+ my ($dbh, $form, $id, $totalqty, $basefactor) = @_;
- my $query = qq|SELECT i.id, i.trans_id, i.qty, i.allocated, i.sellprice,
+ my $query = qq|SELECT i.id, i.trans_id, i.base_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
FROM invoice i, parts p
WHERE i.parts_id = p.id
AND i.parts_id = $id
- AND (i.qty + i.allocated) < 0
+ AND (i.base_qty + i.allocated) < 0
ORDER BY trans_id|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
my $qty;
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
- if (($qty = (($ref->{qty} * -1) - $ref->{allocated})) > $totalqty) {
+ if (($qty = (($ref->{base_qty} * -1) - $ref->{allocated})) > $totalqty) {
$qty = $totalqty;
}
# total expenses and inventory
# sellprice is the cost of the item
- $linetotal = $form->round_amount($ref->{sellprice} * $qty, 2);
+ $linetotal = $form->round_amount(($ref->{sellprice} * $qty) / $basefactor, 2);
if (!$eur) {
}
$query = qq|DELETE FROM shipto
- WHERE trans_id = $form->{id}|;
+ WHERE trans_id = $form->{id} AND module = 'AR'|;
$dbh->do($query) || $form->dberror($query);
$main::lxdebug->leave_sub();
# retrieve invoice
$query = qq|SELECT a.invnumber, a.ordnumber, a.quonumber, a.cusordnumber,
- a.transdate AS invdate, a.deliverydate, 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
+ a.transdate AS invdate, a.deliverydate, a.paid, a.storno,
+ a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes, a.taxzone_id,
+ a.duedate, a.taxincluded, a.curr AS currency, a.shipto_id, a.cp_id,
+ a.employee_id, e.name AS employee, a.payment_id, a.language_id, a.delivery_customer_id, a.delivery_vendor_id, a.type
FROM ar a
LEFT JOIN employee e ON (e.id = a.employee_id)
WHERE a.id = $form->{id}|;
$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}|;
+ WHERE s.trans_id = $form->{id} AND s.module = 'AR'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$ref = $sth->fetchrow_hashref(NAME_lc);
+ delete($ref->{id});
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
+ if ($form->{delivery_customer_id}) {
+ $query = qq|SELECT name FROM customer WHERE id=$form->{delivery_customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{delivery_customer_string}) = $sth->fetchrow_array();
+ $sth->finish;
+ }
+
+ if ($form->{delivery_vendor_id}) {
+ $query = qq|SELECT name FROM customer WHERE id=$form->{delivery_vendor_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{delivery_vendor_string}) = $sth->fetchrow_array();
+ $sth->finish;
+ }
+
# get printed, emailed
$query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname
FROM status s
$sth->finish;
map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
+ my $transdate = "current_date";
+ if($form->{invdate}) {
+ $transdate = "'$form->{invdate}'";
+ }
+
+ if(!$form->{taxzone_id}) {
+ $form->{taxzone_id} = 0;
+ }
# 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,
+ $query = qq|SELECT
+ c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from as inventory_valid,
+ c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from as income_valid,
+ c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from as expense_valid,
+ i.description, i.longdescription, 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,
+ p.partnumber, p.assembly, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id, i.id AS invoice_pos,
pg.partsgroup, i.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=i.pricegroup_id) as pricegroup,
- i.ordnumber, i.transdate, i.cusordnumber
+ i.ordnumber, i.transdate, i.cusordnumber, p.alu, p.formel, i.subtotal
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}
+ LEFT JOIN chart c1 ON ((select inventory_accno_id from buchungsgruppen where id=p.buchungsgruppen_id) = c1.id)
+ LEFT JOIN chart c2 ON ((select income_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c2.id)
+ LEFT JOIN chart c3 ON ((select expense_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c3.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)) {
+ if (!$ref->{"part_inventory_accno_id"}) {
+ map({ delete($ref->{$_}); } qw(inventory_accno inventory_new_chart inventory_valid));
+ }
+ delete($ref->{"part_inventory_accno_id"});
#set expense_accno=inventory_accno if they are different => bilanz
+
+
+ while ($ref->{inventory_new_chart} && ($ref->{inventory_valid} >=0)) {
+ my $query = qq| SELECT accno AS inventory_accno, new_chart_id AS inventory_new_chart, date($transdate) - valid_from AS inventory_valid FROM chart WHERE id = $ref->{inventory_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{inventory_accno}, $ref->{inventory_new_chart}, $ref->{inventory_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{income_new_chart} && ($ref->{income_valid} >=0)) {
+ my $query = qq| SELECT accno AS income_accno, new_chart_id AS income_new_chart, date($transdate) - valid_from AS income_valid FROM chart WHERE id = $ref->{income_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{income_accno}, $ref->{income_new_chart}, $ref->{income_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{expense_new_chart} && ($ref->{expense_valid} >=0)) {
+ my $query = qq| SELECT accno AS expense_accno, new_chart_id AS expense_new_chart, date($transdate) - valid_from AS expense_valid FROM chart WHERE id = $ref->{expense_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{expense_accno}, $ref->{expense_new_chart}, $ref->{expense_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
$vendor_accno =
($ref->{expense_accno} != $ref->{inventory_accno})
? $ref->{inventory_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')
+ $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber
+ FROM tax t LEFT join chart c ON (c.id=t.chart_id)
+ WHERE 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} = "";
+ my $i=0;
while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
# if ($customertax{$ref->{accno}}) {
+ if (($ptr->{accno} eq "") && ($ptr->{rate} == 0)) {
+ $i++;
+ $ptr->{accno} = $i;
+ }
$ref->{taxaccounts} .= "$ptr->{accno} ";
+
if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
$form->{"$ptr->{accno}_rate"} = $ptr->{rate};
- $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_description"} = $ptr->{taxdescription};
$form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
$form->{taxaccounts} .= "$ptr->{accno} ";
}
"<option value=\"$licenseid\">$licensenumber</option>";
$stg->finish();
}
+ if ($form->{type} eq "credit_note") {
+ $ref->{qty} *= -1;
+ }
chop $ref->{taxaccounts};
push @{ $form->{invoice_details} }, $ref;
# 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.email, c.cc, c.bcc, c.language_id, c.payment_id AS customer_payment_id,
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, c.klass as customer_klass
+ b.discount AS tradediscount, b.description AS business, c.klass as customer_klass, c.taxzone_id
FROM customer c
LEFT JOIN business b ON (b.id = c.business_id)
WHERE c.id = $form->{customer_id}|;
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
+ my $query = qq|SELECT sum(a.amount-a.paid) AS dunning_amount FROM ar a WHERE a.paid < a.amount AND a.customer_id=$form->{customer_id} AND a.dunning_id IS NOT NULL|;
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+
+ #print(STDERR "DUNNING AMOUTN $form->{dunning_amount}\n");
+
+ my $query = qq|SELECT dnn.dunning_description AS max_dunning_level FROM dunning_config dnn WHERE id in (select dunning_id from ar WHERE paid < amount AND customer_id=$form->{customer_id} AND dunning_id IS NOT NULL) ORDER BY dunning_level DESC LIMIT 1|;
+ my $sth = $dbh->prepare($query);
+
+ $sth->execute || $form->dberror($query);
+
+ $ref = $sth->fetchrow_hashref(NAME_lc);
+
+ map { $form->{$_} = $ref->{$_} } keys %$ref;
+ $sth->finish;
+ #print(STDERR "LEVEL $form->{max_dunning_level}\n");
+
+
+ #check whether payment_terms are better than old payment_terms
+ if (($form->{payment_id} ne "") && ($form->{customer_payment_id} ne "")) {
+ my $query = qq|select (select ranking from payment_terms WHERE id = $form->{payment_id}), (select ranking from payment_terms WHERE id = $form->{customer_payment_id})|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($old_ranking, $new_ranking) = $stw->fetchrow_array;
+ $stw->finish;
+ if ($new_ranking > $old_ranking) {
+ $form->{payment_id} =$form->{customer_payment_id};
+ }
+ }
+ if ($form->{payment_id} eq "") {
+ $form->{payment_id} =$form->{customer_payment_id};
+ }
+
$form->{creditremaining} = $form->{creditlimit};
$query = qq|SELECT SUM(a.amount - a.paid)
FROM ar a
$sth->finish;
$form->get_contacts($dbh, $form->{customer_id});
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
+ $form->{cp_id} *= 1;
# get contact if selected
- if ($form->{contact} ne "--" && $form->{contact} ne "") {
+ if ($form->{cp_id}) {
$form->get_contact($dbh, $form->{cp_id});
}
qw(shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
$query = qq|SELECT s.* FROM shipto s
- WHERE s.trans_id = $form->{customer_id}|;
+ WHERE s.trans_id = $form->{customer_id} AND s.module = 'CT'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$ref = $sth->fetchrow_hashref(NAME_lc);
+ undef($ref->{id});
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
}
}
$sth->finish;
+ # get shipping addresses
+ $query = qq|SELECT s.id,s.shiptoname
+ FROM shipto s
+ WHERE s.trans_id = $form->{customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my $customertax = ();
+ while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push(@{ $form->{SHIPTO} }, $ref);
+ }
+ $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
$where .= " ORDER BY p.partnumber";
}
+ my $transdate = "";
+ if ($form->{type} eq "invoice") {
+ $transdate = "'$form->{invdate}'";
+ } elsif ($form->{type} eq "sales_order") {
+ $transdate = "'$form->{transdate}'";
+ } elsif ($form->{type} eq "sales_quotation") {
+ $transdate = "'$form->{transdate}'";
+ }
+
+ if ($transdate eq "") {
+ $transdate = "current_date";
+ }
+
# 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
+ p.listprice, p.inventory_accno_id,
+ c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from as inventory_valid,
+ c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from as income_valid,
+ c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from as expense_valid,
+ p.unit, p.assembly, p.bin, p.onhand, p.notes AS partnotes, p.notes AS longdescription, p.not_discountable,
+ pg.partsgroup, p.formel, p.alu, p.payment_id AS part_payment_id, adr.adr_description
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 chart c1 ON ((select inventory_accno_id from buchungsgruppen where id=p.buchungsgruppen_id) = c1.id)
+ LEFT JOIN chart c2 ON ((select income_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c2.id)
+ LEFT JOIN chart c3 ON ((select expense_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c3.id)
LEFT JOIN partsgroup pg ON (pg.id = p.partsgroup_id)
+ LEFT JOIN adr adr ON (adr.id = p.adr_id)
WHERE $where|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ # In der Buchungsgruppe ist immer ein Bestandskonto verknuepft, auch wenn
+ # es sich um eine Dienstleistung handelt. Bei Dienstleistungen muss das
+ # Buchungskonto also aus dem Ergebnis rausgenommen werden.
+ if (!$ref->{inventory_accno_id}) {
+ map({ delete($ref->{"inventory_${_}"}); } qw(accno new_chart valid));
+ }
+ delete($ref->{inventory_accno_id});
+
#set expense_accno=inventory_accno if they are different => bilanz
+
+
+ while ($ref->{inventory_new_chart} && ($ref->{inventory_valid} >=0)) {
+ my $query = qq| SELECT accno AS inventory_accno, new_chart_id AS inventory_new_chart, date($transdate) - valid_from AS inventory_valid FROM chart WHERE id = $ref->{inventory_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{inventory_accno}, $ref->{inventory_new_chart}, $ref->{inventory_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{income_new_chart} && ($ref->{income_valid} >=0)) {
+ my $query = qq| SELECT accno AS income_accno, new_chart_id AS income_new_chart, date($transdate) - valid_from AS income_valid FROM chart WHERE id = $ref->{income_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{income_accno}, $ref->{income_new_chart}, $ref->{income_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{expense_new_chart} && ($ref->{expense_valid} >=0)) {
+ my $query = qq| SELECT accno AS expense_accno, new_chart_id AS expense_new_chart, date($transdate) - valid_from AS expense_valid FROM chart WHERE id = $ref->{expense_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{expense_accno}, $ref->{expense_new_chart}, $ref->{expense_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ #check whether payment_terms are better than old payment_terms
+ if (($form->{payment_id} ne "") && ($ref->{part_payment_id} ne "")) {
+ my $query = qq|select (select ranking from payment_terms WHERE id = $form->{payment_id}), (select ranking from payment_terms WHERE id = $ref->{part_payment_id})|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($old_ranking, $new_ranking) = $stw->fetchrow_array;
+ $stw->finish;
+ if ($new_ranking <= $old_ranking) {
+ $ref->{part_payment_id} = "";
+ }
+ }
+
+
$vendor_accno =
($ref->{expense_accno} != $ref->{inventory_accno})
? $ref->{inventory_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')
+ $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber
+ FROM tax t LEFT JOIN chart c on (c.id=t.chart_id)
+ WHERE 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} = "";
+ my $i = 0;
while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
# if ($customertax{$ref->{accno}}) {
+ if (($ptr->{accno} eq "") && ($ptr->{rate} == 0)) {
+ $i++;
+ $ptr->{accno} = $i;
+ }
$ref->{taxaccounts} .= "$ptr->{accno} ";
+
if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
$form->{"$ptr->{accno}_rate"} = $ptr->{rate};
- $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_description"} = $ptr->{taxdescription};
$form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
$form->{taxaccounts} .= "$ptr->{accno} ";
}
$stw->finish;
chop $ref->{taxaccounts};
+ if ($form->{language_id}) {
+ $query = qq|SELECT tr.translation, tr.longdescription
+ FROM translation tr
+ WHERE tr.language_id=$form->{language_id} AND tr.parts_id=$ref->{id}|;
+ $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ my ($translation, $longdescription) = $stw->fetchrow_array();
+ if ($translation ne "") {
+ $ref->{description} = $translation;
+ $ref->{longdescription} = $longdescription;
+
+ } else {
+ $query = qq|SELECT tr.translation, tr.longdescription
+ FROM translation tr
+ WHERE tr.language_id in (select id from language where article_code=(select article_code from language where id = $form->{language_id})) AND tr.parts_id=$ref->{id} LIMIT 1|;
+ $stg = $dbh->prepare($query);
+ $stg->execute || $form->dberror($query);
+ my ($translation) = $stg->fetchrow_array();
+ if ($translation ne "") {
+ $ref->{description} = $translation;
+ $ref->{longdescription} = $longdescription;
+ }
+ $stg->finish;
+ }
+ $stw->finish;
+ }
push @{ $form->{item_list} }, $ref;
my $i = 1;
my $id = 0;
-
+ my $dimension_units = AM->retrieve_units($myconfig, $form, "dimension");
+ my $service_units = AM->retrieve_units($myconfig, $form, "service");
+ my $all_units = AM->retrieve_units($myconfig, $form);
while (($form->{"id_$i"}) or ($form->{"new_id_$i"})) {
$id = $form->{"id_$i"};
$form->{"sellprice_drag_$i"};
$pricegroup_old = $form->{"pricegroup_old_$i"};
-
+ $form->{"new_pricegroup_$i"} = $selectedpricegroup_id;
+ $form->{"old_pricegroup_$i"} = $pricegroup_old;
$price_new = $form->{"price_new_$i"};
$price_old = $form->{"price_old_$i"};
-
$query =
qq|SELECT pricegroup_id, (SELECT p.sellprice from parts p where p.id = $id) as default_sellprice,(SELECT pg.pricegroup FROM pricegroup pg WHERE id=pricegroup_id) AS pricegroup, price, '' AS selected FROM prices WHERE parts_id = $id UNION SELECT 0 as pricegroup_id,(SELECT sellprice FROM parts WHERE id=$id) as default_sellprice,'' as pricegroup, (SELECT DISTINCT sellprice from parts where id=$id) as price, 'selected' AS selected from prices ORDER BY pricegroup|;
$pkq = $dbh->prepare($query);
$pkq->execute || $form->dberror($query);
+ if (!$form->{"unit_old_$i"}) {
+ # Neue Ware aus der Datenbank. In diesem Fall ist unit_$i die
+ # Einheit, wie sie in den Stammdaten hinterlegt wurde.
+ # Es sollte also angenommen werden, dass diese ausgewaehlt war.
+ $form->{"unit_old_$i"} = $form->{"unit_$i"};
+ }
+
+ # Die zuletzt ausgewaehlte mit der aktuell ausgewaehlten Einheit
+ # vergleichen und bei Unterschied den Preis entsprechend umrechnen.
+ $form->{"selected_unit_$i"} = $form->{"unit_$i"} unless ($form->{"selected_unit_$i"});
+
+ my $check_units = $form->{"inventory_accno_$i"} ? $dimension_units : $service_units;
+ if (!$check_units->{$form->{"selected_unit_$i"}} ||
+ ($check_units->{$form->{"selected_unit_$i"}}->{"base_unit"} ne
+ $all_units->{$form->{"unit_old_$i"}}->{"base_unit"})) {
+ # Die ausgewaehlte Einheit ist fuer diesen Artikel nicht gueltig
+ # (z.B. Dimensionseinheit war ausgewaehlt, es handelt sich aber
+ # um eine Dienstleistung). Dann keinerlei Umrechnung vornehmen.
+ $form->{"unit_old_$i"} = $form->{"selected_unit_$i"} = $form->{"unit_$i"};
+ }
+ my $basefactor = 1;
+
+ if ($form->{"unit_old_$i"} ne $form->{"selected_unit_$i"}) {
+ if (defined($all_units->{$form->{"unit_old_$i"}}->{"factor"}) &&
+ $all_units->{$form->{"unit_old_$i"}}->{"factor"}) {
+ $basefactor = $all_units->{$form->{"selected_unit_$i"}}->{"factor"} /
+ $all_units->{$form->{"unit_old_$i"}}->{"factor"};
+ }
+ }
+ if (!$form->{"basefactor_$i"}) {
+ $form->{"basefactor_$i"} = 1;
+ }
while ($pkr = $pkq->fetchrow_hashref(NAME_lc)) {
# push @{ $form->{PRICES}{$id} }, $pkr;
- push @{ $form->{PRICES}{$i} }, $pkr;
+ #push @{ $form->{PRICES}{$i} }, $pkr;
$pkr->{id} = $id;
$pkr->{selected} = '';
$pkr->{price} /= $form->{exchangerate};
}
+
+ $pkr->{price} *= $form->{"basefactor_$i"};
+
+ $pkr->{price} *= $basefactor;
+
$pkr->{price} = $form->format_amount($myconfig, $pkr->{price}, 5);
if ($selectedpricegroup_id eq undef) {
if ($pkr->{pricegroup_id} eq $form->{customer_klass}) {
$pkr->{selected} = ' selected';
- $last->{selected} = '';
# no customer pricesgroup set
if ($pkr->{price} == $pkr->{default_sellprice}) {
}
}
}
+
if ($selectedpricegroup_id or $selectedpricegroup_id == 0) {
if ($selectedpricegroup_id ne $pricegroup_old) {
if ($pkr->{pricegroup_id} eq $selectedpricegroup_id) {
- if ($price_new != $form->{"sellprice_$i"}) {
- } else {
- $pkr->{selected} = ' selected';
- $last->{selected} = '';
- }
+ $pkr->{selected} = ' selected';
}
} else {
if (($price_new != $form->{"sellprice_$i"}) and ($price_new ne 0)) {
if ($pkr->{pricegroup_id} == 0) {
$pkr->{price} = $form->{"sellprice_$i"};
$pkr->{selected} = ' selected';
- $last->{selected} = '';
}
} else {
if ($pkr->{pricegroup_id} eq $selectedpricegroup_id) {
$pkr->{selected} = ' selected';
- $last->{selected} = '';
if ( ($pkr->{pricegroup_id} == 0)
and ($pkr->{price} == $form->{"sellprice_$i"})) {
}
}
}
+ push @{ $form->{PRICES}{$i} }, $pkr;
+
}
+ $form->{"basefactor_$i"} *= $basefactor;
+
$i++;
$pkq->finish;
if ($form->{"customer_name"}) {
$f .= " AND " if ($f);
$f .=
- "(l.customer_id IN (SELECT id FROM customer WHERE name ILIKE "
+ "(customer_id IN (SELECT id FROM customer WHERE name ILIKE "
. $dbh->quote('%' . $form->{"customer_name"} . '%') . "))";
}
use constant INFO => 1;
use constant DEBUG1 => 2;
use constant DEBUG2 => 3;
-use constant QUERY => 4;
use constant FILE_TARGET => 0;
use constant STDERR_TARGET => 1;
sub enter_sub {
my ($self, $level) = @_;
- return if $global_trace_subs < $level;
+ return 1 if $global_trace_subs < $level;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
- return;
+ return 1;
}
my ($package, $filename, $line, $subroutine) = caller(1);
my ($dummy1, $self_filename, $self_line) = caller(0);
- my $indent = " " x $self->{"calldepth"};
+ my $indent = " " x $self->{"calldepth"};
$self->{"calldepth"} += 1;
if (!defined($package)) {
- $self->_write("enter_sub", $indent . "top-level?\n");
+ $self->_write('sub', $indent . "\\ top-level?\n");
} else {
- $self->_write("enter_sub",
- $indent
- . "${subroutine} in "
+ $self->_write('sub', $indent
+ . "\\ ${subroutine} in "
. "${self_filename}:${self_line} called from "
. "${filename}:${line}\n");
}
+ return 1;
}
sub leave_sub {
my ($self, $level) = @_;
- return if $global_trace_subs < $level;
+ return 1 if $global_trace_subs < $level;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
- return;
+ return 1;
}
my ($package, $filename, $line, $subroutine) = caller(1);
my ($dummy1, $self_filename, $self_line) = caller(0);
$self->{"calldepth"} -= 1;
- my $indent = " " x $self->{"calldepth"};
+ my $indent = " " x $self->{"calldepth"};
if (!defined($package)) {
- $self->_write("leave_sub", $indent . "top-level?\n");
+ $self->_write('sub', $indent . "/ top-level?\n");
} else {
- $self->_write("leave_sub",
- $indent . "${subroutine} in " . "${self_filename}:${self_line}\n");
+ $self->_write('sub', $indent . "/ ${subroutine} in " . "${self_filename}:${self_line}\n");
}
+ return 1;
}
sub message {
}
if ($log_level >= $level) {
- $self->_write(INFO == $level ? "info"
- : DEBUG1 == $level ? "debug1"
- : DEBUG2 == $level ? "debug2"
- : QUERY == $level ? "query":"",
- $message );
+ $self->_write(INFO == $level
+ ? "info"
+ : DEBUG1 == $level ? "debug1" : "debug2",
+ $message);
}
}
sub disable_sub_tracing {
my ($self) = @_;
- $self->{"trace_subs"} = 0;
+ $self->{"trace_subs"} = 1;
}
sub _write {
my $level = $form->escape($item);
my $str =
- qq|<a href=$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|;
+ qq|<a style="vertical-align:top" href=$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|;
my @vars = qw(module action target href);
@menu = grep { /^${menulevel}--/ } @{ $self->{ORDER} };
}
- my @a = split /;/, $myconfig->{acs};
- my %excl;
+ my @a = split /;/, $myconfig->{acs};
+ my $excl = ();
+
+ # remove --AR, --AP from array
+ grep { ($a, $b) = split /--/; s/--$a$//; } @a;
map { $excl{$_} = 1 } @a;
package OE;
+use SL::AM;
+
sub transactions {
$main::lxdebug->enter_sub();
my ($query, $sth, $null);
my $exchangerate = 0;
+ my $service_units = AM->retrieve_units($myconfig,$form,"service");
+ my $part_units = AM->retrieve_units($myconfig,$form,"dimension");
+ $form->{service_units} =$service_units;
+ $form->{part_units} =$part_units;
+
($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} = $form->{cp_id};
$form->{contact_id} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{shipto_id} *= 1;
+ $form->{delivery_customer_id} *= 1;
+ $form->{delivery_vendor_id} *= 1;
my $ml = ($form->{type} eq 'sales_order') ? 1 : -1;
$dbh->do($query) || $form->dberror($query);
$query = qq|DELETE FROM shipto
- WHERE trans_id = $form->{id}|;
+ WHERE trans_id = $form->{id} AND module = 'OE'|;
$dbh->do($query) || $form->dberror($query);
} else {
if ($form->{"qty_$i"}) {
+ # get item baseunit
+ $query = qq|SELECT p.unit
+ FROM parts p
+ WHERE p.id = $form->{"id_$i"}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+ my ($item_unit) = $sth->fetchrow_array();
+ $sth->finish;
+
+ if ($form->{"inventory_accno_$i"}) {
+ if (defined($part_units->{$item_unit}->{factor}) && $part_units->{$item_unit}->{factor} ne '' && $part_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $part_units->{$form->{"unit_$i"}}->{factor} / $part_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ } else {
+ if (defined($service_units->{$item_unit}->{factor}) && $service_units->{$item_unit}->{factor} ne '' && $service_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $service_units->{$form->{"unit_$i"}}->{factor} / $service_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $form->{"qty_$i"} * $basefactor;
+ }
+
map { $form->{"${_}_$i"} =~ s/\'/\'\'/g }
qw(partnumber description unit);
# get pricegroup_id and save ist
($null, my $pricegroup_id) = split /--/, $form->{"sellprice_drag_$i"};
$pricegroup_id *= 1;
+ $subtotal = $form->{"subtotal_$i"} * 1;
# 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,
+ $query .= qq|trans_id, parts_id, description, longdescription, qty, base_qty, sellprice, discount,
unit, reqdate, project_id, serialnumber, ship, pricegroup_id,
- ordnumber, transdate, cusordnumber)
+ ordnumber, transdate, cusordnumber, subtotal)
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"},
+ '$form->{"description_$i"}', '$form->{"longdescription_$i"}', $form->{"qty_$i"}, $baseqty,
$fxsellprice, $form->{"discount_$i"},
'$form->{"unit_$i"}', $reqdate, (SELECT id from project where projectnumber = '$project_id'),
'$form->{"serialnumber_$i"}', $form->{"ship_$i"}, '$pricegroup_id',
- '$form->{"ordnumber_$i"}', '$form->{"transdate_$i"}', '$form->{"cusordnumber_$i"}')|;
+ '$form->{"ordnumber_$i"}', '$form->{"transdate_$i"}', '$form->{"cusordnumber_$i"}', '$subtotal')|;
$dbh->do($query) || $form->dberror($query);
$form->{"sellprice_$i"} = $fxsellprice;
($null, $form->{department_id}) = split(/--/, $form->{department});
$form->{department_id} *= 1;
+ $form->{payment_id} *= 1;
+ $form->{language_id} *= 1;
+ $form->{taxzone_id} *= 1;
+ $form->{proforma} *= 1;
+
+
# save OE record
$query = qq|UPDATE oe set
intnotes = '$form->{intnotes}',
curr = '$form->{currency}',
closed = '$form->{closed}',
+ proforma = '$form->{proforma}',
quotation = '$quotation',
department_id = $form->{department_id},
+ language_id = $form->{language_id},
+ taxzone_id = $form->{taxzone_id},
+ shipto_id = $form->{shipto_id},
+ payment_id = $form->{payment_id},
+ delivery_vendor_id = $form->{delivery_vendor_id},
+ delivery_customer_id = $form->{delivery_customer_id},
employee_id = $form->{employee_id},
cp_id = $form->{contact_id}
WHERE id = $form->{id}|;
# add shipto
$form->{name} = $form->{ $form->{vc} };
$form->{name} =~ s/--$form->{"$form->{vc}_id"}//;
- $form->add_shipto($dbh, $form->{id});
+
+ if (!$form->{shipto_id}) {
+ $form->add_shipto($dbh, $form->{id}, "OE");
+ }
# save printed, emailed, queued
$form->save_status($dbh);
$dbh->do($query) || $form->dberror($query);
$query = qq|DELETE FROM shipto
- WHERE trans_id = $form->{id}|;
+ WHERE trans_id = $form->{id} AND module = 'OE'|;
$dbh->do($query) || $form->dberror($query);
my $rc = $dbh->commit;
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
+ d.description AS department, o.payment_id, o.language_id, o.taxzone_id, o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id
FROM oe o
JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id)
LEFT JOIN employee e ON (o.employee_id = e.id)
$ref = $sth->fetchrow_hashref(NAME_lc);
map { $form->{$_} = $ref->{$_} } keys %$ref;
+
+
# set all entries for multiple ids blank that yield different information
while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
map { $form->{$_} = '' if ($ref->{$_} ne $form->{$_}) } keys %$ref;
$sth->finish;
+ if ($form->{delivery_customer_id}) {
+ $query = qq|SELECT name FROM customer WHERE id=$form->{delivery_customer_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{delivery_customer_string}) = $sth->fetchrow_array();
+ $sth->finish;
+ }
+
+ if ($form->{delivery_vendor_id}) {
+ $query = qq|SELECT name FROM customer WHERE id=$form->{delivery_vendor_id}|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ ($form->{delivery_vendor_string}) = $sth->fetchrow_array();
+ $sth->finish;
+ }
+
# shipto and pinted/mailed/queued status makes only sense for single id retrieve
if (!@ids) {
$query = qq|SELECT s.* FROM shipto s
- WHERE s.trans_id = $form->{id}|;
+ WHERE s.trans_id = $form->{id} AND s.module = 'OE'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$ref = $sth->fetchrow_hashref(NAME_lc);
+ delete($ref->{id});
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish;
my %oid = ('Pg' => 'oid',
'Oracle' => 'rowid');
+ my $transdate = "'$form->{transdate}'";
+ if (!$transdate) {
+ $transdate = "current_date";
+ }
+ if(!$form->{taxzone_id}) {
+ $form->{taxzone_id} = 0;
+ }
# retrieve individual items
# this query looks up all information about the items
# stuff different from the whole will not be overwritten, but saved with a suffix.
$query = qq|SELECT o.id AS orderitems_id,
- c1.accno AS inventory_accno,
- c2.accno AS income_accno,
- c3.accno AS expense_accno,
+ c1.accno AS inventory_accno, c1.new_chart_id AS inventory_new_chart, date($transdate) - c1.valid_from as inventory_valid,
+ c2.accno AS income_accno, c2.new_chart_id AS income_new_chart, date($transdate) - c2.valid_from as income_valid,
+ c3.accno AS expense_accno, c3.new_chart_id AS expense_new_chart, date($transdate) - c3.valid_from as expense_valid,
oe.ordnumber AS ordnumber_oe, oe.transdate AS transdate_oe, oe.cusordnumber AS cusordnumber_oe,
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.sellprice, o.parts_id AS id, o.unit, o.discount, p.bin, p.notes AS partnotes, p.inventory_accno_id AS part_inventory_accno_id,
o.reqdate, o.project_id, o.serialnumber, o.ship,
- o.ordnumber, o.transdate, o.cusordnumber,
- pr.projectnumber,
+ o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.longdescription,
+ pr.projectnumber, p.alu, p.formel,
pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup
FROM orderitems o
JOIN parts p ON (o.parts_id = p.id)
JOIN oe ON (o.trans_id = oe.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 chart c1 ON ((select inventory_accno_id from buchungsgruppen where id=p.buchungsgruppen_id) = c1.id)
+ LEFT JOIN chart c2 ON ((select income_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c2.id)
+ LEFT JOIN chart c3 ON ((select expense_accno_id_$form->{taxzone_id} from buchungsgruppen where id=p.buchungsgruppen_id) = c3.id)
LEFT JOIN project pr ON (o.project_id = pr.id)
LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
|
$sth->execute || $form->dberror($query);
while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ if (!$ref->{"part_inventory_accno_id"}) {
+ map({ delete($ref->{$_}); } qw(inventory_accno inventory_new_chart inventory_valid));
+ }
+ delete($ref->{"part_inventory_accno_id"});
# in collective order, copy global ordnumber, transdate, cusordnumber into item scope
# unless already present there
if (@ids);
map { delete $ref->{$_} } qw|ordnumber_oe transdate_oe cusordnumber_oe|;
- # delete orderitems_id in collective orders, so that they get cloned no matter what
- delete $ref->{orderitems_id} if (@ids);
+
+
+ while ($ref->{inventory_new_chart} && ($ref->{inventory_valid} >=0)) {
+ my $query = qq| SELECT accno AS inventory_accno, new_chart_id AS inventory_new_chart, date($transdate) - valid_from AS inventory_valid FROM chart WHERE id = $ref->{inventory_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{inventory_accno}, $ref->{inventory_new_chart}, $ref->{inventory_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{income_new_chart} && ($ref->{income_valid} >=0)) {
+ my $query = qq| SELECT accno AS income_accno, new_chart_id AS income_new_chart, date($transdate) - valid_from AS income_valid FROM chart WHERE id = $ref->{income_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{income_accno}, $ref->{income_new_chart}, $ref->{income_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
+
+ while ($ref->{expense_new_chart} && ($ref->{expense_valid} >=0)) {
+ my $query = qq| SELECT accno AS expense_accno, new_chart_id AS expense_new_chart, date($transdate) - valid_from AS expense_valid FROM chart WHERE id = $ref->{expense_new_chart}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+ ($ref->{expense_accno}, $ref->{expense_new_chart}, $ref->{expense_valid}) = $stw->fetchrow_array;
+ $stw->finish;
+ }
#set expense_accno=inventory_accno if they are different => bilanz
$vendor_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')
+ $query = qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber
+ FROM tax t LEFT JOIN chart c ON (c.id=t.chart_id)
+ WHERE 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} = "";
+ my $i = 0;
while ($ptr = $stw->fetchrow_hashref(NAME_lc)) {
# if ($customertax{$ref->{accno}}) {
+ if (($ptr->{accno} eq "") && ($ptr->{rate} == 0)) {
+ $i++;
+ $ptr->{accno} = $i;
+ }
$ref->{taxaccounts} .= "$ptr->{accno} ";
if (!($form->{taxaccounts} =~ /$ptr->{accno}/)) {
$form->{"$ptr->{accno}_rate"} = $ptr->{rate};
- $form->{"$ptr->{accno}_description"} = $ptr->{description};
+ $form->{"$ptr->{accno}_description"} = $ptr->{taxdescription};
$form->{"$ptr->{accno}_taxnumber"} = $ptr->{taxnumber};
$form->{taxaccounts} .= "$ptr->{accno} ";
}
&webdav_folder($myconfig, $form);
}
+ # get tax zones
+ $query = qq|SELECT id, description
+ FROM tax_zones|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+
+
+ while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ push @{ $form->{TAXZONE} }, $ref;
+ }
+ $sth->finish;
+
+
my $rc = $dbh->commit;
$dbh->disconnect;
my $dbh = $form->dbconnect($myconfig);
my $query;
my $sth;
-
+ my $nodiscount;
+ my $yesdiscount;
+ my $nodiscount_subtotal = 0;
+ my $discount_subtotal = 0;
my $item;
my $i;
my @partsgroup = ();
my $partsgroup;
+ my $position = 0;
+ my $subtotal_header = 0;
+ my $subposition = 0;
+
my %oid = ('Pg' => 'oid',
'Oracle' => 'rowid');
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 ($form->{"qty_$i"} != 0) {
# add number, description and qty to $form->{number}, ....
+
+ if ($form->{"subtotal_$i"} && !$subtotal_header) {
+ $subtotal_header = $i;
+ $position = int($position);
+ $subposition = 0;
+ $position++;
+ } elsif ($subtotal_header) {
+ $subposition += 1;
+ $position = int($position);
+ $position = $position.".".$subposition;
+ } else {
+ $position = int($position);
+ $position++;
+ }
+
push(@{ $form->{runningnumber} }, $i);
push(@{ $form->{number} }, qq|$form->{"partnumber_$i"}|);
push(@{ $form->{description} }, qq|$form->{"description_$i"}|);
+ push(@{ $form->{longdescription} }, qq|$form->{"longdescription_$i"}|);
push(@{ $form->{qty} },
$form->format_amount($myconfig, $form->{"qty_$i"}));
push(@{ $form->{ship} },
# keep a netprice as well, (sellprice - discount)
#$form->{"netprice_$i"} = $sellprice - $discount;
$form->{"netprice_$i"} = $sellprice - $i_discount;
-
+ my $nodiscount_linetotal =
+ $form->round_amount($form->{"qty_$i"} * $sellprice, 2);
my $linetotal =
$form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);
push(@{ $form->{p_discount} }, $form->{"discount_$i"});
$form->{ordtotal} += $linetotal;
+ $discount_subtotal += $linetotal;
+ $form->{nodiscount_total} += $nodiscount_linetotal;
+ $nodiscount_subtotal += $nodiscount_linetotal;
+ $form->{discount_total} += $form->parse_amount($myconfig, $discount);
+
+ if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) {
+ $discount_subtotal = $form->format_amount($myconfig, $discount_subtotal, 2);
+ push(@{ $form->{discount_sub} }, $discount_subtotal);
+ $nodiscount_subtotal = $form->format_amount($myconfig, $nodiscount_subtotal, 2);
+ push(@{ $form->{nodiscount_sub} }, $nodiscount_subtotal);
+ $discount_subtotal = 0;
+ $nodiscount_subtotal = 0;
+ $subtotal_header = 0;
+ } else {
+ push(@{ $form->{discount_sub} }, "");
+ push(@{ $form->{nodiscount_sub} }, "");
+ }
+ if ($linetotal == $netto_linetotal) {
+ $nodiscount += $linetotal;
+ }
push(@{ $form->{linetotal} },
$form->format_amount($myconfig, $linetotal, 2));
+ push(@{ $form->{nodiscount_linetotal} },
+ $form->format_amount($myconfig, $nodiscount_linetotal, 2));
my ($taxamount, $taxbase);
my $taxrate = 0;
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);
+ qw(runningnumber ship bin serialnumber number unit bin qty reqdate sellprice listprice netprice discount linetotal nodiscount_linetotal);
$sameitem = ($ref->{partsgroup}) ? $ref->{partsgroup} : "--";
push(@{ $form->{description} }, $sameitem);
}
. qq|, $ref->{partnumber}, $ref->{description}|);
map { push(@{ $form->{$_} }, "") }
- qw(number unit qty runningnumber ship bin serialnumber reqdate sellprice listprice netprice discount linetotal);
+ qw(number unit qty runningnumber ship bin serialnumber reqdate sellprice listprice netprice discount linetotal nodiscount_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));
push(@{ $form->{taxrate} },
$form->format_amount($myconfig, $form->{"${item}_rate"} * 100));
push(@{ $form->{taxnumber} }, $form->{"${item}_taxnumber"});
- }
}
+ $form->{subtotal} = $form->format_amount($myconfig, $form->{total}, 2);
+ $yesdiscount = $form->{nodiscount_total} - $nodiscount;
+ $form->{nodiscount_subtotal} = $form->format_amount($myconfig, $form->{nodiscount_total}, 2);
+ $form->{discount_total} = $form->format_amount($myconfig, $form->{discount_total}, 2);
+ $form->{nodiscount} = $form->format_amount($myconfig, $nodiscount, 2);
+ $form->{yesdiscount} = $form->format_amount($myconfig, $yesdiscount, 2);
$form->{subtotal} = $form->format_amount($myconfig, $form->{ordtotal}, 2);
$form->{ordtotal} =
$form->{quototal} = $form->{ordtotal} =
$form->format_amount($myconfig, $form->{ordtotal}, 2);
+ if ($form->{type} =~ /_quotation/) {
+ $form->set_payment_options($myconfig, $form->{quodate});
+ } else {
+ $form->set_payment_options($myconfig, $form->{orddate});
+ }
+
# myconfig variables
map { $form->{$_} = $myconfig->{$_} }
(qw(company address tel fax signature businessnumber));
my ($dbh, $form, $ml) = @_;
- my $query = qq|SELECT oi.parts_id, oi.ship, p.inventory_accno_id, p.assembly
+ my $service_units = $form->{service_units};
+ my $part_units = $form->{part_units};
+
+ my $query = qq|SELECT oi.parts_id, oi.ship, oi.unit, 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 $ispa;
while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ #print(STDERR "Bin in Schleife $ref->{inventory_accno_id}\n");
if ($ref->{inventory_accno_id} || $ref->{assembly}) {
}
+ # get item baseunit
+ $query = qq|SELECT p.unit
+ FROM parts p
+ WHERE p.id = $ref->{parts_id}|;
+ my $stw = $dbh->prepare($query);
+ $stw->execute || $form->dberror($query);
+
+ my ($item_unit) = $stw->fetchrow_array();
+ $stw->finish;
+
+ if ($ref->{inventory_accno_id}) {
+ if (defined($part_units->{$item_unit}->{factor}) && $part_units->{$item_unit}->{factor} ne '' && $part_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $part_units->{$ref->{unit}}->{factor} / $part_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $ref->{ship} * $basefactor;
+ } else {
+ if (defined($service_units->{$item_unit}->{factor}) && $service_units->{$item_unit}->{factor} ne '' && $service_units->{$item_unit}->{factor} ne '0') {
+ $basefactor = $service_units->{$ref->{unit}}->{factor} / $part_units->{$item_unit}->{factor};
+ } else {
+ $basefactor = 1;
+ }
+ $baseqty = $ref->{ship} * $basefactor;
+ }
+ #print(STDERR "$baseqty Basismenge\n");
+
# adjust onhand in parts table
$form->update_balance($dbh, "parts", "onhand",
qq|id = $ref->{parts_id}|,
- $ref->{ship} * $ml);
+ $baseqty * $ml);
}
}
if ($form->{fromdate}) {
$query = qq|SELECT sum(a.amount),
(SELECT DISTINCT c2.category FROM chart c2
- WHERE c2.accno = '$form->{accno}') AS category
+ 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}'
--- /dev/null
+#====================================================================
+# LX-Office ERP
+# Copyright (C) 2004
+# Based on SQL-Ledger Version 2.1.9
+# Web http://www.lx-office.org
+#
+#====================================================================
+
+package SimpleTemplate;
+
+# Parameters:
+# 1. The template's file name
+# 2. A reference to the Form object
+# 3. A reference to the myconfig hash
+#
+# Returns:
+# A new template object
+sub new {
+ my $type = shift;
+ my $self = {};
+
+ bless($self, $type);
+ $self->_init(@_);
+
+ return $self;
+}
+
+sub _init {
+ my $self = shift;
+
+ $self->{"source"} = shift;
+ $self->{"form"} = shift;
+ $self->{"myconfig"} = shift;
+ $self->{"userspath"} = shift;
+
+ $self->{"error"} = undef;
+}
+
+sub cleanup {
+ my ($self) = @_;
+}
+
+# Parameters:
+# 1. A typeglob for the file handle. The output will be written
+# to this file handle.
+#
+# Returns:
+# 1 on success and undef or 0 if there was an error. In the latter case
+# the calling function can retrieve the error message via $obj->get_error()
+sub parse {
+ my $self = $_[0];
+ local *OUT = $_[1];
+
+ print(OUT "Hallo!\n");
+}
+
+sub get_error {
+ my $self = shift;
+
+ return $self->{"error"};
+}
+
+sub uses_temp_file {
+ return 0;
+}
+
+1;
+
+####
+#### LaTeXTemplate
+####
+
+package LaTeXTemplate;
+
+use vars qw(@ISA);
+
+@ISA = qw(SimpleTemplate);
+
+sub new {
+ my $type = shift;
+
+ return $type->SUPER::new(@_);
+}
+
+sub format_string {
+ my ($self, $variable) = @_;
+ my $form = $self->{"form"};
+
+ my %replace =
+ ('order' => [
+ '&', quotemeta("\n"),
+ '"', '\$', '%', '_', '#', quotemeta('^'),
+ '{', '}', '<', '>', '£', "\r"
+ ],
+ '"' => "''",
+ '&' => '\&',
+ '\$' => '\$',
+ '%' => '\%',
+ '_' => '\_',
+ '#' => '\#',
+ '{' => '\{',
+ '}' => '\}',
+ '<' => '$<$',
+ '>' => '$>$',
+ '£' => '\pounds ',
+ "\r" => "",
+ quotemeta('^') => '\^\\',
+ quotemeta("\n") => '\newline '
+ );
+
+ map({ $variable =~ s/$_/$replace{$_}/g; } @{ $replace{"order"} });
+
+ # Allow some HTML markup to be converted into the output format's
+ # corresponding markup code, e.g. bold or italic.
+ my %markup_replace = ('b' => 'textbf',
+ 'i' => 'textit',
+ 'u' => 'underline');
+
+ foreach my $key (keys(%markup_replace)) {
+ my $new = $markup_replace{$key};
+ $variable =~ s/\$\<\$${key}\$\>\$(.*?)\$<\$\/${key}\$>\$/\\${new}\{$1\}/gi;
+ }
+
+ return $variable;
+}
+
+sub parse {
+ my $self = $_[0];
+ local *OUT = $_[1];
+ my ($form, $myconfig) = ($self->{"form"}, $self->{"myconfig"});
+
+ # 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, $current_row) = (1, 1, 0);
+ my ($pagebreak, $sum, $two_passes, $nodiscount_sum) = ("", 0, 0, 0);
+ my ($par, $var);
+
+ # Do we have to run LaTeX two times? This is needed if
+ # the template contains page references.
+ $two_passes = 0;
+
+ if (!open(IN, "$form->{templates}/$form->{IN}")) {
+ $self->{"error"} = "$!";
+ return 0;
+ }
+ @_ = <IN>;
+ close(IN);
+
+ # first we generate a tmpfile
+ # read file and replace <%variable%>
+ while ($_ = shift) {
+ $par = "";
+ $var = $_;
+
+ $two_passes = 1 if (/\\pageref/);
+
+ # 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 .= $_;
+ }
+ }
+
+ 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 .= $_;
+ }
+
+ # Count the number of "lines" for our variable. Also find the forced pagebreak entries.
+ my $num_entries = scalar(@{$form->{$var}});
+ my @forced_pagebreaks = ();
+ for (my $i = 0; $i < scalar(@{$form->{$var}}); $i++) {
+ if ($form->{$var}->[$i] =~ /<pagebreak>/) {
+ push(@forced_pagebreaks, $i);
+ }
+ }
+
+ $current_line = 1;
+ # display contents of $form->{number}[] array
+ for ($i = 0; $i < $num_entries; $i++) {
+ # 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($form->{"description"}->[$i]) / $chars_per_line + 0.95);
+ my $lpp;
+
+ $form->{"description"}->[$i] =~ s/(\\newline\s?)*$//;
+ my $_description = $form->{"description"}->[$i];
+ while ($_description =~ /\\newline/) {
+ $lines++;
+ $_description =~ s/\\newline//;
+ }
+ $lines++;
+
+ if ($current_page == 1) {
+ $lpp = $lines_on_first_page;
+ } else {
+ $lpp = $lines_on_second_page;
+ }
+
+ # Yes we need a manual page break -- or the user has forced one
+ if ((($current_line + $lines) > $lpp) ||
+ grep(/^${current_row}$/, @forced_pagebreaks)) {
+ my $pb = $pagebreak;
+
+ # replace the special variables <%sumcarriedforward%>
+ # and <%lastpage%>
+
+ my $psum = $form->format_amount($myconfig, $sum, 2);
+ my $nodiscount_psum = $form->format_amount($myconfig, $nodiscount_sum, 2);
+ $pb =~ s/<%nodiscount_sumcarriedforward%>/$nodiscount_psum/g;
+ $pb =~ s/<%sumcarriedforward%>/$psum/g;
+ $pb =~ s/<%lastpage%>/$current_page/g;
+
+ # only "normal" variables are supported here
+ # (no <%if, no <%foreach, no <%include)
+
+ while ($pb =~ /<%(.*?)%>/) {
+ substr($pb, $-[0], $+[0] - $-[0]) =
+ $self->format_string($form->{"$1"}->[$i]);
+ }
+
+ # page break block is ready to rock
+ print(OUT $pb);
+ $current_page++;
+ $current_line = 1;
+ }
+ $current_line += $lines;
+ $current_row++;
+ }
+ $sum += $form->parse_amount($myconfig, $form->{"linetotal"}->[$i]);
+ $nodiscount_sum += $form->parse_amount($myconfig, $form->{"nodiscount_linetotal"}->[$i]);
+
+ # don't parse par, we need it for each line
+ $_ = $par;
+ while (/<%(.*?)%>/) {
+ substr($_, $-[0], $+[0] - $-[0]) =
+ $self->format_string($form->{"$1"}->[$i]);
+ }
+ 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 ($form->{$_}) {
+ 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 ($form->{$_}) {
+ 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 ($form->{"$var"});
+
+ open(INC, $form->{templates} . "/$var")
+ or $form->error($self->cleanup . $form->{templates} . "/$var : $!");
+ unshift(@_, <INC>);
+ close(INC);
+
+ $form->{"$var"} = 1;
+
+ next;
+ }
+
+ while (/<%(.*?)%>/) {
+ substr($_, $-[0], $+[0] - $-[0]) = $self->format_string($form->{$1});
+ }
+ print OUT;
+ }
+
+ if ($form->{"format"} =~ /postscript/i) {
+ return $self->convert_to_postscript($two_passes);
+ } elsif ($form->{"format"} =~ /pdf/i) {
+ return $self->convert_to_pdf($two_passes);
+ } else {
+ return 1;
+ }
+}
+
+sub convert_to_postscript {
+ my ($self, $two_passes) = @_;
+ my ($form, $userspath) = ($self->{"form"}, $self->{"userspath"});
+
+ # Convert the tex file to postscript
+
+ if (!chdir("$userspath")) {
+ $self->{"error"} = "chdir : $!";
+ $self->cleanup();
+ return 0;
+ }
+
+ $form->{tmpfile} =~ s/$userspath\///g;
+
+ system("latex --interaction=nonstopmode $form->{tmpfile} " .
+ "> $form->{tmpfile}.err");
+ if ($?) {
+ $self->{"error"} = $form->cleanup();
+ $self->cleanup();
+ return 0;
+ }
+ if ($two_passes) {
+ system("latex --interaction=nonstopmode $form->{tmpfile} " .
+ "> $form->{tmpfile}.err");
+ if ($?) {
+ $self->{"error"} = $form->cleanup();
+ $self->cleanup();
+ return 0;
+ }
+ }
+
+ $form->{tmpfile} =~ s/tex$/dvi/;
+
+ system("dvips $form->{tmpfile} -o -q > /dev/null");
+ if ($?) {
+ $self->{"error"} = "dvips : $!";
+ $self->cleanup();
+ return 0;
+ }
+ $form->{tmpfile} =~ s/dvi$/ps/;
+
+ $self->cleanup();
+
+ return 1;
+}
+
+sub convert_to_pdf {
+ my ($self, $two_passes) = @_;
+ my ($form, $userspath) = ($self->{"form"}, $self->{"userspath"});
+
+ # Convert the tex file to PDF
+
+ if (!chdir("$userspath")) {
+ $self->{"error"} = "chdir : $!";
+ $self->cleanup();
+ return 0;
+ }
+
+ $form->{tmpfile} =~ s/$userspath\///g;
+
+ system("pdflatex --interaction=nonstopmode $form->{tmpfile} " .
+ "> $form->{tmpfile}.err");
+ if ($?) {
+ $self->{"error"} = $form->cleanup();
+ $self->cleanup();
+ return 0;
+ }
+
+ if ($two_passes) {
+ system("pdflatex --interaction=nonstopmode $form->{tmpfile} " .
+ "> $form->{tmpfile}.err");
+ if ($?) {
+ $self->{"error"} = $form->cleanup();
+ $self->cleanup();
+ return 0;
+ }
+ }
+
+ $form->{tmpfile} =~ s/tex$/pdf/;
+
+ $self->cleanup();
+}
+
+sub get_mime_type() {
+ my ($self) = @_;
+
+ if ($self->{"form"}->{"format"} =~ /postscript/i) {
+ return "application/postscript";
+ } else {
+ return "application/pdf";
+ }
+}
+
+sub uses_temp_file {
+ return 1;
+}
+
+
+####
+#### HTMLTemplate
+####
+
+package HTMLTemplate;
+
+use vars qw(@ISA);
+
+@ISA = qw(LaTeXTemplate);
+
+sub new {
+ my $type = shift;
+
+ return $type->SUPER::new(@_);
+}
+
+sub format_string {
+ my ($self, $variable) = @_;
+ my $form = $self->{"form"};
+
+ my %replace =
+ ('order' => ['<', '>', quotemeta("\n")],
+ '<' => '<',
+ '>' => '>',
+ quotemeta("\n") => '<br>',
+ );
+
+ map({ $variable =~ s/$_/$replace{$_}/g; } @{ $replace{"order"} });
+
+ # Allow some HTML markup to be converted into the output format's
+ # corresponding markup code, e.g. bold or italic.
+ my @markup_replace = ('b', 'i', 's', 'u');
+
+ foreach my $key (@markup_replace) {
+ $variable =~ s/\<(\/?)${key}\>/<$1${key}>/g;
+ }
+
+ return $variable;
+}
+
+sub get_mime_type() {
+ return "text/html";
+}
+
+sub uses_temp_file {
+ return 0;
+}
+
+
+
+####
+#### HTMLTemplate
+####
+
+package OpenDocumentTemplate;
+
+use vars qw(@ISA);
+
+use Cwd;
+# use File::Copy;
+# use File::Spec;
+# use File::Temp qw(:mktemp);
+use IO::File;
+
+@ISA = qw(SimpleTemplate);
+
+sub new {
+ my $type = shift;
+
+ $self = $type->SUPER::new(@_);
+
+ foreach my $module (qw(Archive::Zip Text::Iconv)) {
+ eval("use ${module};");
+ if ($@) {
+ $self->{"form"}->error("The Perl module '${module}' could not be " .
+ "loaded. Support for OpenDocument templates " .
+ "does not work without it. Please install your " .
+ "distribution's package or get the module from " .
+ "CPAN ( http://www.cpan.org ).");
+ }
+ }
+
+ $self->{"rnd"} = int(rand(1000000));
+ $self->{"iconv"} = Text::Iconv->new($main::dbcharset, "UTF-8");
+
+ return $self;
+}
+
+sub substitute_vars {
+ my ($self, $text, @indices) = @_;
+
+ my $form = $self->{"form"};
+
+ while ($text =~ /\<\%(.*?)\%\>/) {
+ my $value = $form->{$1};
+
+ for (my $i = 0; $i < scalar(@indices); $i++) {
+ last unless (ref($value) eq "ARRAY");
+ $value = $value->[$indices[$i]];
+ }
+ substr($text, $-[0], $+[0] - $-[0]) = $self->format_string($value);
+ }
+
+ return $text;
+}
+
+sub parse_foreach {
+ my ($self, $var, $text, $start_tag, $end_tag, @indices) = @_;
+
+ my ($form, $new_contents) = ($self->{"form"}, "");
+
+ my $ary = $form->{$var};
+ for (my $i = 0; $i < scalar(@indices); $i++) {
+ last unless (ref($ary) eq "ARRAY");
+ $ary = $ary->[$indices[$i]];
+ }
+
+ for (my $i = 0; $i < scalar(@{$ary}); $i++) {
+ my $new_text = $self->parse_block($text, (@indices, $i));
+ return undef unless (defined($new_text));
+ $new_contents .= $start_tag . $new_text . $end_tag;
+ }
+
+ return $new_contents;
+}
+
+sub parse_block {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $contents, @indices) = @_;
+
+ my $new_contents = "";
+
+ while ($contents ne "") {
+ if (substr($contents, 0, 1) eq "<") {
+ $contents =~ m|^<[^>]+>|;
+ my $tag = $&;
+ substr($contents, 0, length($&)) = "";
+
+ if ($tag =~ m|<table:table-row|) {
+ $contents =~ m|^(.*?)(</table:table-row[^>]*>)|;
+ my $table_row = $1;
+ my $end_tag = $2;
+ substr($contents, 0, length($1) + length($end_tag)) = "";
+
+ if ($table_row =~ m|\<\%foreachrow\s+(.*?)\%\>|) {
+ my $var = $1;
+
+ $table_row =~ s|\<\%foreachrow .*?\%\>||g;
+ $table_row =~ s!\<\%end(for|foreach)?row\s+${var}\%\>!!g;
+
+ my $new_text = $self->parse_foreach($var, $table_row, $tag, $end_tag, @indices);
+ return undef unless (defined($new_text));
+ $new_contents .= $new_text;
+
+ } else {
+ my $new_text = $self->parse_block($table_row, @indices);
+ return undef unless (defined($new_text));
+ $new_contents .= $tag . $new_text . $end_tag;
+ }
+
+ } else {
+ $new_contents .= $tag;
+ }
+
+ } else {
+ $contents =~ /^[^<]+/;
+ my $text = $&;
+
+ my $pos_if = index($text, '<%if');
+ my $pos_foreach = index($text, '<%foreach');
+
+ if ((-1 == $pos_if) && (-1 == $pos_foreach)) {
+ substr($contents, 0, length($text)) = "";
+ $new_contents .= $self->substitute_vars($text, @indices);
+ next;
+ }
+
+ if ((-1 == $pos_if) || ((-1 != $pos_foreach) && ($pos_if > $pos_foreach))) {
+ $new_contents .= $self->substitute_vars(substr($contents, 0, $pos_foreach), @indices);
+ substr($contents, 0, $pos_foreach) = "";
+
+ if ($contents !~ m|^\<\%foreach (.*?)\%\>|) {
+ $self->{"error"} = "Malformed <\%foreach\%>.";
+ $main::lxdebug->leave_sub();
+ return undef;
+ }
+
+ my $var = $1;
+
+ substr($contents, 0, length($&)) = "";
+
+ if ($contents !~ m!\<\%end\s*?(for)?\s+${var}\%\>!) {
+ $self->{"error"} = "Unclosed <\%foreach\%>.";
+ $main::lxdebug->leave_sub();
+ return undef;
+ }
+
+ substr($contents, 0, length($`) + length($&)) = "";
+ my $new_text = $self->parse_foreach($var, $`, "", "", @indices);
+ return undef unless (defined($new_text));
+ $new_contents .= $new_text;
+
+ } else {
+ $new_contents .= $self->substitute_vars(substr($contents, 0, $pos_if), @indices);
+ substr($contents, 0, $pos_if) = "";
+
+ if ($contents !~ m|^\<\%if(not)?\s+(.*?)\%\>|) {
+ $self->{"error"} = "Malformed <\%if\%>.";
+ $main::lxdebug->leave_sub();
+ return undef;
+ }
+
+ my ($not, $var) = ($1, $2);
+
+ substr($contents, 0, length($&)) = "";
+
+ if ($contents !~ m!\<\%endif${not}\s+${var}\%\>!) {
+ $self->{"error"} = "Unclosed <\%if${not}\%>.";
+ $main::lxdebug->leave_sub();
+ return undef;
+ }
+
+ substr($contents, 0, length($`) + length($&)) = "";
+
+ my $value = $self->{"form"}->{$var};
+ for (my $i = 0; $i < scalar(@indices); $i++) {
+ last unless (ref($value) eq "ARRAY");
+ $value = $value->[$indices[$i]];
+ }
+
+ if (($not && !$value) || (!$not && $value)) {
+ my $new_text = $self->parse_block($`, @indices);
+ return undef unless (defined($new_text));
+ $new_contents .= $new_text;
+ }
+ }
+ }
+ }
+
+ return $new_contents;
+}
+
+sub parse {
+ $main::lxdebug->enter_sub();
+
+ my $self = $_[0];
+ local *OUT = $_[1];
+ my $form = $self->{"form"};
+
+ close(OUT);
+
+ my $zip = Archive::Zip->new();
+ if (Archive::Zip::AZ_OK != $zip->read("$form->{templates}/$form->{IN}")) {
+ $self->{"error"} = "File not found/is not a OpenDocument file.";
+ $main::lxdebug->leave_sub();
+ return 0;
+ }
+
+ my $contents = $zip->contents("content.xml");
+ if (!$contents) {
+ $self->{"error"} = "File is not a OpenDocument file.";
+ $main::lxdebug->leave_sub();
+ return 0;
+ }
+
+ my $rnd = $self->{"rnd"};
+ my $new_styles = qq|<style:style style:name="TLXO${rnd}BOLD" style:family="text">
+<style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+</style:style>
+<style:style style:name="TLXO${rnd}ITALIC" style:family="text">
+<style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/>
+</style:style>
+<style:style style:name="TLXO${rnd}UNDERLINE" style:family="text">
+<style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color"/>
+</style:style>
+<style:style style:name="TLXO${rnd}STRIKETHROUGH" style:family="text">
+<style:text-properties style:text-line-through-style="solid"/>
+</style:style>|;
+
+ $contents =~ s|</office:automatic-styles>|${new_styles}</office:automatic-styles>|;
+ $contents =~ s|[\n\r]||gm;
+
+ my $new_contents = $self->parse_block($contents);
+ return 0 unless (defined($new_contents));
+
+# $new_contents =~ s|>|>\n|g;
+
+ $zip->contents("content.xml", $new_contents);
+ $zip->writeToFileNamed($form->{"tmpfile"}, 1);
+
+ my $res = 1;
+ if ($form->{"format"} =~ /pdf/) {
+ $res = $self->convert_to_pdf();
+ }
+
+ $main::lxdebug->leave_sub();
+ return $res;
+}
+
+sub convert_to_pdf {
+ my ($self) = @_;
+
+ my $form = $self->{"form"};
+
+ my $filename = $form->{"tmpfile"};
+ $filename =~ s/.odt$//;
+ if (substr($filename, 0, 1) ne "/") {
+ $filename = getcwd() . "/${filename}";
+ }
+
+ if (substr($self->{"userspath"}, 0, 1) eq "/") {
+ $ENV{'HOME'} = $self->{"userspath"};
+ } else {
+ $ENV{'HOME'} = getcwd() . "/" . $self->{"userspath"};
+ }
+
+ my @cmdline = ($main::xvfb_run_bin, $main::openofficeorg_writer_bin,
+ "-minimized", "-norestore", "-nologo", "-nolockcheck",
+ "-headless",
+ "file:${filename}.odt",
+ "macro://" . (split('/', $filename))[-1] .
+ "/Standard.Conversion.ConvertSelfToPDF()");
+
+ system(@cmdline);
+
+ my $res = $?;
+ if (0 == $?) {
+ $form->{"tmpfile"} =~ s/odt$/pdf/;
+
+ unlink($filename . ".odt");
+
+ $main::lxdebug->leave_sub();
+ return 1;
+
+ }
+
+ unlink($filename . ".odt", $filename . ".pdf");
+ $self->{"error"} = "Conversion from OpenDocument to PDF failed. " .
+ "Exit code: $res";
+
+ $main::lxdebug->leave_sub();
+ return 0;
+}
+
+sub format_string {
+ my ($self, $variable) = @_;
+ my $form = $self->{"form"};
+ my $iconv = $self->{"iconv"};
+
+ my %replace =
+ ('order' => ['<', '>', '"', "'",
+ '\x80', # Euro
+ quotemeta("\n"), quotemeta("\r"), '&'],
+ '<' => '<',
+ '>' => '>',
+ '"' => '"',
+ "'" => ''',
+ '&' => '"',
+ '\x80' => chr(0xa4), # Euro
+ quotemeta("\n") => '<text:line-break/>',
+ quotemeta("\r") => '',
+ );
+
+ map({ $variable =~ s/$_/$replace{$_}/g; } @{ $replace{"order"} });
+
+ # Allow some HTML markup to be converted into the output format's
+ # corresponding markup code, e.g. bold or italic.
+ my $rnd = $self->{"rnd"};
+ my %markup_replace = ("b" => "BOLD", "i" => "ITALIC", "s" => "STRIKETHROUGH",
+ "u" => "UNDERLINE");
+
+ foreach my $key (keys(%markup_replace)) {
+ my $value = $markup_replace{$key};
+ $variable =~ s|\<${key}\>|<text:span text:style-name=\"TLXO${rnd}${value}\">|g;
+ $variable =~ s|\</${key}\>|</text:span>|g;
+ }
+
+ return $iconv->convert($variable);
+}
+
+sub get_mime_type() {
+ if ($self->{"form"}->{"format"} =~ /pdf/) {
+ return "application/pdf";
+ } else {
+ return "application/vnd.oasis.opendocument.text";
+ }
+}
+
+sub uses_temp_file {
+ return 1;
+}
+
+1;
AND ac.project_id = $form->{project_id}
|;
}
-#########################################
-# Method eq 'cash' = IST Versteuerung
-#########################################
- if ($form->{method} eq 'cash') {
+ if ($form->{method} eq 'cash') {
$query = qq|
+
SELECT
- -- Alle tatsaechlichen Zahlungseingaenge
- -- im Voranmeldezeitraum erfassen
- -- (Teilzahlungen werden prozentual auf verschiedene Steuern aufgeteilt)
- SUM( ac.amount *
+ SUM( ac.amount *
-- Bezahlt / Rechnungssumme
(
SELECT SUM(acc.amount)
-- Here no where, please. All Transactions ever should be
-- testet if they are paied in the USTVA report period.
GROUP BY c.pos_ustva
+ 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_amount%'
+ $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
- UNION -- alle Ausgaben AP erfassen
+ |;
- 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
- AND c.link LIKE '%AP_amount%'
- $dpt_where
- $project
- GROUP BY c.$category
-
- UNION -- alle Ausgaben und Einnahmen direkter gl Buchungen erfassen
-
- SELECT sum
- (
- CASE WHEN c.link LIKE '%AR%' THEN ac.amount * -1
- WHEN c.link LIKE '%AP%' THEN ac.amount * 1
- END
- ) 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
- $dpt_from
- AND NOT (c.link = 'AR' OR c.link = 'AP')
- $project
- GROUP BY c.$category
- |;
-
- } else {
-#########################################
-# Method eq 'accrual' = Soll Versteuerung
-#########################################
+ 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|
}
$query = qq|
- SELECT sum
- (
- CASE WHEN c.link LIKE '%AR%' THEN ac.amount * -1
- WHEN c.link LIKE '%AP%' THEN ac.amount * 1
- END
- ) 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
- |;
+
+ 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;
- # Show all $query in Debuglevel LXDebug::QUERY
- $callingdetails = (caller (0))[3];
- $main::lxdebug->message(LXDebug::QUERY, "$callingdetails \$query=\n $query");
-
+ #print $query;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-# Bug 365 solved?!
-# if ($ref->{amount} < 0) {
+ if ($ref->{amount} < 0) {
$ref->{amount} *= -1;
-# }
+ }
if ($category eq "pos_bwa") {
if ($last_period) {
$form->{ $ref->{$category} }{kumm} += $ref->{amount};
}
$myconfig->{vclimit} = 200;
+ $myconfig->{"countrycode"} = "de";
+ $myconfig->{"numberformat"} = "1000,00";
+ $myconfig->{"dateformat"} = "dd.mm.yy";
+
&form_header;
&form_footer;
closedir TEMPLATEDIR;
@allhtml = sort grep /\.html/, @all;
- @alldir = grep !/\.(html|tex)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt)$/, @all;
@alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq|<option>$item\n|;
+ my $selected = $item eq "German" ? " selected" : "";
+ $mastertemplates .= qq|<option$selected>$item\n|;
$lastitem = $item;
}
}
# copy templates to the directory
opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
- @templates = grep /$form->{mastertemplates}.*?\.(html|tex)$/,
+ @templates = grep /$form->{mastertemplates}.*?\.(html|tex|sty)$/,
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
use SL::Form;
use SL::User;
+use Data::Dumper;
+
1;
# end of main
<input type=hidden name=selecttaxkey value="$form->{selecttaxkey}">
</tr>|;
+ #print(STDERR Dumper($form->{NEWACCOUNT}));
+ if (@{ $form->{NEWACCOUNT} }) {
+ if (!$form->{new_chart_valid}) {
+ $form->{selectnewaccount} = "<option value=></option>";
+ }
+ foreach $item (@{ $form->{NEWACCOUNT} }) {
+ if ($item->{id} == $form->{new_chart_id}) {
+ $form->{selectnewaccount} .=
+ "<option value=$item->{id} selected>$item->{accno}--$item->{description}</option>";
+ } elsif (!$form->{new_chart_valid}) {
+ $form->{selectnewaccount} .=
+ "<option value=$item->{id}>$item->{accno}--$item->{description}</option>";
+ }
+
+ }
+ }
+
+ $newaccount = qq|
+ <tr>
+ <td colspan=2>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Folgekonto') . qq|</th>
+ <td><select name=new_chart_id>$form->{selectnewaccount}</select></td>
+ <th align=right>| . $locale->text('Gültig ab') . qq|</th>
+ <td><input name=valid_from value="$form->{valid_from}"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>|;
+
$form->{selectustva} = "<option>\n";
%ustva = (35 => $locale->text('UStVA-Nr. 35'),
<input type=hidden name=selectbwa value="$form->{selectbwa}">
</tr>|;
-# Entfernt bis es ordentlich umgesetzt wird (hli) 30.03.2006
-# $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>|;
+ $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->{type} = "account";
$form->header;
<input type=hidden name=id value=$form->{id}>
<input type=hidden name=type value=account>
+<input type=hidden name=orphaned value=$form->{orphaned}>
+<input type=hidden name=new_chart_valid value=$form->{new_chart_valid}>
<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 value=$form->{fxgain_accno_id}>
-<input type=hidden name=fxloss_accno_id value=$form->{fxloss_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>
. $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_}> |
<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('Expense') . qq|\n<br>
+ . $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>
</table>
</td>
</tr>
+ $newaccount
<tr>
<td><hr size=3 noshade></td>
</tr>
<input type=hidden name=login value=$form->{login}>
<input type=hidden name=password value=$form->{password}>
-<br>
+<br>|;
+#print(STDERR "$form->{type} TYPE $form->{new_chart_valid} CHART_VALID\n");
+ if ((!$form->{id}) || ($form->{id} && $form->{orphaned}) || (($form->{type} eq "account") && (!$form->{new_chart_valid}))) {
+ print qq|
<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="|
$lxdebug->leave_sub();
}
-sub add_sic {
+sub add_language {
$lxdebug->enter_sub();
$form->{title} = "Add";
$form->{callback} =
- "$form->{script}?action=add_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add_language&path=$form->{path}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
- &sic_header;
+ &language_header;
&form_footer;
$lxdebug->leave_sub();
}
-sub edit_sic {
+sub edit_language {
$lxdebug->enter_sub();
$form->{title} = "Edit";
- AM->get_sic(\%myconfig, \%$form);
+ AM->get_language(\%myconfig, \%$form);
- &sic_header;
+ &language_header;
$form->{orphaned} = 1;
&form_footer;
$lxdebug->leave_sub();
}
-sub list_sic {
+sub list_language {
$lxdebug->enter_sub();
- AM->sic(\%myconfig, \%$form);
+ AM->language(\%myconfig, \%$form);
$form->{callback} =
- "$form->{script}?action=list_sic&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+ "$form->{script}?action=list_language&path=$form->{path}&login=$form->{login}&password=$form->{password}";
$callback = $form->escape($form->{callback});
- $form->{title} = $locale->text('Standard Industrial Codes');
+ $form->{title} = $locale->text('Languages');
- @column_index = qw(code description);
+ @column_index = qw(description template_code article_code);
- $column_header{code} =
- qq|<th class=listheading>| . $locale->text('Code') . qq|</th>|;
$column_header{description} =
- qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
+ qq|<th class=listheading width=60%>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_header{template_code} =
+ qq|<th class=listheading width=10%>|
+ . $locale->text('Template Code')
+ . qq|</th>|;
+ $column_header{article_code} =
+ qq|<th class=listheading>|
+ . $locale->text('Article Code')
+ . qq|</th>|;
$form->header;
$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|
+ 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>|;
- }
+ $column_data{description} =
+ qq|<td><a href=$form->{script}?action=edit_language&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
+ $column_data{template_code} = qq|<td align=right>$ref->{template_code}</td>|;
+ $column_data{article_code} =
+ qq|<td align=right>$ref->{article_code}</td>|;
map { print "$column_data{$_}\n" } @column_index;
<input name=callback type=hidden value="$form->{callback}">
-<input type=hidden name=type value=sic>
+<input type=hidden name=type value=language>
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=login value=$form->{login}>
}
print qq|
+
</form>
</body>
$lxdebug->leave_sub();
}
-sub sic_header {
+sub language_header {
$lxdebug->enter_sub();
- $form->{title} = $locale->text("$form->{title} SIC");
+ $form->{title} = $locale->text("$form->{title} Language");
- # $locale->text('Add SIC')
- # $locale->text('Edit SIC')
+ # $locale->text('Add Language')
+ # $locale->text('Edit Language')
- $form->{code} =~ s/\"/"/g;
$form->{description} =~ s/\"/"/g;
+ $form->{template_code} =~ s/\"/"/g;
+ $form->{article_code} =~ s/\"/"/g;
- $checked = ($form->{sictype} eq 'H') ? "checked" : "";
$form->header;
<form method=post action=$form->{script}>
-<input type=hidden name=type value=sic>
-<input type=hidden name=id value=$form->{code}>
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=type value=language>
<table width=100%>
<tr>
</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>
+ <th align=right>| . $locale->text('Language') . qq|</th>
+ <td><input name=description size=30 value="$form->{description}"></td>
<tr>
- <td></td>
- <th align=left><input name=sictype type=checkbox style=checkbox value="H" $checked> |
- . $locale->text('Heading') . qq|</th>
<tr>
+ <th align=right>| . $locale->text('Template Code') . qq|</th>
+ <td><input name=template_code size=5 value=$form->{template_code}></td>
+ </tr>
<tr>
- <th align=right>| . $locale->text('Description') . qq|</th>
- <td><input name=description size=60 value="$form->{description}"></td>
+ <th align=right>| . $locale->text('Article Code') . qq|</th>
+ <td><input name=article_code size=10 value=$form->{article_code}></td>
</tr>
- <td colspan=2><hr size=3 noshade></td>
+ <td colspan=2><hr size=3 noshade></td>
</tr>
</table>
|;
$lxdebug->leave_sub();
}
-sub save_sic {
+sub save_language {
$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!'));
+ $form->isblank("description", $locale->text('Language missing!'));
+ $form->isblank("template_code", $locale->text('Template Code missing!'));
+ $form->isblank("article_code", $locale->text('Article Code missing!'));
+ AM->save_language(\%myconfig, \%$form);
+ $form->redirect($locale->text('Language saved!'));
$lxdebug->leave_sub();
}
-sub delete_sic {
+sub delete_language {
$lxdebug->enter_sub();
- AM->delete_sic(\%myconfig, \%$form);
- $form->redirect($locale->text('SIC deleted!'));
+ AM->delete_language(\%myconfig, \%$form);
+ $form->redirect($locale->text('Language deleted!'));
$lxdebug->leave_sub();
}
-sub display_stylesheet {
+
+sub add_buchungsgruppe {
$lxdebug->enter_sub();
- $form->{file} = "css/$myconfig{stylesheet}";
- &display_form;
+ # $locale->text("Add Buchungsgruppe")
+ # $locale->text("Edit Buchungsgruppe")
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+ AM->get_buchungsgruppe(\%myconfig, \%$form);
+
+ &buchungsgruppe_header;
+ &form_footer;
$lxdebug->leave_sub();
}
-sub display_form {
+sub edit_buchungsgruppe {
$lxdebug->enter_sub();
- $form->{file} =~ s/^(.:)*?\/|\.\.\///g;
- $form->{file} =~ s/^\/*//g;
- $form->{file} =~ s/$userspath//;
-
- $form->error("$!: $form->{file}") unless -f $form->{file};
+ $form->{title} = "Edit";
- AM->load_template(\%$form);
+ AM->get_buchungsgruppe(\%myconfig, \%$form);
- $form->{title} = $form->{file};
+ &buchungsgruppe_header;
- # if it is anything but html
- if ($form->{file} !~ /\.html$/) {
- $form->{body} = "<pre>\n$form->{body}\n</pre>";
- }
+ &form_footer;
- $form->header;
+ $lxdebug->leave_sub();
+}
- print qq|
-<body>
+sub list_buchungsgruppe {
+ $lxdebug->enter_sub();
-$form->{body}
+ AM->buchungsgruppe(\%myconfig, \%$form);
-<form method=post action=$form->{script}>
+ $form->{callback} =
+ "$form->{script}?action=list_buchungsgruppe&path=$form->{path}&login=$form->{login}&password=$form->{password}";
-<input name=file type=hidden value=$form->{file}>
-<input name=type type=hidden value=template>
+ $callback = $form->escape($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->{title} = $locale->text('Buchungsgruppen');
-<input name=action type=submit class=submit value="|
- . $locale->text('Edit') . qq|">|;
+ @column_index = qw(description inventory_accno income_accno_0 expense_accno_0 income_accno_1 expense_accno_1 income_accno_2 expense_accno_2 income_accno_3 expense_accno_3 );
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
+ $column_header{description} =
+ qq|<th class=listheading width=60%>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_header{inventory_accno} =
+ qq|<th class=listheading width=10%>|
+ . $locale->text('Bestandskonto')
+ . qq|</th>|;
+ $column_header{income_accno_0} =
+ qq|<th class=listheading>|
+ . $locale->text('Erlöse Inland')
+ . qq|</th>|;
+ $column_header{expense_accno_0} =
+ qq|<th class=listheading>|
+ . $locale->text('Aufwand Inland')
+ . qq|</th>|;
+ $column_header{income_accno_1} =
+ qq|<th class=listheading>|
+ . $locale->text('Erlöse EU o. UStId')
+ . qq|</th>|;
+ $column_header{expense_accno_1} =
+ qq|<th class=listheading>|
+ . $locale->text('Aufwand EU o. UStId')
+ . qq|</th>|;
+ $column_header{income_accno_2} =
+ qq|<th class=listheading>|
+ . $locale->text('Erlöse EU m. UStId')
+ . qq|</th>|;
+ $column_header{expense_accno_2} =
+ qq|<th class=listheading>|
+ . $locale->text('Aufwand EU m. UStId')
+ . qq|</th>|;
+ $column_header{income_accno_3} =
+ qq|<th class=listheading>|
+ . $locale->text('Erlöse Ausland')
+ . qq|</th>|;
+ $column_header{expense_accno_3} =
+ qq|<th class=listheading>|
+ . $locale->text('Aufwand Ausland')
+ . qq|</th>|;
+ $form->header;
print qq|
- </form>
+<body>
-</body>
-</html>
+<table width=100%>
+ <tr>
+ <th class=listtop>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
|;
- $lxdebug->leave_sub();
-}
+ map { print "$column_header{$_}\n" } @column_index;
-sub edit_template {
- $lxdebug->enter_sub();
+ print qq|
+ </tr>
+|;
- AM->load_template(\%$form);
+ foreach $ref (@{ $form->{ALL} }) {
- $form->{title} = $locale->text('Edit Template');
+ $i++;
+ $i %= 2;
- # convert   to &nbsp;
- $form->{body} =~ s/ /&nbsp;/gi;
+ print qq|
+ <tr valign=top class=listrow$i>
+|;
- $form->header;
+
+ $column_data{description} =
+ qq|<td><a href=$form->{script}?action=edit_buchungsgruppe&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
+ $column_data{inventory_accno} = qq|<td align=right>$ref->{inventory_accno}</td>|;
+ $column_data{income_accno_0} =
+ qq|<td align=right>$ref->{income_accno_0}</td>|;
+ $column_data{expense_accno_0} = qq|<td align=right>$ref->{expense_accno_0}</td>|;
+ $column_data{income_accno_1} =
+ qq|<td align=right>$ref->{income_accno_1}</td>|;
+ $column_data{expense_accno_1} = qq|<td align=right>$ref->{expense_accno_1}</td>|;
+ $column_data{income_accno_2} =
+ qq|<td align=right>$ref->{income_accno_2}</td>|;
+ $column_data{expense_accno_2} = qq|<td align=right>$ref->{expense_accno_2}</td>|;
+ $column_data{income_accno_3} =
+ qq|<td align=right>$ref->{income_accno_3}</td>|;
+ $column_data{expense_accno_3} = qq|<td align=right>$ref->{expense_accno_3}</td>|;
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
print qq|
-<body>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+<br>
<form method=post action=$form->{script}>
-<input name=file type=hidden value=$form->{file}>
-<input name=type type=hidden value=template>
+<input name=callback type=hidden value="$form->{callback}">
+
+<input type=hidden name=type value=buchungsgruppe>
<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|">|;
+<input class=submit type=submit name=action value="|
+ . $locale->text('Add') . qq|">|;
if ($form->{menubar}) {
require "$form->{path}/menu.pl";
&menubar;
}
- print q|
- </form>
+ print qq|
+ </form>
-</body>
-</html>
+ </body>
+ </html>
|;
$lxdebug->leave_sub();
}
-sub save_template {
+sub buchungsgruppe_header {
$lxdebug->enter_sub();
- AM->save_template(\%$form);
- $form->redirect($locale->text('Template saved!'));
+ $form->{title} = $locale->text("$form->{title} Buchungsgruppe");
- $lxdebug->leave_sub();
-}
+ # $locale->text('Buchungsgruppe hinzufügen')
+ # $locale->text('Buchungsgruppe bearbeiten')
-sub config {
- $lxdebug->enter_sub();
+ $form->{description} =~ s/\"/"/g;
- # get defaults for account numbers and last numbers
- AM->defaultaccounts(\%myconfig, \%$form);
+ # 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 {
- 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";
- }
+ $form->{"select$key"} .=
+ "<option value=$ref->{id} $ref->{selected}>$ref->{accno}--$ref->{description}\n";
+ if (($key eq "IC") && ($ref->{selected} eq "selected")) {
+ $form->{IC_default} = $ref->{id};
+ }
+ if ($form->{amount}{$key} eq $ref->{accno}) {
+ $form->{$key} = "$ref->{accno}--$ref->{description}";
+ }
- 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";
+ }
+ }
+ }
+ $form->{selectIC_income} = $form->{selectIC_sale};
+ $form->{selectIC_expense} = $form->{selectIC_cogs};
+ $form->{IC_income} = $form->{IC_sale};
+ $form->{IC_expense} = $form->{IC_cogs};
+
+ if ($form->{id}) {
+ $form->{selectIC} =~ s/selected//g;
+ $form->{selectIC} =~ s/ value=\$form->{inventory_accno_id}/ value=\$form->{inventory_accno_id} selected/;
+ $form->{selectIC_income} =~ s/selected//g;
+ $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_0}/ value=$form->{income_accno_id_0} selected/;
+ $form->{selectIC_expense} =~ s/selected//g;
+ $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_0}/ value=$form->{expense_accno_id_0} selected/;
+ }
+
+ if (!$eur) {
+ $linkaccounts = qq|
+ <tr>
+ <th align=right>| . $locale->text('Inventory') . qq|</th>
+ <td><select name=inventory_accno_id>$form->{selectIC}</select></td>
+ <input name=selectIC type=hidden value="$form->{selectIC}">
+ </tr>|;
+ } else {
+ $linkaccounts = qq|
+ <input type=hidden name=inventory_accno_id value=1>|;
+ }
+
+
+ $linkaccounts .= qq|
+ <tr>
+ <th align=right>| . $locale->text('Erlöse Inland') . qq|</th>
+ <td><select name=income_accno_id_0>$form->{selectIC_income}</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Aufwand Inland') . qq|</th>
+ <td><select name=expense_accno_id_0>$form->{selectIC_expense}</select></td>
+ </tr>|;
+ if ($form->{id}) {
+ $form->{selectIC_income} =~ s/selected//g;
+ $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_1}/ value=$form->{income_accno_id_1} selected/;
+ $form->{selectIC_expense} =~ s/selected//g;
+ $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_1}/ value=$form->{expense_accno_id_1} selected/;
+ }
+ $linkaccounts .= qq| <tr>
+ <th align=right>| . $locale->text('Erlöse EU m. UStId') . qq|</th>
+ <td><select name=income_accno_id_1>$form->{selectIC_income}</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Aufwand EU m UStId') . qq|</th>
+ <td><select name=expense_accno_id_1>$form->{selectIC_expense}</select></td>
+ </tr>|;
+
+ if ($form->{id}) {
+ $form->{selectIC_income} =~ s/selected//g;
+ $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_2}/ value=$form->{income_accno_id_2} selected/;
+ $form->{selectIC_expense} =~ s/selected//g;
+ $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_2}/ value=$form->{expense_accno_id_2} selected/;
+ }
+
+ $linkaccounts .= qq| <tr>
+ <th align=right>| . $locale->text('Erlöse EU o. UStId') . qq|</th>
+ <td><select name=income_accno_id_2>$form->{selectIC_income}</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Aufwand EU o. UStId') . qq|</th>
+ <td><select name=expense_accno_id_2>$form->{selectIC_expense}</select></td>
+ </tr>|;
+
+ if ($form->{id}) {
+ $form->{selectIC_income} =~ s/selected//g;
+ $form->{selectIC_income} =~ s/ value=$form->{income_accno_id_3}/ value=$form->{income_accno_id_3} selected/;
+ $form->{selectIC_expense} =~ s/selected//g;
+ $form->{selectIC_expense} =~ s/ value=$form->{expense_accno_id_3}/ value=$form->{expense_accno_id_3} selected/;
+ }
+
+ $linkaccounts .= qq| <tr>
+ <th align=right>| . $locale->text('Erlöse Ausland') . qq|</th>
+ <td><select name=income_accno_id_3>$form->{selectIC_income}</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Aufwand Ausland') . qq|</th>
+ <td><select name=expense_accno_id_3>$form->{selectIC_expense}</select></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=buchungsgruppe>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Buchungsgruppe') . qq|</th>
+ <td><input name=description size=30 value="$form->{description}"></td>
+ <tr>
+ $linkaccounts
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_buchungsgruppe {
+ $lxdebug->enter_sub();
+
+ $form->isblank("description", $locale->text('Description missing!'));
+
+ AM->save_buchungsgruppe(\%myconfig, \%$form);
+ $form->redirect($locale->text('Buchungsgruppe gespeichert!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_buchungsgruppe {
+ $lxdebug->enter_sub();
+
+ AM->delete_buchungsgruppe(\%myconfig, \%$form);
+ $form->redirect($locale->text('Buchungsgruppe gelöscht!'));
+
+ $lxdebug->leave_sub();
+}
+
+
+sub add_printer {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &printer_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_printer {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_printer(\%myconfig, \%$form);
+
+ &printer_header;
+
+ $form->{orphaned} = 1;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_printer {
+ $lxdebug->enter_sub();
+
+ AM->printer(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_printer&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Printer');
+
+ @column_index = qw(printer_description printer_command template_code);
+
+ $column_header{printer_description} =
+ qq|<th class=listheading width=60%>|
+ . $locale->text('Printer Description')
+ . qq|</th>|;
+ $column_header{printer_command} =
+ qq|<th class=listheading width=10%>|
+ . $locale->text('Printer Command')
+ . qq|</th>|;
+ $column_header{template_code} =
+ qq|<th class=listheading>|
+ . $locale->text('Template Code')
+ . 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{printer_description} =
+ qq|<td><a href=$form->{script}?action=edit_printer&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{printer_description}</td>|;
+ $column_data{printer_command} = qq|<td align=right>$ref->{printer_command}</td>|;
+ $column_data{template_code} =
+ qq|<td align=right>$ref->{template_code}</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=printer>
+
+<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 printer_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Printer");
+
+ # $locale->text('Add Printer')
+ # $locale->text('Edit Printer')
+
+ $form->{printer_description} =~ s/\"/"/g;
+ $form->{template_code} =~ s/\"/"/g;
+ $form->{printer_command} =~ 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=printer>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('Printer') . qq|</th>
+ <td><input name=printer_description size=30 value="$form->{printer_description}"></td>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('Printer Command') . qq|</th>
+ <td><input name=printer_command size=30 value="$form->{printer_command}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Template Code') . qq|</th>
+ <td><input name=template_code size=5 value="$form->{template_code}"></td>
+ </tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_printer {
+ $lxdebug->enter_sub();
+
+ $form->isblank("printer_description", $locale->text('Description missing!'));
+ $form->isblank("printer_command", $locale->text('Printer Command missing!'));
+ AM->save_printer(\%myconfig, \%$form);
+ $form->redirect($locale->text('Printer saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_printer {
+ $lxdebug->enter_sub();
+
+ AM->delete_printer(\%myconfig, \%$form);
+ $form->redirect($locale->text('Printer deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+
+sub add_adr {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_adr&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &adr_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_adr {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_adr(\%myconfig, \%$form);
+
+ &adr_header;
+
+ $form->{orphaned} = 1;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_adr {
+ $lxdebug->enter_sub();
+
+ AM->adr(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_adr&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('ADR');
+
+ @column_index = qw(adr_code adr_description);
+
+ $column_header{adr_description} =
+ qq|<th class=listheading width=60%>|
+ . $locale->text('ADR Description')
+ . qq|</th>|;
+ $column_header{adr_code} =
+ qq|<th class=listheading width=10%>|
+ . $locale->text('ADR Code')
+ . 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{adr_code} =
+ qq|<td><a href=$form->{script}?action=edit_adr&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{adr_code}</td>|;
+ $column_data{adr_description} = qq|<td align=left>$ref->{adr_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=adr>
+
+<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 adr_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} ADR");
+
+ # $locale->text('Add ADR')
+ # $locale->text('Edit ADR')
+
+ $form->{adr_description} =~ s/\"/"/g;
+ $form->{adr_code} =~ 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=adr>
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=2>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>
+ <th align=right>| . $locale->text('ADR Code') . qq|</th>
+ <td><input name=adr_code size=30 value="$form->{adr_code}"></td>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('ADR Description') . qq|</th>
+ <td><input name=adr_description size=60 value="$form->{adr_description}"></td>
+ </tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_adr {
+ $lxdebug->enter_sub();
+
+ $form->isblank("adr_description", $locale->text('ADR Description missing!'));
+ $form->isblank("adr_code", $locale->text('ADR Code missing!'));
+ AM->save_adr(\%myconfig, \%$form);
+ $form->redirect($locale->text('ADR saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+
+sub delete_adr {
+ $lxdebug->enter_sub();
+
+ AM->delete_adr(\%myconfig, \%$form);
+ $form->redirect($locale->text('ADR deleted!'));
+
+ $lxdebug->leave_sub();
+}
+
+
+sub add_payment {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Add";
+
+ $form->{callback} =
+ "$form->{script}?action=add_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &payment_header;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit_payment {
+ $lxdebug->enter_sub();
+
+ $form->{title} = "Edit";
+
+ AM->get_payment(\%myconfig, \%$form);
+
+ &payment_header;
+
+ $form->{orphaned} = 1;
+ &form_footer;
+
+ $lxdebug->leave_sub();
+}
+
+sub list_payment {
+ $lxdebug->enter_sub();
+
+ AM->payment(\%myconfig, \%$form);
+
+ $form->{callback} =
+ "$form->{script}?action=list_payment&path=$form->{path}&login=$form->{login}&password=$form->{password}";
+
+ $callback = $form->escape($form->{callback});
+
+ $form->{title} = $locale->text('Payment Terms');
+
+ @column_index = qw(description description_long terms_netto terms_skonto percent_skonto);
+
+ $column_header{description} =
+ qq|<th class=listheading>|
+ . $locale->text('Description')
+ . qq|</th>|;
+ $column_header{description_long} =
+ qq|<th class=listheading>|
+ . $locale->text('Long Description')
+ . qq|</th>|;
+ $column_header{terms_netto} =
+ qq|<th class=listheading>|
+ . $locale->text('Netto Terms')
+ . qq|</th>|;
+ $column_header{terms_skonto} =
+ qq|<th class=listheading>|
+ . $locale->text('Skonto Terms')
+ . qq|</th>|;
+ $column_header{percent_skonto} =
+ qq|<th class=listheading>|
+ . $locale->text('Skonto')
+ . 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_payment&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
+ $column_data{description_long} = qq|<td align=right>$ref->{description_long}</td>|;
+ $column_data{terms_netto} =
+ qq|<td align=right>$ref->{terms_netto}</td>|;
+ $column_data{terms_skonto} =
+ qq|<td align=right>$ref->{terms_skonto}</td>|;
+ $column_data{percent_skonto} =
+ qq|<td align=right>$ref->{percent_skonto} %</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 payment_header {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text("$form->{title} Payment Terms");
+
+ # $locale->text('Add Payment Terms')
+ # $locale->text('Edit Payment Terms')
+
+ $form->{description} =~ 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=payment>
+
+<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><input name=description size=30 value="$form->{description}"></td>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('Ranking') . qq|</th>
+ <td><input name=ranking size=30 value="$form->{ranking}"></td>
+ <tr>
+ <tr>
+ <th align=right>| . $locale->text('Long Description') . qq|</th>
+ <td><input name=description_long size=50 value="$form->{description_long}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Netto Terms') . qq|</th>
+ <td><input name=terms_netto size=10 value="$form->{terms_netto}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Skonto Terms') . qq|</th>
+ <td><input name=terms_skonto size=10 value="$form->{terms_skonto}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Skonto') . qq| %</th>
+ <td><input name=percent_skonto size=10 value="$form->{percent_skonto}"></td>
+ </tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+</table>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub save_payment {
+ $lxdebug->enter_sub();
+
+ $form->isblank("description", $locale->text('Language missing!'));
+ AM->save_payment(\%myconfig, \%$form);
+ $form->redirect($locale->text('Payment Terms saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub delete_payment {
+ $lxdebug->enter_sub();
+
+ AM->delete_payment(\%myconfig, \%$form);
+ $form->redirect($locale->text('Payment terms 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)) {
</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>
+ . $locale->text('Last Credit Note Number') . qq|</th>
+ <td><input name=cnnumber size=10 value=$form->{defaults}{cnnumber}></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 Sales Order Number') . qq|</th>
+ <td><input name=sonumber size=10 value=$form->{defaults}{sonumber}></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>|
$lxdebug->leave_sub();
}
+
+sub edit_units {
+ $lxdebug->enter_sub();
+
+ $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}, "resolved_");
+ AM->units_in_use(\%myconfig, $form, $units);
+ map({ $units->{$_}->{"BASE_UNIT_DDBOX"} = AM->unit_select_data($units, $units->{$_}->{"base_unit"}, 1); } keys(%{$units}));
+
+ @unit_list = ();
+ foreach $name (sort({ lc($a) cmp lc($b) } grep({ !$units->{$_}->{"base_unit"} } keys(%{$units})))) {
+ map({ push(@unit_list, $units->{$_}); }
+ sort({ ($units->{$a}->{"resolved_factor"} * 1) <=> ($units->{$b}->{"resolved_factor"} * 1) }
+ grep({ $units->{$_}->{"resolved_base_unit"} eq $name } keys(%{$units}))));
+ }
+ map({ $_->{"factor"} = $form->format_amount(\%myconfig, $_->{"factor"}, 5) if ($_->{"factor"}); } @unit_list);
+
+ $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"});
+ $ddbox = AM->unit_select_data($units, undef, 1);
+
+ $form->{"title"} = sprintf($locale->text("Add and edit %s"), $form->{"unit_type"} eq "dimension" ? $locale->text("dimension units") : $locale->text("service units"));
+ $form->header();
+ print($form->parse_html_template("am/edit_units", { "UNITS" => \@unit_list, "NEW_BASE_UNIT_DDBOX" => $ddbox }));
+
+ $lxdebug->leave_sub();
+}
+
+sub add_unit {
+ $lxdebug->enter_sub();
+
+ $form->isblank("new_name", $locale->text("The name is missing."));
+ $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"});
+ $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($units->{$form->{"new_name"}});
+
+ my ($base_unit, $factor);
+ if ($form->{"new_base_unit"}) {
+ $form->show_generic_error($locale->text("The base unit does not exist.")) unless (defined($units->{$form->{"new_base_unit"}}));
+
+ $form->isblank("new_factor", $locale->text("The factor is missing."));
+ $factor = $form->parse_amount(\%myconfig, $form->{"new_factor"});
+ $form->show_generic_error($locale->text("The factor is missing.")) unless ($factor);
+ $base_unit = $form->{"new_base_unit"};
+ }
+
+ AM->add_unit(\%myconfig, $form, $form->{"new_name"}, $base_unit, $factor, $form->{"unit_type"});
+
+ $form->{"saved_message"} = $locale->text("The unit has been saved.");
+
+ edit_units();
+
+ $lxdebug->leave_sub();
+}
+
+sub save_unit {
+ $lxdebug->enter_sub();
+
+ $old_units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}, "resolved_");
+ AM->units_in_use(\%myconfig, $form, $old_units);
+
+ $new_units = {};
+ @delete_units = ();
+ foreach $i (1..($form->{"rowcount"} * 1)) {
+ $old_unit = $old_units->{$form->{"old_name_$i"}};
+ if (!$old_unit) {
+ $form->show_generic_error(sprintf($locale->text("The unit in row %d has been deleted in the meantime."), $i));
+ }
+
+ if ($form->{"unchangeable_$i"}) {
+ $new_units->{$form->{"old_name_$i"}} = $old_units->{$form->{"old_name_$i"}};
+ $new_units->{$form->{"old_name_$i"}}->{"unchanged_unit"} = 1;
+ next;
+ }
+
+ if ($old_unit->{"in_use"}) {
+ $form->show_generic_error(sprintf($locale->text("The unit in row %d has been used in the meantime and cannot be changed anymore."), $i));
+ }
+
+ if ($form->{"delete_$i"}) {
+ push(@delete_units, $old_unit->{"name"});
+ next;
+ }
+
+ $form->isblank("name_$i", sprintf($locale->text("The name is missing in row %d."), $i));
+
+ $form->show_generic_error(sprintf($locale->text("The name in row %d has already been used before."), $i)) if ($new_units->{$form->{"name_$i"}});
+ my %h = map({ $_ => $form->{"${_}_$i"} } qw(name base_unit factor old_name));
+ $new_units->{$form->{"name_$i"}} = \%h;
+ $new_units->{$form->{"name_$i"}}->{"row"} = $i;
+ }
+
+ foreach $unit (values(%{$new_units})) {
+ next unless ($unit->{"old_name"});
+ if ($unit->{"base_unit"}) {
+ $form->show_generic_error(sprintf($locale->text("The base unit does not exist or it is about to be deleted in row %d."), $unit->{"row"}))
+ unless (defined($new_units->{$unit->{"base_unit"}}));
+ $unit->{"factor"} = $form->parse_amount(\%myconfig, $unit->{"factor"});
+ $form->show_generic_error(sprintf($locale->text("The factor is missing in row %d."), $unit->{"row"})) unless ($unit->{"factor"} >= 1.0);
+ } else {
+ $unit->{"base_unit"} = undef;
+ $unit->{"factor"} = undef;
+ }
+ }
+
+ foreach $unit (values(%{$new_units})) {
+ next if ($unit->{"unchanged_unit"});
+
+ map({ $_->{"seen"} = 0; } values(%{$new_units}));
+ $new_unit = $unit;
+ while ($new_unit->{"base_unit"}) {
+ $new_unit->{"seen"} = 1;
+ $new_unit = $new_units->{$new_unit->{"base_unit"}};
+ if ($new_unit->{"seen"}) {
+ $form->show_generic_error(sprintf($locale->text("The base unit relations must not contain loops (e.g. by saying that unit A's base unit is B, " .
+ "B's base unit is C and C's base unit is A) in row %d."), $unit->{"row"}));
+ }
+ }
+ }
+
+ #print(STDERR Dumper($delete_units));
+ #print(STDERR Dumper($new_units));
+
+ AM->save_units(\%myconfig, $form, $form->{"unit_type"}, $new_units, \@delete_units);
+
+ $form->{"saved_message"} = $locale->text("The units have been saved.");
+
+ edit_units();
+
+ $lxdebug->leave_sub();
+}
$tax =
qq|<td><select id="taxchart_$i" name="taxchart_$i" style="width:200px">$tax</select></td>|;
- my $korrektur = $form->{"korrektur_$i"} ? 'checked' : '';
-
print qq|
<tr>
<td width=50%><select name="AP_amount_$i" onChange="setTaxkey(this, $i)" style="width:100%">$selectAP_amount</select></td>
<td><input name="amount_$i" size=10 value=$form->{"amount_$i"}></td>
<td><input name="tax_$i" size=10 value=$form->{"tax_$i"}></td>
- <td><input type="checkbox" name="korrektur_$i" value="1" "$korrektur"></td>
+ <td><input type="checkbox" name="korrektur_$i" value="1"></td>
$tax
<td><input name="projectnumber_$i" size=20 value="$form->{"projectnumber_$i"}">
<input type=hidden name="project_id_$i" value=$form->{"project_id_$i"}>
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
-
+ $form->{update} = 0;
# for credit calculations
$form->{oldinvtotal} = 0;
$form->{oldtotalpaid} = 0;
if ($form->{"old$name"} ne qq|$form->{$name}--$form->{"${name}_id"}|) {
# this is needed for is, ir and oe
+ $form->{update} = 0;
# for credit calculations
$form->{oldinvtotal} = 0;
}
}
}
+ $form->language_payment(\%myconfig);
$lxdebug->leave_sub();
if ($myconfig{printer}) {
print qq|
-<input type=hidden name=transdateto value=$form->{transdateto}>
-<input type=hidden name=transdatefrom value=$form->{transdatefrom}>
-<input type=hidden name=invnumber value=$form->{invnumber}>
-<input type=hidden name=ordnumber value=$form->{ordnumber}>
-<input type=hidden name=quonumber value=$form->{quonumber}>
-<input type=hidden name=customer value=$form->{customer}>
-<input type=hidden name=vendor value=$form->{vendor}>
<input class=submit type=submit name=action value="|
. $locale->text('Select all') . qq|">
<input class=submit type=submit name=action value="|
--- /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;
+use Data::Dumper;
+
+require "$form->{path}/io.pl";
+require "$form->{path}/arap.pl";
+
+1;
+
+# end of main
+
+sub add {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Add Credit Note');
+
+ $form->{callback} =
+ "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&password=$form->{password}"
+ unless $form->{callback};
+
+ $form{jsscript} = "date";
+
+
+ &credit_note_links;
+ &prepare_credit_note;
+ $form->{format} = "pdf";
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub edit {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Edit Credit Note');
+
+
+ if ($form->{print_and_post}) {
+ $form->{action} = "print";
+ $form->{resubmit} = 1;
+ }
+ &credit_note_links;
+ &prepare_credit_note;
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
+sub credit_note_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};
+ }
+ }
+
+ if ($form->{payment_id}) {
+ $payment_id = $form->{payment_id};
+ }
+ if ($form->{language_id}) {
+ $language_id = $form->{language_id};
+ }
+
+ $cp_id = $form->{cp_id};
+ IS->get_customer(\%myconfig, \%$form);
+
+ IS->retrieve_invoice(\%myconfig, \%$form);
+ $form->{cp_id} = $cp_id;
+
+ if ($payment_id) {
+ $form->{payment_id} = $payment_id;
+ }
+ if ($language_id) {
+ $form->{language_id} = $language_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_credit_note {
+ $lxdebug->enter_sub();
+
+ $form->{type} = "credit_note";
+ $form->{formname} = "credit_note";
+ $form->{media} = "screen";
+
+ if ($form->{id}) {
+
+ map { $form->{$_} =~ s/\"/"/g }
+ qw(invnumber ordnumber quonumber shippingpoint shipvia notes intnotes);
+
+ # # get pricegroups for parts
+ # IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+
+ 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);
+
+ (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+ $dec_qty = length $dec_qty;
+
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit partnotes);
+ $form->{rowcount} = $i;
+
+ }
+ }
+ $lxdebug->leave_sub();
+}
+
+sub form_header {
+ $lxdebug->enter_sub();
+
+ $payment = qq|<option value=""></option>|;
+ foreach $item (@{ $form->{payment_terms} }) {
+ if ($form->{payment_id} eq $item->{id}) {
+ $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
+
+ # 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>
+ |;
+ $button3 = qq|
+ <td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td>
+ <td width="4"><input type=button name=deliverydate id="trigger3" value=|
+ . $locale->text('button') . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "3",
+ "invdate", "BL",
+ "trigger1", "duedate",
+ "BL", "trigger2",
+ "deliverydate", "BL",
+ "trigger3");
+ } 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>|;
+ }
+ if ($form->{resubmit} && ($form->{format} eq "html")) {
+ $onload =
+ qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
+ } elsif ($form->{resubmit}) {
+ $onload = qq|document.invoice.submit()|;
+ } else {
+ $onload = "fokus()";
+ }
+ $form->header;
+
+ print qq|
+<body onLoad="$onload">
+<script type="text/javascript" src="js/common.js"></script>
+<script type="text/javascript" src="js/delivery_customer_selection.js"></script>
+<script type="text/javascript" src="js/vendor_selection.js"></script>
+<script type="text/javascript" src="js/calculate_qty.js"></script>
+
+<form method=post name="invoice" action=$form->{script}>
+
+
+<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=action value=$form->{action}>
+
+<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_klass value=$form->{customer_klass}>
+ <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>
+ <tr>
+ <td colspan=4>
+ <table>
+ <tr>
+ <td colspan=2>
+ <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">| . $locale->text('Choose Customer') . qq|</button>
+ </td>
+ <td colspan=2><input type=hidden name=delivery_customer_id value="$form->{delivery_customer_id}">
+ <input id=delivery_customer_string name=delivery_customer_string value="$form->{delivery_customer_string}"></td>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">| . $locale->text('Choose Vendor') . qq|</button>
+ </td>
+ <td colspan=2><input type=hidden name=delivery_vendor_id value="$form->{delivery_vendor_id}">
+ <input id=delivery_vendor_string name=delivery_vendor_string value="$form->{delivery_vendor_string}"></td>
+ </tr>
+ </table>
+ </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('Credit Note Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}"></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Credit Note Date') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Due Date') . qq|</th>
+ $button2
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Delivery Date') . qq|</th>
+ $button3
+ </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>
+ <th align=right>| . $locale->text('Payment Terms') . qq|</th>
+ </tr>
+ <tr valign=top>
+ <td>$notes</td>
+ <td>$intnotes</td>
+ <td><select name=payment_id tabindex=24>$payment
+ </select></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('Preview') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('E-mail') . qq|">
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Print and Post') . 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);
+ if ($form->{second_run}) {
+ $form->{print_and_post} = 0;
+ }
+ &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>|;
+ }
+ }
+
+ # get pricegroups for parts
+ IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+
+ # build up html code for prices_$i
+ &set_pricegroup($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("customer", $locale->text('Customer missing!'));
+
+ # if oldcustomer ne customer redo form
+ if (&check_name(customer)) {
+ &update;
+ exit;
+ }
+ if ($form->{second_run}) {
+ $form->{print_and_post} = 0;
+ }
+
+ &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};
+
+ # get new invnumber in sequence if no invnumber is given or if posasnew was requested
+ if (!$form->{invnumber} || $form->{postasnew}) {
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
+ }
+ if ($print_post) {
+ if (!(IS->post_invoice(\%myconfig, \%$form))) {
+ $form->error($locale->text('Cannot post invoice!'));
+ }
+ } else {
+ $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 print_and_post {
+ $lxdebug->enter_sub();
+
+ $old_form = new Form;
+ $print_post = 1;
+ $form->{print_and_post} = 1;
+ &post();
+
+ &edit();
+ $lxdebug->leave_sub();
+
+}
+
+sub preview {
+ $lxdebug->enter_sub();
+
+ $form->{preview} = 1;
+ $old_form = new Form;
+ for (keys %$form) { $old_form->{$_} = $form->{$_} }
+ $old_form->{rowcount}++;
+
+ &print_form($old_form);
+ $lxdebug->leave_sub();
+
+}
+
+sub delete {
+ $lxdebug->enter_sub();
+ if ($form->{second_run}) {
+ $form->{print_and_post} = 0;
+ }
+ $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();
+}
use Data::Dumper;
+use SL::Common;
+
sub save_form {
$lxdebug->enter_sub();
- my (@names, @values);
- foreach my $key (keys(%{$form})) {
- push(@names, "\$form->{\"$key\"}");
- push(@values, $form->{$key});
- }
- my $dumper = Data::Dumper->new(\@values, \@names);
- $dumper->Indent(0);
- my $old_form = $dumper->Dump();
+ my $old_form = "";
+ map({ $old_form .= "$_=" . $form->escape($form->{$_}) . '&'; } keys(%{$form}));
+ chop($old_form);
$lxdebug->leave_sub();
sub restore_form {
$lxdebug->enter_sub();
- my ($old_form, $no_delete) = @_;
+ my ($old_form) = @_;
+
+ map({ delete($form->{$_}); } keys(%{$form}));
+
+ foreach my $pair (split('&', $old_form)) {
+ my ($key, $value) = split('=', $form->unescape($pair), 2);
+ $form->{$key} = $value;
+ }
+
+ $lxdebug->leave_sub();
+}
+
+sub select_employee {
+ $lxdebug->enter_sub();
+
+ my ($callback_sub, @employees) = @_;
+
+ if (0 == scalar(@employees)) {
+ @employees = SystemBrace->get_all_employees(\%myconfig, $form);
+ }
+
+ my $old_form = save_form();
+
+ $form->header();
+ print($form->parse_html_template("generic/select_employee",
+ { "EMPLOYEES" => \@employees,
+ "old_form" => $old_form,
+ "title" => $locale->text("Select an employee"),
+ "nextsub" => "select_employee_internal",
+ "callback_sub" => $callback_sub }));
+
+ $lxdebug->leave_sub();
+}
+
+sub select_employee_internal {
+ $lxdebug->enter_sub();
+
+ my ($new_id, $new_name, $callback_sub);
+
+ my $new_id = $form->{"new_id_" . $form->{"selection"}};
+ my $new_name = $form->{"new_name_" . $form->{"selection"}};
+ my $callback_sub = $form->{"callback_sub"};
- map({ delete($form->{$_}); } keys(%{$form})) unless ($no_delete);
- eval($old_form);
+ restore_form($form->{"old_form"});
+
+ &{ $callback_sub }($new_id, $new_name);
$lxdebug->leave_sub();
}
-sub H {
- return $form->quote_html($_[0]);
+sub select_part {
+ $lxdebug->enter_sub();
+
+ my ($callback_sub, @parts) = @_;
+
+ my $remap_parts_id = 0;
+ if (defined($parts[0]->{"parts_id"}) && !defined($parts[0]->{"id"})) {
+ $remap_parts_id = 1;
+ map({ $_->{"id"} = $_->{"parts_id"}; } @parts);
+ }
+
+ my $remap_partnumber = 0;
+ if (defined($parts[0]->{"partnumber"}) && !defined($parts[0]->{"number"})) {
+ $remap_partnumber = 1;
+ map({ $_->{"number"} = $_->{"partnumber"}; } @parts);
+ }
+
+ my $has_charge = 0;
+ if (defined($parts[0]->{"chargenumber"})) {
+ $has_charge = 1;
+ map({ $_->{"has_charge"} = 1; } @parts);
+ }
+
+ my $old_form = save_form();
+
+ $form->header();
+ print($form->parse_html_template("generic/select_part",
+ { "PARTS" => \@parts,
+ "old_form" => $old_form,
+ "title" => $locale->text("Select a part"),
+ "nextsub" => "select_part_internal",
+ "callback_sub" => $callback_sub,
+ "has_charge" => $has_charge,
+ "remap_parts_id" => $remap_parts_id,
+ "remap_partnumber" => $remap_partnumber }));
+
+ $lxdebug->leave_sub();
+}
+
+sub select_part_internal {
+ $lxdebug->enter_sub();
+
+ my ($new_item, $callback_sub);
+
+ my $re = "^new_.*_" . $form->{"selection"};
+ map({
+ my $key = $_;
+ $key =~ s/^new_//;
+ $key =~ s/_\d+$//;
+ $new_item->{$key} = $form->{$_};
+ } grep(/$re/, keys(%{$form})));
+
+ if ($form->{"remap_parts_id"}) {
+ $new_item->{"parts_id"} = $new_item->{"id"};
+ delete($new_item->{"id"});
+ }
+ if ($form->{"remap_partnumber"}) {
+ $new_item->{"partnumber"} = $new_item->{"number"};
+ delete($new_item->{"number"});
+ }
+
+ my $callback_sub = $form->{"callback_sub"};
+
+ restore_form($form->{"old_form"});
+
+ &{ $callback_sub }($new_item);
+
+ $lxdebug->leave_sub();
+}
+
+sub part_selection_internal {
+ $lxdebug->enter_sub();
+
+ $order_by = "description";
+ $order_by = $form->{"order_by"} if (defined($form->{"order_by"}));
+ $order_dir = 1;
+ $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
+
+ $parts = Common->retrieve_parts(\%myconfig, $form, $order_by, $order_dir);
+ map({ $parts->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$parts}));
+ if (0 == scalar(@{$parts})) {
+ $form->show_generic_information($locale->text("No part was found matching the search parameters."));
+ } elsif (1 == scalar(@{$parts})) {
+ $onload = "part_selected('1')";
+ }
+
+ my $callback = "$form->{script}?action=part_selection_internal&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password partnumber description input_partnumber input_description input_partsid), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(partnumber description);
+ my %header_title = ( "partnumber" => $locale->text("Part Number"),
+ "description" => $locale->text("Part description"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback . "order_by=${_}&order_dir=" . ($order_by eq $_ ? 1 - $order_dir : $order_dir),
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Select a part");
+ $form->header();
+ print($form->parse_html_template("generic/part_selection", { "HEADER" => \@header,
+ "PARTS" => $parts,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub project_selection_internal {
+ $lxdebug->enter_sub();
+
+ $order_by = "description";
+ $order_by = $form->{"order_by"} if (defined($form->{"order_by"}));
+ $order_dir = 1;
+ $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
+
+ $projects = Common->retrieve_projects(\%myconfig, $form, $order_by, $order_dir);
+ map({ $projects->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$projects}));
+ if (0 == scalar(@{$projects})) {
+ $form->show_generic_information($locale->text("No project was found matching the search parameters."));
+ } elsif (1 == scalar(@{$projects})) {
+ $onload = "project_selected('1')";
+ }
+
+ my $callback = "$form->{script}?action=project_selection_internal&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password projectnumber description input_projectnumber input_description input_project_id), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(projectnumber description);
+ my %header_title = ( "projectnumber" => $locale->text("Project Number"),
+ "description" => $locale->text("Project description"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback . "order_by=${_}&order_dir=" . ($order_by eq $_ ? 1 - $order_dir : $order_dir),
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Select a project");
+ $form->header();
+ print($form->parse_html_template("generic/project_selection", { "HEADER" => \@header,
+ "PROJECTS" => $projects,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub employee_selection_internal {
+ $lxdebug->enter_sub();
+
+ $order_by = "name";
+ $order_by = $form->{"order_by"} if (defined($form->{"order_by"}));
+ $order_dir = 1;
+ $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
+
+ $employees = Common->retrieve_employees(\%myconfig, $form, $order_by, $order_dir);
+ map({ $employees->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$employees}));
+ if (0 == scalar(@{$employees})) {
+ $form->show_generic_information($locale->text("No employee was found matching the search parameters."));
+ } elsif (1 == scalar(@{$employees})) {
+ $onload = "employee_selected('1')";
+ }
+
+ my $callback = "$form->{script}?action=employee_selection_internal&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name input_id), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(name);
+ my %header_title = ( "name" => $locale->text("Name"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback . "order_by=${_}&order_dir=" . ($order_by eq $_ ? 1 - $order_dir : $order_dir),
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Select an employee");
+ $form->header();
+ print($form->parse_html_template("generic/employee_selection", { "HEADER" => \@header,
+ "EMPLOYEES" => $employees,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub delivery_customer_selection {
+ $lxdebug->enter_sub();
+
+ $order_by = "name";
+ $order_by = $form->{"order_by"} if (defined($form->{"order_by"}));
+ $order_dir = 1;
+ $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
+
+ $delivery = Common->retrieve_delivery_customer(\%myconfig, $form, $order_by, $order_dir);
+ map({ $delivery->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$delivery}));
+ if (0 == scalar(@{$delivery})) {
+ $form->show_generic_information($locale->text("No Customer was found matching the search parameters."));
+ } elsif (1 == scalar(@{$delivery})) {
+ $onload = "customer_selected('1')";
+ }
+
+ my $callback = "$form->{script}?action=delivery_customer_selection&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name input_id), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(name customernumber address);
+ my %header_title = ( "name" => $locale->text("Name"),
+ "customernumber" => $locale->text("Customer Number"),
+ "address" => $locale->text("Address"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback . "order_by=${_}&order_dir=" . ($order_by eq $_ ? 1 - $order_dir : $order_dir),
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Select a Customer");
+ $form->header();
+ print($form->parse_html_template("generic/select_delivery_customer", { "HEADER" => \@header,
+ "DELIVERY" => $delivery,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub vendor_selection {
+ $lxdebug->enter_sub();
+
+ $order_by = "name";
+ $order_by = $form->{"order_by"} if (defined($form->{"order_by"}));
+ $order_dir = 1;
+ $order_dir = $form->{"order_dir"} if (defined($form->{"order_dir"}));
+
+ $vendor = Common->retrieve_vendor(\%myconfig, $form, $order_by, $order_dir);
+ map({ $vendor->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$vendor}));
+ if (0 == scalar(@{$vendor})) {
+ $form->show_generic_information($locale->text("No Vendor was found matching the search parameters."));
+ } elsif (1 == scalar(@{$vendor})) {
+ $onload = "vendor_selected('1')";
+ }
+
+ my $callback = "$form->{script}?action=vendor_selection&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name input_id), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(name customernumber address);
+ my %header_title = ( "name" => $locale->text("Name"),
+ "customernumber" => $locale->text("Customer Number"),
+ "address" => $locale->text("Address"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback . "order_by=${_}&order_dir=" . ($order_by eq $_ ? 1 - $order_dir : $order_dir),
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Select a Customer");
+ $form->header();
+ print($form->parse_html_template("generic/select_vendor", { "HEADER" => \@header,
+ "VENDOR" => $vendor,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub calculate_qty {
+ $lxdebug->enter_sub();
+
+ my @variable_sort = ();
+ my %variable_list = ();
+ my $unit_list = ();
+ $form->{formel} =~ s/\r\n//g;
+
+ my ($variable_string, $formel) = split /###/,$form->{formel};
+
+
+ split /;/, $variable_string;
+ foreach $item (@_) {
+ my($name, $valueunit) = split /=/,$item;
+ my($value, $unit) = split / /, $valueunit;
+
+ push(@variable_sort, $value);
+ $variable_list{$value} = $name;
+ $unit_list{$value} = $unit;
+ }
+
+ my @header_sort = qw(variable value unit);
+ my %header_title = ( "variable" => $locale->text("Variable"),
+ "value" => $locale->text("Value"),
+ "unit" => $locale->text("Unit"),
+ );
+
+ my @variable = map(+{ "description" => $variable_list{$_},
+ "name" => $_,
+ "unit" => $unit_list{$_} }, @variable_sort);
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ },
+ @header_sort);
+ $form->{formel} = $formel;
+ $form->{"title"} = $locale->text("Please enter values");
+ $form->header();
+ print($form->parse_html_template("generic/calculate_qty", { "HEADER" => \@header,
+ "VARIABLES" => \@variable,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
+sub calculate_alu {
+ $lxdebug->enter_sub();
+
+
+
+ my ($length, $weight) = split /\r\n/,$form->{formel};
+
+ #print(STDERR "$form->{formel} Formel\n");
+ #print(STDERR "$form->{description} Description\n");
+
+ map({ $form->{$_} = "" } (qw(qty_alu price_alu total_alu qty_eloxal price_eloxal total_eloxal total)));
+
+ if ($form->{description} =~ /.*Alupreisberechnung.*/) {
+ $form->{description} =~ /.*Alupreisberechnung:\n(.*)kg Aluminiumprofil Einzelpreis: (.*) Gesamt: (.*)\n(.*)m Eloxal Einzelpreis: (.*) Gesamt: (.*)/;
+ $form->{qty_alu} = $1;
+ $form->{price_alu} = $2;
+ $form->{total_alu} = $3;
+ $form->{qty_eloxal} = $4;
+ $form->{price_eloxal} = $5;
+ $form->{total_eloxal} = $6;
+ $form->{total} = $form->format_amount(\%myconfig, ($form->parse_amount(\%myconfig, $form->{total_alu}) + $form->parse_amount(\%myconfig, $form->{total_eloxal})));
+ }
+ ($form->{description}, $null) = split /\nAlupreisberechnung/, $form->{description};
+ #map({ print(STDERR "$_ = $form->{$_}\n") } (qw(qty_alu price_alu total_alu qty_eloxal price_eloxal total_eloxal total)));
+
+ my $callback = "$form->{script}?action=vendor_selection&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name input_id), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(name customernumber address);
+ my %header_title = ( "name" => $locale->text("Name"),
+ "customernumber" => $locale->text("Customer Number"),
+ "address" => $locale->text("Address"),
+ );
+ ($null, $form->{weight}) = split / /, $weight;
+ ($null, $form->{length}) = split / /, $length;
+
+ $form->{calc_weight} = $form->parse_amount(\%myconfig, $form->{weight});
+ $form->{calc_length} = $form->parse_amount(\%myconfig, $form->{length});
+
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Enter values for aluminium calculation");
+ $form->header();
+ print($form->parse_html_template("generic/calculate_alu"));
+
+ $lxdebug->leave_sub();
+}
+
+
+sub set_longdescription {
+ $lxdebug->enter_sub();
+
+
+ my $callback = "$form->{script}?action=set_longdescription&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name input_id), grep({ /^[fl]_/ } keys %$form)));
+
+ $form->{"title"} = $locale->text("Enter longdescription");
+ $form->header();
+ print($form->parse_html_template("generic/set_longdescription"));
+
+ $lxdebug->leave_sub();
}
1;
}
# recalculate
-
- # Modified from $amount = $form->{amount} by J.Zach to update amount to total
- # payment amount in Zahlungsausgang
- $amount = 0;
+ $amount = $form->{amount};
for $i (1 .. $form->{rowcount}) {
map {
$form->{"paid_$i"} = $form->{"due_$i"};
}
- # Modified by J.Zach, see abovev
- $amount += $form->{"paid_$i"};
-
+ $amount -= $form->{"paid_$i"};
} else {
$form->{"paid_$i"} = "";
}
}
- # Line added by J.Zach, see above
- $form->{amount}=$amount;
-
&form_header;
&list_invoices;
&form_footer;
$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') {
# $locale->text('Add Vendor')
use SL::CT;
+use CGI::Ajax;
+use CGI;
+use Data::Dumper;
1;
$lxdebug->leave_sub();
}
+sub search_delivery {
+ $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 search_adr {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('ADR Report');
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=from id=from size=11 title="$myconfig{dateformat}" value=$form->{from}></td>
+ <td><input type=button name=from id="trigger1" value=|
+ . $locale->text('button') . qq|></td>
+ |;
+ $button2 = qq|
+ <td width="13"><input name=to id=to size=11 title="$myconfig{dateformat}" value=$form->{to}></td>
+ <td width="4"><input type=button name=to id="trigger2" value=|
+ . $locale->text('button') . qq|></td></td>
+ |;
+
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "2",
+ "from", "BL",
+ "trigger1", "to",
+ "BL", "trigger2");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=from size=11 title="$myconfig{dateformat}" value=$form->{from}></td>|;
+ $button2 =
+ qq|<td width="13"><input name=to size=11 title="$myconfig{dateformat}" value=$form->{to}></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 valign=top>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Year') . qq|</th>
+ <td><input name=year type=input value=$form->{year}></td>
+ <tr>
+ <th align=right nowrap>| . $locale->text('From') . qq|</th>
+ $button1
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Bis') . qq|</th>
+ $button2
+ </tr>
+ <tr>
+ <td></td>
+ <td><input name=format class=radio type=radio value=html checked> |
+ . $locale->text('HTML') . qq|
+ <input name=format class=radio type=radio value=csv> |
+ . $locale->text('CSV') . qq|</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>
+$jsscript
+<input type=hidden name=nextsub value=adr_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 type=submit class=submit name=action value="|
+ . $locale->text('Continue') . qq|">
+</form>
+
+</body>
+</html>
+|;
+ $lxdebug->leave_sub();
+}
+sub adr_report {
+ $lxdebug->enter_sub();
+
+ CT->adr(\%myconfig, \%$form);
+
+ $form->{title} = $locale->text('ADR Report');
+ if ($form->{from} || $form->{to}) {
+ $option = "Für den Zeitraum $form->{from} bis $form->{to}";
+ } elsif ($form->{year}) {
+ $option = "Für das Jahr $form->{year}";
+ }
+
+ if ($form->{format} eq "html") {
+ $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>
+</table>|;
+
+
+ @column_index =
+ $form->sort_columns(adr_code,
+ adr_description,
+ sum,
+ unit);
+
+
+
+ $column_header{adr_code} =
+ qq|<th class=listheading>| . $locale->text('ADR Code') . qq|</th>|;
+ $column_header{adr_description} =
+ qq|<th class=listheading>|. $locale->text('ADR Description'). qq|</th>|;
+ $column_header{sum} =
+ qq|<th class=listheading>|. $locale->text('Quantity'). qq|</th>|;
+ $column_header{unit} =
+ qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|;
+
+ print qq|
+
+<table width=100%>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+
+ foreach $ref (@{ $form->{ADR} }) {
+
+ map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
+
+
+ $i++;
+ $i %= 2;
+ print "
+ <tr class=listrow$i>
+";
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+
+
+ }
+
+ print qq|
+</table>
+</body>
+</html>
+|;
+ } else {
+ my $filename = "adr-report-$form->{from}-$form->{to}.csv";
+ if ($form->{year}) {
+ $filename = "adr-report-$form->{year}.csv";
+ }
+ @column_index =
+ $form->sort_columns(adr_code,
+ adr_description,
+ sum,
+ unit);
+
+ $tmpfile = qq|ADR Code;ADR Beschreibung;Menge;Einheit\n|;
+ foreach $ref (@{ $form->{ADR} }) {
+
+ map { $column_data{$_} = qq|"$ref->{$_}"| } @column_index;
+
+ $line = "";
+ map { $line .= "$column_data{$_};" } @column_index;
+ chomp($line);
+ $tmpfile .= qq|$line\n|;;
+ }
+
+ my $size = length($tmpfile);
+ # launch application
+ print qq|Content-Type: application/csv
+Content-Disposition: attachment; filename="$filename"
+Content-Length: $size
+
+$tmpfile
+|;
+ }
+
+ $lxdebug->leave_sub();
+}
+
sub list_names {
$lxdebug->enter_sub();
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
$form->{creditlimit} =
$form->format_amount(\%myconfig, $form->{creditlimit}, 0);
- $form->{discount} = $form->format_amount(\%myconfig, $form->{discount});
if ($myconfig{role} eq 'admin') {
$bcc = qq|
|;
}
$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>|;
+ foreach $item (@{ $form->{languages} }) {
+ if ($form->{language_id} eq $item->{id}) {
+ $lang .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
} else {
- $lang .= qq|<option value="$item">$langs{$item}</option>|;
+ $lang .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
+
+ $payment = qq|<option value=""></option>|;
+ foreach $item (@{ $form->{payment_terms} }) {
+ if ($form->{payment_id} eq $item->{id}) {
+ $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
+
+ if (!$form->{id}) {
+ if ($form->{db} eq "customer") {
+ $form->{taxzone_id} = 0;
+ } else {
+ $form->{taxzone_id} = 0;
+ }
+ }
+
+ if (@{ $form->{TAXZONE} }) {
+ foreach $item (@{ $form->{TAXZONE} }) {
+ if ($item->{id} == $form->{taxzone_id}) {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id} selected>$item->{description}\n";
+ } else {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id}>$item->{description}\n";
+ }
+
}
}
+ $taxzone = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
+ <input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
+ </tr>|;
+
+ $get_contact_url =
+ "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_contact";
+
+ my $pjx = new CGI::Ajax( 'get_contact' => $get_contact_url );
+ $form->{selectcontact} = "<option value=0></option>";
+ if (@{ $form->{CONTACTS} }) {
+ foreach $item (@{ $form->{CONTACTS} }) {
+ if ($item->{cp_id} == $form->{cp_id}) {
+ $form->{selectcontact} .=
+ qq|<option value=$item->{cp_id} selected>$item->{cp_name}</option>\n|;
+ } else {
+ $form->{selectcontact} .=
+ qq|<option value=$item->{cp_id}>$item->{cp_name}</option>\n|;
+ }
+
+ }
+ }
+ push(@ { $form->{AJAX} }, $pjx);
+ $ansprechpartner = qq|
+ <tr>
+ <th align=right>| . $locale->text('Ansprechpartner') . qq|</th>
+ <td><select id=cp_id name=cp_id onChange="get_contact(['cp_id__' + this.value], ['cp_name', 'cp_greeting', 'cp_title', 'cp_givenname', 'cp_phone1', 'cp_phone2', 'cp_email', 'cp_abteilung', 'cp_fax', 'cp_mobile1', 'cp_mobile2', 'cp_satphone', 'cp_satfax', 'cp_project', 'cp_privatphone', 'cp_privatemail', 'cp_birthday'])">$form->{selectcontact}</select></td>
+ <input type=hidden name=selectcontact value="$form->{selectcontact}">
+ </tr>|;
+ $get_shipto_url =
+ "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_shipto";
+
+ my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url );
+ $form->{selectshipto} = "<option value=0></option>";
+ if (@{ $form->{SHIPTO} }) {
+ foreach $item (@{ $form->{SHIPTO} }) {
+ if ($item->{id} == $form->{shipto_id}) {
+ $form->{selectshipto} .=
+ "<option value=$item->{id} selected>$item->{shiptoname}\n";
+ } else {
+ $form->{selectshipto} .=
+ "<option value=$item->{id}>$item->{shiptoname}\n";
+ }
+
+ }
+ }
+ push(@ { $form->{AJAX} }, $pjy);
+
+ $shipto = qq|
+ <tr>
+ <th align=right>| . $locale->text('Shipping Address') . qq|</th>
+ <td><select id=shipto_id name=shipto_id onChange="get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail'])">$form->{selectshipto}</select></td>
+ <input type=hidden name=selectshipto value="$form->{selectshipto}">
+ </tr>|;
+
+
+ $get_delivery_url =
+ "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_delivery";
+
+ my $pjz = new CGI::Ajax( 'get_delivery' => $get_delivery_url );
+
+ push(@ { $form->{AJAX} }, $pjz);
+
+ $delivery = qq|
+ <tr>
+ <th align=right>| . $locale->text('Shipping Address') . qq|</th>
+ <td><select id=delivery_id name=delivery_id onChange="get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value], ['delivery'])">$form->{selectshipto}</select></td>
+ </tr>|;
+
foreach $item (split / /, $form->{taxaccounts}) {
if (($form->{tax}{$item}{taxable}) || !($form->{id})) {
$taxable .=
s/<option value=$form->{business}>/<option value=$form->{business} selected>/;
$label = ucfirst $form->{db};
- $form->{title} = $locale->text("$form->{title} $label");
+ if ($form->{title} eq "Edit") {
+ $form->{title} = $locale->text("$form->{title} $label") . " $form->{name}";
+ } else {
+ $form->{title} = $locale->text("$form->{title} $label");
+ }
if ($form->{title_save}) {
$form->{title} = $form->{title_save};
}
map(
{ $select_greeting .= qq|<option>$_</option>|; } @{ $form->{GREETINGS} });
$select_greeting .= qq|</select>|;
+
+ $select_company_greeting =
+ qq| <select name=selected_company_greeting><option></option>|;
+ map(
+ { $select_company_greeting .= qq|<option>$_</option>|; } @{ $form->{COMPANY_GREETINGS} });
+ $select_company_greeting .= qq|</select>|;
+
+ $select_department =
+ qq| <select name=selected_cp_abteilung><option></option>|;
+ map(
+ { $select_department .= qq|<option>$_</option>|; } @{ $form->{DEPARTMENT} });
+ $select_department .= qq|</select>|;
## /LINET
if ($form->{db} eq 'customer') {
$form->{selectpricegroup} =~
s/(<option value="\Q$form->{klass}\E")/$1 selected/;
- $pricegroup .=
- qq|<select name=klass tabindex=24>$form->{selectpricegroup}</select>|;
+ $pricegroup .= qq|<select name=klass>$form->{selectpricegroup}</select>|;
}
}
# $locale->text('Customer Number')
# $locale->text('Vendor Number')
- $form->{fokus} = "ct.name";
+ $form->{fokus} = "ct.greeting";
$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>
+
+
+<form method=post name="ct" action=$form->{script} onKeyUp="highlight(event)" onClick="highlight(event)">
+
+
+
+<ul id="maintab" class="shadetabs">
+<li class="selected"><a href="#" rel="billing">|
+ . $locale->text('Billing Address') . qq|</a></li>
+<li><a href="#" rel="shipto">|
+ . $locale->text('Shipping Address') . qq|</a></li>
+<li><a href="#" rel="contacts">Ansprechpartner</a></li>
+<li><a href="#" rel="deliveries">|
+ . $locale->text('Lieferungen') . qq|</a></li>
+
+</ul>
+
+<div class="tabcontentstyle">
+
+<div id="billing" class="tabcontent">
+
<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('Greeting') . qq|</th>
+ <td><input id=greeting name=greeting size=30 maxlength=30 value="$form->{greeting}">
+ $select_company_greeting</td>
+ </tr>
<tr>
<th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
- <td><input name=name size=35 maxlength=75 tabindex=1 value="$form->{name}"></td>
- <td><input name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td>
+ <td><input name=name size=35 maxlength=75 value="$form->{name}"></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>
+ <td><input name=department_1 size=16 maxlength=75 value="$form->{department_1}">
+ <input name=department_2 size=16 maxlength=75 value="$form->{department_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=75 value="$form->{shiptostreet}"></td>
+ <td><input name=street size=35 maxlength=75 value="$form->{street}"></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>
+ <td><input name=zipcode size=5 maxlength=10 value="$form->{zipcode}">
+ <input name=city size=30 maxlength=75 value="$form->{city}"></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>
+ <td><input name=country size=35 maxlength=75 value="$form->{country}"></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>
+ <td><input name=contact size=28 maxlength=75 value="$form->{contact}"></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>
+ <td><input name=phone size=30 maxlength=30 value="$form->{phone}"></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>
+ <td><input name=fax size=30 maxlength=30 value="$form->{fax}"></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>
+ <td><input name=email size=45 value="$form->{email}"></td>
</tr>
<tr>
<th align=right nowrap>| . $locale->text('Homepage') . qq|</th>
- <td><input name=homepage tabindex=12 size=45 value="$form->{homepage}"></td>
+ <td><input name=homepage 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>
+</table>
+<table>
<tr>
<th align=right>| . $locale->text('Credit Limit') . qq|</th>
- <td><input name=creditlimit tabindex=13 size=9 value="$form->{creditlimit}"></td>
+ <td><input name=creditlimit 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}">|
+ <td><input name=terms 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><input name=discount 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>
+ <td><input name=taxnumber 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>
+ <td><input name=ustid 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>
+ <td><input name=account_number size=10 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>
+ <td><input name=bank_code size=10 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>
+ <td><input name=bank size=30 value="$form->{bank}"></td>
</tr>
<tr>
$business
<th align=right>| . $locale->text('Language') . qq|</th>
- <td><select name=language tabindex=23>$lang
+ <td><select name=language_id tabindex=23>$lang
</select></td>|;
if ($form->{db} eq 'customer') {
<tr>
<td align=right>| . $locale->text('Obsolete') . qq|</td>
<td><input name=obsolete class=checkbox type=checkbox value=1 $form->{obsolete}></td>
+ <th align=right>| . $locale->text('Payment Terms') . qq|</th>
+ <td><select name=payment_id>$payment
+ </select></td>
</tr>
+ $taxzone
</table>
- </td>
- </tr>
+ <table>
<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>
+ </td>
+ </tr>
</table>
+<br style="clear: left" /></div>|;
+
+print qq|
+ <div id="shipto" class="tabcontent">
+
+ <table width=100%>
+$shipto
+ <tr>
+ <th align=right nowrap>| . $locale->text('Company Name') . qq|</th>
+ <td><input id=shiptoname name=shiptoname size=35 maxlength=75 value="$form->{shiptoname}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Abteilung') . qq|</th>
+ <td><input id=shiptodepartment_1 name=shiptodepartment_1 size=16 maxlength=75 value="$form->{shiptodepartment_1}">
+ <input id=shiptodepartment_2 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 id=shiptostreet name=shiptostreet size=35 maxlength=75 value="$form->{shiptostreet}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Zipcode') . "/" . $locale->text('City') . qq|</th>
+ <td><input id=shiptozipcode name=shiptozipcode size=5 maxlength=10 value="$form->{shiptozipcode}">
+ <input id=shiptocity name=shiptocity size=30 maxlength=75 value="$form->{shiptocity}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Country') . qq|</th>
+ <td><input id=shiptocountry name=shiptocountry size=35 maxlength=35 value="$form->{shiptocountry}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Contact') . qq|</th>
+ <td><input id=shiptocontact name=shiptocontact size=30 maxlength=75 value="$form->{shiptocontact}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Phone') . qq|</th>
+ <td><input id=shiptophone name=shiptophone size=30 maxlength=30 value="$form->{shiptophone}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Fax') . qq|</th>
+ <td><input id=shiptofax name=shiptofax size=30 maxlength=30 value="$form->{shiptofax}"></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input id=shiptoemail name=shiptoemail size=45 value="$form->{shiptoemail}"></td>
+ </tr>
+ <tr>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ </tr>
+
+ </table>
+<br style="clear: left" /></div>|;
+
+
+##LINET - added fields for contact person
+ print qq|
+<div id="contacts" class="tabcontent">
+<table>
+ <tr>
+ <td colspan=3>
+ <input type=hidden name=cp_id value=$form->{cp_id}>
+ <table>
+ $ansprechpartner
+ <tr>
+ <th align=left nowrap>| . $locale->text('Greeting') . qq|</th>
+ <td><input id=cp_greeting name=cp_greeting size=30 maxlength=30 value="$form->{cp_greeting}">
+ $select_greeting</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Title') . qq|</th>
+ <td><input id=cp_title name=cp_title size=30 maxlength=30 value="$form->{cp_title}">
+ $select_title</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Department') . qq|</th>
+ <td><input id=cp_abteilung name=cp_abteilung size=30 maxlength=40 value="$form->{cp_abteilung}">
+ $select_department</td>
+ </tr>
+ <tr>
+ <th align=left nowrap>|
+ . $locale->text('Given Name') . qq|</th>
+ <td><input id=cp_givenname name=cp_givenname size=30 maxlength=40 value="$form->{cp_givenname}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Name') . qq|</th>
+ <td><input id=cp_name name=cp_name size=30 maxlength=40 value="$form->{cp_name}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Phone1') . qq|</th>
+ <td><input id=cp_phone1 name=cp_phone1 size=30 maxlength=30 value="$form->{cp_phone1}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Phone2') . qq|</th>
+ <td><input id=cp_phone2 name=cp_phone2 size=30 maxlength=30 value="$form->{cp_phone2}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Fax') . qq|</th>
+ <td><input id=cp_fax name=cp_fax size=30 maxlength=30 value="$form->{cp_fax}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Mobile1') . qq|</th>
+ <td><input id=cp_mobile1 name=cp_mobile1 size=30 maxlength=30 value="$form->{cp_mobile1}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Mobile2') . qq|</th>
+ <td><input id=cp_mobile2 name=cp_mobile2 size=30 maxlength=30 value="$form->{cp_mobile2}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Sat. Phone') . qq|</th>
+ <td><input id=cp_satphone name=cp_satphone size=30 maxlength=30 value="$form->{cp_satphone}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Sat. Fax') . qq|</th>
+ <td><input id=cp_satfax name=cp_satfax size=30 maxlength=30 value="$form->{cp_satfax}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Project') . qq|</th>
+ <td><input id=cp_project name=cp_project size=30 maxlength=40 value="$form->{cp_project}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('E-mail') . qq|</th>
+ <td><input id=cp_email name=cp_email size=30 maxlength=40 value="$form->{cp_email}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Private Phone') . qq|</th>
+ <td><input id=cp_privatphone name=cp_privatphone size=30 maxlength=40 value="$form->{cp_privatphone}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Private E-mail') . qq|</th>
+ <td><input id=cp_privatemail name=cp_privatemail size=30 maxlength=40 value="$form->{cp_privatemail}"></td>
+ </tr>
+ <tr>
+ <th align=left nowrap>| . $locale->text('Birthday') . qq|</th>
+ <td><input id=cp_birthday name=cp_birthday size=30 maxlength=40 value="$form->{cp_birthday}"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+ <tr height="5"></tr>|;
+##/LINET
+ print qq| $bcc
+ $tax
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+<br style="clear: left" /></div>
+<div id="deliveries" class="tabcontent">
+ <table>
+ $delivery
+ <tr>
+ <th align=left nowrap>| . $locale->text('From') . qq|</th>
+ <td><input id=from name=from size=10 maxlength=10 value="$form->{from}"></td>
+ <th align=left nowrap>| . $locale->text('Bis') . qq|</th>
+ <td><input id=to name=to size=10 maxlength=10 value="$form->{to}"></td>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <div id=delivery>
+ </div>
+ </td>
+ </tr>
+ </table>
+<br style="clear: left" /></div>
+
+</div>
+
|;
$lxdebug->leave_sub();
$update_button
<input class=submit type=submit name=action accesskey="s" value="|
. $locale->text("Save") . qq|">
+<input class=submit type=submit name=action accesskey="s" value="|
+ . $locale->text("Save and Close") . qq|">
<input class=submit type=submit name=action value="$arap">
<input class=submit type=submit name=action value="|
. $locale->text("Save and Invoice") . qq|">
print qq|
</form>
-
+<script type="text/javascript">
+//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
+initializetabcontent("maintab")
+</script>
</body>
</html>
|;
$lxdebug->enter_sub();
$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->{callback} = $form->escape($form->{callback}, 1);
$lxdebug->leave_sub();
}
-sub save {
+sub save_and_close {
$lxdebug->enter_sub();
# $locale->text('Customer saved!')
if ($vertreter && $form->{db} eq "customer") {
$form->isblank("salesman_id", $locale->text("Salesman missing!"));
}
- $rc = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
- if ($rc == 3) {
- $form->error($locale->text('customernumber not unique!'));
- }
+ &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+
$form->redirect($locale->text($msg));
$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!"));
+ }
+ print(STDERR "SHIPTO in sub save $form->{shipto_id}\n");
+ &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
+
+ &edit;
+ exit;
+ $lxdebug->leave_sub();
+}
+
sub delete {
$lxdebug->enter_sub();
$lxdebug->leave_sub();
}
+sub get_contact {
+ $lxdebug->enter_sub();
+
+ CT->get_contact(\%myconfig, \%$form);
+
+ my $q = new CGI;
+ $result = "$form->{cp_name}";
+ map { $result .= "__pjx__" . $form->{$_} } qw(cp_greeting cp_title cp_givenname cp_phone1 cp_phone2 cp_email cp_abteilung cp_fax cp_mobile1 cp_mobile2 cp_satphone cp_satfax cp_project cp_privatphone cp_privatemail cp_birthday);
+ print $q->header();
+ print $result;
+ $lxdebug->leave_sub();
+
+}
+
+
+sub get_shipto {
+ $lxdebug->enter_sub();
+
+ CT->get_shipto(\%myconfig, \%$form);
+
+ my $q = new CGI;
+ $result = "$form->{shiptoname}";
+ map { $result .= "__pjx__" . $form->{$_} } qw(shiptodepartment_1 shiptodepartment_2 shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
+ print $q->header();
+ print $result;
+ $lxdebug->leave_sub();
+
+}
+
+sub get_delivery {
+ $lxdebug->enter_sub();
+
+ CT->get_delivery(\%myconfig, \%$form);
+
+ @column_index =
+ $form->sort_columns(shiptoname,
+ invnumber,
+ ordnumber,
+ transdate,
+ description,
+ adr_code,
+ qty,
+ unit);
+
+
+
+ $column_header{shiptoname} =
+ qq|<th class=listheading>| . $locale->text('Shipping Address') . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th class=listheading>|. $locale->text('Invoice'). qq|</th>|;
+ $column_header{ordnumber} =
+ qq|<th class=listheading>|. $locale->text('Order'). qq|</th>|;
+ $column_header{transdate} =
+ qq|<th class=listheading>| . $locale->text('Invdate') . qq|</th>|;
+ $column_header{description} =
+ qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
+ $column_header{adr_code} =
+ qq|<th class=listheading>| . $locale->text('ADR') . qq|</th>|;
+ $column_header{qty} =
+ qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
+ $column_header{unit} =
+ qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|;
+ $result .= qq|
+
+<table width=100%>
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+|;
+
+ map { $result .= "$column_header{$_}\n" } @column_index;
+
+ $result .= qq|
+ </tr>
+|;
+
+
+ foreach $ref (@{ $form->{DELIVERY} }) {
+
+ if ($ref->{shiptoname} eq $sameshiptoname) {
+ map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
+ $column_data{shiptoname} = "<td> </td>";
+ } else {
+ map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
+ }
+
+ $i++;
+ $i %= 2;
+ $result .= "
+ <tr class=listrow$i>
+";
+
+ map { $result .= "$column_data{$_}\n" } @column_index;
+
+ $result .= qq|
+ </tr>
+|;
+
+ $sameshiptoname = $ref->{shiptoname};
+
+ }
+
+ $result .= qq|
+ </table>
+|;
+
+
+ my $q = new CGI;
+ print $q->header();
+ print $result;
+ $lxdebug->leave_sub();
+
+}
+
sub continue { &{ $form->{nextsub} } }
--- /dev/null
+#=====================================================================
+# LX-Office ERP
+# Copyright (C) 2006
+# 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.
+#======================================================================
+#
+# Dunning process module
+#
+#======================================================================
+
+use SL::IS;
+use SL::PE;
+use SL::DN;
+use Data::Dumper;
+
+require "$form->{path}/io.pl";
+require "$form->{path}/arap.pl";
+
+1;
+
+sub edit_config {
+ $lxdebug->enter_sub();
+
+ # edit all dunning config data
+
+ $form->header;
+ DN->get_config(\%myconfig, \%$form);
+ $form->{title} = $locale->text('Edit Dunning Process Config');
+
+ $form->{callback} =
+ "$form->{script}?action=edit_config&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ @column_index = qw(dunning_level dunning_description active auto email payment_terms terms fee interest template);
+
+ $column_header{dunning_level} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Level')
+ . qq|</th>|;
+ $column_header{dunning_description} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Description')
+ . qq|</th>|;
+ $column_header{active} =
+ qq|<th class=listheading>|
+ . $locale->text('Active?')
+ . qq|</th>|;
+ $column_header{auto} =
+ qq|<th class=listheading>|
+ . $locale->text('Auto Send?')
+ . qq|</th>|;
+ $column_header{email} =
+ qq|<th class=listheading>|
+ . $locale->text('eMail Send?')
+ . qq|</th>|;
+ $column_header{payment_terms} =
+ qq|<th class=listheading>|
+ . $locale->text('Fristsetzung')
+ . qq|</th>|;
+ $column_header{terms} =
+ qq|<th class=listheading>|
+ . $locale->text('Duedate +Days')
+ . qq|</th>|;
+ $column_header{fee} =
+ qq|<th class=listheading>|
+ . $locale->text('Fee')
+ . qq|</th>|;
+ $column_header{interest} =
+ qq|<th class=listheading>|
+ . $locale->text('Interest Rate')
+ . qq|</th>|;
+ $column_header{template} =
+ qq|<th class=listheading>|
+ . $locale->text('Template')
+ . qq|</th>|;
+ print qq|
+<body>
+<script type="text/javascript" src="js/common.js"></script>
+<script type="text/javascript" src="js/dunning.js"></script>
+<form method=post action=$form->{script}>
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=9>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>|;
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ my $i = 0;
+ foreach $ref (@{ $form->{DUNNING} }) {
+
+ $i++;
+ my $j = $i % 2;
+
+ print qq|
+ <tr valign=top class=listrow$j>
+|;
+
+
+ $column_data{dunning_level} =
+ qq|<td><input type=hidden name=dunning_level_$i size=2 value="$i"><input type=hidden name=id_$i value="$ref->{id}">$i</td>|;
+ $column_data{dunning_description} = qq|<td><input name=dunning_description_$i value="$ref->{dunning_description}"></td>|;
+ my $active = ($ref->{active}) ? "checked" : "";
+ $column_data{active} =
+ qq|<td><input type=checkbox name=active_$i value=1 $active></td>|;
+ my $email = ($ref->{email}) ? "checked" : "";
+ $column_data{email} =
+ qq|<td><input type=checkbox name=email_$i value=1 $email><button type="button" onclick="set_email_window('email_subject_$i', 'email_body_$i', 'email_attachment_$i')">| . $locale->text('L') . qq|</button><input type=hidden name=email_body_$i value="$ref->{email_body}"><input type=hidden name=email_subject_$i value="$ref->{email_subject}"><input type=hidden name=email_attachment_$i value="$ref->{email_attachment}"></td>|;
+
+ my $auto = ($ref->{auto}) ? "checked" : "";
+ $column_data{auto} =
+ qq|<td><input type=checkbox name=auto_$i value=1 $auto></td>|;
+ $column_data{payment_terms} = qq|<td><input name=payment_terms_$i size=3 value="$ref->{payment_terms}"></td>|;
+ $column_data{terms} = qq|<td><input name=terms_$i size=3 value="$ref->{terms}"></td>|;
+ $column_data{fee} = qq|<td><input name=fee_$i size=5 value="$ref->{fee}"></td>|;
+ $column_data{interest} = qq|<td><input name=interest_$i size=4 value="$ref->{interest}">%</td>|;
+ $column_data{template} = qq|<td><input name=template_$i value="$ref->{template}"></td>|;
+
+
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+ $i++;
+ my $j = $i % 2;
+
+ print qq|
+ <tr valign=top class=listrow$j>
+|;
+
+
+ $column_data{dunning_level} =
+ qq|<td><input type=hidden size=2 name=dunning_level_$i value=$i>$i</td>|;
+ $column_data{dunning_description} = qq|<td><input name=dunning_description_$i ></td>|;
+ my $active = "";
+ $column_data{active} =
+ qq|<td><input type=checkbox name=active_$i value=1 $active></td>|;
+ my $email = "";
+ $column_data{email} =
+ qq|<td><input type=checkbox name=email_$i value=1 $email><button type="button" onclick="set_email_window('email_subject_$i', 'email_body_$i', 'email_attachment_$i')">| . $locale->text('L') . qq|</button><input type=hidden name=email_body_$i><input type=hidden name=email_subject_$i><input type=hidden name=email_attachment_$i></td>|;
+ my $auto = "";
+ $column_data{auto} =
+ qq|<td><input type=checkbox name=auto_$i value=1 $auto></td>|;
+ $column_data{payment_terms} = qq|<td><input size=3 name=payment_terms_$i></td>|;
+ $column_data{terms} = qq|<td><input size=3 name=terms_$i></td>|;
+ $column_data{fee} = qq|<td><input size=5 name=fee_$i></td>|;
+ $column_data{interest} = qq|<td><input size=4 name=interest_$i>%</td>|;
+ $column_data{template} = qq|<td><input name=template_$i></td>|;
+
+
+ $form->{rowcount} = $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>
+
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+<input name=rowcount type=hidden 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}>
+
+<input class=submit type=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 add {
+ $lxdebug->enter_sub();
+ # setup customer selection
+ $form->all_vc(\%myconfig, "customer", "AR");
+
+ DN->get_config(\%myconfig, \%$form);
+
+ 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>|;
+ }
+
+ # dunning levels
+ if (@{ $form->{DUNNING} }) {
+ $form->{selectdunning_level} = "<option></option\n";
+ map {
+ $form->{selectdunning_level} .=
+ "<option value=$_->{id}>$_->{dunning_description}</option>\n"
+ } (@{ $form->{DUNNING} });
+ }
+ $dunning_level = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Next Dunning Level') . qq|</th>
+ <td colspan=3><select name=dunning_level>$form->{selectdunning_level}</select></td>
+ </tr>
+ | if $form->{selectdunning_level};
+
+ # 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('Start Dunning Process');
+ $form->{nextsub} = "show_invoices";
+
+ # use JavaScript Calendar or not
+ $form->{jsscript} = $jscalendar;
+ $jsscript = "";
+ if ($form->{jsscript}) {
+
+ # with JavaScript Calendar
+ $button1 = qq|
+ <td><input name=paymentuntil id=paymentuntil size=11 title="$myconfig{dateformat}">
+ <input type=button name=paymentuntil id="trigger1" value=|
+ . $locale->text('button') . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1", "paymentuntil", "BR", "trigger1");
+ } else {
+
+ # without JavaScript Calendar
+ $button1 =
+ qq|<td><input name=paymentuntil id=paymentuntil 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>
+ $dunning_level
+ $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('Payment until') . qq|</th>
+ $button1
+ </tr>
+ <input type=hidden name=sort value=transdate>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Minimum Amount') . qq|</th>
+ <td><input name=minamount size=6></td>
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Group Invoices') . qq|</th>
+ <td><input type=checkbox value=1 name=groupinvoices checked></td>
+ </tr>
+ </table>
+ </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 show_invoices {
+ $lxdebug->enter_sub();
+
+ DN->get_invoices(\%myconfig, \%$form);
+ $form->{title} = $locale->text('Start Dunning Process');
+
+ if (@{ $form->{DUNNING_CONFIG} }) {
+ foreach $item (@{ $form->{DUNNING_CONFIG} }) {
+ $form->{selectdunning} .=
+ "<option value=$item->{id}>$item->{dunning_description}</option>";
+ }
+ }
+
+
+ $form->{nextsub} = "save_dunning";
+
+ $form->{callback} =
+ "$form->{script}?action=show_invoices&path=$form->{path}&login=$form->{login}&password=$form->{password}&customer=$form->{customer}&invnumber=$form->{invnumber}&ordnumber=$form->{ordnumber}&paymentuntil=$form->{paymentuntil}&groupinvoices=$form->{groupinvoices}&minamount=$form->{minamount}&dunning_level=$form->{dunning_level}¬es=$form->{notes}"
+ unless $form->{callback};
+
+ @column_index = qw(dunning_description active email customername invnumber invdate inv_duedate invamount next_duedate fee interest );
+
+ $column_header{dunning_description} =
+ qq|<th class=listheading>|
+ . $locale->text('Current / Next Level')
+ . qq|</th>|;
+ $column_header{active} =
+ qq|<th class=listheading>|
+ . $locale->text('Active?')
+ . qq|</th>|;
+ $column_header{email} =
+ qq|<th class=listheading>|
+ . $locale->text('eMail?')
+ . qq|</th>|;
+ $column_header{customername} =
+ qq|<th class=listheading>|
+ . $locale->text('Customername')
+ . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th class=listheading>|
+ . $locale->text('Invno.')
+ . qq|</th>|;
+ $column_header{inv_duedate} =
+ qq|<th class=listheading>|
+ . $locale->text('Inv. Duedate')
+ . qq|</th>|;
+ $column_header{next_duedate} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Duedate')
+ . qq|</th>|;
+ $column_header{invdate} =
+ qq|<th class=listheading>|
+ . $locale->text('Invdate')
+ . qq|</th>|;
+ $column_header{invamount} =
+ qq|<th class=listheading>|
+ . $locale->text('Amount')
+ . qq|</th>|;
+ $column_header{fee} =
+ qq|<th class=listheading>|
+ . $locale->text('Total Fees')
+ . qq|</th>|;
+ $column_header{interest} =
+ qq|<th class=listheading>|
+ . $locale->text('Total Interest')
+ . qq|</th>|;
+
+ $form->header;
+
+
+ print qq|
+<body>
+<script type="text/javascript" src="js/common.js"></script>
+<script type="text/javascript" src="js/dunning.js"></script>
+<form method=post action=$form->{script}>
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=9>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>|;
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ my $i = 0;
+ foreach $ref (@{ $form->{DUNNINGS} }) {
+
+ $i++;
+ my $j = $i % 2;
+
+ print qq|
+ <tr valign=top class=listrow$j>
+|;
+
+ $form->{selectdunning} =~ s/ selected//g;
+ if ($ref->{next_dunning_id} ne "") {
+ $form->{selectdunning} =~ s/value=$ref->{next_dunning_id}/value=$ref->{next_dunning_id} selected/;
+ }
+
+
+ $dunning = qq|<select name=next_dunning_id_$i>$form->{selectdunning}</select>|;
+
+
+ $column_data{dunning_description} = qq|<td><input type=hidden name=inv_id_$i size=2 value="$ref->{id}"><input type=hidden name=customer_id_$i size=2 value="$ref->{customer_id}">$ref->{dunning_level}: $dunning</td>|;
+ my $active = "checked";
+ $column_data{active} =
+ qq|<td><input type=checkbox name=active_$i value=1 $active></td>|;
+ my $email = "checked";
+ $column_data{email} =
+ qq|<td><input type=checkbox name=email_$i value=1 $email></td>|;
+ $column_data{next_duedate} = qq|<td><input type=hidden name=next_duedate_$i size=6 value="$ref->{next_duedate}">$ref->{next_duedate}</td>|;
+
+ $column_data{inv_duedate} = qq|<td><input type=hidden name=inv_duedate_$i size=6 value="$ref->{duedate}">$ref->{duedate}</td>|;
+ $column_data{invdate} = qq|<td><input type=hidden name=invdate_$i size=6 value="$ref->{transdate}">$ref->{transdate}</td>|;
+ $column_data{invnumber} = qq|<td><input type=hidden name=invnumber_$i size=6 value="$ref->{invnumber}">$ref->{invnumber}</td>|;
+ $column_data{customername} = qq|<td><input type=hidden name=customername_$i size=6 value="$ref->{customername}">$ref->{customername}</td>|;
+ $column_data{invamount} = qq|<td><input type=hidden name=invamount_$i size=6 value="$ref->{amount}">$ref->{amount}</td>|;
+ $column_data{fee} = qq|<td><input type=hidden name=fee_$i size=5 value="$ref->{fee}">$ref->{fee}</td>|;
+ $column_data{interest} = qq|<td><input type=hidden name=interest_$i size=4 value="$ref->{interest}">$ref->{interest}</td>|;
+
+
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ $form->{rowcount} = $i;
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+</table>|;
+&print_options;
+print qq|
+<br>
+<form method=post action=$form->{script}>
+
+<input name=callback type=hidden value="$form->{callback}">
+<input name=rowcount type=hidden value="$form->{rowcount}">
+<input name=nextsub type=hidden value="$form->{nextsub}">
+<input name=groupinvoices type=hidden value="$form->{groupinvoices}">
+
+
+<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|">|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+ </form>
+
+ </body>
+ </html>
+|;
+
+
+ $lxdebug->leave_sub();
+
+}
+
+sub save {
+ $lxdebug->enter_sub();
+
+ for my $i (1 .. $form->{rowcount}) {
+ if ($form->{"dunning_description_$i"} ne "") {
+ $form->isblank("dunning_level_$i", $locale->text('Dunning Level missing in row '). $i);
+ $form->isblank("dunning_description_$i", $locale->text('Dunning Description missing in row '). $i);
+ $form->isblank("terms_$i", $locale->text('Terms missing in row '). $i);
+ $form->isblank("payment_terms_$i", $locale->text('Payment Terms missing in row '). $i);
+ }
+ }
+
+ DN->save_config(\%myconfig, \%$form);
+ $form->redirect($locale->text('Dunning Process Config saved!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub save_dunning {
+ $lxdebug->enter_sub();
+
+ my $active=1;
+ my @rows = ();
+ undef($form->{DUNNING_PDFS});
+ if ($form->{groupinvoices}) {
+ while ($active) {
+ $lastcustomer = 0;
+ $form->{inv_ids} = "";
+ $active = 0;
+ @rows = ();
+ for my $i (1 .. $form->{rowcount}) {
+ $form->{"active_$i"} *= 1;
+ $lastcustomer = $form->{"customer_id_$i"} unless ($lastcustomer);
+ #print(STDERR qq|LASTCUSTOMER $lastcustomer AKTUELL $form->{"customer_id_$i"} ACTIVE? $form->{"active_$i"} active $active\n Zeile $i|);
+ if ($form->{"active_$i"} && ($form->{"customer_id_$i"} == $lastcustomer)) {
+ if ($form->{inv_ids}) {
+ $form->{inv_ids} .= qq|,$form->{"inv_id_$i"}|;
+ } else {
+ $form->{inv_ids} = qq|($form->{"inv_id_$i"}|;
+ }
+ $form->{"active_$i"} = 0;
+ $form->{"customer_id_$i"} = 0;
+ push(@rows, $i);
+ } elsif ($form->{"active_$i"}) {
+ $active = 1;
+ } else {
+ $form->{"customer_id_$i"} = 0;
+ }
+ }
+ if ($form->{inv_ids} ne "") {
+ $form->{inv_ids} .= ")";
+ #print(STDERR "Rufe save_dunning_auf für Zeile $form->{inv_ids} von Kunde $lastcustomer\n");
+ DN->save_dunning(\%myconfig, \%$form, \@rows, $userspath,$spool, $sendmail);
+ }
+ }
+ } else {
+ for my $i (1 .. $form->{rowcount}) {
+ if ($form->{"active_$i"}) {
+ @rows = ();
+ $form->{inv_ids} = qq|($form->{"inv_id_$i"})|;
+ push(@rows, $i);
+ #print(STDERR "Rufe save_dunning_auf für Zeile $i\n");
+ DN->save_dunning(\%myconfig, \%$form, \@rows, $userspath,$spool, $sendmail);
+ }
+ }
+ }
+ #print(STDERR Dumper($form->{DUNNING_PDFS}));
+ if($form->{DUNNING_PDFS}) {
+ DN->melt_pdfs(\%myconfig, \%$form,$spool);
+ }
+
+ $form->redirect($locale->text('Dunning Process started for selected invoices!'));
+
+ $lxdebug->leave_sub();
+}
+
+sub set_email {
+ $lxdebug->enter_sub();
+
+
+ my $callback = "$form->{script}?action=set_email&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_subject input_body input_attachment email_subject email_body email_attachment), grep({ /^[fl]_/ } keys %$form)));
+
+ if ($form->{email_attachment}) {
+ $form->{email_attachment} = "checked";
+ }
+ $form->{"title"} = $locale->text("Set eMail text");
+ $form->header();
+ print($form->parse_html_template("dunning/set_email"));
+
+ $lxdebug->leave_sub();
+}
+
+sub search {
+ $lxdebug->enter_sub();
+ # setup customer selection
+ $form->all_vc(\%myconfig, "customer", "AR");
+
+ DN->get_config(\%myconfig, \%$form);
+
+ 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>|;
+ }
+
+ # dunning levels
+ if (@{ $form->{DUNNING} }) {
+ $form->{selectdunning_level} = "<option></option\n";
+ map {
+ $form->{selectdunning_level} .=
+ "<option value=$_->{id}>$_->{dunning_description}</option>\n"
+ } (@{ $form->{DUNNING} });
+ }
+ $dunning_level = qq|
+ <tr>
+ <th align=right nowrap>| . $locale->text('Next Dunning Level') . qq|</th>
+ <td colspan=3><select name=dunning_level>$form->{selectdunning_level}</select></td>
+ </tr>
+ | if $form->{selectdunning_level};
+
+ # 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('Search Dunning');
+ $form->{nextsub} = "show_dunning";
+
+ # 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 id="trigger2" value=|
+ . $locale->text('button') . qq|></td>
+ |;
+ $button3 = qq|
+ <td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}">
+ <input type=button name=dunningfrom id="trigger3" value=|
+ . $locale->text('button') . qq|></td>
+ |;
+ $button4 = qq|
+ <td><input name=dunningto id=dunningto size=11 title="$myconfig{dateformat}">
+ <input type=button name=dunningto id="trigger4" value=|
+ . $locale->text('button') . qq|></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "4", "transdatefrom", "BR", "trigger1", "transdateto", "BR", "trigger2", "dunningfrom", "BR", "trigger3", "dunningto", "BR", "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>|;
+ $button1 =
+ qq|<td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}"></td>|;
+ $button1 =
+ qq|<td><input name=dunningfrom id=dunningto 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>
+ $dunning_level
+ $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('Invdate from') . qq|</th>
+ $button1
+ <th align=right nowrap>| . $locale->text('To') . qq|</th>
+ $button2
+ </tr>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Dunning Date from') . qq|</th>
+ $button3
+ <th align=right nowrap>| . $locale->text('To') . qq|</th>
+ $button4
+ </tr>
+
+ <input type=hidden name=sort value=transdate>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align=right nowrap>| . $locale->text('Show old dunnings') . qq|</th>
+ <td><input type=checkbox value=1 name=showold></td>
+ </tr>
+ </table>
+ </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 show_dunning {
+ $lxdebug->enter_sub();
+
+ DN->get_dunning(\%myconfig, \%$form);
+ $form->{title} = $locale->text('Dunning overview');
+
+
+
+
+
+ $form->{callback} =
+ "$form->{script}?action=show_dunning&path=$form->{path}&login=$form->{login}&password=$form->{password}&customer=$form->{customer}&invnumber=$form->{invnumber}&ordnumber=$form->{ordnumber}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&dunningfrom=$form->{dunningfrom}&dunningto=$form->{dunningto}¬es=$form->{notes}&showold=$form->{showold}&dunning_level=$form->{dunning_level}"
+ unless $form->{callback};
+
+ @column_index = qw(dunning_description customername invnumber invdate inv_duedate invamount dunning_date next_duedate fee interest );
+
+ $column_header{dunning_description} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Level')
+ . qq|</th>|;
+ $column_header{customername} =
+ qq|<th class=listheading>|
+ . $locale->text('Customername')
+ . qq|</th>|;
+ $column_header{invnumber} =
+ qq|<th class=listheading>|
+ . $locale->text('Invnumber')
+ . qq|</th>|;
+ $column_header{inv_duedate} =
+ qq|<th class=listheading>|
+ . $locale->text('Invoice Duedate')
+ . qq|</th>|;
+ $column_header{dunning_date} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Date')
+ . qq|</th>|;
+ $column_header{next_duedate} =
+ qq|<th class=listheading>|
+ . $locale->text('Dunning Duedate')
+ . qq|</th>|;
+ $column_header{invdate} =
+ qq|<th class=listheading>|
+ . $locale->text('Invdate')
+ . qq|</th>|;
+ $column_header{invamount} =
+ qq|<th class=listheading>|
+ . $locale->text('Amount')
+ . qq|</th>|;
+ $column_header{fee} =
+ qq|<th class=listheading>|
+ . $locale->text('Total Fees')
+ . qq|</th>|;
+ $column_header{interest} =
+ qq|<th class=listheading>|
+ . $locale->text('Total Interest')
+ . qq|</th>|;
+
+ $form->header;
+
+
+ print qq|
+<body>
+<script type="text/javascript" src="js/common.js"></script>
+<script type="text/javascript" src="js/dunning.js"></script>
+<form method=post action=$form->{script}>
+
+
+<table width=100%>
+ <tr>
+ <th class=listtop colspan=9>$form->{title}</th>
+ </tr>
+ <tr height="5"></tr>
+ <tr>|;
+ map { print "$column_header{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ my $i = 0;
+ foreach $ref (@{ $form->{DUNNINGS} }) {
+
+ $i++;
+ my $j = $i % 2;
+
+ print qq|
+ <tr valign=top class=listrow$j>
+|;
+
+
+
+ $dunning = qq|<select name=next_dunning_id_$i>$form->{selectdunning}</select>|;
+
+
+ $column_data{dunning_description} = qq|<td>$ref->{dunning_description}</td>|;
+ my $active = "checked";
+ $column_data{dunning_date} = qq|<td>$ref->{dunning_date}</td>|;
+ $column_data{next_duedate} = qq|<td>$ref->{dunning_duedate}</td>|;
+
+ $column_data{inv_duedate} = qq|<td>$ref->{duedate}</td>|;
+ $column_data{invdate} = qq|<td>$ref->{transdate}</td>|;
+ $column_data{invnumber} = qq|<td><a href=ar.pl?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{invnumber}</a></td>|;
+ $column_data{customername} = qq|<td>$ref->{customername}</td>|;
+ $column_data{invamount} = qq|<td>$ref->{amount}</td>|;
+ $column_data{fee} = qq|<td>$ref->{fee}</td>|;
+ $column_data{interest} = qq|<td>$ref->{interest}</td>|;
+
+
+
+ map { print "$column_data{$_}\n" } @column_index;
+
+ print qq|
+ </tr>
+|;
+ }
+
+ $form->{rowcount} = $i;
+
+ 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=rowcount type=hidden value="$form->{rowcount}">
+<input name=nextsub type=hidden 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}>
+|;
+
+ if ($form->{menubar}) {
+ require "$form->{path}/menu.pl";
+ &menubar;
+ }
+
+ print qq|
+
+ </form>
+
+ </body>
+ </html>
+|;
+
+
+ $lxdebug->leave_sub();
+
+}
+# end of main
+
<form method=post action=$form->{script}>
|;
- map { $form->{$_} =~ s/\"/"/g } qw(reference description chart taxchart);
+ 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|<input type=hidden name=$key value="$form->{$key}">\n|;
}
print qq|
"$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');
+ $form->{"unit_changeable"} = 1;
+
IC->get_pricegroups(\%myconfig, \%$form);
&link_part;
&display_form;
<td colspan=3>
<table>
<tr>
- <td><input name=l_partnumber class=checkbox type=checkbox value=Y checked> |
+ <td><input name=l_partnumber class=checkbox type=checkbox value=Y> |
. $locale->text('Part Number') . qq|</td>
<td><input name=l_description class=checkbox type=checkbox value=Y checked> |
. $locale->text('Part Description') . qq|</td>
. $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> |
+ <td><input name=l_lastcost class=checkbox type=checkbox value=Y checked> |
. $locale->text('Last Cost') . qq|</td>
<td><input name=l_linetotal class=checkbox type=checkbox value=Y checked> |
. $locale->text('Line Total') . qq|</td>
. $locale->text('Subtotal') . qq|</td>
<td><input name=l_soldtotal class=checkbox type=checkbox value=Y> |
. $locale->text('soldtotal') . qq|</td>
- <td><input name=l_deliverydate class=checkbox type=checkbox value=Y> |
- . $locale->text('deliverydate') . qq|</td>
</tr>
</table>
</td>
<input type=hidden name=revers value="$form->{revers}">
<input type=hidden name=lastsort value="$form->{lastsort}">
+<input type=hidden name=sort value="description">
<input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
$lxdebug->leave_sub();
} #end search()
+
+sub search_update_prices {
+ $lxdebug->enter_sub();
+
+ $form->{title} = $locale->text('Update prices');
+ IC->get_pricegroups(\%myconfig, \%$form);
+
+ # 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>|;
+# }
+
+ $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>
+|;
+
+
+
+ $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 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>|;
+ print qq|
+ <tr>
+ <td colspan=4>
+ <table width=100%>
+ <tr>
+ <th class="listheading">| . $locale->text('Preisklasse') . qq|</th>
+ <th class="listheading">| . $locale->text('Preis') . qq|</th>
+ <th class="listheading">| . $locale->text('Prozentual/Absolut') . qq|</th>
+ </tr>
+ <tr>
+ <td>| . $locale->text('Sell Price') . qq|</td>
+ <td><input name="sellprice" size=11 value="$form->{"sellprice"}"></td>
+ <td><input name="sellprice_type" class=radio type=radio value=percent checked>/<input name="sellprice_type" class=radio type=radio value=absolut></td>
+ </tr>
+ <tr>
+ <td>| . $locale->text('List Price') . qq|</td>
+ <td><input name="listprice" size=11 value="$form->{"listprice"}"></td>
+ <td><input name="listprice_type" class=radio type=radio value=percent checked>/<input name="listprice_type" class=radio type=radio value=absolut></td>
+ </tr>
+|;
+ for $i (1 .. $form->{price_rows}) {
+ print qq|
+ <tr>
+ <td width=50%><input type=hidden name="pricegroup_$i" size=30 value="$form->{"pricegroup_$i"}">$form->{"pricegroup_$i"}</td>
+ <td width=50%><input name="price_$i" size=11></td>
+ <input type=hidden name="pricegroup_id_$i" value="$form->{"pricegroup_id_$i"}">
+ <td><input name="pricegroup_type_$i" class=radio type=radio value=percent checked>/<input name="pricegroup_type_$i" class=radio type=radio value=absolut></td>
+ </tr>
+|;
+ }
+
+ print qq|
+ </table>
+ </td>
+ </tr>
+
+ <tr><td colspan=4><hr size=3 noshade></td></tr>
+</table>
+<input type=hidden name=nextsub value=confirm_price_update>
+<input type=hidden name=price_rows value=$form->{price_rows}>
+
+<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();
+} #end search()
+
+sub confirm_price_update {
+ $lxdebug->enter_sub();
+
+
+ $form->{nextsub} = "update_prices";
+ $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 update the prices')
+. qq| </h4>
+
+<p>
+<input name=action class=submit type=submit value="|
+ . $locale->text('Continue') . qq|">
+</form>
+|;
+
+ $lxdebug->leave_sub();
+}
+
+sub update_prices {
+ $lxdebug->enter_sub();
+
+ if (IC->update_prices(\%myconfig, \%$form)) {
+ $form->redirect($form->{update_count} . $locale->text('prices updated!'));
+ } else {
+ $form->error($locale->text('Could not update prices!'));
+ }
+
+ $lxdebug->leave_sub();
+}
+
sub choice {
$lxdebug->enter_sub();
|| $form->{rfq}
|| $form->{quoted}) {
$form->{l_onhand} = "Y";
- } else {
+ } else {
$form->{l_linetotalsellprice} = "";
$form->{l_linetotallastcost} = "";
}
$option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}<br>|;
}
- if ($form->{l_deliverydate}) {
- $callback .= "&deliverydate=$form->{deliverydate}";
- }
-
@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 deliverydate)
+ 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->{rfq}
|| $form->{quoted}) {
$form->{l_onhand} = "Y";
- } else {
+ } else {
$form->{l_linetotalsellprice} = "";
$form->{l_linetotallastcost} = "";
}
. $locale->text('soldtotal')
. qq|</a></th>|;
- $column_header{deliverydate} =
- qq|<th nowrap><a class=listheading href=$callback&sort=deliverydate&revers=$form->{revers}&lastsort=$form->{lastsort}>|
- . $locale->text('deliverydate')
- . qq|</a></th>|;
-
$form->header;
$colspan = $#column_index + 1;
$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{description} = "<td><a href=$form->{script}?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description} </a></td>";
$column_data{partsgroup} = "<td>$ref->{partsgroup} </td>";
$column_data{onhand} =
. $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ")
. "</td>";
- $column_data{deliverydate} = "<td>$ref->{deliverydate}</td>";
-
$i++;
$i %= 2;
print "<tr class=listrow$i>";
#decimalplaces for listprice
($dec) = ($form->{listprice} =~ /\.(\d+)/);
$dec = length $dec;
- my $decimalplaces = ($dec > 2) ? $dec : 2;
+ my $decimalplaces = ($dec == 2) ? $dec : 2;
$form->{listprice} =
$form->format_amount(\%myconfig, $form->{listprice}, $decimalplaces);
#decimalplaces for sellprice and gv
($dec) = ($form->{sellprice} =~ /\.(\d+)/);
$dec = length $dec;
- my $decimalplaces = ($dec > 2) ? $dec : 2;
+ my $decimalplaces = ($dec == 2) ? $dec : 2;
map {
$form->{$_} =
($dec) = ($form->{lastcost} =~ /\.(\d+)/);
$dec = length $dec;
- my $decimalplaces = ($dec > 2) ? $dec : 2;
+ my $decimalplaces = ($dec == 2) ? $dec : 2;
$form->{lastcost} =
$form->format_amount(\%myconfig, $form->{lastcost}, $decimalplaces);
$form->{$item} =~ s/\"/"/g;
}
+ $payment = qq|<option value=""></option>|;
+ foreach $item (@{ $form->{payment_terms} }) {
+ if ($form->{payment_id} eq $item->{id}) {
+ $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
+
+
if (($rows = $form->numtextrows($form->{notes}, 40)) < 2) {
- $rows = 2;
+ $rows = 4;
}
$notes =
- qq|<textarea name=notes rows=$rows cols=40 wrap=soft>$form->{notes}</textarea>|;
+ qq|<textarea name=notes rows=$rows cols=60 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>|;
$form->{"IC_tax_$item"} = ($form->{"IC_tax_$item"}) ? "checked" : "";
}
+ IC->retrieve_buchungsgruppen(\%myconfig, $form);
+ if (@{ $form->{BUCHUNGSGRUPPEN} }) {
+ foreach $item (@{ $form->{BUCHUNGSGRUPPEN} }) {
+ if ($item->{id} == $form->{buchungsgruppen_id}) {
+ $form->{selectbuchungsgruppe} .=
+ "<option value=$item->{id} selected>$item->{description}\n";
+ } elsif (($form->{id} && $form->{orphaned}) || (!$form->{id})) {
+ $form->{selectbuchungsgruppe} .=
+ "<option value=$item->{id}>$item->{description}\n";
+ }
+
+ }
+ }
+
+ $buchungsgruppe = qq|
+ <tr>
+ <th align=right>| . $locale->text('Buchungsgruppe') . qq|</th>
+ <td><select name=buchungsgruppen_id>$form->{selectbuchungsgruppe}</select></td>
+ </tr>|;
+
+
+ $form->{selectadr} = "<option></option>";
+ if (@{ $form->{ADR} }) {
+ foreach $item (@{ $form->{ADR} }) {
+ if ($item->{id} == $form->{adr_id}) {
+ $form->{selectadr} .=
+ "<option value=$item->{id} selected>$item->{adr_code}\n";
+ } else {
+ $form->{selectadr} .=
+ "<option value=$item->{id}>$item->{adr_code}\n";
+ }
+
+ }
+ }
+
+ $adr = qq|
+ <tr>
+ <th align=right>| . $locale->text('ADR') . qq|</th>
+ <td><select name=adr_id>$form->{selectadr}</select></td>
+ </tr>|;
+
+
# set option
foreach $item (qw(IC IC_income IC_expense)) {
if ($form->{$item}) {
<input name=selectIC_income type=hidden value="$form->{selectIC_income}">
</tr>
<tr>
- <th align=right>| . $locale->text('Expense') . qq|</th>
+ <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>
|;
}
+ $linkaccounts = qq|<input type=hidden name=IC_income value="$form->{IC_income_default}">|;
+
+ if ($form->{IC_cogs_default}) {
+ $form->{IC_expense_default} = $form->{IC_cogs_default};
+ }
+
+ if (($form->{item} eq "service") || ($form->{item} eq "part")) {
+ $linkaccounts .= qq|<input type=hidden name=IC_expense value="$form->{IC_expense_default}">|;
+ }
+ if ($form->{item} eq "part") {
+ $linkaccounts .= qq|<input type=hidden name=IC value="$form->{IC_default}">|;
+ }
if ($form->{item} ne 'service') {
$n = ($form->{onhand} > 0) ? "1" : "0";
<td><input name=gv size=10 value=$form->{gv}></td>
</tr>
|;
+ $aluok = $form->{alu} == 1 ? "checked" : "";
+
+ $alu .= qq|
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Aluartikel') . qq|</th>
+ <td><input class=checkbox type=checkbox name=alu value=1 $aluok></td>
+ </tr>|;
+
+ $notdiscountableok = ($form->{not_discountable}) == 1 ? "checked" : "";
+ $notdiscountable .= qq|
+ <tr>
+ <th align=right nowrap>|
+ . $locale->text('Not Discountable') . qq|</th>
+ <td><input class=checkbox type=checkbox name=not_discountable value=1 $notdiscountableok></td>
+ </tr>
+|;
+
+ $formel =
+ qq|<ilayer><layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('| . $locale->text('The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br><br>For alu article:<br>Length:<br>Weight/m:<br>Length ist total length of article and weight/m ist the weight pro meter') . qq|')"><textarea name=formel rows=4 cols=60 wrap=soft>$form->{formel}</textarea></layer><ilayer>|;
+ $formel = "";
$imagelinks = qq|
<tr>
<td>
|;
}
$shopok = $form->{shop} == 1 ? "checked" : "";
- $obsolete .= qq|
+ $shop .= qq|
<tr>
<th align=right nowrap>|
. $locale->text('Shopartikel') . qq|</th>
</tr>
|;
+
# type=submit $locale->text('Add Part')
# type=submit $locale->text('Add Service')
# type=submit $locale->text('Add Assembly')
<td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}"></td>|;
}
+ my $unit_select = '<input type="hidden" name="unit_changeable" value="' . $form->{"unit_changeable"} . '">';
+ if (!$form->{"unit_changeable"}) {
+ $unit_select .= '<input type="hidden" name="unit" value="' . $form->{"unit"} . '">' . $form->{"unit"};
+ } else {
+ my $units = AM->retrieve_units(\%myconfig, $form, $form->{"item"} eq "service" ? "service" : "dimension");
+ $unit_select .= AM->unit_select_html($units, "unit", $form->{"unit"});
+ }
+
$form->{fokus} = "ic.partnumber";
$form->header;
print qq|
<body onLoad="fokus()">
-
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/parts_language_selection.js"></script>
<form method=post name="ic" action=$form->{script}>
<input name=taxaccounts type=hidden value="$form->{taxaccounts}">
<input name=rowcount type=hidden value=$form->{rowcount}>
<input name=eur type=hidden value=$eur>
+<input name=language_values type=hidden value="$form->{language_values}">
<table width="100%">
<tr>
<table width="100%" height="100%">
<tr class="listheading">
<th class="listheading" align="center" colspan=2>|
- . $locale->text('Link Accounts') . qq|</th>
+ . $locale->text('') . qq|</th>
</tr>
- $linkaccounts
+ <td colspan=2>
+ <table>
+ $buchungsgruppe
+ $linkaccounts
+ $adr
+ </table>
+ </td>
<tr>
<th align="left">| . $locale->text('Notes') . qq|</th>
</tr>
<tr>
- <td colspan=2>
+ <td>
$notes
</td>
</tr>
+ <tr>
+ <td colspan=2>
+ <button type="button" onclick="parts_language_selection_window('language_values')">| . $locale->text('Set Language Values') . qq|</button>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Payment Terms') . qq|</th>
+ <td><select name=payment_id>$payment</select></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
</table>
</td>
<td width="30%">
$lastcost
<tr>
<th align="right" nowrap="true">| . $locale->text('Unit') . qq|</th>
- <td><input name=unit size=5 maxlength="10" value="$form->{unit}"></td>
+ <td>$unit_select</td>
</tr>
$weight
$rop
$bin
+ $notdiscountable
$vegv
+ $shop
+ $alu
$obsolete
</table>
</td>
print qq|
</form>
+<script type="text/javascript" src="js/wz_tooltip.js"></script>
</body>
</html>
$column_data{total} = qq|<td align=right>$linetotal</td>|;
- $column_data{deliverydate} = qq|<td align=right>$deliverydate</td>|;
-
print qq|
<tr>|;
&check_form;
- } else {
+ } else {
IC->assembly_item(\%myconfig, \%$form);
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
qw(sellprice listprice);
&form_header;
+ &price_row;
&form_footer;
}
sub save {
$lxdebug->enter_sub();
- # check if there is a part number - commented out, cause there is an automatic allocation of numbers
+ # check if there is a part number
# $form->isblank("partnumber", $locale->text(ucfirst $form->{item}." Part Number missing!"));
- # check if there is a description
- $form->isblank("description", $locale->text("Part Description missing!"));
-
if ($form->{obsolete}) {
$form->error(
$locale->text(
if ($form->{onhand});
}
+ if (!$form->{buchungsgruppen_id}) {
+ $form->error($locale->text("Parts must have an entry type.") . " " .
+ $locale->text("If you see this message, you most likely just setup your LX-Office and haven't added any entry types. If this is the case, the option is accessible for administrators in the System menu.")
+ );
+ }
+
+ $form->error($locale->text('Description must not be empty!')) unless $form->{description};
+ $form->error($locale->text('Partnumber must not be set to empty!')) if $form->{id} && !$form->{partnumber};
+
# 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!')
$lxdebug->leave_sub();
}
+
+sub parts_language_selection {
+ $lxdebug->enter_sub();
+
+
+ my $languages = IC->retrieve_languages(\%myconfig, $form);
+
+
+ my $callback = "$form->{script}?action=parts_language_selection&";
+ map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
+ (qw(login path password name input_name), grep({ /^[fl]_/ } keys %$form)));
+
+ my @header_sort = qw(name longdescription);
+ my %header_title = ( "name" => $locale->text("Name"),
+ "longdescription" => $locale->text("Long Description"),
+ );
+
+ my @header =
+ map(+{ "column_title" => $header_title{$_},
+ "column" => $_,
+ "callback" => $callback,
+ },
+ @header_sort);
+
+ $form->{"title"} = $locale->text("Language Values");
+ $form->header();
+ print($form->parse_html_template("ic/parts_language_selection", { "HEADER" => \@header,
+ "LANGUAGES" => $languages,
+ "onload" => $onload }));
+
+ $lxdebug->leave_sub();
+}
+
sub continue { &{ $form->{nextsub} } }
# $locale->text('Dec')
use SL::IS;
use SL::PE;
+use SL::AM;
use Data::Dumper;
########################################
# Eintrag fuer Version 2.2.0 geaendert #
}
############## ENDE Neueintrag ##################
+ my $dimension_units = AM->retrieve_units(\%myconfig, $form, "dimension");
+ my $service_units = AM->retrieve_units(\%myconfig, $form, "service");
+ my $all_units = AM->retrieve_units(\%myconfig, $form);
+
push @column_index, qw(unit);
#for pricegroups column
map {
$form->{"${_}_$i"} =
$form->parse_amount(\%myconfig, $form->{"${_}_$i"})
- } qw(qty ship discount sellprice price_new price_old);
+ } qw(qty ship discount sellprice price_new price_old) unless ($form->{simple_save});
+
+ if (!$form->{"unit_old_$i"}) {
+ # Neue Ware aus der Datenbank. In diesem Fall ist unit_$i die
+ # Einheit, wie sie in den Stammdaten hinterlegt wurde.
+ # Es sollte also angenommen werden, dass diese ausgewaehlt war.
+ $form->{"unit_old_$i"} = $form->{"unit_$i"};
+ }
+
+
+
+ # Die zuletzt ausgewaehlte mit der aktuell ausgewaehlten Einheit
+ # vergleichen und bei Unterschied den Preis entsprechend umrechnen.
+ $form->{"selected_unit_$i"} = $form->{"unit_$i"} unless ($form->{"selected_unit_$i"});
+ my $check_units = $form->{"inventory_accno_$i"} ? $dimension_units : $service_units;
+ if (!$check_units->{$form->{"selected_unit_$i"}} ||
+ ($check_units->{$form->{"selected_unit_$i"}}->{"base_unit"} ne
+ $all_units->{$form->{"unit_old_$i"}}->{"base_unit"})) {
+ # Die ausgewaehlte Einheit ist fuer diesen Artikel nicht gueltig
+ # (z.B. Dimensionseinheit war ausgewaehlt, es handelt sich aber
+ # um eine Dienstleistung). Dann keinerlei Umrechnung vornehmen.
+ $form->{"unit_old_$i"} = $form->{"selected_unit_$i"} = $form->{"unit_$i"};
+ }
+ if ((!$form->{"prices_$i"}) || ($form->{"new_pricegroup_$i"} == $form->{"old_pricegroup_$i"})) {
+ if ($form->{"unit_old_$i"} ne $form->{"selected_unit_$i"}) {
+ my $basefactor = 1;
+ if (defined($all_units->{$form->{"unit_old_$i"}}->{"factor"}) &&
+ $all_units->{$form->{"unit_old_$i"}}->{"factor"}) {
+ $basefactor = $all_units->{$form->{"selected_unit_$i"}}->{"factor"} /
+ $all_units->{$form->{"unit_old_$i"}}->{"factor"};
+ }
+ $form->{"sellprice_$i"} *= $basefactor;
+ $form->{"unit_old_$i"} = $form->{"selected_unit_$i"};
+ }
+ }
($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
$dec = length $dec;
$decimalplaces = ($dec > 2) ? $dec : 2;
# convert " to "
map { $form->{"${_}_$i"} =~ s/\"/"/g }
- qw(partnumber description unit);
+ qw(partnumber description unit unit_old);
########################################
# Eintrag fuer Version 2.2.0 geaendert #
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>|;
+ qq|<td><textarea name="description_$i" rows=$rows cols=30 wrap=soft>$form->{"description_$i"}</textarea><button type="button" onclick="set_longdescription_window('longdescription_$i')">| . $locale->text('L') . qq|</button></td>|;
} else {
$column_data{description} =
- qq|<td><input name="description_$i" size=30 value="$form->{"description_$i"}"></td>|;
+ qq|<td><input name="description_$i" size=30 value="$form->{"description_$i"}"><button type="button" onclick="set_longdescription_window('longdescription_$i')">| . $locale->text('L') . qq|</button></td>|;
}
(my $qty_dec) = ($form->{"qty_$i"} =~ /\.(\d+)/);
$column_data{qty} =
qq|<td align=right><input name="qty_$i" size=5 value=|
- . $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec)
- . qq|></td>|;
+ . $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec) .qq|>|;
+ if ($form->{formel}) {
+ $column_data{qty} .= qq|<button type="button" onclick="calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)">| . $locale->text('*/') . qq|</button>
+ <input type=hidden name="formel_$i" value="$form->{"formel_$i"}"><input type=hidden name="alu_$i" value="$form->{"alu_$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><input name="unit_$i" size=5 value="$form->{"unit_$i"}"></td>|;
+
+ my $is_part = $form->{"inventory_accno_$i"};
+ my $is_assigned = $form->{"id_$i"};
+ my $this_unit = $form->{"unit_$i"};
+ if ($form->{"selected_unit_$i"} && $this_unit &&
+ $all_units->{$form->{"selected_unit_$i"}} && $all_units->{$this_unit} &&
+ ($all_units->{$form->{"selected_unit_$i"}}->{"base_unit"} eq $all_units->{$this_unit}->{"base_unit"})) {
+ $this_unit = $form->{"selected_unit_$i"};
+ } elsif (!$is_assigned ||
+ ($is_part && !$this_unit && ($all_units->{$this_unit} && ($all_units->{$this_unit}->{"base_unit"} eq $all_units->{"kg"}->{"base_unit"})))) {
+ $this_unit = "kg";
+ }
+
+ $column_data{"unit"} = "<td>" .
+ ($qty_readonly ? " " :
+ AM->unit_select_html($is_part ? $dimension_units :
+ $is_assigned ? $service_units : $all_units,
+ "unit_$i", $this_unit,
+ $is_assigned ? $form->{"unit_$i"} : undef))
+ . "</td>";
# build in dragdrop for pricesgroups
if ($form->{"prices_$i"}) {
- $price_tmp =
- $form->format_amount(\%myconfig, $form->{"price_new_$i"}, 2);
+ if ($form->{"new_pricegroup_$i"} != $form->{"old_pricegroup_$i"}) {
+ $price_tmp = $form->format_amount(\%myconfig, $form->{"price_new_$i"}, $decimalplaces);
+ } else {
+ $price_tmp = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
+ }
$column_data{sellprice_drag} =
qq|<td align=right><select name="sellprice_drag_$i">$form->{"prices_$i"}</select></td>|;
$column_data{sellprice} =
- qq|<td><input name="sellprice_$i" size=5 value=$price_tmp></td>|;
+ qq|<td><input name="sellprice_$i" size=10 value=$price_tmp></td>|;
} else {
# for last row and report
$decimalplaces)
. qq|></td>|;
}
+ print(STDERR "Sellprice vor Ausgabe: ",$form->{"sellprice_$i"},"\n");
$column_data{sellprice} =
- qq|<td><input name="sellprice_$i" size=5 value=|
+ qq|<td><input name="sellprice_$i" size=10 value=|
. $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
$decimalplaces)
. qq|></td>|;
#
# $column_data{projectnr} = qq|<td><input name="projectnumber_$i" size=10 value="$form->{"projectnumber_$i"}"></td>|;
############## ENDE Neueintrag ##################
-
+ my $j = $i % 2;
print qq|
- <tr valign=top>|;
+
+ <tr valign=top class=listrow$j>|;
map { print "\n$column_data{$_}" } @column_index;
<input type=hidden name="pricegroup_old_$i" value=$form->{"pricegroup_old_$i"}>
<input type=hidden name="price_old_$i" value=$form->{"price_old_$i"}>
+<input type=hidden name="unit_old_$i" value="$form->{"selected_unit_$i"}">
<input type=hidden name="price_new_$i" value=|
. $form->format_amount(\%myconfig, $form->{"price_new_$i"}) . qq|>
<input type=hidden name="ordnumber_$i" value="$form->{"ordnumber_$i"}">
<input type=hidden name="transdate_$i" value="$form->{"transdate_$i"}">
<input type=hidden name="cusordnumber_$i" value="$form->{"cusordnumber_$i"}">
+<input type=hidden name="longdescription_$i" value="$form->{"longdescription_$i"}">
+<input type=hidden name="basefactor_$i" value="$form->{"basefactor_$i"}">
+<input type=hidden name="adr_description_$i" value="$form->{"adr_description_$i"}">
|;
########################################
# print second row
print qq|
- <tr>
+ <tr class=listrow$j>
<td colspan=$colspan>
|;
if ($lizenzen && $form->{type} eq "invoice" && $form->{vc} eq "customer") {
<b>${$reqdate_term}</b> <input name="${reqdate_term}_$i" size=11 value="$form->{"${reqdate_term}_$i"}">
|;
}
-
+ my $subtotalchecked = ($form->{"subtotal_$i"}) ? "checked" : "";
print qq|
+ <b>|.$locale->text('Subtotal').qq|</b> <input type="checkbox" name="subtotal_$i" value="1" "$subtotalchecked">
</td>
</tr>
<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_formel_$i" type=hidden value="$ref->{formel}">
+<input name="new_alu_$i" type=hidden value="$ref->{alu}">
+<input name="new_longdescription_$i" type=hidden value="$ref->{longdescription}">
+<input name="new_not_discountable_$i" type=hidden value="$ref->{not_discountable}">
+<input name="new_part_payment_id_$i" type=hidden value="$ref->{part_payment_id}">
+<input name="new_adr_description_$i" type=hidden value="$ref->{adr_description}">
<input name="new_id_$i" type=hidden value=$ref->{id}>
$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);
+ qw(id partnumber description sellprice listprice inventory_accno income_accno expense_accno bin unit weight assembly taxaccounts partsgroup formel alu longdescription not_discountable adr_description);
+ if ($form->{"part_payment_id_$i"} ne "") {
+ $form->{payment_id} = $form->{"part_payment_id_$i"};
+ }
if ($lizenzen) {
map { $form->{"${_}_$i"} = $form->{"new_${_}_$j"} } qw(lizenzen);
$form->{sellprice} += ($form->{"sellprice_$i"} * $form->{"qty_$i"});
$form->{weight} += ($form->{"weight_$i"} * $form->{"qty_$i"});
+
+ if ($form->{"not_discountable_$i"}) {
+ $form->{"discount_$i"} = 0;
+ }
$amount =
$form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) *
sub display_form {
$lxdebug->enter_sub();
+ $form->language_payment(\%myconfig);
# if we have a display_form
if ($form->{display_form}) {
$subroutine = "makemodel_row";
}
if ($form->{item} eq 'assembly') {
- $numrows = ++$form->{price_rows};
+ $numrows = $form->{price_rows};
$subroutine = "price_row";
&{$subroutine}($numrows);
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)
+ 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 payment_id not_discountable shop ve gv buchungsgruppen_id adr_id language_values)
);
+
# remove any makes or model rows
if ($form->{item} eq 'part') {
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
$form->{rowcount}--;
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
require "$form->{path}/$form->{script}";
$buysell = 'buy';
}
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
$form->{script} = 'oe.pl';
. $locale->text('Bin List');
}
+ if ($form->{type} eq 'credit_note') {
+ $type = qq|<select name=formname>
+ <option value=credit_note $form->{PD}{credit_note}>|
+ . $locale->text('Credit Note');
+ }
+
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=proforma $form->{PD}{proforma}>|
+ . $locale->text('Proforma Invoice') . 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');
+ . $locale->text('Packing List') . qq|
+ <option value=agb $form->{PD}{agb}>|
+ . $locale->text('AGB') . qq|
+ <option value=bunker_receipt $form->{PD}{bunker_receipt}>|
+ . $locale->text('Bunker Receipt');
}
if ($form->{type} =~ /_quotation$/) {
$type = qq|<select name=formname>
<option value="$`_quotation" $form->{PD}{"$`_quotation"}>|
- . $locale->text('Quotation') . qq|
-|;
+ . $locale->text('Quotation')
+;
}
if ($form->{type} eq 'invoice') {
$type = qq|<select name=formname>
<option value=invoice $form->{PD}{invoice}>|
. $locale->text('Invoice') . qq|
+ <option value=proforma $form->{PD}{proforma}>|
+ . $locale->text('Proforma Invoice') . qq|
<option value=packing_list $form->{PD}{packing_list}>|
. $locale->text('Packing List');
}
+ if ($form->{type} eq 'invoice' && $form->{storno}) {
+ $type = qq|<select name=formname>
+ <option value=storno_invoice $form->{PD}{storno_invoice}>|
+ . $locale->text('Storno Invoice') . qq|
+ <option value=storno_packing_list $form->{PD}{storno_packing_list}>|
+ . $locale->text('Storno Packing List');
+ }
+
+ if ($form->{type} eq 'credit_note') {
+ $type = qq|<select name=formname>
+ <option value=credit_note $form->{PD}{credit_note}>|
+ . $locale->text('Credit Note');
+ }
+
if ($form->{type} eq 'ship_order') {
$type = qq|<select name=formname>
<option value=pick_list $form->{PD}{pick_list}>|
} else {
$media = qq|<select name=media>
<option value=screen $form->{OP}{screen}>| . $locale->text('Screen');
- if ($myconfig{printer} && $latex_templates) {
+ if (scalar(keys (%{ $form->{printers} })) !=0 && $latex_templates) {
$media .= qq|
<option value=printer $form->{OP}{printer}>|
. $locale->text('Printer');
}
}
- $format = qq|<select name=format>
- <option value=html $form->{DF}{html}>html|;
+ $format = qq|<select name=format>|;
+ if ($opendocument_templates && $openofficeorg_writer_bin &&
+ $xvfb_bin && (-x $openofficeorg_writer_bin) && (-x $xvfb_bin)) {
+ $format .= qq|<option value=opendocument_pdf | .
+ $form->{DF}{"opendocument_pdf"} . qq|>| .
+ $locale->text("PDF (OpenDocument/OASIS)") . qq|</option>|;
+ }
if ($latex_templates) {
- $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');
+ $format .= qq|<option value=pdf $form->{DF}{pdf}>| .
+ $locale->text('PDF') . qq|</option>|;
}
$format .= qq|<option value=html $form->{DF}{html}>HTML</option>|;
- if ($latex_templates) {
+ if ($latex) {
$format .= qq|<option value=postscript $form->{DF}{postscript}>| .
$locale->text('Postscript') . qq|</option>|;
}
- $language_select = 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_select .= qq|<option value="$item" selected>$lang{$item}</option>|;
- } else {
- $language_select .= qq|<option value="$item">$lang{$item}</option>|;
+ if ($opendocument_templates) {
+ $format .= qq|<option value=opendocument $form->{DF}{opendocument}>| .
+ $locale->text("OpenDocument/OASIS") . qq|</option>|;
+ }
+ $format .= qq|</select>|;
+
+ if (scalar(keys (%{ $form->{languages} })) !=0) {
+
+ $language_select = qq|<select name=language_id>|;
+ foreach $item (@{ $form->{languages} }) {
+ if ($form->{language_id} eq $item->{id}) {
+ $language_select .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $language_select .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
}
}
+ if (scalar(keys (%{ $form->{printers} })) !=0) {
+
+ $printer_select = qq|<select name=printer_id>
+ <option value=""></option>|;
+ foreach $item (@{ $form->{printers} }) {
+ $printer_select .= qq|<option value="$item->{id}">$item->{printer_description}</option>|;
+ }
+ }
+
+
+
print qq|
<table width=100% cellspacing=0 cellpadding=0>
<tr>
<td>
<table>
<tr>
- <td>$type</select></td>
- <td>${language_select}</select></td>
+ <td>$type</select></td>|;
+ if (scalar(keys (%{ $form->{languages} })) !=0) {
+ print qq|
+ <td>${language_select}</select></td>|;
+ }
+ print qq|
<td>$format</select></td>
- <td>$media</select></td>
+ <td>$media</select></td>|;
+ if (scalar(keys (%{ $form->{printers} })) !=0) {
+ print qq|
+ <td>$printer_select</select></td>
|;
+ }
- if ($myconfig{printer} && $latex_templates && $form->{media} ne 'email') {
+ if (scalar(keys (%{ $form->{printers} })) !=0 && $latex_templates && $form->{media} ne 'email') {
print qq|
<td>| . $locale->text('Copies') . qq|
<input name=copies size=2 value=$form->{copies}></td>
map { $old_form->{$_} = $form->{$_} } keys %$form;
}
+ if (!$form->{id} || (($form->{formname} eq "proforma") && !$form->{proforma} && (($form->{type} =~ /_order$/) || ($form->{type} =~ /_quotation$/)))) {
+ if ($form->{formname} eq "proforma") {
+ $form->{proforma} = 1;
+ }
+ $form->{print_and_save} = 1;
+ my $formname = $form->{formname};
+ &save();
+ $form->{formname} = $formname;
+ &edit();
+ exit;
+ }
+
&print_form($old_form);
$lxdebug->leave_sub();
# this is from an invoice
$form->{label} = $locale->text('Packing List');
}
- if ($form->{formname} eq 'sales_order') {
+ if (($form->{formname} eq 'sales_order') || ($form->{formname} eq 'agb') || ($form->{formname} eq 'bunker_receipt')) {
$inv = "ord";
$due = "req";
$form->{"${inv}date"} = $form->{transdate};
$numberfld = "sonumber";
$order = 1;
}
+
+ if (($form->{type} eq 'invoice') && ($form->{formname} eq 'proforma') ) {
+ $inv = "inv";
+ $due = "due";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{"invdate"} = $form->{transdate};
+ $form->{label} = $locale->text('Proforma Invoice');
+ $numberfld = "sonumber";
+ $order = 0;
+ }
+
+ if (($form->{type} eq 'sales_order') && ($form->{formname} eq 'proforma') ) {
+ $inv = "inv";
+ $due = "due";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{"invdate"} = $form->{transdate};
+ $form->{invnumber} = $form->{ordnumber};
+ $form->{label} = $locale->text('Proforma Invoice');
+ $numberfld = "sonumber";
+ $order = 1;
+ }
+
if ($form->{formname} eq 'packing_list' && $form->{type} ne 'invoice') {
# we use the same packing list as from an invoice
$form->{invdate} = $form->{"${inv}date"} = $form->{transdate};
$form->{label} = $locale->text('Packing List');
$order = 1;
- # set invnumber for template packing_list
- $form->{invnumber} = $form->{ordnumber};
}
if ($form->{formname} eq 'pick_list') {
$inv = "ord";
$numberfld = "sqnumber";
$order = 1;
}
+
+ if (($form->{type} eq 'sales_quotation') && ($form->{formname} eq 'proforma') ) {
+ $inv = "quo";
+ $due = "req";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{"invdate"} = $form->{transdate};
+ $form->{label} = $locale->text('Proforma Invoice');
+ $numberfld = "sqnumber";
+ $order = 1;
+ }
+
if ($form->{formname} eq 'request_quotation') {
$inv = "quo";
$due = "req";
my ($saved_email, $saved_cc, $saved_bcc) =
($form->{"email"}, $form->{"cc"}, $form->{"bcc"});
- $language_saved = $form->{language};
+ $language_saved = $form->{language_id};
&{"$form->{vc}_details"};
- $form->{language} = $language_saved;
+ $form->{language_id} = $language_saved;
$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",
- "transdate_$i", "ordnumber_$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};
} 0 .. $#{ $form->{$field} };
}
+ if ($form->{shipto_id}) {
+ $form->get_shipto(\%myconfig);
+ }
+
@a = qw(name street zipcode city country);
$shipto = 1;
$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 department_1 department_2);
-
- push @a, ("${inv}date", "${due}date", "deliverydate", email, cc, bcc);
+ $form->{templates} = "$myconfig{templates}";
- $form->format_string(@a);
+ $form->{language} = $form->get_template_language(\%myconfig);
+ $form->{printer_code} = $form->get_printer_code(\%myconfig);
- $form->{templates} = "$myconfig{templates}";
if ($form->{language} ne "") {
$form->{language} = "_" . $form->{language};
}
- $form->{IN} = "$form->{formname}$form->{language}.html";
+ if ($form->{printer_code} ne "") {
+ $form->{printer_code} = "_" . $form->{printer_code};
+ }
+
+ $form->{IN} = "$form->{formname}$form->{language}$form->{printer_code}.html";
if ($form->{format} eq 'postscript') {
$form->{postscript} = 1;
$form->{IN} =~ s/html$/tex/;
- }
- if ($form->{format} eq 'pdf') {
+ } elsif ($form->{"format"} =~ /pdf/) {
$form->{pdf} = 1;
- $form->{IN} =~ s/html$/tex/;
+ if ($form->{"format"} =~ /opendocument/) {
+ $form->{IN} =~ s/html$/odt/;
+ } else {
+ $form->{IN} =~ s/html$/tex/;
+ }
+ } elsif ($form->{"format"} =~ /opendocument/) {
+ $form->{"opendocument"} = 1;
+ $form->{"IN"} =~ s/html$/odt/;
}
if ($form->{media} eq 'printer') {
- $form->{OUT} = "| $myconfig{printer}";
+ $form->{OUT} = "| $form->{printer_command} &>/dev/null";
$form->{printed} .= " $form->{formname}";
$form->{printed} =~ s/^ //;
}
: $locale->text('emailed to') . " $form->{email}";
$form->redirect(qq|$form->{label} $form->{"${inv}number"} $msg|);
}
+ if ($form->{printing}) {
+ &{"$display_form"};
+ exit;
+ }
$lxdebug->leave_sub();
}
$form->create_links("AP", \%myconfig, "vendor");
- #quote all_vendor Bug 133
- foreach $ref (@{ $form->{all_vendor} }) {
- $ref->{name} = $form->quote($ref->{name});
- }
-
if ($form->{all_vendor}) {
unless ($form->{vendor_id}) {
$form->{vendor_id} = $form->{all_vendor}->[0]->{id};
}
}
+ if ($form->{payment_id}) {
+ $payment_id = $form->{payment_id};
+ }
+ if ($form->{language_id}) {
+ $language_id = $form->{language_id};
+ }
+ if ($form->{taxzone_id}) {
+ $taxzone_id = $form->{taxzone_id};
+ }
$cp_id = $form->{cp_id};
IR->get_vendor(\%myconfig, \%$form);
IR->retrieve_invoice(\%myconfig, \%$form);
$form->{cp_id} = $cp_id;
+
+ if ($payment_id) {
+ $form->{payment_id} = $payment_id;
+ }
+ if ($language_id) {
+ $form->{language_id} = $language_id;
+ }
+ if ($taxzone_id) {
+ $form->{taxzone_id} = $taxzone_id;
+ }
# currencies
@curr = split /:/, $form->{currencies};
s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
}
- #quote selectvendor Bug 133
- $form->{"selectvendor"} = $form->quote($form->{"selectvendor"});
-
$form->{exchangerate} =
$form->format_amount(\%myconfig, $form->{exchangerate});
<input type=hidden name=forex value=$form->{forex}>
|;
+
+ if (@{ $form->{TAXZONE} }) {
+ $form->{selecttaxzone} = "";
+ foreach $item (@{ $form->{TAXZONE} }) {
+ if ($item->{id} == $form->{taxzone_id}) {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id} selected>$item->{description}</option>";
+ } else {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id}>$item->{description}</option>";
+ }
+
+ }
+ } else {
+ $form->{selecttaxzone} =~ s/ selected//g;
+ if ($form->{taxzone_id} ne "") {
+ $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/;
+ }
+ }
+ if ($form->{rowcount} >1) {
+ $form->{selecttaxzone} =~ /<option value=\d+ selected>.*?<\/option>/;
+ $form->{selecttaxzone} = $&;
+ }
+
+
+ $taxzone = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
+ <input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
+ </tr>|;
+
+
+
$vendor =
($form->{selectvendor})
? qq|<select name=vendor>$form->{selectvendor}</select>\n<input type=hidden name="selectvendor" value="$form->{selectvendor}">|
<input type=hidden name=locked value=$form->{locked}>
<input type=hidden name=shipped value=$form->{shipped}>
-
+<input type=hidden name=storno value=$form->{storno}>
+<input type=hidden name=storno_id value=$form->{storno_id}>
<table width=100%>
<tr class=listtop>
<td colspan=3><select name=AP>$form->{selectAP}</select></td>
<input type=hidden name=selectAP value="$form->{selectAP}">
</tr>
+ $taxzone
$department
<tr>
<th align=right nowrap>| . $locale->text('Currency') . qq|</th>
if ($form->{id}) {
print qq|<input class=submit type=submit name=action value="|
- . $locale->text('Update') . qq|">
+ . $locale->text('Post Payment') . 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|">
-|;
- }
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Storno') . qq|">
+| unless ($form->{storno});
} else {
if ($invdate > $closedto) {
$form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
&check_form;
- } else {
+ } else {
+
+ $form->{"selected_unit_$i"} = $form->{"unit_$i"};
IR->retrieve_item(\%myconfig, \%$form);
$lxdebug->leave_sub();
}
+sub storno {
+ $lxdebug->enter_sub();
+
+ if ($form->{storno}) {
+ $form->error($locale->text('Cannot storno storno invoice!'));
+ }
+
+ $form->{storno_id} = $form->{id};
+ $form->{storno} = 1;
+ $form->{id} = "";
+ $form->{invnumber} = "Storno zu " . $form->{invnumber};
+ $form->{rowcount}--;
+
+ &post();
+ $lxdebug->leave_sub();
+
+}
+
+sub post_payment {
+ $lxdebug->enter_sub();
+ 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->redirect($locale->text(' Payment posted!'))
+ if (IR->post_payment(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post payment!'));
+
+
+ $lxdebug->leave_sub();
+}
+
sub post {
$lxdebug->enter_sub();
if ($form->{currency} ne $form->{defaultcurrency});
for $i (1 .. $form->{paidaccounts}) {
- if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
+ if ($form->{"paid_$i"}) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
$form->{id} = 0 if $form->{postasnew};
- # get new invnumber in sequence if no invnumber is given or if posasnew was requested
- if (!$form->{invnumber} || $form->{postasnew}) {
- $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
- }
-
$form->redirect( $locale->text('Invoice')
. " $form->{invnumber} "
. $locale->text('posted!'))
sub add {
$lxdebug->enter_sub();
+
+ if ($form->{type} eq "credit_note") {
+ $form->{title} = $locale->text('Add Credit Note');
+
+ if ($form->{storno}) {
+ $form->{title} = $locale->text('Add Storno Credit Note');
+ }
+ } else {
+ $form->{title} = $locale->text('Add Sales Invoice');
+
+ }
- $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}"
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");
}
+ $edit = 1;
if ($form->{print_and_post}) {
$form->{action} = "print";
$form->{resubmit} = 1;
+ $language_id = $form->{language_id};
+ $printer_id = $form->{printer_id};
}
&invoice_links;
&prepare_invoice;
+ if ($form->{print_and_post}) {
+ $form->{language_id} = $language_id;
+ $form->{printer_id} = $printer_id;
+ }
+
&display_form;
$lxdebug->leave_sub();
$form->{customer_id} = $form->{all_customer}->[0]->{id};
}
}
- $cp_id = $form->{cp_id};
- IS->get_customer(\%myconfig, \%$form);
- #quote all_customer Bug 133
- foreach $ref (@{ $form->{all_customer} }) {
- $ref->{name} = $form->quote($ref->{name});
+ if ($form->{payment_id}) {
+ $payment_id = $form->{payment_id};
+ }
+ if ($form->{language_id}) {
+ $language_id = $form->{language_id};
+ }
+ if ($form->{taxzone_id}) {
+ $taxzone_id = $form->{taxzone_id};
+ }
+ if ($form->{id}) {
+ $id = $form->{id};
+ }
+ if ($form->{shipto_id}) {
+ $shipto_id = $form->{shipto_id};
}
+ $cp_id = $form->{cp_id};
+ IS->get_customer(\%myconfig, \%$form);
+ if ($id) {
+ $form->{id} = $id;
+ }
IS->retrieve_invoice(\%myconfig, \%$form);
$form->{cp_id} = $cp_id;
+ if ($payment_id) {
+ $form->{payment_id} = $payment_id;
+ }
+ if ($language_id) {
+ $form->{language_id} = $language_id;
+ }
+ if ($taxzone_id) {
+ $form->{taxzone_id} = $taxzone_id;
+ }
+ if ($shipto_id) {
+ $form->{shipto_id} = $shipto_id;
+ }
+
# currencies
@curr = split /:/, $form->{currencies};
chomp $curr[0];
sub prepare_invoice {
$lxdebug->enter_sub();
- $form->{type} = "invoice";
- $form->{formname} = "invoice";
- $form->{media} = "screen";
+ if ($form->{type} eq "credit_note") {
+ $form->{type} = "credit_note";
+ $form->{formname} = "credit_note";
+ $form->{media} = "screen";
+ } else {
+ $form->{type} = "invoice";
+ $form->{formname} = "invoice";
+ $form->{media} = "screen";
+ }
if ($form->{id}) {
foreach $ref (@{ $form->{invoice_details} }) {
$i++;
+
+
map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
$form->{"discount_$i"} =
$form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
sub form_header {
$lxdebug->enter_sub();
+ if ($edit) {
+
+ if ($form->{type} eq "credit_note") {
+ $form->{title} = $locale->text('Edit Credit Note');
+
+ if ($form->{storno}) {
+ $form->{title} = $locale->text('Edit Storno Credit Note');
+ }
+ } else {
+ $form->{title} = $locale->text('Edit Sales Invoice');
+
+ if ($form->{storno}) {
+ $form->{title} = $locale->text('Edit Storno Invoice');
+ }
+ }
+ }
+
+ $payment = qq|<option value=""></option>|;
+ foreach $item (@{ $form->{payment_terms} }) {
+ if ($form->{payment_id} eq $item->{id}) {
+ $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
+
+
+ if (@{ $form->{TAXZONE} }) {
+ $form->{selecttaxzone} = "";
+ foreach $item (@{ $form->{TAXZONE} }) {
+ if ($item->{id} == $form->{taxzone_id}) {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id} selected>$item->{description}</option>";
+ } else {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id}>$item->{description}</option>";
+ }
+
+ }
+ } else {
+ $form->{selecttaxzone} =~ s/ selected//g;
+ if ($form->{taxzone_id} ne "") {
+ $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/;
+ }
+ }
+ if ($form->{rowcount} >0) {
+ $form->{selecttaxzone} =~ /<option value=\d+ selected>.*?<\/option>/;
+ $form->{selecttaxzone} = $&;
+ }
+
+
+ $taxzone = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
+ <input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
+ </tr>|;
+
+
+ if (@{ $form->{SHIPTO} }) {
+ $form->{selectshipto} = "<option value=0></option>";
+ foreach $item (@{ $form->{SHIPTO} }) {
+ if ($item->{id} == $form->{shipto_id}) {
+ $form->{selectshipto} .=
+ "<option value=$item->{id} selected>$item->{shiptoname}</option>";
+ } else {
+ $form->{selectshipto} .=
+ "<option value=$item->{id}>$item->{shiptoname}</option>";
+ }
+
+ }
+ } else {
+ $form->{selectshipto} =~ s/ selected//g;
+ if ($form->{shipto_id} ne "") {
+ $form->{selectshipto} =~ s/value=$form->{shipto_id}/value=$form->{shipto_id} selected/;
+ }
+ }
+
+ $shipto = qq|
+ <th align=right>| . $locale->text('Shipping Address') . qq|</th>
+ <td><select name=shipto_id>$form->{selectshipto}</select></td>
+ <input type=hidden name=selectshipto value="$form->{selectshipto}">|;
+
+
+
# set option selected
- foreach $item (qw(AR customer currency department employee contact)) {
+ foreach $item (qw(AR customer currency department employee)) {
$form->{"select$item"} =~ s/ selected//;
$form->{"select$item"} =~
s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
}
- #quote customer Bug 133
- $form->{selectcustomer} = $form->quote($form->{selectcustomer});
-
#build contacts
if ($form->{all_contacts}) {
- $form->{selectcontact} = "";
+ $form->{selectcontact} = "<option></option>";
foreach $item (@{ $form->{all_contacts} }) {
+ my $department = ($item->{cp_abteilung}) ? "--$item->{cp_abteilung}" : "";
if ($form->{cp_id} == $item->{cp_id}) {
$form->{selectcontact} .=
- "<option selected>$item->{cp_name}--$item->{cp_id}";
+ "<option value=$item->{cp_id} selected>$item->{cp_name}$department</option>";
} else {
- $form->{selectcontact} .= "<option>$item->{cp_name}--$item->{cp_id}";
+ $form->{selectcontact} .= "<option value=$item->{cp_id}>$item->{cp_name}$department</option>";
}
}
+ } else {
+ $form->{selectcontact} =~ s/ selected//g;
+ if ($form->{cp_id} ne "") {
+ $form->{selectcontact} =~ s/value=$form->{cp_id}/value=$form->{cp_id} selected/;
+ }
+ }
+
+
+ if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) {
+ $creditwarning = 1;
+ } else {
+ $creditwarning = 0;
}
#else {$form->{all_contacts} = 0;}
#sk
$contact =
($form->{selectcontact})
- ? qq|<select name=contact>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
+ ? qq|<select name=cp_id>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
: qq|<input name=contact value="$form->{contact}" size=35>|;
$department = qq|
|;
}
+ if ($form->{max_dunning_level}) {
+ $dunning = qq|
+ <tr>
+ <td colspan=4>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Max. Dunning Level') . qq|:</th>
+ <td><b>$form->{max_dunning_level}</b></td>
+ <th align=right>| . $locale->text('Dunning Amount') . qq|:</th>
+ <td><b>|
+ . $form->format_amount(\%myconfig, $form->{dunning_amount},2)
+ . qq|</b></td>
+ </tr>
+ </table>
+ </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>
- |;
- $button3 = qq|
- <td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td>
- <td width="4"><input type=button name=deliverydate id="trigger3" value=|
- . $locale->text('button') . qq|></td></td>
- |;
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "3",
- "invdate", "BL",
- "trigger1", "duedate",
- "BL", "trigger2",
- "deliverydate", "BL",
- "trigger3");
+ if ($form->{type} eq "credit_note") {
+ 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>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "1",
+ "invdate", "BL",
+ "trigger1");
+ } 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>|;
+ }
} 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>|;
+ 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>
+ |;
+ $button3 = qq|
+ <td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td>
+ <td width="4"><input type=button name=deliverydate id="trigger3" value=|
+ . $locale->text('button') . qq|></td></td>
+ |;
+
+ #write Trigger
+ $jsscript =
+ Form->write_trigger(\%myconfig, "3",
+ "invdate", "BL",
+ "trigger1", "duedate",
+ "BL", "trigger2",
+ "deliverydate", "BL",
+ "trigger3");
+ } 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>|;
+ }
}
if ($form->{resubmit} && ($form->{format} eq "html")) {
$onload =
} else {
$onload = "fokus()";
}
+
+ $credittext = $locale->text('Credit Limit exceeded!!!');
+ if ($creditwarning) {
+ $onload = qq|alert('$credittext')|;
+ }
+
$form->header;
print qq|
<body onLoad="$onload">
+<script type="text/javascript" src="js/common.js"></script>
+<script type="text/javascript" src="js/delivery_customer_selection.js"></script>
+<script type="text/javascript" src="js/vendor_selection.js"></script>
+<script type="text/javascript" src="js/calculate_qty.js"></script>
<form method=post name="invoice" action=$form->{script}>
<input type=hidden name=shipped value=$form->{shipped}>
<input type=hidden name=lizenzen value=$lizenzen>
+<input type=hidden name=storno value=$form->{storno}>
+<input type=hidden name=storno_id value=$form->{storno_id}>
+
+
<table width=100%>
<tr class=listtop>
</tr>
</table>
</td>
+ $shipto
</tr>
$business
+ $dunning
<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>
+ $taxzone
$department
<tr>
<th align=right nowrap>| . $locale->text('Currency') . qq|</th>
<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>
+ </tr>|;
+# <tr>
+# <td colspan=4>
+# <table>
+# <tr>
+# <td colspan=2>
+# <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">| . $locale->text('Choose Customer') . qq|</button>
+# </td>
+# <td colspan=2><input type=hidden name=delivery_customer_id value="$form->{delivery_customer_id}">
+# <input size=45 id=delivery_customer_string name=delivery_customer_string value="$form->{delivery_customer_string}"></td>
+# </tr>
+# <tr>
+# <td colspan=2>
+# <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">| . $locale->text('Choose Vendor') . qq|</button>
+# </td>
+# <td colspan=2><input type=hidden name=delivery_vendor_id value="$form->{delivery_vendor_id}">
+# <input size=45 id=delivery_vendor_string name=delivery_vendor_string value="$form->{delivery_vendor_string}"></td>
+# </tr>
+# </table>
+# </td>
+# </tr>
+print qq| </table>
</td>
<td align=right>
<table>
<td colspan=2><select name=employee>$form->{selectemployee}</select></td>
<input type=hidden name=selectemployee value="$form->{selectemployee}">
<td></td>
+ </tr>|;
+if ($form->{type} eq "credit_note") {
+print qq| <tr>
+ <th align=right nowrap>| . $locale->text('Credit Note Number') . qq|</th>
+ <td><input name=invnumber size=11 value="$form->{invnumber}"></td>
</tr>
<tr>
+ <th align=right>| . $locale->text('Credit Note Date') . qq|</th>
+ $button1
+ </tr>|;
+} else {
+print qq| <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('Delivery Date') . qq|</th>
$button3
- </tr>
- <tr>
+ </tr>|;
+}
+print qq| <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=left>| . $locale->text('Notes') . qq|</th>
<th align=left>| . $locale->text('Internal Notes') . qq|</th>
+ <th align=right>| . $locale->text('Payment Terms') . qq|</th>
</tr>
<tr valign=top>
<td>$notes</td>
<td>$intnotes</td>
+ <td><select name=payment_id tabindex=24>$payment
+ </select></td>
</tr>
</table>
</td>
print $webdav_list;
}
+if ($form->{type} eq "credit_note") {
+ print qq|
+ <tr>
+ <td>
+ <table width=100%>
+ <tr class=listheading>
+ <th colspan=6 class=listheading>|
+ . $locale->text('Payments') . qq|</th>
+ </tr>
+|;
+} else {
print qq|
<tr>
<td>
. $locale->text('Incoming Payments') . qq|</th>
</tr>
|;
+}
if ($form->{currency} eq $form->{defaultcurrency}) {
@column_index = qw(datepaid source memo paid AR_paid);
<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|">
+ . $locale->text('E-mail') . qq|">|;
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Storno') . qq|">| unless ($form->{storno});
+ print qq|<input class=submit type=submit name=action value="|
+ . $locale->text('Post Payment') . 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 ($form->{id} && !($form->{type} eq "credit_note")) {
+ print qq|
+ <input class=submit type=submit name=action value="|
+ . $locale->text('Credit Note') . 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|">
|;
if ($form->{second_run}) {
$form->{print_and_post} = 0;
}
+
+ $form->{update} = 1;
+
&check_name(customer);
&check_project;
$form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
&check_form;
- } else {
+ } else {
+
+ $form->{"selected_unit_$i"} = $form->{"unit_$i"};
IS->retrieve_item(\%myconfig, \%$form);
qw(partnumber description unit);
map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
keys %{ $form->{item_list}[0] };
+ if ($form->{"part_payment_id_$i"} ne "") {
+ $form->{payment_id} = $form->{"part_payment_id_$i"};
+ }
- $form->{"discount_$i"} = $form->{discount} * 100;
+ if ($form->{"not_discountable_$i"}) {
+ $form->{"discount_$i"} = 0;
+ }
$s = ($sellprice) ? $sellprice : $form->{"sellprice_$i"};
($dec) = ($s =~ /\.(\d+)/);
}
$lxdebug->leave_sub();
}
+sub post_payment {
+ $lxdebug->enter_sub();
+ 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->redirect($locale->text(' Payment posted!'))
+ if (IS->post_payment(\%myconfig, \%$form));
+ $form->error($locale->text('Cannot post payment!'));
+
+
+ $lxdebug->leave_sub();
+}
sub post {
$lxdebug->enter_sub();
if ($form->{currency} ne $form->{defaultcurrency});
for $i (1 .. $form->{paidaccounts}) {
- if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
+ if ($form->{"paid_$i"}) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
# get new invnumber in sequence if no invnumber is given or if posasnew was requested
if (!$form->{invnumber} || $form->{postasnew}) {
- $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
+ if ($form->{type} eq "credit_note") {
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "cnnumber");
+ } else {
+ $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
+ }
}
if ($print_post) {
if (!(IS->post_invoice(\%myconfig, \%$form))) {
}
+sub storno {
+ $lxdebug->enter_sub();
+
+ if ($form->{storno}) {
+ $form->error($locale->text('Cannot storno storno invoice!'));
+ }
+
+ $form->{storno_id} = $form->{id};
+ $form->{storno} = 1;
+ $form->{id} = "";
+ $form->{invnumber} = "Storno zu " . $form->{invnumber};
+ $form->{rowcount}--;
+
+ &post();
+ $lxdebug->leave_sub();
+
+}
+
sub preview {
$lxdebug->enter_sub();
$lxdebug->leave_sub();
}
+sub credit_note {
+ $lxdebug->enter_sub();
+
+ $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
+ $form->{duedate} =
+ $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
+
+ $form->{id} = '';
+ $form->{rowcount}--;
+ $form->{shipto} = 1;
+
+
+ $form->{title} = $locale->text('Add Credit Note');
+ $form->{script} = 'is.pl';
+ $script = "is";
+ $buysell = 'buy';
+
+
+ # bo creates the id, reset it
+ map { delete $form->{$_} }
+ qw(id invnumber subject message cc bcc printed emailed queued);
+ $form->{ $form->{vc} } =~ s/--.*//g;
+ $form->{type} = "credit_note";
+
+
+ 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;
+
+
+ &display_form;
+
+ $lxdebug->leave_sub();
+}
+
sub yes {
$lxdebug->enter_sub();
$menufile = "menu.ini";
use SL::Menu;
+use Data::Dumper;
1;
$form->header;
print qq|
-<frameset rows="20px,*" cols="*" framespacing="0" frameborder="0">
+<frameset rows="28px,*" 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">
$label_icon = $label . ".gif";
$mlab = $label;
$label = $locale->text($label);
+
+ # multi line hack, sschoeling jul06
+ # if a label is too long, try to split it at whitespaces, then join it to chunks of less
+ # than 20 chars and store it in an array.
+ # use this array later instead of the -ed label
+ @chunks = ();
+ my ($i,$l) =(-1, 20);
+ map {
+ $l += length $_;
+ if ($l < 20) { $chunks[$i] .= " $_";
+ } else { $l =length $_; $chunks[++$i] = $_; }
+ } split / /, $label;
+ map { $chunks[$_] =~ s/ / / } 0..$#chunks;
+ # end multi line
+
$label =~ s/ / /g;
$menu->{$item}{target} = "main_window" unless $menu->{$item}{target};
§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|;
+ if (scalar @chunks <= 1) {
+ 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 $tmpitem = $menu->menuitem(\%myconfig, \%$form, $item, $level);
+ print
+ qq|<tr><td class="hover" height="13" >$spacer<img src="image/unterpunkt.png" style="vertical-align:text-top">|
+ . $tmpitem
+ . qq|$chunks[0]</a></td></tr>\n|;
+ map {
+ print
+ qq|<tr style="vertical-align:top""><td class="hover">$spacer<img src="image/unterpunkt.png" style="visibility:hidden; width:23; height=2;">|
+ . $tmpitem
+ . qq|$chunks[$_]</a></td></tr>\n|;
+ } 1..$#chunks;
+ }
}
}
} else {
# Order entry module
# Quotation module
#======================================================================
-use Data::Dumper;
use SL::OE;
use SL::IR;
}
}
+ if ($form->{print_and_save}) {
+ $form->{action} = "print";
+ $form->{resubmit} = 1;
+ $language_id = $form->{language_id};
+ $printer_id = $form->{printer_id};
+ }
+
if ($form->{type} eq 'purchase_order') {
$form->{title} = $locale->text('Edit Purchase Order');
$form->{heading} = $locale->text('Purchase Order');
&order_links;
&prepare_order;
+ if ($form->{print_and_save}) {
+ $form->{language_id} = $language_id;
+ $form->{printer_id} = $printer_id;
+ }
&display_form;
$lxdebug->leave_sub();
# retrieve order/quotation
$form->{webdav} = $webdav;
-
# set jscalendar
$form->{jscalendar} = $jscalendar;
OE->retrieve(\%myconfig, \%$form);
+ if ($form->{payment_id}) {
+ $payment_id = $form->{payment_id};
+ }
+ if ($form->{language_id}) {
+ $language_id = $form->{language_id};
+ }
+ if ($form->{taxzone_id}) {
+ $taxzone_id = $form->{taxzone_id};
+ }
+
+
# if multiple rowcounts (== collective order) then check if the
# there were more than one customer (in that case OE::retrieve removes
# the content from the field)
# get customer / vendor
if ($form->{type} =~ /(purchase_order|request_quotation|receive_order)/) {
IR->get_vendor(\%myconfig, \%$form);
-
- #quote all_vendor Bug 133
- foreach $ref (@{ $form->{all_vendor} }) {
- $ref->{name} = $form->quote($ref->{name});
- }
-
}
if ($form->{type} =~ /(sales|ship)_(order|quotation)/) {
IS->get_customer(\%myconfig, \%$form);
-
- #quote all_vendor Bug 133
- foreach $ref (@{ $form->{all_customer} }) {
- $ref->{name} = $form->quote($ref->{name});
- }
-
}
$form->{cp_id} = $cp_id;
-
+ if ($payment_id) {
+ $form->{payment_id} = $payment_id;
+ }
+ if ($language_id) {
+ $form->{language_id} = $language_id;
+ }
+ if ($taxzone_id) {
+ $form->{taxzone_id} = $taxzone_id;
+ }
$form->{intnotes} = $intnotes;
($form->{ $form->{vc} }) = split /--/, $form->{ $form->{vc} };
$form->{"old$form->{vc}"} =
$lxdebug->enter_sub();
$form->{format} = "pdf";
$form->{media} = "screen";
- $form->{formname} = $form->{type};
+ $form->{formname} = $form->{type} unless $form->{formname};
map { $form->{$_} =~ s/\"/"/g }
qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact);
-
+ my $i = 0;
foreach $ref (@{ $form->{form_details} }) {
$form->{rowcount} = ++$i;
$form->{jsscript} = $form->{jscalendar};
$jsscript = "";
+ $payment = qq|<option value=""></option>|;
+ foreach $item (@{ $form->{payment_terms} }) {
+ if ($form->{payment_id} eq $item->{id}) {
+ $payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|;
+ } else {
+ $payment .= qq|<option value="$item->{id}">$item->{description}</option>|;
+ }
+ }
if ($form->{jsscript}) {
# with JavaScript Calendar
}
# set option selected
- foreach $item ($form->{vc}, currency, department, employee, contact) {
+ foreach $item ($form->{vc}, currency, department, employee) {
$form->{"select$item"} =~ s/ selected//;
$form->{"select$item"} =~
s/option>\Q$form->{$item}\E/option selected>$form->{$item}/;
}
- #quote select[customer|vendor] Bug 133
- $form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"});
-
#build contacts
if ($form->{all_contacts}) {
- $form->{selectcontact} = "";
+ $form->{selectcontact} = "<option></option>";
foreach $item (@{ $form->{all_contacts} }) {
+ my $department = ($item->{cp_abteilung}) ? "--$item->{cp_abteilung}" : "";
if ($form->{cp_id} == $item->{cp_id}) {
$form->{selectcontact} .=
- "<option selected>$item->{cp_name}--$item->{cp_id}";
+ "<option value=$item->{cp_id} selected>$item->{cp_name}$department</option>";
} else {
- $form->{selectcontact} .= "<option>$item->{cp_name}--$item->{cp_id}";
+ $form->{selectcontact} .= "<option value=$item->{cp_id}>$item->{cp_name}$department</option>";
}
}
+ } else {
+ $form->{selectcontact} =~ s/ selected//g;
+ if ($form->{cp_id} ne "") {
+ $form->{selectcontact} =~ s/value=$form->{cp_id}/value=$form->{cp_id} selected/;
+ }
}
+
+ if (@{ $form->{SHIPTO} }) {
+ $form->{selectshipto} = "<option value=0></option>";
+ foreach $item (@{ $form->{SHIPTO} }) {
+ if ($item->{id} == $form->{shipto_id}) {
+ $form->{selectshipto} .=
+ "<option value=$item->{id} selected>$item->{shiptoname}</option>";
+ } else {
+ $form->{selectshipto} .=
+ "<option value=$item->{id}>$item->{shiptoname}</option>";
+ }
+
+ }
+ } else {
+ $form->{selectshipto} =~ s/ selected//g;
+ if ($form->{shipto_id} ne "") {
+ $form->{selectshipto} =~ s/value=$form->{shipto_id}/value=$form->{shipto_id} selected/;
+ }
+ }
+
+ $shipto = qq|
+ <th align=right>| . $locale->text('Shipping Address') . qq|</th>
+ <td><select name=shipto_id>$form->{selectshipto}</select></td>
+ <input type=hidden name=selectshipto value="$form->{selectshipto}">|;
+
+
+
+
$form->{exchangerate} =
$form->format_amount(\%myconfig, $form->{exchangerate});
+ if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) {
+ $creditwarning = 1;
+ } else {
+ $creditwarning = 0;
+ }
+
$form->{creditlimit} =
$form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
$form->{creditremaining} =
$contact =
($form->{selectcontact})
- ? qq|<select name=contact>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
+ ? qq|<select name=cp_id>$form->{selectcontact}</select>\n<input type=hidden name="selectcontact" value="$form->{selectcontact}">|
: qq|<input name=contact value="$form->{contact}" size=35>|;
$exchangerate = qq|
|;
}
+ if ($form->{max_dunning_level}) {
+ $dunning = qq|
+ <tr>
+ <td colspan=4>
+ <table>
+ <tr>
+ <th align=right>| . $locale->text('Max. Dunning Level') . qq|:</th>
+ <td><b>$form->{max_dunning_level}</b></td>
+ <th align=right>| . $locale->text('Dunning Amount') . qq|:</th>
+ <td><b>|
+ . $form->format_amount(\%myconfig, $form->{dunning_amount},2)
+ . qq|</b></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+|;
+ }
+
+ if (@{ $form->{TAXZONE} }) {
+ $form->{selecttaxzone} = "";
+ foreach $item (@{ $form->{TAXZONE} }) {
+ if ($item->{id} == $form->{taxzone_id}) {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id} selected>$item->{description}</option>";
+ } else {
+ $form->{selecttaxzone} .=
+ "<option value=$item->{id}>$item->{description}</option>";
+ }
+
+ }
+ } else {
+ $form->{selecttaxzone} =~ s/ selected//g;
+ if ($form->{taxzone_id} ne "") {
+ $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}/value=$form->{taxzone_id} selected/;
+ }
+ }
+
+ if ($form->{rowcount} >0) {
+ $form->{selecttaxzone} =~ /<option value=\d+ selected>.*?<\/option>/;
+ $form->{selecttaxzone} = $&;
+ }
+
+
+ $taxzone = qq|
+ <tr>
+ <th align=right>| . $locale->text('Steuersatz') . qq|</th>
+ <td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
+ <input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
+ </tr>|;
+
+
if ($form->{type} !~ /_quotation$/) {
$ordnumber = qq|
<tr>
</tr>
</table>
</td>
+ $shipto
</tr>
|;
} else {
$button2
</tr>
|;
-
+ $creditremaining = qq| <tr>
+ <td colspan=4></td>
+ $shipto
+ </tr>|;
}
$vc =
</tr>
|;
}
+ if ($form->{resubmit} && ($form->{format} eq "html")) {
+ $onload =
+ qq|window.open('about:blank','Beleg'); document.oe.target = 'Beleg';document.oe.submit()|;
+ } elsif ($form->{resubmit}) {
+ $onload = qq|document.oe.submit()|;
+ } else {
+ $onload = "fokus()";
+ }
+
+ $credittext = $locale->text('Credit Limit exceeded!!!');
+ if ($creditwarning) {
+ $onload = qq|alert('$credittext')|;
+ }
$form->header;
print qq|
-<body>
+<body onLoad="$onload">
-<form method=post action=$form->{script}>
+<form method=post name=oe action=$form->{script}>
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
+ <script type="text/javascript" src="js/vendor_selection.js"></script>
+ <script type="text/javascript" src="js/calculate_qty.js"></script>
<input type=hidden name=id value=$form->{id}>
+<input type=hidden name=action value=$form->{action}>
<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=proforma value=$form->{proforma}>
<input type=hidden name=queued value="$form->{queued}">
<input type=hidden name=printed value="$form->{printed}">
</tr>
$creditremaining
$business
+ $dunning
+ $taxzone
$department
<tr>
<th align=right>| . $locale->text('Currency') . qq|</th>
<tr>
<th align=right>| . $locale->text('Ship via') . qq|</th>
<td colspan=3><input name=shipvia size=35 value="$form->{shipvia}"></td>
- </tr>
- </table>
+ </tr>|;
+# <tr>
+# <td colspan=4>
+# <table>
+# <tr>
+# <td colspan=2>
+# <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">| . $locale->text('Choose Customer') . qq|</button>
+# </td>
+# <td colspan=2><input type=hidden name=delivery_customer_id value="$form->{delivery_customer_id}">
+# <input size=45 id=delivery_customer_string name=delivery_customer_string value="$form->{delivery_customer_string}"></td>
+# </tr>
+# <tr>
+# <td colspan=2>
+# <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">| . $locale->text('Choose Vendor') . qq|</button>
+# </td>
+# <td colspan=2><input type=hidden name=delivery_vendor_id value="$form->{delivery_vendor_id}">
+# <input size=45 id=vendor_string name=delivery_vendor_string value="$form->{delivery_vendor_string}"></td>
+# </tr>
+# </table>
+# </td>
+# </tr>
+print qq| </table>
</td>
<td align=right>
<table>
<td>$notes</td>
<td>$intnotes</td>
</tr>
+ <th align=right>| . $locale->text('Payment Terms') . qq|</th>
+ <td><select name=payment_id tabindex=24>$payment
+ </select></td>
</table>
</td>
<td align=right width=100%>
. $locale->text('E-mail') . qq|">
<input class=submit type=submit name=action value="|
. $locale->text('Save') . qq|">
+<input class=submit type=submit name=action value="|
+ . $locale->text('Save and Close') . qq|">
|;
- if ($form->{id}) {
+ 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} =~ /sales_quotation$/) {
+ if (($form->{type} =~ /sales_quotation$/)) {
print qq|
<input class=submit type=submit name=action value="|
. $locale->text('Sales Order') . qq|">|;
<input class=submit type=submit name=action value="|
. $locale->text('Purchase Order') . qq|">|;
}
+ if (1) {
print qq|
<input class=submit type=submit name=action value="|
. $locale->text('Invoice') . qq|">
|;
+}
if ($form->{type} =~ /sales_order$/) {
print qq|
. $locale->text('Order') . qq|">
|;
}
- } elsif ($form->{type} =~ /sales_order$/ && $form->{rowcount}) {
+ } elsif ($form->{type} =~ /sales_order$/ && $form->{rowcount} && !$form->{proforma}) {
print qq|
<br>Workflow $form->{heading}<br>
<input class=submit type=submit name=action value="|
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
qw(exchangerate creditlimit creditremaining);
+ $form->{update} = 1;
&check_name($form->{vc});
$form->{creditremaining} += ($form->{oldinvtotal} - $form->{oldtotalpaid});
&check_form;
- } else {
+ } else {
+
+ $form->{"selected_unit_$i"} = $form->{"unit_$i"};
if ( $form->{type} eq 'purchase_order'
|| $form->{type} eq 'request_quotation') {
} else {
$sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
-
+ if ($form->{"not_discountable_$i"}) {
+ $form->{"discount_$i"} = 0;
+ }
map { $form->{item_list}[$i]{$_} =~ s/\"/"/g }
qw(partnumber description unit);
map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} }
keys %{ $form->{item_list}[0] };
+ if ($form->{"part_payment_id_$i"} ne "") {
+ $form->{payment_id} = $form->{"part_payment_id_$i"};
+ }
$s = ($sellprice) ? $sellprice : $form->{"sellprice_$i"};
$form->{rowcount}--;
$form->{"discount_$i"} = "";
&display_form;
- } else {
+ } else {
$form->{"id_$i"} = 0;
$form->{"unit_$i"} = $locale->text('ea');
$lxdebug->leave_sub();
}
-sub save {
+sub save_and_close {
$lxdebug->enter_sub();
if ($form->{type} =~ /_order$/) {
}
- # get new number in sequence if no number is given or if saveasnew was requested
- if (!$form->{$ordumber} || $form->{saveasnew}) {
- $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld);
- }
+ $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
+ unless $form->{$ordnumber};
$form->redirect(
$form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))
$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};
+
+
+ OE->save(\%myconfig, \%$form);
+ $form->{simple_save} = 1;
+ if(!$form->{print_and_save}) {
+ &update;
+ exit;
+ }
+ $lxdebug->leave_sub();
+}
+
sub delete {
$lxdebug->enter_sub();
exit;
}
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
if ( $form->{type} =~ /_order/
$form->{saveasnew} = 1;
$form->{closed} = 0;
- map { delete $form->{$_} } qw(printed emailed queued);
+ map { delete $form->{$_} } qw(printed emailed queued ordnumber quonumber);
&save;
OE->save(\%myconfig, \%$form);
}
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
$form->{title} = $locale->text('Add Purchase Order');
OE->save(\%myconfig, \%$form);
}
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
$form->{title} = $locale->text('Add Sales Order');
<tr>
<th align=right>| . $locale->text('From') . qq|</th>
<td><input name=fromdate size=11 title="$myconfig{dateformat}"></td>
- <th align=right>| . $locale->text('Until') . qq|</th>
+ <th align=right>| . $locale->text('To') . qq|</th>
<td><input name=todate size=11 title="$myconfig{dateformat}"></td>
</tr>
</table>
$option .= "\n<br>" if ($option);
$option .=
$locale->text('From') . " "
- . $locale->date(\%myconfig, $form->{fromdate}, 0);
+ . $locale->date(\%myconfig, $form->{fromdate}, 1);
}
if ($form->{todate}) {
$option .= "\n<br>" if ($option);
$option .=
- $locale->text('Until') . " "
- . $locale->date(\%myconfig, $form->{todate}, 0);
+ $locale->text('To') . " "
+ . $locale->date(\%myconfig, $form->{todate}, 1);
}
$form->{title} = "$form->{accno}--$form->{account}";
$longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
$shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
- $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{this_period} = "$shortfromdate\n$shorttodate";
$form->{period} =
$locale->text('for Period')
- . qq|<br>\n$longfromdate |
+ . qq|\n$longfromdate |
. $locale->text('Bis')
. qq| $longtodate|;
}
$longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
$shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
- $form->{last_period} = "$shortcomparefromdate<br>\n$shortcomparetodate";
+ $form->{last_period} = "$shortcomparefromdate\n$shortcomparetodate";
$form->{period} .=
- "<br>\n$longcomparefromdate "
+ "\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};
# setup company variables for the form
map { $form->{$_} = $myconfig{$_} }
(qw(company address businessnumber nativecurr));
- $form->{address} =~ s/\\n/<br>/g;
$form->{templates} = $myconfig{templates};
$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_templates) {
+ $media .= qq|
+ <option value=printer $form->{OP}{printer}>|
+ . $locale->text('Printer');
+ }
+ }
+
+ if ($latex_templates) {
+ $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_templates && $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();
$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') {
(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};
$longfromdate = $locale->date(\%germandate, $form->{fromdate}, 1);
$shortfromdate = $locale->date(\%germandate, $form->{fromdate}, 0);
- $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{this_period} = "$shortfromdate\n$shorttodate";
$form->{period} =
$locale->text('for Period')
- . qq|<br>\n$longfromdate |
+ . qq|\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";
$longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
$shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
- $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
+ $form->{this_period} = "$shortfromdate\n$shorttodate";
$form->{period} =
$locale->text('for Period')
. qq|<br>\n$longfromdate |
$longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
$shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
- $form->{last_period} = "$shortcomparefromdate<br>\n$shortcomparetodate";
+ $form->{last_period} = "$shortcomparefromdate\n$shortcomparetodate";
$form->{period} .=
- "<br>\n$longcomparefromdate "
+ "\n$longcomparefromdate "
. $locale->text('bis')
. qq| $longcomparetodate|;
}
$lxdebug->enter_sub();
my $myconfig = \%myconfig;
use CGI;
-
$form->{title} = $locale->text('UStVA');
- $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 Nein=0
+ $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1
my $year = substr(
$form->datetonum($form->current_date(\%myconfig),
my $temp = $form->{address};
$temp =~ s/\\n/<br \/>/;
($form->{co_street}, $form->{co_city}) = split("<br \/>", $temp);
- $form->{co_city} =~ s/\\n//g;
}
if ($form->{co_street} ne ''
Keine Steuernummer hinterlegt!</a><br>|;
}
print qq|
- <br>
+ <!--<br>
| . $locale->text('ELSTER-Steuernummer: ') . qq|
$form->{elstersteuernummer}
- <br>
+ <br>-->
<br>
</fieldset>
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' => $locale->text('January'),
- '02' => $locale->text('February'),
- '03' => $locale->text('March'),
- '04' => $locale->text('April'),
- '05' => $locale->text('May'),
- '06' => $locale->text('June'),
- '07' => $locale->text('July'),
- '08' => $locale->text('August'),
- '09' => $locale->text('September'),
- '10' => $locale->text('October'),
- '11' => $locale->text('November'),
- '12' => $locale->text('December'),
- '13' => $locale->text('Yearly'),
- );
+ 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',
+ '13' => 'Yearly',);
my $yy = $form->{year} * 10000;
$yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
+ $yymmdd = 20060121;
$sel = '';
- my $dfv = '';
+ my $dfv = '0';
# Offset für Dauerfristverlängerung
$dfv = '100' if ($form->{FA_dauerfrist} eq '1');
};
}
- 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}</option>
+ <option value="$key" $selected>|
+ . $locale->text("$liste{$key}") . qq|</option>
+
|;
}
print qq|</select>|;
my $temp = $form->{address};
$temp =~ s/\\n/<br \/>/;
($form->{co_street}, $form->{co_city}) = split("<br \/>", $temp);
- $form->{co_city} =~ s/\\n//g;
}
if ( $form->{format} eq 'pdf'
$form->{bold} = "<b>";
$form->{endbold} = "</b>";
$form->{br} = "<br>";
- $form->{address} =~ s/\\n/<br \/>/g;
+ $form->{address} =~ s/\\n/<br \/>/;
}
$form->parse_amount(\%myconfig, $form->{"66"}) *
100; # Vorsteuer 7% plus 16%
my $k83 =
- $form->parse_amount(\%myconfig, $form->{"83"}) * 100 ; # Endbetrag
+ $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
<!-- Diese Datei ist mit Lx-Office $form->{version} generiert -->
<WinstonAusgang>
<Formular Typ="UST"></Formular>
- <Ordnungsnummer>$form->{elsterFFFF}$form->{elstersteuernummer}</Ordnungsnummer>
+ <Ordnungsnummer>$form->{elstersteuernummer}</Ordnungsnummer>
<AnmeldeJahr>$form->{year}</AnmeldeJahr>
<AnmeldeZeitraum>$azr</AnmeldeZeitraum>
|;
--- /dev/null
+.shadetabs{
+padding: 3px 0;
+margin-left: 0;
+margin-top: 1px;
+margin-bottom: 0;
+font: bold 12px Verdana;
+list-style-type: none;
+text-align: left; /*set to left, center, or right to align the menu as desired*/
+}
+
+.shadetabs li{
+display: inline;
+margin: 0;
+}
+
+.shadetabs li a{
+text-decoration: none;
+padding: 3px 7px;
+margin-right: 3px;
+border: 1px solid #778;
+color: #2d2b2b;
+background: white url(shade.gif) top left repeat-x;
+}
+
+.shadetabs li a:visited{
+color: #2d2b2b;
+}
+
+.shadetabs li a:hover{
+text-decoration: underline;
+color: #2d2b2b;
+}
+
+.shadetabs li.selected{
+position: relative;
+top: 1px;
+}
+
+.shadetabs li.selected a{ /*selected main tab style */
+background-image: url(shadeactive.gif);
+border-bottom-color: white;
+}
+
+.shadetabs li.selected a:hover{ /*selected main tab style */
+text-decoration: none;
+}
+
+.tabcontentstyle{ /*style of tab content oontainer*/
+border: 1px solid gray;
+width: 90%;
+margin-bottom: 1em;
+padding: 10px;
+}
+
+.tabcontent{
+display:none;
+}
+
+@media print {
+.tabcontent {
+display:block!important;
+}
+}
\ No newline at end of file
-Aktuelle Installations- und Konfigurationshinweise:
-===================================================
-
-gibt es:
-
--auf der Lx-Office Homepage unter
-http://lx-office.org/index.php?id=dokumentation
--im Lx-Office-Wiki unter Dokumentation
-http://wiki.lx-office.org/index.php/Lx-Office_ERP
--im Lx-Office-Forum:
-http://www.lx-office.org/forum/
-
-=======================================
Lx-Office ERP
Installationsanleitung
========================================
Webserver (Apache)
PostgreSQL - Datenbank
-Perl - DBI und Perl - DBD
-perl-HTML-Template
+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)
Datenbankzugriff den eben angelegten Benutzer lxoffice.
+OpenDocument-Vorlagen
+=====================
+Lx-Office unterstützt die Verwendung von Vorlagen im
+OpenDocument-Format, wie es OpenOffice.org ab Version 2
+erzeugt. Lx-Office kann dabei sowohl neue OpenDocument-Dokumente als
+auch aus diesen direkt PDF-Dateien erzeugen. Um die Unterstützung von
+OpenDocument-Vorlagen zu aktivieren muss in der Datei "lx-erp.conf"
+die Variable "$opendocument_templates" auf "1" stehen. Dieses ist die
+Standardeinstellung.
+
+Weiterhin muss in der Datei "lx-erp.conf" die Variable "$dbcharset"
+auf die Zeichenkodierung gesetzt werden, die auch bei der Speicherung
+der Daten in der Datenbank verwendet wird. Diese ist in den meisten
+Fällen "ISO-8859-15".
+
+Während die Erzeugung von reinen OpenDocument-Dateien keinerlei
+weitere Software benötigt, wird zur Umwandlung dieser Dateien in PDF
+OpenOffice.org benötigt. Soll dieses Feature genutzt werden, so muss
+neben OpenOffice.org ab Version 2 auch der "X virtual frame buffer"
+(xvfb) installiert werden. Bei Debian ist er im Paket "xvfb"
+enthalten. Andere Distributionen enthalten ihn in anderen Paketen.
+
+Nach der Installation müssen in der Datei "lx-erp.conf" zwei weitere
+Variablen angepasst werden: "$openofficeorg_writer_bin" muss den
+vollständigen Pfad zur OpenOffice.org Writer-Anwendung enthalten.
+"$xvfb_run_bin" muss den Pfad zu einem Script enthalten, dass den "X
+virtual frame buffer" startet und direkt danach ein Programm in ihm
+startet, das dem Script als Parameter übergeben wird. Lx-Office
+enthält bereits ein solches Script namens "xvfb-run", das
+standardmäßig verwendet wird. Es handelt sich dabei um eine gestutzte
+Version des Scripts "xvfb-run" aus dem Debian-Paket "xvfb".
+
+Als letztes muss herausgefunden werden, welchen Namen OpenOffice.org
+Writer dem Verzeichnis mit den Benutzereinstellungen gibt. Unter
+Debian ist dies momentan "~/.openoffice.org2". Sollte der Name bei
+Ihrer OpenOffice.org-Installation anders sein, so muss das Verzeichnis
+"users/.openoffice.org2" entsprechend umbenannt werden. Ist der Name
+z.B. einfach nur ".openoffice", so wäre folgender Befehl auszuführen:
+
+mv users/.openoffice.org2 users/.openoffice
+
+Dieses Verzeichnis, wie auch das komplette "users"-Verzeichnis, muss
+vom Webserver beschreibbar sein. Dieses wurde in Schritt "Installation
+des Programmpakets" oben bereits erledigt, kann aber erneut überprüft
+werden, wenn die Konvertierung nach PDF fehlschlägt.
+
+
Lx-Office ERP verwenden
=======================
Einloggen können Sie sich unter:
# Veraenderungen von Lx-Office ERP #\r
####################################\r
\r
+2006-03-07 - Version 2.2.2 (942 - 970) \r
+ - Bugfix 308 - falsches Quoten bei Kreditorenbuchungen\r
+ - Bugfix 306 - UStVa Vorschau vervollstaendigt\r
+\r
+2006-02-27 - Version 2.2.1 (856 - 941)\r
+\r
+ - Bugfix 288,290,296,297 - Upgradeskript fehlerhaft\r
+ - Bugfix Druck eines Lieferscheins fehlte in der Rechnungsmaske\r
+ - Bugfix 300 - falsches Quoten bei Kreditorenbuchungen\r
+ - Bugfix 301 - Opera/Konqueror - fehlerhafte Anzeige des neuen Menus\r
+ - Bugfix - Kundenmaske falsche max. Laenge von Firmenname und Lieferstr.\r
+ - Bugfix - Zeilenumbrueche in locales entfernt\r
\r
2006-02-03 - Version 2.2.0 - Revision testing (542 - 855)\r
\r
--- /dev/null
+<html>
+ <head>
+ <title>Dokumentenvorlagen 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>Dokumentenvorlagen 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="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
+ Inhaltsverzeichnis</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#einfuehrung">Einführung</a>
+ </li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#zuordnung_dateinamen">
+ Zuordnung von Dateinamen zu den Funktionen</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#allgemeine_variablen">
+ Allgemeine Variablen, die in allen Vorlagen vorhanden sind</a><br>
+
+ <ol>
+ <li><a href="dokumentenvorlagen-und-variablen.html#allgemein_stammdaten">
+ Stammdaten von Kunden und Lieferanten</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#allgemein_verkaeufer">
+ Informationen über den Verkäufer</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#allgemein_steuern">
+ Variablen für jede Steuer</a></li>
+ </ol>
+ </li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#invoice">
+ Variablen in Rechnungen</a>
+
+ <ol>
+ <li><a href="dokumentenvorlagen-und-variablen.html#invoice_allgemein">
+ Allgemeine Variablen</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#invoice_posten">
+ Variablen für jeden Posten auf der Rechnung</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#invoice_zahlungen">
+ Variablen für die Zahlungseingänge</a></li>
+ </ol>
+ </li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#anderevorlagen">
+ Variablen in anderen Vorlagen</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke">
+ Blöcke, bedingte Anweisungen und Schleifen</a>
+
+ <ol>
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_einschr_latex">
+ Einschänkungen für Blöcke in LaTeX-Vorlagen</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_einschr_opendocument">
+ Einschänkungen für Blöcke in OpenDocument-Vorlagen</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_include">
+ Die <code>include</code>-Anweisung</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_ifnot">
+ Der <code>if not</code>-Block</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_if">
+ Der <code>if</code>-Block</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_foreach">
+ Die <code>foreach</code>-Schleife</a></li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#bloecke_pagebreak">
+ Der <code>pagebreak</code>-Block</a></li>
+ </ol>
+ </li>
+
+ <li><a href="dokumentenvorlagen-und-variablen.html#markup">
+ Markup-Code, der innerhalb von Formularen zur Textformatierung verwendet
+ werden kann</a></li>
+
+ </ol>
+
+ <hr>
+
+ <h2><a name="einfuehrung">Einführung</a></h2>
+
+ <p>Dies ist eine Auflistung der Standard-Dokumentenvorlagen und aller
+ zur Bearbeitung verfügbaren Variablen. Eine Variable wird in
+ einer Vorlage durch ihren Inhalt ersetzt, wenn sie in der Form
+ <code><%variablenname%></code> verwendet wird.</p>
+
+ <p>Früher wurde hier nur über LaTeX gesprochen. Inzwischen
+ unterstützt Lx-Office aber auch OpenDocument-Vorlagen. Sofern
+ es nicht ausdrücklich eingeschränkt wird, gilt das im
+ Folgenden gesagte für alle Vorlagenarten.</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="dokumentenvorlagen-und-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 folgende kurze Auflistung zeigt, welche Vorlage bei welcher
+ Funktion ausgelesen wird. Dabei ist die Dateiendung ".ext"
+ geeignet zu ersetzen: ".tex" fü LaTeX-Vorlagen und
+ ".odt" für OpenDocument-Vorlagen.</p>
+
+ <ul>
+ <li><code>bin_list.ext</code> -- Lagerliste</li>
+ <li><code>check.ext</code> -- ?</li>
+ <li><code>invoice.ext</code> -- Rechnung</li>
+ <li><code>packing_list.ext</code> -- Verpackungsliste</li>
+ <li><code>pick_list.ext</code> -- Sammelliste</li>
+ <li><code>purcharse_order.ext</code> -- Bestellung an Lieferanten</li>
+ <li><code>request_quotation.ext</code> -- Anfrage an Lieferanten</li>
+ <li><code>sales_order.ext</code> -- Bestellung</li>
+ <li><code>sales_quotation.ext</code> -- Angebot an Kunden</li>
+ </ul>
+
+ <small><a href="dokumentenvorlagen-und-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="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptocontact</code></td>
+ <td>Kontakt (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptocountry</code></td>
+ <td>Land (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptoemail</code></td>
+ <td>Email (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptofax</code></td>
+ <td>Fax (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptoname</code></td>
+ <td>Firmenname (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptophone</code></td>
+ <td>Telefonnummer (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptostreet</code></td>
+ <td>Straße und Hausnummer (Lieferadresse)
+ <a href="dokumentenvorlagen-und-variablen.html#anmerkung_shipto">*</a></td>
+ </tr>
+ <tr>
+ <td><code>shiptozipcode</code></td>
+ <td>Postleitzahl (Lieferadresse)
+ <a href="dokumentenvorlagen-und-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="dokumentenvorlagen-und-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>deliverydate</code></td>
+ <td>Lieferdatum</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, wenn die Rechnung aus einem Auftrag erstellt wurde</td>
+ </tr>
+ <tr>
+ <td><code>quonumber</code></td>
+ <td>Angebotsnummer</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="dokumentenvorlagen-und-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>
+ <tr>
+ <td><code>transdate</code></td>
+ <td>Auftragsdatum wenn die Rechnung aus einem Auftrag erstellt wurde</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_oe</code></td>
+ <td>Lieferdatum</td>
+ </tr>
+ <tr>
+ <td><code>description</code></td>
+ <td>Artikelbeschreibung</td>
+ </tr>
+ <tr>
+ <td><code>discount</code></td>
+ <td>Rabatt als Betrag</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>ordnumber_oe</code></td>
+ <td>Auftragsnummer des Originalauftrags, wenn die Rechnung aus einem Sammelauftrag erstellt wurde</td>
+ </tr>
+ <tr>
+ <td><code>p_discount</code></td>
+ <td>Rabatt in Prozent</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>transdate_oe</code></td>
+ <td>Auftragsdatum des Originalauftrags, wenn die Rechnung aus einem Sammelauftrag erstellt wurde</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="dokumentenvorlagen-und-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="dokumentenvorlagen-und-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>
+
+ <h3><a name="bloecke_einschr_latex">
+ Einschänkungen für Blöcke in LaTeX-Vorlagen</a></h3>
+
+ <p>Achtung: Blöcke können in LaTeX-Vorlagen momentan nicht
+ verschachtelt werden. 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_einschr_opendocument">
+ Einschänkungen für Blöcke in OpenDocument-Vorlagen</a></h3>
+
+ <p>Die eben erwähnten Einschränkungen für
+ LaTeX-Vorlagen gelten in abgeschwächter Form auch für
+ OpenDocument-Vorlagen. Auch bei OpenDocument-Vorlagen können
+ Blöcke nicht verschachtelt werden. Einzige Ausnahme ist, dass
+ <code><if></code> und
+ <code><ifnot></code>-Blöcke innerhalb von
+ <code><foreach></code>-Blöcken auftreten
+ dürfen.</p>
+
+ <h3><a name="bloecke_include">Die <code>include</code>-Anweisung</a></h3>
+
+ <p class="blue"><code><%include dateiname.ext%></code></p>
+
+ <p>Dieser Block funktioniert nur in LaTeX- und HTML-Vorlagen.</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="dokumentenvorlagen-und-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>
+
+ <p>Besonderheit in OpenDocument-Vorlagen: Tritt ein
+ <code><foreach></code>-Blcok innerhalb einer Tabellenzelle
+ auf, so wird die komplette Tabellenzeile so oft wiederholt wie
+ notwendig. Tritt er außerhalb auf, so wird nur der Inhalt
+ zwischen <code><foreach></code> und <code><end
+ foreach></code> wiederholt, nicht aber die komplette Zeile, in
+ der er steht.</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 existiert nur in LaTeX-Vorlagen.</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="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+ <h2><a name="markup">
+ Markup-Code, der innerhalb von Formularen zur Textformatierung
+ verwendet werden kann</a></h2>
+
+ <p>Wenn der Benutzer innhalb von Formularen in Lx-Office Text anders
+ formatiert haben möchte, so ist dies begrenzt möglich. Lx-Office
+ unterstützt die Textformatierung mit HTML-ähnlichen Tags. Der
+ Benutzer kann z.B. bei der Artikelbeschreibung auf einer Rechnung Teile des
+ Texts zwischen Start- und Endtags setzen. Dieser Teil wird dann automatisch
+ in Anweisungen für das ausgewählte Vorlagenformat (HTML oder
+ PDF über LaTeX) umgesetzt.</p>
+
+ <p>Die unterstützen Formatierungen sind:</p>
+
+ <p>
+ <table border="1">
+ <tr><th>Formatierung</th><th>Auswirkung</th></tr>
+ <tr>
+ <td><code><b>Text</b></code></td>
+ <td>Text wird in <b>fettdruck</b> gesetzt.</td>
+ </tr>
+ <tr>
+ <td><code><i>Text</i></code></td>
+ <td>Text wird <i>kursiv</i> gesetzt.</td>
+ </tr>
+ <tr>
+ <td><code><u>Text</u></code></td>
+ <td>Text wird <u>unterstrichen</u>.</td>
+ </tr>
+ <tr>
+ <td><code><s>Text</s></code></td>
+ <td>Text wird <s>durchgestrichen</s>. Diese Formatierung ist nicht bei der
+ Ausgabe als PDF über LaTeX verfügbar.</td>
+ </tr>
+ <tr>
+ <td><code><pagebreak></code></td>
+ <td>Erzwingt einen Seitenumbruch (siehe unten).</td>
+ </tr>
+ </table>
+ </p>
+
+ <p>Eine Besonderheit ist der Befehl <code><pagebreak></code>,
+ der nur in LaTeX-Vorlagen funktioniert und in anderen Vorlagen
+ einfach gelöscht wird. Dieser erzwingt unabhängig von der
+ im <a
+ href="dokumentenvorlagen-und-variablen.html#bloecke_pagebreak">pagebreak-Block</a>
+ voreingestellten Werte einen Seitenumbruch nach der aktuellen
+ Rechnungsposition. Dementsprechend funktioniert er nur innerhalb von
+ <code><foreach...></code>-Schleifen. Weiterhin benötigt er kein
+ Endtag.</p>
+
+ <small><a href="dokumentenvorlagen-und-variablen.html#inhaltsverzeichnis">
+ zum Inhaltsverzeichnis</a></small><br>
+ <hr>
+
+</body>
+</html>
+++ /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>
-
- <li><a href="latex-template-variablen.html#markup">
- Markup-Code, der innerhalb von Formularen zur Textformatierung verwendet
- werden kann</a></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>v_customer_id</code></td>
- <td>Kundennummer beim Lieferanten; 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>deliverydate</code></td>
- <td>Lieferdatum</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, wenn die Rechnung aus einem Auftrag erstellt wurde</td>
- </tr>
- <tr>
- <td><code>quonumber</code></td>
- <td>Angebotsnummer</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>
- <tr>
- <td><code>transdate</code></td>
- <td>Auftragsdatum wenn die Rechnung aus einem Auftrag erstellt wurde</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_oe</code></td>
- <td>Lieferdatum</td>
- </tr>
- <tr>
- <td><code>description</code></td>
- <td>Artikelbeschreibung</td>
- </tr>
- <tr>
- <td><code>discount</code></td>
- <td>Rabatt als Betrag</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>ordnumber_oe</code></td>
- <td>Auftragsnummer des Originalauftrags, wenn die Rechnung aus einem Sammelauftrag erstellt wurde</td>
- </tr>
- <tr>
- <td><code>p_discount</code></td>
- <td>Rabatt in Prozent</td>
- </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>transdate_oe</code></td>
- <td>Auftragsdatum des Originalauftrags, wenn die Rechnung aus einem Sammelauftrag erstellt wurde</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>
-
- <h2><a name="markup">
- Markup-Code, der innerhalb von Formularen zur Textformatierung
- verwendet werden kann</a></h2>
-
- <p>Wenn der Benutzer innhalb von Formularen in Lx-Office Text anders
- formatiert haben möchte, so ist dies begrenzt möglich. Lx-Office
- unterstützt die Textformatierung mit HTML-ähnlichen Tags. Der
- Benutzer kann z.B. bei der Artikelbeschreibung auf einer Rechnung Teile des
- Texts zwischen Start- und Endtags setzen. Dieser Teil wird dann automatisch
- in Anweisungen für das ausgewählte Vorlagenformat (HTML oder
- PDF über LaTeX) umgesetzt.</p>
-
- <p>Die unterstützen Formatierungen sind:</p>
-
- <p>
- <table border="1">
- <tr><th>Formatierung</th><th>Auswirkung</th></tr>
- <tr>
- <td><code><b>Text</b></code></td>
- <td>Text wird in <b>fettdruck</b> gesetzt.</td>
- </tr>
- <tr>
- <td><code><u>Text</u></code></td>
- <td>Text wird <u>unterstrichen</u>.</td>
- </tr>
- <tr>
- <td><code><s>Text</s></code></td>
- <td>Text wird <s>durchgestrichen</s>. Diese Formatierung ist nicht bei der
- Ausgabe als PDF über LaTeX verfügbar.</td>
- </tr>
- <tr>
- <td><code><pagebreak></code></td>
- <td>Erzwingt einen Seitenumbruch (siehe unten).</td>
- </tr>
- </table>
- </p>
-
- <p>Eine Besonderheit ist der Befehl <code><pagebreak></code>. Dieser
- erzwingt unabhängig von der im <a
- href="latex-template-variablen.html#bloecke_pagebreak">pagebreak-Block</a>
- voreingestellten Werte einen Seitenumbruch nach der aktuellen
- Rechnungsposition. Dementsprechend funktioniert er nur innerhalb von
- <code><foreach...></code>-Schleifen. Weiterhin benötigt er kein
- Endtag.</p>
-
- <small><a href="latex-template-variablen.html#inhaltsverzeichnis">
- zum Inhaltsverzeichnis</a></small><br>
- <hr>
-
-</body>
-</html>
--- /dev/null
+function calculate_qty_selection_window(input_name, alu, formel, row) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var name = document.getElementsByName(input_name)[0].value;
+ if (document.getElementsByName(alu)[0].value == "1") {
+ var action = "calculate_alu";
+ var qty = document.getElementsByName("qty_" + row)[0].value;
+ var description = document.getElementsByName("description_" + row)[0].value;
+ } else var action = "calculate_qty";
+ url = "common.pl?" +
+ "action=" + action + "&" +
+ "login=" + encodeURIComponent(document.getElementsByName("login")[0].value) + "&" +
+ "password=" + encodeURIComponent(document.getElementsByName("password")[0].value) + "&" +
+ "path=" + encodeURIComponent(document.getElementsByName("path")[0].value) + "&" +
+ "name=" + escape(name) + "&" +
+ "input_name=" + escape(input_name) + "&" +
+ "description=" + escape(description) + "&" +
+ "qty=" + escape(qty) + "&" +
+ "row=" + escape(row) + "&" +
+ "formel=" + escape(document.getElementsByName(formel)[0].value)
+ //alert(url);
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+function centerParms(width,height,extra) {
+ xPos = (screen.width - width) / 2;
+ yPos = (screen.height - height) / 2;
+
+ string = "left=" + xPos + ",top=" + yPos;
+
+ if (extra)
+ string += "width=" + width + ",height=" + height;
+
+ return string;
+}
+
+function set_longdescription_window(input_name) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var name = document.getElementsByName(input_name)[0].value;
+ url = "common.pl?" +
+ "action=set_longdescription&" +
+ "login=" + encodeURIComponent(document.getElementsByName("login")[0].value)+ "&"+
+ "password=" + encodeURIComponent(document.getElementsByName("password")[0].value) + "&" +
+ "path=" + encodeURIComponent(document.getElementsByName("path")[0].value) + "&" +
+ "longdescription=" + escape(document.getElementsByName(input_name)[0].value) + "&" +
+ "input_name=" + escape(input_name) + "&"
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+function delivery_customer_selection_window(input_name, input_id) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var name = document.getElementsByName(input_name)[0].value;
+ url = "common.pl?" +
+ "action=delivery_customer_selection&" +
+ "login=" + escape(document.getElementsByName("login")[0].value) + "&" +
+ "password=" + escape(document.getElementsByName("password")[0].value) + "&" +
+ "path=" + escape(document.getElementsByName("path")[0].value) + "&" +
+ "name=" + escape(name) + "&" +
+ "input_name=" + escape(input_name) + "&" +
+ "input_id=" + escape(input_id)
+ //alert(url);
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+function set_email_window(input_subject, input_body, input_attachment) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var url = "dn.pl?" +
+ "action=set_email&" +
+ "login=" + encodeURIComponent(document.getElementsByName("login")[0].value)+ "&"+
+ "password=" + encodeURIComponent(document.getElementsByName("password")[0].value) + "&" +
+ "path=" + encodeURIComponent(document.getElementsByName("path")[0].value) + "&" +
+ "email_subject=" + escape(document.getElementsByName(input_subject)[0].value) + "&" +
+ "email_body=" + escape(document.getElementsByName(input_body)[0].value) + "&" +
+ "email_attachment=" + escape(document.getElementsByName(input_attachment)[0].value) + "&" +
+ "input_subject=" + escape(input_subject) + "&" +
+ "input_body=" + escape(input_body) + "&" +
+ "input_attachment=" + escape(input_attachment);
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
+//For full source code, 100's more DHTML scripts, and TOS,
+//visit http://www.dynamicdrive.com
+
+var highlightcolor="yellow"
+
+var ns6=document.getElementById&&!document.all
+var previous=''
+var eventobj
+
+//Regular expression to highlight only form elements
+var intended=/INPUT|TEXTAREA|SELECT|OPTION/
+
+//Function to check whether element clicked is form element
+function checkel(which){
+if (which.style&&intended.test(which.tagName)){
+if (ns6&&eventobj.nodeType==3)
+eventobj=eventobj.parentNode.parentNode
+return true
+}
+else
+return false
+}
+
+//Function to highlight form element
+function highlight(e){
+eventobj=ns6? e.target : event.srcElement
+if (previous!=''){
+if (checkel(previous))
+previous.style.backgroundColor=''
+previous=eventobj
+if (checkel(eventobj))
+eventobj.style.backgroundColor=highlightcolor
+}
+else{
+if (checkel(eventobj))
+eventobj.style.backgroundColor=highlightcolor
+previous=eventobj
+}
+}
\ No newline at end of file
--- /dev/null
+function parts_language_selection_window(input_name) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var name = document.getElementsByName(input_name)[0].value;
+ url = "ic.pl?" +
+ "action=parts_language_selection&" +
+ "login=" + escape(document.ic.login.value) + "&" +
+ "password=" + escape(document.ic.password.value) + "&" +
+ "path=" + escape(document.ic.path.value) + "&" +
+ "id=" + escape(document.ic.id.value) + "&" +
+ "language_values=" + escape(document.ic.language_values.value) + "&" +
+ "name=" + escape(name) + "&" +
+ "input_name=" + escape(input_name) + "&"
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)\r
+//** Last updated: June 29th, 06\r
+\r
+var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?\r
+\r
+////NO NEED TO EDIT BELOW////////////////////////\r
+var tabcontentIDs=new Object()\r
+\r
+function expandcontent(linkobj){\r
+var ulid=linkobj.parentNode.parentNode.id //id of UL element\r
+var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents\r
+for (var i=0; i<ullist.length; i++){\r
+ullist[i].className="" //deselect all tabs\r
+if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)\r
+document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents\r
+}\r
+linkobj.parentNode.className="selected" //highlight currently clicked on tab\r
+document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content\r
+saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))\r
+}\r
+\r
+function savetabcontentids(ulid, relattribute){// save ids of tab content divs\r
+if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet\r
+tabcontentIDs[ulid]=new Array()\r
+tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute\r
+}\r
+\r
+function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie\r
+if (enabletabpersistence==1) //if persistence feature turned on\r
+setCookie(ulid, selectedtabid)\r
+}\r
+\r
+function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content\r
+var ullist=document.getElementById(ulid).getElementsByTagName("li")\r
+for (var i=0; i<ullist.length; i++){\r
+if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){\r
+return ullist[i].getElementsByTagName("a")[0]\r
+break\r
+}\r
+}\r
+}\r
+\r
+function initializetabcontent(){\r
+for (var i=0; i<arguments.length; i++){ //loop through passed UL ids\r
+if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off\r
+setCookie(arguments[i], "")\r
+var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any\r
+var ulobj=document.getElementById(arguments[i])\r
+var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL\r
+for (var x=0; x<ulist.length; x++){ //loop through each LI element\r
+var ulistlink=ulist[x].getElementsByTagName("a")[0]\r
+if (ulistlink.getAttribute("rel")){\r
+savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs\r
+ulistlink.onclick=function(){\r
+expandcontent(this)\r
+return false\r
+}\r
+if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default\r
+expandcontent(ulistlink) //auto load currenly selected tab content\r
+}\r
+} //end inner for loop\r
+if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value\r
+var culistlink=getullistlinkbyId(arguments[i], clickedontab)\r
+if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value\r
+expandcontent(culistlink) //auto load currenly selected tab content\r
+else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)\r
+expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead\r
+}\r
+} //end outer for loop\r
+}\r
+\r
+\r
+function getCookie(Name){ \r
+var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair\r
+if (document.cookie.match(re)) //if cookie found\r
+return document.cookie.match(re)[0].split("=")[1] //return its value\r
+return ""\r
+}\r
+\r
+function setCookie(name, value){\r
+document.cookie = name+"="+value //cookie value is domain wide (path=/)\r
+}
\ No newline at end of file
--- /dev/null
+function vendor_selection_window(input_name, input_id) {
+ var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
+ var name = document.getElementsByName(input_name)[0].value;
+ url = "common.pl?" +
+ "action=vendor_selection&" +
+ "login=" + escape(document.getElementsByName("login")[0].value) + "&" +
+ "password=" + escape(document.getElementsByName("password")[0].value) + "&" +
+ "path=" + escape(document.getElementsByName("path")[0].value) + "&" +
+ "name=" + escape(name) + "&" +
+ "input_name=" + escape(input_name) + "&" +
+ "input_id=" + escape(input_id)
+ //alert(url);
+ window.open(url, "_new_generic", parm);
+}
--- /dev/null
+/* This notice must be untouched at all times.
+
+wz_tooltip.js v. 3.38
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Copyright (c) 2002-2005 Walter Zorn. All rights reserved.
+Created 1. 12. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
+Last modified: 9. 12. 2005
+
+Cross-browser tooltips working even in Opera 5 and 6,
+as well as in NN 4, Gecko-Browsers, IE4+, Opera 7+ and Konqueror.
+No onmouseouts required.
+Appearance of tooltips can be individually configured
+via commands within the onmouseovers.
+
+LICENSE: LGPL
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License (LGPL) as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library 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.
+
+For more details on the GNU Lesser General Public License,
+see http://www.gnu.org/copyleft/lesser.html
+*/
+
+
+
+//////////////// GLOBAL TOOPTIP CONFIGURATION /////////////////////
+var ttAbove = false; // tooltip above mousepointer? Alternative: true
+var ttBgColor = "#e6ecff";
+var ttBgImg = ""; // path to background image;
+var ttBorderColor = "#003399";
+var ttBorderWidth = 1;
+var ttDelay = 500; // time span until tooltip shows up [milliseconds]
+var ttFontColor = "#000066";
+var ttFontFace = "arial,helvetica,sans-serif";
+var ttFontSize = "11px";
+var ttFontWeight = "normal"; // alternative: "bold";
+var ttLeft = false; // tooltip on the left of the mouse? Alternative: true
+var ttOffsetX = 12; // horizontal offset of left-top corner from mousepointer
+var ttOffsetY = 15; // vertical offset "
+var ttOpacity = 100; // opacity of tooltip in percent (must be integer between 0 and 100)
+var ttPadding = 3; // spacing between border and content
+var ttShadowColor = "";
+var ttShadowWidth = 0;
+var ttStatic = false; // tooltip NOT move with the mouse? Alternative: true
+var ttSticky = false; // do NOT hide tooltip on mouseout? Alternative: true
+var ttTemp = 0; // time span after which the tooltip disappears; 0 (zero) means "infinite timespan"
+var ttTextAlign = "left";
+var ttTitleColor = "#ffffff"; // color of caption text
+var ttWidth = 300;
+//////////////////// END OF TOOLTIP CONFIG ////////////////////////
+
+
+
+////////////// TAGS WITH TOOLTIP FUNCTIONALITY ////////////////////
+// List may be extended or shortened:
+var tt_tags = new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s", "select", "small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer");
+/////////////////////////////////////////////////////////////////////
+
+
+
+///////// DON'T CHANGE ANYTHING BELOW THIS LINE /////////////////////
+var tt_obj = null, // current tooltip
+tt_ifrm = null, // iframe to cover windowed controls in IE
+tt_objW = 0, tt_objH = 0, // width and height of tt_obj
+tt_objX = 0, tt_objY = 0,
+tt_offX = 0, tt_offY = 0,
+xlim = 0, ylim = 0, // right and bottom borders of visible client area
+tt_sup = false, // true if T_ABOVE cmd
+tt_sticky = false, // tt_obj sticky?
+tt_wait = false,
+tt_act = false, // tooltip visibility flag
+tt_sub = false, // true while tooltip below mousepointer
+tt_u = "undefined",
+tt_mf = null, // stores previous mousemove evthandler
+// Opera: disable href when hovering <a>
+tt_tag = null; // stores hovered dom node, href and previous statusbar txt
+
+
+var tt_db = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null,
+tt_n = navigator.userAgent.toLowerCase(),
+tt_nv = navigator.appVersion;
+// Browser flags
+var tt_op = !!(window.opera && document.getElementById),
+tt_op6 = tt_op && !document.defaultView,
+tt_op7 = tt_op && !tt_op6,
+tt_ie = tt_n.indexOf("msie") != -1 && document.all && tt_db && !tt_op,
+tt_ie6 = tt_ie && parseFloat(tt_nv.substring(tt_nv.indexOf("MSIE")+5)) >= 5.5,
+tt_n4 = (document.layers && typeof document.classes != tt_u),
+tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != tt_u),
+tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;
+
+function tt_Int(t_x)
+{
+ var t_y;
+ return isNaN(t_y = parseInt(t_x))? 0 : t_y;
+}
+function wzReplace(t_x, t_y)
+{
+ var t_ret = "",
+ t_str = this,
+ t_xI;
+ while((t_xI = t_str.indexOf(t_x)) != -1)
+ {
+ t_ret += t_str.substring(0, t_xI) + t_y;
+ t_str = t_str.substring(t_xI + t_x.length);
+ }
+ return t_ret+t_str;
+}
+String.prototype.wzReplace = wzReplace;
+function tt_N4Tags(tagtyp, t_d, t_y)
+{
+ t_d = t_d || document;
+ t_y = t_y || new Array();
+ var t_x = (tagtyp=="a")? t_d.links : t_d.layers;
+ for(var z = t_x.length; z--;) t_y[t_y.length] = t_x[z];
+ for(z = t_d.layers.length; z--;) t_y = tt_N4Tags(tagtyp, t_d.layers[z].document, t_y);
+ return t_y;
+}
+function tt_Htm(tt, t_id, txt)
+{
+ var t_bgc = (typeof tt.T_BGCOLOR != tt_u)? tt.T_BGCOLOR : ttBgColor,
+ t_bgimg = (typeof tt.T_BGIMG != tt_u)? tt.T_BGIMG : ttBgImg,
+ t_bc = (typeof tt.T_BORDERCOLOR != tt_u)? tt.T_BORDERCOLOR : ttBorderColor,
+ t_bw = (typeof tt.T_BORDERWIDTH != tt_u)? tt.T_BORDERWIDTH : ttBorderWidth,
+ t_ff = (typeof tt.T_FONTFACE != tt_u)? tt.T_FONTFACE : ttFontFace,
+ t_fc = (typeof tt.T_FONTCOLOR != tt_u)? tt.T_FONTCOLOR : ttFontColor,
+ t_fsz = (typeof tt.T_FONTSIZE != tt_u)? tt.T_FONTSIZE : ttFontSize,
+ t_fwght = (typeof tt.T_FONTWEIGHT != tt_u)? tt.T_FONTWEIGHT : ttFontWeight,
+ t_opa = (typeof tt.T_OPACITY != tt_u)? tt.T_OPACITY : ttOpacity,
+ t_padd = (typeof tt.T_PADDING != tt_u)? tt.T_PADDING : ttPadding,
+ t_shc = (typeof tt.T_SHADOWCOLOR != tt_u)? tt.T_SHADOWCOLOR : (ttShadowColor || 0),
+ t_shw = (typeof tt.T_SHADOWWIDTH != tt_u)? tt.T_SHADOWWIDTH : (ttShadowWidth || 0),
+ t_algn = (typeof tt.T_TEXTALIGN != tt_u)? tt.T_TEXTALIGN : ttTextAlign,
+ t_tit = (typeof tt.T_TITLE != tt_u)? tt.T_TITLE : "",
+ t_titc = (typeof tt.T_TITLECOLOR != tt_u)? tt.T_TITLECOLOR : ttTitleColor,
+ t_w = (typeof tt.T_WIDTH != tt_u)? tt.T_WIDTH : ttWidth;
+ if(t_shc || t_shw)
+ {
+ t_shc = t_shc || "#cccccc";
+ t_shw = t_shw || 5;
+ }
+ if(tt_n4 && (t_fsz == "10px" || t_fsz == "11px")) t_fsz = "12px";
+
+ var t_optx = (tt_n4? '' : tt_n6? ('-moz-opacity:'+(t_opa/100.0)) : tt_ie? ('filter:Alpha(opacity='+t_opa+')') : ('opacity:'+(t_opa/100.0))) + ';';
+ var t_y = '<div id="'+t_id+'" style="position:absolute;z-index:1010;';
+ t_y += 'left:0px;top:0px;width:'+(t_w+t_shw)+'px;visibility:'+(tt_n4? 'hide' : 'hidden')+';'+t_optx+'">' +
+ '<table border="0" cellpadding="0" cellspacing="0"'+(t_bc? (' bgcolor="'+t_bc+'" style="background:'+t_bc+';"') : '')+' width="'+t_w+'">';
+ if(t_tit)
+ {
+ t_y += '<tr><td style="padding-left:3px;padding-right:3px;" align="'+t_algn+'"><font color="'+t_titc+'" face="'+t_ff+'" ' +
+ 'style="color:'+t_titc+';font-family:'+t_ff+';font-size:'+t_fsz+';"><b>' +
+ (tt_n4? ' ' : '')+t_tit+'</b></font></td></tr>';
+ }
+ t_y += '<tr><td><table border="0" cellpadding="'+t_padd+'" cellspacing="'+t_bw+'" width="100%">' +
+ '<tr><td'+(t_bgc? (' bgcolor="'+t_bgc+'"') : '')+(t_bgimg? ' background="'+t_bgimg+'"' : '')+' style="text-align:'+t_algn+';';
+ if(tt_n6) t_y += 'padding:'+t_padd+'px;';
+ t_y += '" align="'+t_algn+'"><font color="'+t_fc+'" face="'+t_ff+'"' +
+ ' style="color:'+t_fc+';font-family:'+t_ff+';font-size:'+t_fsz+';font-weight:'+t_fwght+';">';
+ if(t_fwght == 'bold') t_y += '<b>';
+ t_y += txt;
+ if(t_fwght == 'bold') t_y += '</b>';
+ t_y += '</font></td></tr></table></td></tr></table>';
+ if(t_shw)
+ {
+ var t_spct = Math.round(t_shw*1.3);
+ if(tt_n4)
+ {
+ t_y += '<layer bgcolor="'+t_shc+'" left="'+t_w+'" top="'+t_spct+'" width="'+t_shw+'" height="0"></layer>' +
+ '<layer bgcolor="'+t_shc+'" left="'+t_spct+'" align="bottom" width="'+(t_w-t_spct)+'" height="'+t_shw+'"></layer>';
+ }
+ else
+ {
+ t_optx = tt_n6? '-moz-opacity:0.85;' : tt_ie? 'filter:Alpha(opacity=85);' : 'opacity:0.85;';
+ t_y += '<div id="'+t_id+'R" style="position:absolute;background:'+t_shc+';left:'+t_w+'px;top:'+t_spct+'px;width:'+t_shw+'px;height:1px;overflow:hidden;'+t_optx+'"></div>' +
+ '<div style="position:relative;background:'+t_shc+';left:'+t_spct+'px;top:0px;width:'+(t_w-t_spct)+'px;height:'+t_shw+'px;overflow:hidden;'+t_optx+'"></div>';
+ }
+ }
+ return(t_y+'</div>' +
+ (tt_ie6 ? '<iframe id="TTiEiFrM" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>' : ''));
+}
+function tt_EvX(t_e)
+{
+ var t_y = tt_Int(t_e.pageX || t_e.clientX || 0) +
+ tt_Int(tt_ie? tt_db.scrollLeft : 0) +
+ tt_offX;
+ if(t_y > xlim) t_y = xlim;
+ var t_scr = tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0);
+ if(t_y < t_scr) t_y = t_scr;
+ return t_y;
+}
+function tt_EvY(t_e)
+{
+ var t_y = tt_Int(t_e.pageY || t_e.clientY || 0) +
+ tt_Int(tt_ie? tt_db.scrollTop : 0);
+ if(tt_sup) t_y -= (tt_objH + tt_offY - 15);
+ else if(t_y > ylim || !tt_sub && t_y > ylim-24)
+ {
+ t_y -= (tt_objH + 5);
+ tt_sub = false;
+ }
+ else
+ {
+ t_y += tt_offY;
+ tt_sub = true;
+ }
+ return t_y;
+}
+function tt_ReleasMov()
+{
+ if(document.onmousemove == tt_Move)
+ {
+ if(!tt_mf && document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);
+ document.onmousemove = tt_mf;
+ }
+}
+function tt_ShowIfrm(t_x)
+{
+ if(!tt_obj || !tt_ifrm) return;
+ if(t_x)
+ {
+ tt_ifrm.style.width = tt_objW+'px';
+ tt_ifrm.style.height = tt_objH+'px';
+ tt_ifrm.style.display = "block";
+ }
+ else tt_ifrm.style.display = "none";
+}
+function tt_GetDiv(t_id)
+{
+ return(
+ tt_n4? (document.layers[t_id] || null)
+ : tt_ie? (document.all[t_id] || null)
+ : (document.getElementById(t_id) || null)
+ );
+}
+function tt_GetDivW()
+{
+ return tt_Int(
+ tt_n4? tt_obj.clip.width
+ : (tt_obj.style.pixelWidth || tt_obj.offsetWidth)
+ );
+}
+function tt_GetDivH()
+{
+ return tt_Int(
+ tt_n4? tt_obj.clip.height
+ : (tt_obj.style.pixelHeight || tt_obj.offsetHeight)
+ );
+}
+
+// Compat with DragDrop Lib: Ensure that z-index of tooltip is lifted beyond toplevel dragdrop element
+function tt_SetDivZ()
+{
+ var t_i = tt_obj.style || tt_obj;
+ if(t_i)
+ {
+ if(window.dd && dd.z)
+ t_i.zIndex = Math.max(dd.z+1, t_i.zIndex);
+ if(tt_ifrm) tt_ifrm.style.zIndex = t_i.zIndex-1;
+ }
+}
+function tt_SetDivPos(t_x, t_y)
+{
+ var t_i = tt_obj.style || tt_obj;
+ var t_px = (tt_op6 || tt_n4)? '' : 'px';
+ t_i.left = (tt_objX = t_x) + t_px;
+ t_i.top = (tt_objY = t_y) + t_px;
+ if(tt_ifrm)
+ {
+ tt_ifrm.style.left = t_i.left;
+ tt_ifrm.style.top = t_i.top;
+ }
+}
+function tt_ShowDiv(t_x)
+{
+ tt_ShowIfrm(t_x);
+ if(tt_n4) tt_obj.visibility = t_x? 'show' : 'hide';
+ else tt_obj.style.visibility = t_x? 'visible' : 'hidden';
+ tt_act = t_x;
+}
+function tt_OpDeHref(t_e)
+{
+ var t_tag;
+ if(t_e)
+ {
+ t_tag = t_e.target;
+ while(t_tag)
+ {
+ if(t_tag.hasAttribute("href"))
+ {
+ tt_tag = t_tag
+ tt_tag.t_href = tt_tag.getAttribute("href");
+ tt_tag.removeAttribute("href");
+ tt_tag.style.cursor = "hand";
+ tt_tag.onmousedown = tt_OpReHref;
+ tt_tag.stats = window.status;
+ window.status = tt_tag.t_href;
+ break;
+ }
+ t_tag = t_tag.parentElement;
+ }
+ }
+}
+function tt_OpReHref()
+{
+ if(tt_tag)
+ {
+ tt_tag.setAttribute("href", tt_tag.t_href);
+ window.status = tt_tag.stats;
+ tt_tag = null;
+ }
+}
+function tt_Show(t_e, t_id, t_sup, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky, t_temp)
+{
+ if(tt_obj) tt_Hide();
+ tt_mf = document.onmousemove || null;
+ if(window.dd && (window.DRAG && tt_mf == DRAG || window.RESIZE && tt_mf == RESIZE)) return;
+ var t_sh, t_h;
+
+ tt_obj = tt_GetDiv(t_id);
+ if(tt_obj)
+ {
+ t_e = t_e || window.event;
+ tt_sub = !(tt_sup = t_sup);
+ tt_sticky = t_sticky;
+ tt_objW = tt_GetDivW();
+ tt_objH = tt_GetDivH();
+ tt_offX = t_left? -(tt_objW+t_offx) : t_offx;
+ tt_offY = t_offy;
+ if(tt_op7) tt_OpDeHref(t_e);
+ if(tt_n4)
+ {
+ if(tt_obj.document.layers.length)
+ {
+ t_sh = tt_obj.document.layers[0];
+ t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3);
+ }
+ }
+ else
+ {
+ t_sh = tt_GetDiv(t_id+'R');
+ if(t_sh)
+ {
+ t_h = tt_objH - tt_Int(t_sh.style.pixelTop || t_sh.style.top || 0);
+ if(typeof t_sh.style.pixelHeight != tt_u) t_sh.style.pixelHeight = t_h;
+ else t_sh.style.height = t_h+'px';
+ }
+ }
+
+ xlim = tt_Int((tt_db && tt_db.clientWidth)? tt_db.clientWidth : window.innerWidth) +
+ tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0) -
+ tt_objW -
+ (tt_n4? 21 : 0);
+ ylim = tt_Int(window.innerHeight || tt_db.clientHeight) +
+ tt_Int(window.pageYOffset || (tt_db? tt_db.scrollTop : 0) || 0) -
+ tt_objH - tt_offY;
+
+ tt_SetDivZ();
+ if(t_fix) tt_SetDivPos(tt_Int((t_fix = t_fix.split(','))[0]), tt_Int(t_fix[1]));
+ else tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));
+
+ var t_txt = 'tt_ShowDiv(\'true\');';
+ if(t_sticky) t_txt += '{'+
+ 'tt_ReleasMov();'+
+ 'window.tt_upFunc = document.onmouseup || null;'+
+ 'if(document.captureEvents) document.captureEvents(Event.MOUSEUP);'+
+ 'document.onmouseup = new Function("window.setTimeout(\'tt_Hide();\', 10);");'+
+ '}';
+ else if(t_static) t_txt += 'tt_ReleasMov();';
+ if(t_temp > 0) t_txt += 'window.tt_rtm = window.setTimeout(\'tt_sticky = false; tt_Hide();\','+t_temp+');';
+ window.tt_rdl = window.setTimeout(t_txt, t_delay);
+
+ if(!t_fix)
+ {
+ if(document.captureEvents) document.captureEvents(Event.MOUSEMOVE);
+ document.onmousemove = tt_Move;
+ }
+ }
+}
+var tt_area = false;
+function tt_Move(t_ev)
+{
+ if(!tt_obj) return;
+ if(tt_n6 || tt_w3c)
+ {
+ if(tt_wait) return;
+ tt_wait = true;
+ setTimeout('tt_wait = false;', 5);
+ }
+ var t_e = t_ev || window.event;
+ tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));
+ if(tt_op6)
+ {
+ if(tt_area && t_e.target.tagName != 'AREA') tt_Hide();
+ else if(t_e.target.tagName == 'AREA') tt_area = true;
+ }
+}
+function tt_Hide()
+{
+ if(window.tt_obj)
+ {
+ if(window.tt_rdl) window.clearTimeout(tt_rdl);
+ if(!tt_sticky || !tt_act)
+ {
+ if(window.tt_rtm) window.clearTimeout(tt_rtm);
+ tt_ShowDiv(false);
+ tt_SetDivPos(-tt_objW, -tt_objH);
+ tt_obj = null;
+ if(typeof window.tt_upFunc != tt_u) document.onmouseup = window.tt_upFunc;
+ }
+ tt_sticky = false;
+ if(tt_op6 && tt_area) tt_area = false;
+ tt_ReleasMov();
+ if(tt_op7) tt_OpReHref();
+ }
+}
+function tt_Init()
+{
+ if(!(tt_op || tt_n4 || tt_n6 || tt_ie || tt_w3c)) return;
+
+ var htm = tt_n4? '<div style="position:absolute;"></div>' : '',
+ tags,
+ t_tj,
+ over,
+ esc = 'return escape(';
+ var i = tt_tags.length; while(i--)
+ {
+ tags = tt_ie? (document.all.tags(tt_tags[i]) || 1)
+ : document.getElementsByTagName? (document.getElementsByTagName(tt_tags[i]) || 1)
+ : (!tt_n4 && tt_tags[i]=="a")? document.links
+ : 1;
+ if(tt_n4 && (tt_tags[i] == "a" || tt_tags[i] == "layer")) tags = tt_N4Tags(tt_tags[i]);
+ var j = tags.length; while(j--)
+ {
+ if(typeof (t_tj = tags[j]).onmouseover == "function" && t_tj.onmouseover.toString().indexOf(esc) != -1 && !tt_n6 || tt_n6 && (over = t_tj.getAttribute("onmouseover")) && over.indexOf(esc) != -1)
+ {
+ if(over) t_tj.onmouseover = new Function(over);
+ var txt = unescape(t_tj.onmouseover());
+ htm += tt_Htm(
+ t_tj,
+ "tOoLtIp"+i+""+j,
+ txt.wzReplace("& ","&")
+ );
+
+ t_tj.onmouseover = new Function('e',
+ 'tt_Show(e,'+
+ '"tOoLtIp' +i+''+j+ '",'+
+ ((typeof t_tj.T_ABOVE != tt_u)? t_tj.T_ABOVE : ttAbove)+','+
+ ((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay)+','+
+ ((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""')+','+
+ ((typeof t_tj.T_LEFT != tt_u)? t_tj.T_LEFT : ttLeft)+','+
+ ((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX)+','+
+ ((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY)+','+
+ ((typeof t_tj.T_STATIC != tt_u)? t_tj.T_STATIC : ttStatic)+','+
+ ((typeof t_tj.T_STICKY != tt_u)? t_tj.T_STICKY : ttSticky)+','+
+ ((typeof t_tj.T_TEMP != tt_u)? t_tj.T_TEMP : ttTemp)+
+ ');'
+ );
+ t_tj.onmouseout = tt_Hide;
+ if(t_tj.alt) t_tj.alt = "";
+ if(t_tj.title) t_tj.title = "";
+ }
+ }
+ }
+ document.write(htm);
+ if(document.getElementById) tt_ifrm = document.getElementById("TTiEiFrM");
+}
+tt_Init();
' Date missing!' => ' Datum fehlt!',
' Number' => ' Nummer',
' Part Number missing!' => ' Artikelnummer fehlt!',
+ ' Payment posted!' => 'Zahlung gebucht!',
' missing!' => ' fehlt!',
+ '*/' => '',
'1. Quarter' => '1. Quartal',
'1000,00 or 1000.00' => '1000,00 oder 1000.00',
'2. Quarter' => '2. Quartal',
'3. Quarter' => '3. Quartal',
'4. Quarter' => '4. Quartal',
+ 'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
+ 'ADR' => 'ADR',
+ 'ADR Code' => 'ADR-Kürzel',
+ 'ADR Code missing!' => 'ADR-Kürzel fehlt!',
+ 'ADR Description' => 'ADR-Text',
+ 'ADR Description missing!' => 'ADR-Text fehlt!',
+ 'ADR Report' => '',
+ 'ADR deleted!' => 'Adr gelöscht!',
+ 'ADR saved!' => 'ADR gespeichert!',
+ 'AGB' => '',
'AP' => 'Einkauf',
'AP Aging' => 'Offene Verbindlichkeiten',
'AP Transaction' => 'Kreditorenbuchung',
'Accounting Menu' => 'Kontoverwaltung',
'Accrual' => 'Bilanzierung',
'Active' => 'Aktiv',
+ 'Active?' => 'Aktiviert?',
'Add' => 'Erfassen',
'Add ' => 'Hinzufügen',
+ 'Add ADR' => 'ADR hinzufügen',
'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 Buchungsgruppe' => 'Buchungsgruppe erfassen',
'Add Business' => 'Kundentyp erfassen',
+ 'Add Credit Note' => 'Gutschrift erfassen',
'Add Customer' => 'Kunde erfassen',
'Add Department' => 'Abteilung erfassen',
+ 'Add Dunning' => 'Mahnung erzeugen',
'Add Exchangerate' => 'Wechselkurs erfassen',
'Add GIFI' => 'GIFI erfassen',
'Add General Ledger Transaction' => 'Dialogbuchen',
'Add Group' => 'Warengruppe erfassen',
+ 'Add Language' => 'Sprache hinzufügen',
'Add License' => 'Lizenz erfassen',
'Add Part' => 'Ware erfassen',
+ 'Add Payment Terms' => 'Zahlungskonditionen hinzufügen',
'Add Pricegroup' => 'Preisgruppe erfassen',
+ 'Add Printer' => 'Drucker hinzufügen',
'Add Project' => 'Projekt erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add RFQ' => 'Neue Preisanfrage',
+ 'Add RMA' => 'RMA erfassen',
'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 Storno Credit Note' => 'Gutschrift Storno hinzufügen',
'Add Transaction' => 'Dialogbuchen',
'Add User' => 'Benutzer erfassen',
'Add Vendor' => 'Lieferant erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Add Warehouse' => 'Lager erfassen',
+ 'Add and edit %s' => '%s hinzufügen und bearbeiten',
+ 'Add unit' => 'Einheit hinzufügen',
'Address' => 'Adresse',
'Administration' => 'Administration',
'Administrator' => 'Administrator',
'All' => 'Alle',
'All Accounts' => 'Alle Konten',
'All Datasets up to date!' => 'Alle Datenbanken sind auf aktuellem Stand.',
+ 'Aluartikel' => 'Aluartikel',
'Amount' => 'Betrag',
'Amount Due' => 'Betrag fällig',
'Angaben zum Finanzamt' => 'Angaben zum Finanzamt',
+ 'Ansprechpartner' => '',
'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 RMA Number' => '',
'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?',
+ 'Are you sure you want to update the prices' => 'Sind Sie sicher, dass Sie die Preise
+aktualisieren wollen?',
+ 'Article Code' => 'Artikelkürzel',
+ 'Article Code missing!' => 'Artikelkürzel fehlt',
'Assemblies' => 'Erzeugnisse',
'Assemblies restocked!' => 'Erzeugnisse sind im Lager!',
'Assembly Number missing!' => 'Erzeugnisnummer fehlt!',
- 'Asset' => 'Aktiva/Mittelverwendung',
+ 'Asset' => 'Aktiva',
+ 'Attach PDF:' => 'PDF anhängen',
'Attachment' => 'als Anhang',
'Audit Control' => 'Bücherkontrolle',
+ 'Aufwand Ausland' => '',
+ 'Aufwand EU m UStId' => '',
+ 'Aufwand EU m. UStId' => '',
+ 'Aufwand EU o. UStId' => '',
+ 'Aufwand Inland' => '',
'Aug' => 'Aug',
'August' => 'August',
'Ausgabeformat' => 'Ausgabeformat',
'Ausgabeformat auswählen...' => 'Ausgabeformat auswählen...',
+ 'Auto Send?' => 'Auto. Versand?',
+ 'BG anzeigen' => 'BG anzeigen',
+ 'BG hinzufügen' => 'BG hinzufügen',
'BLZ: ' => 'BLZ: ',
'BOM' => 'Stückliste',
'BWA' => 'BWA',
'Bankverbindung des Finanzamts' => 'Bankverbindung des Finanzamts',
'Bankverbindungen' => 'Bankverbindungen',
'Bankverbindungen des Finanzamts' => 'Bankverbindungen des Finanzamts',
+ 'Base unit' => 'Basiseinheit',
'Batch Printing' => 'Druck',
'Bcc' => 'Bcc',
'Belegnummer' => 'Buchungsnummer',
'Beratername' => 'Beratername',
'Beraternummer' => 'Beraternummer',
'Berichtigte Anmeldung' => 'Berichtigte Anmeldung',
+ 'Bestandskonto' => '',
'Bilanz' => 'Bilanz',
'Billing Address' => 'Rechnungsadresse',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
+ 'Birthday' => 'Geburtstag',
'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 eine Steuernummer angeben' => 'Bitte eine Steuernummer angeben',
+ 'Body:' => 'Text:',
'Books are open' => 'Die Bücher sind geöffnet.',
'Bought' => 'Gekauft',
'Buchungsdatum' => 'Buchungsdatum',
+ 'Buchungsgruppe' => 'Buchungsgruppe',
+ 'Buchungsgruppe bearbeiten' => 'Buchungsgruppe bearbeiten',
+ 'Buchungsgruppe gelöscht!' => 'Buchungsgruppe gelöscht!',
+ 'Buchungsgruppe gespeichert!' => 'Buchungsgruppe gespeichert!',
+ 'Buchungsgruppe hinzufügen' => 'Buchungsgruppe hinzufügen',
+ 'Buchungsgruppen' => 'Buchungsgruppen',
'Buchungsjournal' => 'Buchungsjournal',
+ 'Bunker Receipt' => '',
'Business' => 'Firma',
'Business Number' => 'Firmennummer',
'Business deleted!' => 'Firma gelöscht.',
'Business saved!' => 'Firma gespeichert.',
'C' => 'G',
+ 'COGS' => 'Umsatzkosten',
+ 'CSV' => '',
+ 'Calculate' => 'Berechnen',
'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 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 save rma!' => '',
'Cannot stock assemblies!' => 'Erzeugnisse können nicht ins Lager!',
+ 'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren',
'Cash' => 'Zahlungsverkehr',
'Cc' => 'Cc',
'Change Admin Password' => 'Administratorpasswort ändern',
'Chart of Accounts' => 'Kontenübersicht',
'Check' => 'Scheck',
'Checks' => 'Schecks',
+ 'Choose Customer' => 'Endkunde wählen:',
+ 'Choose Vendor' => 'Händler wählen',
'City' => 'Stadt',
'Cleared Balance' => 'abgeschlossen',
'Click on login name to edit!' => 'Zum Bearbeiten den Zugriffsnamen anklicken!',
+ 'Close' => 'Ãœbernehmen',
'Close Books up to' => 'Die Bücher abschließen bis zum',
'Closed' => 'Geschlossen',
'Code' => 'kode',
'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',
+ 'Contacts' => '',
'Continue' => 'Weiter',
'Contra' => 'gegen',
'Copies' => 'Kopien',
'Cost Center' => 'Kostenstelle',
'Could not save!' => 'Konnte nicht speichern!',
'Could not transfer Inventory!' => 'Konnte Waren nicht umlagern!',
+ 'Could not update prices!' => 'Preise konnten nicht aktualisiert werden!',
'Country' => 'Land',
'Create Chart of Accounts' => 'Kontenplan anlegen',
'Create Dataset' => 'Datenbank anlegen',
'Credit' => 'Haben',
'Credit Account' => 'Habenkonto',
'Credit Limit' => 'Kreditlimit',
+ 'Credit Limit exceeded!!!' => 'Kreditlimit überschritten!',
+ 'Credit Note' => 'Gutschrift',
+ 'Credit Note Date' => 'Gutschriftdatum',
+ 'Credit Note Number' => 'Gutschriftnummer',
'Credit Tax' => 'Umsatzsteuer',
'Credit Tax Account' => 'Umsatzsteuerkonto',
'Curr' => 'Währung',
'Currency' => 'Währung',
'Current' => 'Betrag',
+ 'Current / Next Level' => 'Aktuelles / Nächstes Mahnlevel',
'Current Earnings' => 'Gewinn',
'Customer' => 'Kunde',
'Customer Number' => 'Kundennummer',
'Customer missing!' => 'Kundenname fehlt!',
'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
'Customer saved!' => 'Kunde gespeichert!',
+ 'Customername' => 'Kundenname',
'Customernumberinit' => 'Kundennummernkreis',
'Customers' => 'Kunden',
'Customized Report' => 'Vorgewählte Zeiträume',
'Deposit' => 'Gutschrift',
'Description' => 'Beschreibung',
'Description missing!' => 'Beschreibung fehlt.',
+ 'Description must not be empty!' => 'Beschreibung darf nicht leer sein',
'Difference' => 'Differenz',
+ 'Dimension units' => 'Maßeinheiten',
'Directory' => 'Verzeichnis',
'Discount' => 'Rabatt',
'Done' => 'Fertig',
'Due' => 'Fällig',
'Due Date' => 'Fälligkeitsdatum',
'Due Date missing!' => 'Fälligkeitsdatum fehlt!',
+ 'Duedate +Days' => 'Fällikeitsdatum +Tage',
+ 'Dunning Amount' => 'gemahnter Betrag',
+ 'Dunning Date' => 'Mahndatum',
+ 'Dunning Date from' => 'Mahnungen von',
+ 'Dunning Description' => 'Mahnstufenbeschreibung',
+ 'Dunning Description missing in row ' => 'Mahnstufenbeschreibung fehlt in Zeile ',
+ 'Dunning Duedate' => 'Zahlbar bis',
+ 'Dunning Level' => 'Mahnlevel',
+ 'Dunning Level missing in row ' => 'Mahnlevel fehlt in ',
+ 'Dunning Process' => 'Mahnwesen',
+ 'Dunning Process Config saved!' => 'Mahnwesenkonfiguration gespeichert!',
+ 'Dunning Process started for selected invoices!' => 'Mahnprozess für selektierte Rechnungen
+gestartet',
+ 'Dunning overview' => 'Mahnungsübersicht',
+ 'Dunnings' => 'Mahnungen',
'E-mail' => 'eMail',
'E-mail Statement to' => 'Fälligkeitsabrechnung als eMail an',
'E-mail address missing!' => 'eMailadresse fehlt!',
'EUR' => 'E/Ü-Rechnung',
'Edit' => 'Bearbeiten',
'Edit ' => 'Bearbeiten',
+ 'Edit ADR' => 'ADR bearbeiten',
'Edit Account' => 'Kontodaten bearbeiten',
'Edit Accounts Payables Transaction' => 'Kreditorenbuchung bearbeiten',
'Edit Accounts Receivables Transaction' => 'Debitorenbuchung bearbeiten',
'Edit Assembly' => 'Erzeugnis bearbeiten',
+ 'Edit Buchungsgruppe' => 'Buchungsgruppe bearbeiten',
'Edit Business' => 'Kundentyp bearbeiten',
+ 'Edit Credit Note' => 'Gutschrift bearbeiten',
'Edit Customer' => 'Kunde editieren',
'Edit Department' => 'Abteilung bearbeiten',
+ 'Edit Dunning Process Config' => 'Mahnwesenkonfiguration bearbeiten',
'Edit GIFI' => 'GIFI editieren',
'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
'Edit Group' => 'Warengruppe editieren',
+ 'Edit Language' => 'Sprache bearbeiten',
'Edit Part' => 'Ware bearbeiten',
+ 'Edit Payment Terms' => 'Zahlungskonditionen bearbeiten',
'Edit Preferences for' => 'Benutzereinstellungen für',
'Edit Pricegroup' => 'Preisgruppe bearbeiten',
+ 'Edit Printer' => 'Drucker bearbeiten',
'Edit Project' => 'Projekt bearbeiten',
'Edit Purchase Order' => 'Lieferantenaufrag bearbeiten',
'Edit Quotation' => 'Angebot bearbeiten',
+ 'Edit RMA' => 'RMA 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 Storno Credit Note' => 'Storno Gutschrift bearbeiten',
+ 'Edit Storno Invoice' => 'Stornorechnung bearbeiten',
'Edit Template' => 'Vorlage bearbeiten',
'Edit User' => 'Benutzerdaten bearbeiten',
'Edit Vendor' => 'Lieferant editieren',
'Edit Vendor Invoice' => 'Einkaufsrechnung bearbeiten',
'Edit Warehouse' => 'Lager bearbeiten',
+ 'Edit units' => 'Einheiten bearbeiten',
'Employee' => 'Bearbeiter',
'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
+ 'Enter longdescription' => 'Langtext eingeben',
'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Geben Sie Ihre und weitere Währungen mit bis zu drei Buchstaben pro Währung und Währungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)',
- 'Equity' => 'Passiva/Eigenkapital',
- 'Error!' => 'Fehler!',
+ 'Enter values for aluminium calculation' => 'Werte für Preisberechnung eingeben',
+ 'Equity' => 'Passiva',
+ 'Erlöse Ausland' => 'Erlöse Ausland',
+ 'Erlöse EU m. UStId' => 'Erlöse EU m. UStId',
+ 'Erlöse EU o. UStId' => 'Erlöse EU o. UStId',
+ 'Erlöse Inland' => 'Erlöse Inland',
+ 'Error!' => '',
'Exch' => 'Wechselkurs.',
'Exchangerate' => 'Wechselkurs',
'Exchangerate Difference' => 'Wechselkursunterschied',
'Export Buchungsdaten' => 'Export Buchungsdaten',
'Export Stammdaten' => 'Export Stammdaten',
'Extended' => 'Gesamt',
+ 'Factor' => 'Faktor',
'Fax' => 'Fax',
'Fax. : ' => 'Fax. : ',
'Fax.: ' => 'Fax.: ',
'Feb' => 'Feb',
'February' => 'Februar',
+ 'Fee' => 'Gebühr',
'File locked!' => 'Datei gesperrt!',
'Finanzamt' => 'Finanzamt',
'Finanzamt - Einstellungen' => 'Finanzamt - Einstellungen',
'Firma' => 'Firma',
+ 'Folgekonto' => 'Folgekonto',
'Foreign Exchange Gain' => 'Wechselkurserträge',
'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
'Free report period' => 'Freier Zeitraum',
+ 'Fristsetzung' => '',
'From' => 'Von',
'GIFI' => 'GIFI',
'GIFI deleted!' => 'GIFI gelöscht!',
'Given Name' => 'Vorname',
'Greeting' => 'Anrede',
'Group' => 'Warengruppe',
+ 'Group Invoices' => 'Rechnungen zusammenfassen',
'Group Items' => 'Waren gruppieren',
'Group deleted!' => 'Warengruppe gelöscht!',
'Group missing!' => 'Warengruppe fehlt!',
'Group saved!' => 'Warengruppe gespeichert!',
'Groups' => 'Warengruppen',
+ 'Gültig ab' => 'Gültig ab',
'HTML' => 'HTML',
'HTML Templates' => 'HTML-Vorlagen',
'Heading' => 'Ãœberschrift',
'Help' => 'Hilfe',
'Help:' => 'Hilfe:',
+ 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)',
'Hinweise' => 'Hinweise',
'Homepage' => 'Homepage',
'II' => 'II',
'III' => 'III',
'IV' => 'IV',
+ 'If you see this message, you most likely just setup your LX-Office and haven\'t added any entry types. If this is the case, the option is accessible for administrators in the System menu.' => 'Wenn Sie diese Meldung sehen haben Sie wahrscheinlich ein frisches LX-Office Setup und noch keine Buchungsgruppen eingerichtet. Ein Administrator kann dies im Systemmenü erledigen.',
'Image' => 'Grafik',
+ 'Import' => '',
'Impossible to create yearly Tax Report as PDF or PS.<br \> Not yet implemented!' => 'Umsatzsteuer Jahreserklärung als PDF wird noch nicht unterstützt.<br \> Bitte benutzen Sie das Ausgabeformat Vorschau.',
'Impossible to create yearly Tax Report via Winston.<br \> Not yet implemented!' => 'Umsatzsteuer Jahreserklärung via Winston wird noch nicht unterstützt.<br \> Bitte benutzen Sie das Ausgabeformat Vorschau.',
'In-line' => 'im Text',
'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
'Increase' => 'Erhöhen',
'Individual Items' => 'Einzelteile',
+ 'Information' => 'Information',
'Input Number Format' => 'Zahlenformat (Eingabe)',
+ 'Insert quantity and prices below.' => 'Menge und Preise unten eingeben',
+ 'Interest Rate' => 'Zinssatz',
'Internal Notes' => 'interne Bemerkungen',
'Internet' => 'Internet',
+ 'Inv. Duedate' => '',
+ 'Invdate' => 'Rechnungsdatum',
+ 'Invdate from' => 'Rechnungen von',
'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.',
+ 'Invno.' => '',
+ 'Invnumber' => 'Rechnungsnummer',
'Invoice' => 'Rechnung',
'Invoice Date' => 'Rechnungsdatum',
'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Duedate' => 'Fälligkeitsdatum',
'Invoice Number' => 'Rechnungsnummer',
'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
'Invoice deleted!' => 'Rechnung gelöscht!',
'Invoices' => 'Rechnungen',
- 'Is this a summary account to record' => 'Buchungskonto in',
+ '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!',
'Korrektur' => 'Korrektur',
'Kreditinstitut' => 'Kreditinstitut',
'Kundennummer' => 'Kundennummer',
+ 'L' => 'L',
'LaTeX Templates' => 'LaTeX-Vorlagen',
'Language' => 'Sprache',
+ 'Language Values' => 'Sprachübersetzungen',
+ 'Language deleted!' => 'Sprache gelöscht!',
+ 'Language missing!' => 'Sprache fehlt!',
+ 'Language saved!' => 'Sprache gespeichert!',
+ 'Languages' => 'Sprachen',
'Last Article Number' => 'Letzte Artikelnummer',
'Last Cost' => 'Einkaufspreis',
+ 'Last Credit Note Number' => 'Letzte Gutschriftnummer',
'Last Customer Number' => 'Letzte Kundennummer',
'Last Invoice Number' => 'Letzte Rechnungsnummer',
'Last Numbers & Default Accounts' => 'Laufende Zähler und Standardkonten',
'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/Mittelherkunft',
+ 'Liability' => 'Passiva',
'License' => 'Lizenz',
'License key' => 'Lizenzschlüssel',
'Licensed to' => 'Lizensiert für',
'Licenses' => 'Lizenzen',
+ 'Lieferungen' => 'Lieferungen',
'Line Total' => 'Zeilensumme',
'Link' => 'Verknüpfungen',
- 'Link Accounts' => 'Konten verknüpfen',
+ 'List ADR' => 'ADR anzeigen',
'List Accounts' => 'Kontenliste',
'List Businesses' => 'Liste Kundentypen',
'List Departments' => 'Abteilungsliste',
+ 'List Languages' => 'Sprachenliste',
+ 'List Payment Terms' => 'Liste der Zahlungskonditionen',
'List Price' => 'Listenpreis',
+ 'List Printer' => 'Drucker anzeigen',
'List SIC' => 'SIC anzeigen',
'List Transactions' => 'Buchungsliste',
'Lock System' => 'System sperren',
'Login Name' => 'Benutzername',
'Login name missing!' => 'Loginname fehlt.',
'Logout' => 'Abmeldung',
+ 'Long Description' => 'Langtext',
'Make' => 'Hersteller',
'Manager' => 'Manager',
'Mandantennummer' => 'Mandantennummer',
'March' => 'März',
'Marked entries printed!' => 'Markierte Einträge wurden gedruckt!',
'Master Data' => 'Stammdaten',
+ 'Max. Dunning Level' => 'höchste Mahnstufe',
'May' => 'Mai',
'May ' => 'Mai',
'Memo' => 'Memo',
'Message' => 'Nachricht',
'Method' => 'Verfahren',
'Microfiche' => 'Mikrofilm',
+ 'Minimum Amount' => 'Mindestbetrag',
'Missing Method!' => 'Fehlender Voranmeldungszeitraum',
'Missing Preferences: Outputroutine disabled' => 'Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!',
'Missing Tax Authoritys Preferences' => 'Fehlende Angaben zum Finanzamt!',
'Mitarbeiter' => 'Mitarbeiter',
+ 'Mobile1' => 'Mobile 1',
+ 'Mobile2' => 'Mobile 2',
'Model' => 'Modell',
'Monat' => 'Monat',
'Monthly' => 'monatlich',
'N/A' => 'N.Z.',
'Name' => 'Name',
'Name missing!' => 'Name fehlt!',
+ 'Netto Terms' => 'Zahlungsziel netto',
'New Templates' => 'neue Vorlagen',
+ 'Next Dunning Level' => 'Nächste Mahnstufe',
'No' => 'Nein',
+ 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
'No Database Drivers available!' => 'Kein Datenbanktreiber verfügbar!',
'No Dataset selected!' => 'Keine Datenbank ausgewählt!',
+ 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden',
'No email address for' => 'Keine eMailaddresse für',
+ 'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
'No licenses were found that match the search criteria.' => 'Es wurden keine Lizenzen gefunden, auf die die Suchkriterien zutreffen.',
+ 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
+ 'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
'No.' => 'Position',
'Non-taxable Purchases' => 'Nicht zu versteuernde Einkäufe',
'Non-taxable Sales' => 'Nicht zu versteuernde Verkäufe',
+ 'Not Discountable' => 'Nicht rabattierfähig',
'Notes' => 'Bemerkungen',
'Nothing entered!' => 'Es wurde nichts eingegeben.',
'Nothing selected!' => 'Es wurde nichts ausgewählt!',
'On Hand' => 'Auf Lager',
'On Order' => 'Ist bestellt',
'Open' => 'Offen',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Oracle Database Administration' => 'Oracle Datenbankadministration',
'Order' => 'Auftrag',
'Order Date' => 'Auftragsdatum',
'Output Number Format' => 'Zahlenformat (Ausgabe)',
'Own Product' => 'eigenes Produkt',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'PLZ, Ort' => 'PLZ, Ort',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Paid' => 'bezahlt',
'Part' => 'Ware',
'Part Description' => 'Artikelbeschreibung',
- 'Part Description missing!' => 'Artikelbezeichnung fehlt!',
'Part Number' => 'Artikelnummer',
'Part Number missing!' => 'Artikelnummer fehlt!',
+ 'Part description' => 'Artikelbeschreibung',
+ 'Partnumber must not be set to empty!' => 'Die Artikelnummer darf nicht auf leer geändert werden.',
'Partnumber not unique!' => 'Artikelnummer bereits vorhanden!',
'Parts' => 'Waren',
'Parts Inventory' => 'Warenliste',
+ 'Parts must have an entry type.' => 'Waren müssen eine Buchungsgruppe haben.',
'Password' => 'Passwort',
'Password changed!' => 'Passwort geändert!',
'Payables' => 'Verbindlichkeiten',
'Payment' => 'Zahlungsausgang',
+ 'Payment Terms' => 'Zahlungskonditionen',
+ 'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
+ 'Payment Terms saved!' => 'Zahlungskonditionen gespeichert!',
'Payment date missing!' => 'Tag der Zahlung fehlt!',
'Payment posted!' => 'Zahlung gebucht!',
+ 'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!',
+ 'Payment until' => 'Zahlungseingänge bis',
'Payments' => 'Zahlungsausgänge',
'Pg Database Administration' => 'Datenbankadministration',
'Phone' => 'Telefon',
'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.',
+ 'Please enter values' => 'Bitte Werte eingeben',
+ 'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein',
+ 'Please insert your language values below' => 'Bitte die Ãœbersetzungen unten eintragen',
+ 'Please insert your longdescription below' => 'Bitte den Langtext eingeben',
+ 'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste auswählen',
+ 'Please select a vendor from the list below.' => 'Bitte einen Händler aus der Liste auswählen',
'Port' => 'Port',
'Port missing!' => 'Portangabe fehlt!',
'Post' => 'Buchen',
+ 'Post Payment' => 'Zahlung buchen',
'Post as new' => 'Neu buchen',
'Postscript' => 'Postscript',
'Preferences' => 'Benutzereinstellungen',
'Prepayment' => 'Vorauszahlung',
'Preview' => 'Druckvorschau',
'Price' => 'Preis',
+ 'Price Alu:' => 'Preis Alu:',
+ 'Price Eloxal:' => 'Preis Eloxal:',
'Pricegroup' => 'Preisgruppe',
'Pricegroup deleted!' => 'Preisgruppe gelöscht!',
'Pricegroup missing!' => 'Preisgruppe fehlt!',
'Print and Post' => 'Drucken und Buchen',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Printer Command' => 'Druckbefehl',
+ 'Printer Command missing!' => 'Druckbefehl fehlt',
+ 'Printer Description' => 'Druckerbeschreibung',
+ 'Printer deleted!' => 'Drucker gelöscht!',
+ 'Printer saved!' => 'Drucker gespeichert!',
'Printing ... ' => 'Es wird gedruckt.',
- 'Profit Center' => 'Erfolgsbereich',
+ 'Private E-mail' => 'Private eMail',
+ 'Private Phone' => 'Privates Tel.',
+ 'Profit Center' => 'Erfolgsreich',
+ 'Proforma Invoice' => 'Proformarechnung',
'Programm' => 'Programm',
'Project' => 'Projekt',
'Project Number' => 'Projektnummer',
'Project Number missing!' => 'Projektnummer fehlt!',
'Project Transactions' => 'Projektbuchungen',
'Project deleted!' => 'Projekt gelöscht!',
+ 'Project description' => 'Projektbeschreibung',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Project saved!' => 'Projekt gespeichert!',
'Projects' => 'Projekte',
'Projecttransactions' => 'Projektbuchungen',
+ 'Prozentual/Absolut' => '',
'Purchase Order' => 'Lieferantenauftrag',
'Purchase Orders' => 'Lieferantenaufträge',
'Qty' => 'Menge',
'Quantity' => 'Menge',
+ 'Quantity Alu:' => 'Menge Alu:',
+ 'Quantity Article:' => 'Menge Artikel:',
'Quartal' => 'Quartal',
'Quarter' => 'Quartal',
'Quarterly' => 'quartalsweise',
'RFQ' => 'Anfrage',
'RFQ Number' => 'Anfragenummer',
'RFQs' => 'Anfragen',
+ 'RMA' => 'RMA',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
+ 'RMA Date' => 'RMA Datum',
+ 'RMA Number' => 'RMA Nummer',
'ROP' => 'Mindestlagerbestand',
+ 'Ranking' => '',
'Rate' => 'Rate',
'Recd' => 'erhalten',
'Receipt' => 'Zahlungseingang',
'Request for Quotation' => 'Anfrage',
'Request for Quotations' => 'Anfragen',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Revenue' => 'Erlöskonto',
'Revenue Account' => 'Erlöskonto',
'SIC' => 'SIC',
'Salesman' => 'Vertreter',
'Salesman missing!' => 'Vertreter fehlt!',
'Salesperson' => 'Verkäufer',
+ 'Sat. Fax' => 'Sat. Fax',
+ 'Sat. Phone' => 'Sat. Tel.',
'Save' => 'Speichern',
'Save and AP Transaction' => 'Speichern und Kreditorenbuchung erfassen',
'Save and AR Transaction' => 'Speichern und Debitorenbuchung erfassen',
+ 'Save and Close' => 'Speichern und schließen',
'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',
'Screen' => 'Bildschirm',
+ 'Search Dunning' => 'Mahnung suchen',
'Select' => 'auswählen',
+ 'Select a Customer' => 'Endkunde auswählen',
+ 'Select a part' => 'Artikel auswählen',
'Select a period' => 'Bitte Zeitraum auswählen',
+ 'Select a project' => 'Projekt auswählen',
'Select all' => 'Alle auswählen',
+ 'Select an employee' => 'Angestellten 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',
'Service' => 'Dienstleistung',
'Service Items' => 'Dienstleistungen',
'Service Number missing!' => 'Dienstleistungsnummer fehlt!',
+ 'Service units' => 'Dienstleistungseinheiten',
'Services' => 'Dienstleistungen',
+ 'Set Language Values' => 'Spracheinstellungen',
+ 'Set eMail text' => 'eMail Text eingeben',
'Setup Menu' => 'Menüsetup',
'Setup Templates' => 'Vorlagen auswählen',
'Ship' => 'Lagerausgang',
'Shipping Date' => 'Lieferdatum',
'Shipping Date missing!' => 'Lieferdatum fehlt.',
'Shipping Point' => 'Versandort',
+ 'Shipto' => '',
'Shopartikel' => 'Shopartikel',
'Short' => 'kurz',
'Show' => 'Zeigen',
+ 'Show old dunnings' => 'Alte Mahnungen anzeigen',
'Signature' => 'Unterschrift',
+ 'Skonto' => 'Skonto',
+ 'Skonto Terms' => 'Zahlungsziel Skonto',
'Sold' => 'Verkauft',
'Source' => 'Beleg',
'Spoolfile' => 'Druckdatei',
'Standard Industrial Codes' => 'SIC',
+ 'Start Dunning Process' => 'Mahnprozess starten',
'Statement' => 'Sammelrechnung',
'Statement Balance' => 'Sammelrechnungsbilanz',
'Statement sent to' => 'Sammelrechnung verschickt an',
'Stock' => 'einlagern',
'Stock Assembly' => 'Erzeugnis einlagern',
'Storno' => 'Storno',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Straße' => 'Straße',
'Street' => 'Straße',
'Stylesheet' => 'Stilvorlage',
'Subject' => 'Betreff',
+ 'Subject:' => 'Betreff:',
'Subtotal' => 'Zwischensumme',
'Supervisor' => 'Supervisor',
'System' => 'System',
'Tel. : ' => 'Tel. : ',
'Tel.: ' => 'Tel.: ',
'Telefon' => 'Telefon',
+ 'Template' => 'Druckvorlage',
+ 'Template Code' => 'Vorlagenkürzel',
+ 'Template Code missing!' => 'Vorlagenkürzel fehlt!',
'Template saved!' => 'Schablone gespeichert!',
'Templates' => 'Vorlagen',
+ 'Terms missing in row ' => '+Tage fehlen in Zeile ',
'Terms: Net' => 'Zahlungsziel',
+ 'The base unit does not exist or it is about to be deleted in row %d.' => 'Die Basiseinheit in Zeile %d existiert nicht oder soll gelöscht werden.',
+ 'The base unit does not exist.' => 'Die Basiseinheit existiert nicht.',
+ 'The base unit relations must not contain loops (e.g. by saying that unit A\'s base unit is B, B\'s base unit is C and C\'s base unit is A) in row %d.' => 'Die Beziehungen der Einheiten dürfen keine Schleifen beinhalten (z.B. wenn gesagt wird, dass Einheit As Basiseinheit B, Bs Basiseinheit C und Cs Basiseinheit A ist) in Zeile %d.',
+ 'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
+ 'The factor is missing.' => 'Der Faktor fehlt.',
'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 formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br><br>For alu article:<br>Length:<br>Weight/m:<br>Length ist total length of article and weight/m ist the weight pro meter' => 'Die Formeln müssen in der folgenden Syntax eingegeben werden:<br>Bei normalen Artikeln:<br>Variablenname= Variable Einheit;<br>Variablenname2= Variable2 Einheit2;<br>...<br>###<br>Variable + Variable2 * ( Variable - Variable2 )<br>Bitte achten Sie auf die Leerzeichen in der Formel<br><br>Bei Aluminiumartikeln:<br>Länge: x<br>Gewicht/m: y<br>x ist die Gesamtlänge des Artikels in Meter und y das Gewicht pro Meter. Es muss jeweils die Gesamtezeile eingegeben werden',
'The licensing module has been deactivated in lx-erp.conf.' => 'Das Lizenzverwaltungsmodul wurde in lx-erp.conf deaktiviert.',
+ 'The name in row %d has already been used before.' => 'Der Name in Zeile %d wurde vorher bereits benutzt.',
+ 'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.',
+ 'The name is missing.' => 'Der Name fehlt.',
+ 'The unit has been saved.' => 'Die Einheit wurde gespeichert.',
+ 'The unit in row %d has been deleted in the meantime.' => 'Die Einheit in Zeile %d ist in der Zwischentzeit gelöscht worden.',
+ 'The unit in row %d has been used in the meantime and cannot be changed anymore.' => 'Die Einheit in Zeile %d wurde in der Zwischenzeit benutzt und kann nicht mehr geändert werden.',
+ 'The units have been saved.' => 'Die Einheiten wurden gespeichert.',
'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',
'Top 100 hinzufuegen' => 'Top 100 hinzufügen',
'Top Level' => 'Hauptartikelbezeichnung',
'Total' => 'Summe',
+ 'Total Alu:' => 'Gesamtpreis Alu:',
+ 'Total Eloxal:' => 'Gesamtpreis Eloxal:',
+ 'Total Fees' => 'Kumulierte Gebühren',
+ 'Total Interest' => 'Kumulierte Zinsen',
+ 'Total length' => 'Gesamtlänge des Artikels',
+ 'Total:' => 'Gesamtpreis:',
'Trade Discount' => 'Rabatt',
'Transaction Date missing!' => 'Buchungsdatum fehlt!',
'Transaction deleted!' => 'Buchung gelöscht!',
'Transfer' => 'Umlagerung',
'Transfer Inventory' => 'Ware umlagern',
'Transfer to' => 'umlagern nach',
- 'Trial Balance' => 'Saldenbilanz',
+ 'Trial Balance' => 'Vergleichsbilanz',
'Type of Business' => 'Kundentyp',
'USTVA-Hint: Method' => '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.',
'USTVA-Hint: Tax Authoritys' => 'Bitte das Bundesland UND die Stadt bzw. den Einzugsbereich Ihres zuständigen Finanzamts auswählen.',
'Umsatzsteuervoranmeldung' => 'Umsatzsteuervoranmeldung',
'Unit' => 'Einheit',
'Unit of measure' => 'Maßeinheit',
+ 'Units' => 'Einheiten',
'Unlock System' => 'System entsperren',
- 'Until' => 'Bis',
'Update' => 'Erneuern',
'Update Dataset' => 'Datenbank aktualisieren',
+ 'Update Prices' => 'Preise aktualisieren',
+ 'Update prices' => 'Preise aktualisieren',
'Updated' => 'Erneuert am',
'Use Templates' => 'benutze Vorlagen',
'User' => 'Benutzer',
'Username' => 'Benutzername',
'Ust-IDNr' => 'USt-IdNr.',
'Valid until' => 'gültig bis',
+ 'Value' => 'Wert',
+ 'Variable' => 'Variable',
'Vendor' => 'Lieferant',
'Vendor Invoice' => 'Einkaufsrechnung',
'Vendor Invoices' => 'Einkaufsrechnungen',
'Warehouses' => 'Lager',
'Weight' => 'Gewicht',
'Weight Unit' => 'Gewichtseinheit',
+ 'Weight/m' => 'Gewicht pro Meter',
'What type of item is this?' => 'Was ist dieser Artikel?',
'YYYY' => 'JJJJ',
'Year' => 'Jahr',
'choice part' => 'Artikel auswählen',
'config' => 'Konfiguration',
'continue' => 'weiter',
- 'customernumber not unique!' => 'Die Kundennummer ist schon vergeben',
'days' => 'Tage',
'debug' => 'Debug',
- 'deliverydate' => 'Lieferdatum',
+ 'dimension units' => 'Maßeinheiten',
'does not exist' => 'existiert nicht',
'done' => 'erledigt',
+ 'eMail Send?' => 'eMail-Versand?',
+ 'eMail?' => 'eMail?',
'ea' => 'St.',
'emailed to' => 'gemailt an',
'equal Outputformat' => 'wie Ausgabeformat',
'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',
+ 'prices updated!' => ' Preise aktualisiert!',
'quarter' => 'vierteljährliche (quartalsweise) Abgabe',
's' => 's',
'save' => 'speichern',
'saved!' => 'gespeichert',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
+ 'service units' => 'Dienstleistungseinheiten',
'soldtotal' => 'Verkaufte Anzahl',
'successfully created!' => 'wurde erfolgreich erstellt',
'successfully deleted!' => 'wurde erfolgreich gelöscht',
$self{texts} = {
'1000,00 or 1000.00' => '1000,00 oder 1000.00',
+ 'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
+ 'ADR' => 'ADR',
+ 'ADR Code' => 'ADR-Kürzel',
+ 'ADR Code missing!' => 'ADR-Kürzel fehlt!',
+ 'ADR Description' => 'ADR-Text',
+ 'ADR Description missing!' => 'ADR-Text fehlt!',
+ 'ADR deleted!' => 'Adr gelöscht!',
+ 'ADR saved!' => 'ADR gespeichert!',
'AP' => 'Einkauf',
'AR' => 'Verkauf',
'Account' => 'Konto',
'Account saved!' => 'Konto gespeichert!',
'Accounting Menu' => 'Kontoverwaltung',
'Add' => 'Erfassen',
+ 'Add ADR' => 'ADR hinzufügen',
'Add Account' => 'Konto erfassen',
+ 'Add Buchungsgruppe' => 'Buchungsgruppe erfassen',
'Add Business' => 'Kundentyp erfassen',
'Add Department' => 'Abteilung erfassen',
'Add GIFI' => 'GIFI erfassen',
+ 'Add Language' => 'Sprache hinzufügen',
+ 'Add Payment Terms' => 'Zahlungskonditionen hinzufügen',
+ 'Add Printer' => 'Drucker hinzufügen',
'Add SIC' => 'SIC erfassen',
'Add Warehouse' => 'Lager erfassen',
+ 'Add and edit %s' => '%s hinzufügen und bearbeiten',
'Address' => 'Adresse',
- 'Asset' => 'Aktiva/Mittelverwendung',
+ 'Article Code' => 'Artikelkürzel',
+ 'Article Code missing!' => 'Artikelkürzel fehlt',
+ 'Asset' => 'Aktiva',
'Audit Control' => 'Bücherkontrolle',
+ 'Aufwand Ausland' => 'Aufwand Ausland',
+ 'Aufwand EU m UStId' => 'Aufwand EU m UStId',
+ 'Aufwand EU m. UStId' => 'Aufwand EU m. UStId',
+ 'Aufwand EU o. UStId' => 'Aufwand EU o. UStId',
+ 'Aufwand Inland' => 'Aufwand Inland',
'BWA' => 'BWA',
'Backup sent to' => 'Eine Sicherungskopie wurde gesandt an',
+ 'Bestandskonto' => 'Bestandskonto',
'Bilanz' => 'Bilanz',
'Books are open' => 'Die Bücher sind geöffnet.',
+ 'Buchungsgruppe' => 'Buchungsgruppe',
+ 'Buchungsgruppe bearbeiten' => 'Buchungsgruppe bearbeiten',
+ 'Buchungsgruppe gelöscht!' => 'Buchungsgruppe gelöscht!',
+ 'Buchungsgruppe gespeichert!' => 'Buchungsgruppe gespeichert!',
+ 'Buchungsgruppe hinzufügen' => 'Buchungsgruppe hinzufügen',
+ 'Buchungsgruppen' => 'Buchungsgruppen',
'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!',
'E-mail' => 'eMail',
'EUER' => 'Einnahmen-/Ãœberschussrechnung',
'Edit' => 'Bearbeiten',
+ 'Edit ADR' => 'ADR bearbeiten',
'Edit Account' => 'Kontodaten bearbeiten',
+ 'Edit Buchungsgruppe' => 'Buchungsgruppe bearbeiten',
'Edit Business' => 'Kundentyp bearbeiten',
'Edit Department' => 'Abteilung bearbeiten',
'Edit GIFI' => 'GIFI editieren',
+ 'Edit Language' => 'Sprache bearbeiten',
+ 'Edit Payment Terms' => 'Zahlungskonditionen bearbeiten',
'Edit Preferences for' => 'Benutzereinstellungen für',
+ 'Edit Printer' => 'Drucker bearbeiten',
'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' => 'Geben Sie Ihre und weitere Währungen mit bis zu drei Buchstaben pro Währung und Währungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)',
- 'Equity' => 'Passiva/Eigenkapital',
+ 'Erlöse Ausland' => 'Erlöse Ausland',
+ 'Erlöse EU m. UStId' => 'Erlöse EU m. UStId',
+ 'Erlöse EU o. UStId' => 'Erlöse EU o. UStId',
+ 'Erlöse Inland' => 'Erlöse Inland',
'Expense' => 'Aufwandskonto',
'Expense Account' => 'Aufwandskonto',
'Expense/Asset' => 'Aufwand/Anlagen',
'Fax' => 'Fax',
+ 'Folgekonto' => 'Folgekonto',
'Foreign Exchange Gain' => 'Wechselkurserträge',
'Foreign Exchange Loss' => 'Wechselkursaufwendungen',
'GIFI' => 'GIFI',
'GIFI deleted!' => 'GIFI gelöscht!',
'GIFI missing!' => 'GIFI fehlt!',
'GIFI saved!' => 'GIFI gespeichert!',
+ 'Gültig ab' => 'Gültig ab',
'Heading' => 'Ãœberschrift',
'Include in drop-down menus' => 'In Aufklappmenü aufnehmen',
'Input Number Format' => 'Zahlenformat (Eingabe)',
'Inventory' => 'Inventar',
'Inventory Account' => 'Warenbestand',
- 'Is this a summary account to record' => 'Buchungskonto in',
+ 'Is this a summary account to record' => 'Summenkonto für',
'Language' => 'Sprache',
+ 'Language deleted!' => 'Sprache gelöscht!',
+ 'Language missing!' => 'Sprache fehlt!',
+ 'Language saved!' => 'Sprache gespeichert!',
+ 'Languages' => 'Sprachen',
'Last Article Number' => 'Letzte Artikelnummer',
+ 'Last Credit Note Number' => 'Letzte Gutschriftnummer',
'Last Customer Number' => 'Letzte Kundennummer',
'Last Invoice Number' => 'Letzte Rechnungsnummer',
'Last Numbers & Default Accounts' => 'Laufende Zähler und Standardkonten',
'Last Sales Quotation Number' => 'Letzte Angebotsnummer',
'Last Service Number' => 'Letzte Dienstleistungsnr.',
'Last Vendor Number' => 'Letzte Lieferantennummer',
- 'Liability' => 'Passiva/Mittelherkunft',
+ 'Liability' => 'Passiva',
'Link' => 'Verknüpfungen',
+ 'Long Description' => 'Langtext',
'Name' => 'Name',
+ 'Netto Terms' => 'Zahlungsziel netto',
'No' => 'Nein',
'No email address for' => 'Keine eMailaddresse für',
'Number' => 'Nummer',
'Password' => 'Passwort',
'Payables' => 'Verbindlichkeiten',
'Payment' => 'Zahlungsausgang',
+ 'Payment Terms' => 'Zahlungskonditionen',
+ 'Payment Terms saved!' => 'Zahlungskonditionen gespeichert!',
+ 'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!',
'Phone' => 'Telefon',
'Preferences saved!' => 'Einstellungen gespeichert!',
- 'Profit Center' => 'Erfolgsbereich',
+ 'Printer' => 'Drucker',
+ 'Printer Command' => 'Druckbefehl',
+ 'Printer Command missing!' => 'Druckbefehl fehlt',
+ 'Printer Description' => 'Druckerbeschreibung',
+ 'Printer deleted!' => 'Drucker gelöscht!',
+ 'Printer saved!' => 'Drucker gespeichert!',
+ 'Profit Center' => 'Erfolgsreich',
+ 'Ranking' => 'Ranking',
'Rate' => 'Rate',
'Receipt' => 'Zahlungseingang',
'Receivables' => 'Forderungen',
'Service Items' => 'Dienstleistungen',
'Setup Menu' => 'Menüsetup',
'Signature' => 'Unterschrift',
+ 'Skonto' => 'Skonto',
+ 'Skonto Terms' => 'Zahlungsziel Skonto',
'Standard Industrial Codes' => 'SIC',
'Steuersatz' => 'Steuersatz',
'Stylesheet' => 'Stilvorlage',
'Tax' => 'Steuer',
'Tax Accounts' => 'Steuerkonto',
+ 'Template Code' => 'Vorlagenkürzel',
+ 'Template Code missing!' => 'Vorlagenkürzel fehlt!',
'Template saved!' => 'Schablone gespeichert!',
+ 'The base unit does not exist or it is about to be deleted in row %d.' => 'Die Basiseinheit in Zeile %d existiert nicht oder soll gelöscht werden.',
+ 'The base unit does not exist.' => 'Die Basiseinheit existiert nicht.',
+ 'The base unit relations must not contain loops (e.g. by saying that unit A\'s base unit is B, B\'s base unit is C and C\'s base unit is A) in row %d.' => 'Die Beziehungen der Einheiten dürfen keine Schleifen beinhalten (z.B. wenn gesagt wird, dass Einheit As Basiseinheit B, Bs Basiseinheit C und Cs Basiseinheit A ist) in Zeile %d.',
+ 'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
+ 'The factor is missing.' => 'Der Faktor fehlt.',
+ 'The name in row %d has already been used before.' => 'Der Name in Zeile %d wurde vorher bereits benutzt.',
+ 'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.',
+ 'The name is missing.' => 'Der Name fehlt.',
+ 'The unit has been saved.' => 'Die Einheit wurde gespeichert.',
+ 'The unit in row %d has been deleted in the meantime.' => 'Die Einheit in Zeile %d ist in der Zwischentzeit gelöscht worden.',
+ 'The unit in row %d has been used in the meantime and cannot be changed anymore.' => 'Die Einheit in Zeile %d wurde in der Zwischenzeit benutzt und kann nicht mehr geändert werden.',
+ 'The units have been saved.' => 'Die Einheiten wurden 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',
'Weight Unit' => 'Gewichtseinheit',
'Year End' => 'Jahresende',
'Yes' => 'Ja',
+ 'dimension units' => 'Maßeinheiten',
'equal Outputformat' => 'wie Ausgabeformat',
+ 'service units' => 'Dienstleistungseinheiten',
};
$self{subs} = {
'account_header' => 'account_header',
'add' => 'add',
'add_account' => 'add_account',
+ 'add_adr' => 'add_adr',
+ 'add_buchungsgruppe' => 'add_buchungsgruppe',
'add_business' => 'add_business',
'add_department' => 'add_department',
'add_gifi' => 'add_gifi',
+ 'add_language' => 'add_language',
+ 'add_payment' => 'add_payment',
+ 'add_printer' => 'add_printer',
'add_sic' => 'add_sic',
+ 'add_unit' => 'add_unit',
'add_warehouse' => 'add_warehouse',
+ 'adr_header' => 'adr_header',
'audit_control' => 'audit_control',
'backup' => 'backup',
+ 'buchungsgruppe_header' => 'buchungsgruppe_header',
'business_header' => 'business_header',
'config' => 'config',
'continue' => 'continue',
'copy_to_coa' => 'copy_to_coa',
'delete' => 'delete',
'delete_account' => 'delete_account',
+ 'delete_adr' => 'delete_adr',
+ 'delete_buchungsgruppe' => 'delete_buchungsgruppe',
'delete_business' => 'delete_business',
'delete_department' => 'delete_department',
'delete_gifi' => 'delete_gifi',
+ 'delete_language' => 'delete_language',
+ 'delete_payment' => 'delete_payment',
+ 'delete_printer' => 'delete_printer',
'delete_sic' => 'delete_sic',
'delete_warehouse' => 'delete_warehouse',
'department_header' => 'department_header',
'doclose' => 'doclose',
'edit' => 'edit',
'edit_account' => 'edit_account',
+ 'edit_adr' => 'edit_adr',
+ 'edit_buchungsgruppe' => 'edit_buchungsgruppe',
'edit_business' => 'edit_business',
'edit_department' => 'edit_department',
'edit_gifi' => 'edit_gifi',
+ 'edit_language' => 'edit_language',
+ 'edit_payment' => 'edit_payment',
+ 'edit_printer' => 'edit_printer',
'edit_sic' => 'edit_sic',
'edit_template' => 'edit_template',
+ 'edit_units' => 'edit_units',
'edit_warehouse' => 'edit_warehouse',
'form_footer' => 'form_footer',
'gifi_footer' => 'gifi_footer',
'gifi_header' => 'gifi_header',
+ 'language_header' => 'language_header',
'list_account' => 'list_account',
+ 'list_adr' => 'list_adr',
+ 'list_buchungsgruppe' => 'list_buchungsgruppe',
'list_business' => 'list_business',
'list_department' => 'list_department',
'list_gifi' => 'list_gifi',
+ 'list_language' => 'list_language',
+ 'list_payment' => 'list_payment',
+ 'list_printer' => 'list_printer',
'list_sic' => 'list_sic',
'list_warehouse' => 'list_warehouse',
+ 'payment_header' => 'payment_header',
+ 'printer_header' => 'printer_header',
'save' => 'save',
'save_account' => 'save_account',
+ 'save_adr' => 'save_adr',
+ 'save_buchungsgruppe' => 'save_buchungsgruppe',
'save_business' => 'save_business',
'save_department' => 'save_department',
'save_gifi' => 'save_gifi',
+ 'save_language' => 'save_language',
+ 'save_payment' => 'save_payment',
'save_preferences' => 'save_preferences',
+ 'save_printer' => 'save_printer',
'save_sic' => 'save_sic',
'save_template' => 'save_template',
+ 'save_unit' => 'save_unit',
'save_warehouse' => 'save_warehouse',
'section_menu' => 'section_menu',
'sic_header' => 'sic_header',
--- /dev/null
+$self{texts} = {
+ ' Date missing!' => ' Datum fehlt!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
+ 'Account' => 'Konto',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Credit Note' => 'Gutschrift erfassen',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage 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',
+ 'Bunker Receipt' => 'Bunker Receipt',
+ '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',
+ 'Choose Customer' => 'Endkunde wählen:',
+ 'Choose Vendor' => 'Händler wählen',
+ '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',
+ 'Credit Note' => 'Gutschrift',
+ 'Credit Note Date' => 'Gutschriftdatum',
+ 'Credit Note Number' => 'Gutschriftnummer',
+ '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 Credit Note' => 'Gutschrift 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 missing!' => 'Rechnungsdatum fehlt!',
+ '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',
+ 'L' => 'L',
+ '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',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
+ 'Order' => 'Auftrag',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
+ 'Packing List' => 'Lieferschein',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Payment Terms' => 'Zahlungskonditionen',
+ 'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Post' => 'Buchen',
+ 'Post as new' => 'Neu buchen',
+ 'Postscript' => 'Postscript',
+ 'Preview' => 'Druckvorschau',
+ 'Price' => 'Preis',
+ 'Pricegroup' => 'Preisgruppe',
+ 'Print' => 'Drucken',
+ 'Print and Post' => 'Drucken und Buchen',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
+ '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!',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
+ 'Record in' => 'Buchen auf',
+ 'Remaining' => 'Rest',
+ 'Reqdate' => 'Lieferdatum',
+ 'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
+ 'Sales Order' => 'Kundenauftrag',
+ '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',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
+ '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' => 'St.',
+ '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',
+ 'credit_note_links' => 'credit_note_links',
+ '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',
+ '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_credit_note' => 'prepare_credit_note',
+ 'preview' => 'preview',
+ 'print' => 'print',
+ 'print_and_post' => 'print_and_post',
+ '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',
+ 'set_pricegroup' => 'set_pricegroup',
+ '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',
+ 'druckvorschau' => 'preview',
+ 'drucken' => 'print',
+ 'drucken_und_buchen' => 'print_and_post',
+ 'lieferadresse' => 'ship_to',
+ 'erneuern' => 'update',
+ 'ja' => 'yes',
+};
+
+1;
$self{texts} = {
+ 'Address' => 'Adresse',
+ 'Customer Number' => 'Kundennummer',
+ 'Enter longdescription' => 'Langtext eingeben',
+ 'Enter values for aluminium calculation' => 'Werte für Preisberechnung eingeben',
+ 'Name' => 'Name',
+ 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
+ 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden',
+ 'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
+ 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
+ 'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
+ 'Part Number' => 'Artikelnummer',
+ 'Part description' => 'Artikelbeschreibung',
+ 'Please enter values' => 'Bitte Werte eingeben',
+ 'Project Number' => 'Projektnummer',
+ 'Project description' => 'Projektbeschreibung',
+ 'Select a Customer' => 'Endkunde auswählen',
+ 'Select a part' => 'Artikel auswählen',
+ 'Select a project' => 'Projekt auswählen',
+ 'Select an employee' => 'Angestellten auswählen',
+ 'Unit' => 'Einheit',
+ 'Value' => 'Wert',
+ 'Variable' => 'Variable',
};
$self{subs} = {
- 'H' => 'H',
+ 'calculate_alu' => 'calculate_alu',
+ 'calculate_qty' => 'calculate_qty',
+ 'delivery_customer_selection' => 'delivery_customer_selection',
+ 'employee_selection_internal' => 'employee_selection_internal',
+ 'part_selection_internal' => 'part_selection_internal',
+ 'project_selection_internal' => 'project_selection_internal',
'restore_form' => 'restore_form',
'save_form' => 'save_form',
+ 'select_employee' => 'select_employee',
+ 'select_employee_internal' => 'select_employee_internal',
+ 'select_part' => 'select_part',
+ 'select_part_internal' => 'select_part_internal',
+ 'set_longdescription' => 'set_longdescription',
+ 'vendor_selection' => 'vendor_selection',
};
1;
$self{texts} = {
' Number' => ' Nummer',
+ 'ADR' => 'ADR',
+ 'ADR Code' => 'ADR-Kürzel',
+ 'ADR Description' => 'ADR-Text',
+ 'ADR Report' => 'ADR Report',
'Abteilung' => 'Abteilung',
'Account Number' => 'Kontonummer',
'Accounting Menu' => 'Kontoverwaltung',
'Add Vendor' => 'Lieferant erfassen',
'Address' => 'Adresse',
'All' => 'Alle',
+ 'Ansprechpartner' => 'Ansprechpartner',
'Bank' => 'Bank',
'Bank Code Number' => 'Bankleitzahl',
'Bcc' => 'Bcc',
'Billing Address' => 'Rechnungsadresse',
+ 'Birthday' => 'Geburtstag',
+ 'Bis' => 'bis',
+ 'CSV' => 'CSV',
'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 saved!' => 'Kunde gespeichert!',
'Customers' => 'Kunden',
'Delete' => 'Löschen',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
'E-mail' => 'eMail',
'Edit Customer' => 'Kunde editieren',
'Edit Vendor' => 'Lieferant editieren',
'Fax' => 'Fax',
+ 'From' => 'Von',
'GIFI' => 'GIFI',
'Given Name' => 'Vorname',
'Greeting' => 'Anrede',
+ 'HTML' => 'HTML',
'Homepage' => 'Homepage',
'ID' => 'Buchungsnummer',
'Include in Report' => 'In Bericht aufnehmen',
+ 'Invdate' => 'Rechnungsdatum',
'Invoice' => 'Rechnung',
'Invoices' => 'Rechnungen',
'KNr. beim Kunden' => 'KNr. beim Kunden',
'Kundennummer' => 'Kundennummer',
'Language' => 'Sprache',
+ 'Lieferungen' => 'Lieferungen',
+ 'Mobile1' => 'Mobile 1',
+ 'Mobile2' => 'Mobile 2',
'Name' => 'Name',
'Name missing!' => 'Name fehlt!',
'Notes' => 'Bemerkungen',
'Orders' => 'Aufträge',
'Orphaned' => 'Nie benutzt',
'Password' => 'Passwort',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Phone' => 'Telefon',
'Phone1' => 'Telefon 1 ',
'Phone2' => 'Telefon 2',
'Preisklasse' => 'Preisgruppe',
+ 'Private E-mail' => 'Private eMail',
+ 'Private Phone' => 'Privates Tel.',
+ 'Project' => 'Projekt',
+ 'Qty' => 'Menge',
+ 'Quantity' => 'Menge',
'Quotation' => 'Angebot',
'Quotations' => 'Angebote',
'SIC' => 'SIC',
'Salesman' => 'Vertreter',
'Salesman missing!' => 'Vertreter fehlt!',
+ 'Sat. Fax' => 'Sat. Fax',
+ 'Sat. Phone' => 'Sat. Tel.',
'Save' => 'Speichern',
'Save and AP Transaction' => 'Speichern und Kreditorenbuchung erfassen',
'Save and AR Transaction' => 'Speichern und Debitorenbuchung erfassen',
+ 'Save and Close' => 'Speichern und schließen',
'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',
+ 'Steuersatz' => 'Steuersatz',
'Street' => 'Straße',
'Tax Included' => 'Steuer im Preis inbegriffen',
'Tax Number' => 'Steuernummer',
'Title' => 'Titel',
'Type of Business' => 'Kundentyp',
'USt-IdNr.' => 'USt-IdNr.',
+ 'Unit' => 'Einheit',
'Update' => 'Erneuern',
'Username' => 'Benutzername',
'Vendor Number' => 'Lieferantennummer',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Vendor saved!' => 'Lieferant gespeichert!',
'Vendors' => 'Lieferanten',
+ 'Year' => 'Jahr',
'Zipcode' => 'PLZ',
- 'customernumber not unique!' => 'Die Kundennummer ist schon vergeben',
+ 'button' => '?',
'days' => 'Tage',
's' => 's',
};
'acc_menu' => 'acc_menu',
'add' => 'add',
'add_transaction' => 'add_transaction',
+ 'adr_report' => 'adr_report',
'check_salesman' => 'check_salesman',
'continue' => 'continue',
'delete' => 'delete',
'edit' => 'edit',
'form_footer' => 'form_footer',
'form_header' => 'form_header',
+ 'get_contact' => 'get_contact',
+ 'get_delivery' => 'get_delivery',
+ 'get_shipto' => 'get_shipto',
'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_close' => 'save_and_close',
'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',
+ 'search_adr' => 'search_adr',
+ 'search_delivery' => 'search_delivery',
'section_menu' => 'section_menu',
'select_salesman' => 'select_salesman',
'update' => 'update',
'speichern' => 'save',
'speichern_und_kreditorenbuchung_erfassen' => 'save_and_ap_transaction',
'speichern_und_debitorenbuchung_erfassen' => 'save_and_ar_transaction',
+ 'speichern_und_schließen' => 'save_and_close',
'speichern_und_rechnung_erfassen' => 'save_and_invoice',
'speichern_und_auftrag_erfassen' => 'save_and_order',
'speichern_und_angebot' => 'save_and_quotation',
--- /dev/null
+$self{texts} = {
+ ' Date missing!' => ' Datum fehlt!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
+ 'Accounting Menu' => 'Kontoverwaltung',
+ 'Active?' => 'Aktiviert?',
+ 'Add Purchase Order' => 'Lieferantenauftrag erfassen',
+ 'Add Quotation' => 'Angebot erfassen',
+ 'Add Request for Quotation' => 'Anfrage erfassen',
+ 'Add Sales Order' => 'Auftrag erfassen',
+ 'Address' => 'Adresse',
+ 'Amount' => 'Betrag',
+ 'Apr' => 'Apr',
+ 'April' => 'April',
+ 'Attachment' => 'als Anhang',
+ 'Aug' => 'Aug',
+ 'August' => 'August',
+ 'Auto Send?' => 'Auto. Versand?',
+ 'Bcc' => 'Bcc',
+ 'Billing Address' => 'Rechnungsadresse',
+ 'Bin' => 'Lagerplatz',
+ 'Bin List' => 'Lagerliste',
+ 'Bunker Receipt' => 'Bunker Receipt',
+ 'Cc' => 'Cc',
+ 'City' => 'Stadt',
+ 'Company Name' => 'Firmenname',
+ 'Confirmation' => 'Auftragsbestätigung',
+ 'Contact' => 'Kontakt',
+ 'Continue' => 'Weiter',
+ 'Copies' => 'Kopien',
+ 'Country' => 'Land',
+ 'Credit Note' => 'Gutschrift',
+ 'Current / Next Level' => 'Aktuelles / Nächstes Mahnlevel',
+ 'Customer' => 'Kunde',
+ 'Customer Number' => 'Kundennummer',
+ 'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
+ 'Customername' => 'Kundenname',
+ 'Dec' => 'Dez',
+ 'December' => 'Dezember',
+ 'Delivery Date' => 'Lieferdatum',
+ 'Department' => 'Abteilung',
+ 'Description' => 'Beschreibung',
+ 'Discount' => 'Rabatt',
+ 'Duedate +Days' => 'Fällikeitsdatum +Tage',
+ 'Dunning Date' => 'Mahndatum',
+ 'Dunning Date from' => 'Mahnungen von',
+ 'Dunning Description' => 'Mahnstufenbeschreibung',
+ 'Dunning Description missing in row ' => 'Mahnstufenbeschreibung fehlt in Zeile ',
+ 'Dunning Duedate' => 'Zahlbar bis',
+ 'Dunning Level' => 'Mahnlevel',
+ 'Dunning Level missing in row ' => 'Mahnlevel fehlt in ',
+ 'Dunning Process Config saved!' => 'Mahnwesenkonfiguration gespeichert!',
+ 'Dunning Process started for selected invoices!' => 'Mahnprozess für selektierte Rechnungen
+gestartet',
+ 'Dunning overview' => 'Mahnungsübersicht',
+ 'E-mail' => 'eMail',
+ 'E-mail address missing!' => 'eMailadresse fehlt!',
+ 'E-mailed' => 'eMail gesendet.',
+ 'Edit Dunning Process Config' => 'Mahnwesenkonfiguration bearbeiten',
+ 'Extended' => 'Gesamt',
+ 'Fax' => 'Fax',
+ 'Feb' => 'Feb',
+ 'February' => 'Februar',
+ 'Fee' => 'Gebühr',
+ 'Fristsetzung' => 'Fristsetzung',
+ 'Group' => 'Warengruppe',
+ 'Group Invoices' => 'Rechnungen zusammenfassen',
+ 'Group Items' => 'Waren gruppieren',
+ 'In-line' => 'im Text',
+ 'Interest Rate' => 'Zinssatz',
+ 'Inv. Duedate' => 'Inv. Duedate',
+ 'Invdate' => 'Rechnungsdatum',
+ 'Invdate from' => 'Rechnungen von',
+ 'Invno.' => 'Invno.',
+ 'Invnumber' => 'Rechnungsnummer',
+ 'Invoice' => 'Rechnung',
+ 'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
+ 'Invoice Duedate' => 'Fälligkeitsdatum',
+ 'Invoice Number' => 'Rechnungsnummer',
+ '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',
+ 'L' => 'L',
+ 'License' => 'Lizenz',
+ 'Mar' => 'März',
+ 'March' => 'März',
+ 'May' => 'Mai',
+ 'May ' => 'Mai',
+ 'Message' => 'Nachricht',
+ 'Minimum Amount' => 'Mindestbetrag',
+ 'Next Dunning Level' => 'Nächste Mahnstufe',
+ 'No.' => 'Position',
+ 'Notes' => 'Bemerkungen',
+ 'Nov' => 'Nov',
+ 'November' => 'November',
+ 'Number' => 'Nummer',
+ 'Number missing in Row' => 'Nummer fehlt in Zeile',
+ 'Oct' => 'Okt',
+ 'October' => 'Oktober',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
+ 'Order Date missing!' => 'Auftragsdatum fehlt!',
+ 'Order Number' => 'Auftragsnummer',
+ 'Order Number missing!' => 'Auftragsnummer fehlt!',
+ 'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
+ 'Packing List' => 'Lieferschein',
+ 'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
+ 'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
+ 'Part' => 'Ware',
+ 'Part Description' => 'Artikelbeschreibung',
+ 'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
+ 'Payment until' => 'Zahlungseingänge bis',
+ 'Phone' => 'Telefon',
+ 'Pick List' => 'Sammelliste',
+ 'Postscript' => 'Postscript',
+ 'Price' => 'Preis',
+ 'Pricegroup' => 'Preisgruppe',
+ 'Printed' => 'gedruckt.',
+ 'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
+ '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!',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
+ 'Reqdate' => 'Lieferdatum',
+ 'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
+ 'Sales Order' => 'Kundenauftrag',
+ 'Save' => 'Speichern',
+ 'Screen' => 'Bildschirm',
+ 'Search Dunning' => 'Mahnung suchen',
+ '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',
+ 'Set eMail text' => 'eMail Text eingeben',
+ 'Ship' => 'Lagerausgang',
+ 'Ship to' => 'Lieferadresse',
+ 'Shipping Address' => 'Lieferadresse',
+ 'Show old dunnings' => 'Alte Mahnungen anzeigen',
+ 'Start Dunning Process' => 'Mahnprozess starten',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
+ 'Street' => 'Straße',
+ 'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
+ 'Template' => 'Druckvorlage',
+ 'Terms missing in row ' => '+Tage fehlen in Zeile ',
+ 'To' => 'An',
+ 'Total Fees' => 'Kumulierte Gebühren',
+ 'Total Interest' => 'Kumulierte Zinsen',
+ 'Unit' => 'Einheit',
+ 'Vendor Number' => 'Lieferantennummer',
+ 'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
+ 'What type of item is this?' => 'Was ist dieser Artikel?',
+ 'Zipcode' => 'PLZ',
+ 'button' => '?',
+ 'eMail Send?' => 'eMail-Versand?',
+ 'eMail?' => 'eMail?',
+ 'emailed to' => 'gemailt an',
+ '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',
+ 'display' => 'display',
+ 'display_form' => 'display_form',
+ 'display_row' => 'display_row',
+ 'e_mail' => 'e_mail',
+ 'edit_config' => 'edit_config',
+ 'gl_transaction' => 'gl_transaction',
+ 'invoicetotal' => 'invoicetotal',
+ 'item_selected' => 'item_selected',
+ 'name_selected' => 'name_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',
+ 'project_selected' => 'project_selected',
+ 'quotation' => 'quotation',
+ 'sales_invoice' => 'sales_invoice',
+ 'save' => 'save',
+ 'save_dunning' => 'save_dunning',
+ 'search' => 'search',
+ 'section_menu' => 'section_menu',
+ 'select_item' => 'select_item',
+ 'select_name' => 'select_name',
+ 'select_project' => 'select_project',
+ 'send_email' => 'send_email',
+ 'set_email' => 'set_email',
+ 'set_pricegroup' => 'set_pricegroup',
+ 'ship_to' => 'ship_to',
+ 'show_dunning' => 'show_dunning',
+ 'show_invoices' => 'show_invoices',
+ 'validate_items' => 'validate_items',
+ 'vendor_details' => 'vendor_details',
+ 'vendor_invoice' => 'vendor_invoice',
+ 'weiter' => 'continue',
+ 'speichern' => 'save',
+};
+
+1;
'Apr' => 'Apr',
'April' => 'April',
'Are you sure you want to delete Transaction' => 'Buchung wirklich löschen?',
- 'Asset' => 'Aktiva/Mittelverwendung',
+ 'Asset' => 'Aktiva',
'Aug' => 'Aug',
'August' => 'August',
'Balance' => 'Bilanz',
'Description' => 'Beschreibung',
'Description missing!' => 'Beschreibung fehlt.',
'Edit General Ledger Transaction' => 'Buchung im Hauptbuch bearbeiten',
- 'Equity' => 'Passiva/Eigenkapital',
+ 'Equity' => 'Passiva',
'Expense' => 'Aufwandskonto',
'Feb' => 'Feb',
'February' => 'Februar',
'Jun' => 'Jun',
'June' => 'Juni',
'Korrektur' => 'Korrektur',
- 'Liability' => 'Passiva/Mittelherkunft',
+ 'Liability' => 'Passiva',
'Mar' => 'März',
'March' => 'März',
'May' => 'Mai',
$self{texts} = {
' Date missing!' => ' Datum fehlt!',
' Part Number missing!' => ' Artikelnummer fehlt!',
+ '*/' => '*/',
+ 'ADR' => 'ADR',
+ 'AGB' => 'AGB',
'Accounting Menu' => 'Kontoverwaltung',
'Active' => 'Aktiv',
'Add' => 'Erfassen',
'Add Request for Quotation' => 'Anfrage erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Add Service' => 'Dienstleistung erfassen',
+ 'Aluartikel' => 'Aluartikel',
'Apr' => 'Apr',
'April' => 'April',
+ 'Are you sure you want to update the prices' => 'Sind Sie sicher, dass Sie die Preise
+aktualisieren wollen?',
'Assemblies' => 'Erzeugnisse',
'Assemblies restocked!' => 'Erzeugnisse sind im Lager!',
'Assembly Number missing!' => 'Erzeugnisnummer fehlt!',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
'Bought' => 'Gekauft',
+ 'Buchungsgruppe' => 'Buchungsgruppe',
+ 'Bunker Receipt' => 'Bunker Receipt',
+ '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',
+ 'Confirm!' => 'Bestätigen Sie!',
'Confirmation' => 'Auftragsbestätigung',
'Contact' => 'Kontakt',
'Continue' => 'Weiter',
'Copies' => 'Kopien',
+ 'Could not update prices!' => 'Preise konnten nicht aktualisiert werden!',
'Country' => 'Land',
+ 'Credit Note' => 'Gutschrift',
'Customer Number' => 'Kundennummer',
'Dec' => 'Dez',
'December' => 'Dezember',
'Delete' => 'Löschen',
'Delivery Date' => 'Lieferdatum',
+ 'Description must not be empty!' => 'Beschreibung darf nicht leer sein',
'Discount' => 'Rabatt',
'Drawing' => 'Zeichnung',
'E-mail' => 'eMail',
'Geschäftsvolumen' => 'Geschäftsvolumen',
'Group' => 'Warengruppe',
'Group Items' => 'Waren gruppieren',
+ 'If you see this message, you most likely just setup your LX-Office and haven\'t added any entry types. If this is the case, the option is accessible for administrators in the System menu.' => 'Wenn Sie diese Meldung sehen haben Sie wahrscheinlich ein frisches LX-Office Setup und noch keine Buchungsgruppen eingerichtet. Ein Administrator kann dies im Systemmenü erledigen.',
'Image' => 'Grafik',
'In-line' => 'im Text',
'Include in Report' => 'In Bericht aufnehmen',
'July' => 'Juli',
'Jun' => 'Jun',
'June' => 'Juni',
+ 'L' => 'L',
+ 'Language Values' => 'Sprachübersetzungen',
'Last Cost' => 'Einkaufspreis',
'License' => 'Lizenz',
'Line Total' => 'Zeilensumme',
- 'Link Accounts' => 'Konten verknüpfen',
'List Price' => 'Listenpreis',
+ 'Long Description' => 'Langtext',
'Make' => 'Hersteller',
'Mar' => 'März',
'March' => 'März',
'Model' => 'Modell',
'Name' => 'Name',
'No.' => 'Position',
+ 'Not Discountable' => 'Nicht rabattierfähig',
'Notes' => 'Bemerkungen',
'Nov' => 'Nov',
'November' => 'November',
'October' => 'Oktober',
'On Hand' => 'Auf Lager',
'On Order' => 'Ist bestellt',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'Ordered' => 'Vom Kunde bestellt',
'Orphaned' => 'Nie benutzt',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
'Part' => 'Ware',
'Part Description' => 'Artikelbeschreibung',
- 'Part Description missing!' => 'Artikelbezeichnung fehlt!',
'Part Number' => 'Artikelnummer',
'Part Number missing!' => 'Artikelnummer fehlt!',
+ 'Partnumber must not be set to empty!' => 'Die Artikelnummer darf nicht auf leer geändert werden.',
'Partnumber not unique!' => 'Artikelnummer bereits vorhanden!',
'Parts' => 'Waren',
+ 'Parts must have an entry type.' => 'Waren müssen eine Buchungsgruppe haben.',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Phone' => 'Telefon',
'Pick List' => 'Sammelliste',
'Postscript' => 'Postscript',
'Pricegroup' => 'Preisgruppe',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
'Project' => 'Projekt',
+ 'Prozentual/Absolut' => 'Prozentual/Absolut',
'Purchase Order' => 'Lieferantenauftrag',
'Qty' => 'Menge',
'Queue' => 'Warteschlange',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
'Quoted' => 'Angeboten',
'RFQ' => 'Anfrage',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
'ROP' => 'Mindestlagerbestand',
'Reqdate' => 'Lieferdatum',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Revenue' => 'Erlöskonto',
'Sales Order' => 'Kundenauftrag',
'Save' => 'Speichern',
'Service' => 'Dienstleistung',
'Service Number missing!' => 'Dienstleistungsnummer fehlt!',
'Services' => 'Dienstleistungen',
+ 'Set Language Values' => 'Spracheinstellungen',
'Ship' => 'Lagerausgang',
'Ship to' => 'Lieferadresse',
'Shipping Address' => 'Lieferadresse',
'Sold' => 'Verkauft',
'Stock' => 'einlagern',
'Stock Assembly' => 'Erzeugnis einlagern',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'Subject' => 'Betreff',
'Subtotal' => 'Zwischensumme',
'TOP100' => 'Top 100',
+ 'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br><br>For alu article:<br>Length:<br>Weight/m:<br>Length ist total length of article and weight/m ist the weight pro meter' => 'Die Formeln müssen in der folgenden Syntax eingegeben werden:<br>Bei normalen Artikeln:<br>Variablenname= Variable Einheit;<br>Variablenname2= Variable2 Einheit2;<br>...<br>###<br>Variable + Variable2 * ( Variable - Variable2 )<br>Bitte achten Sie auf die Leerzeichen in der Formel<br><br>Bei Aluminiumartikeln:<br>Länge: x<br>Gewicht/m: y<br>x ist die Gesamtlänge des Artikels in Meter und y das Gewicht pro Meter. Es muss jeweils die Gesamtezeile eingegeben werden',
'To' => 'An',
'Top 100' => 'Top 100',
'Top 100 hinzufuegen' => 'Top 100 hinzufügen',
'Unit' => 'Einheit',
'Unit of measure' => 'Maßeinheit',
'Update' => 'Erneuern',
+ 'Update prices' => 'Preise aktualisieren',
'Updated' => 'Erneuert am',
'Vendor Number' => 'Lieferantennummer',
'Verrechnungseinheit' => 'Verrechnungseinheit',
'button' => '?',
'choice' => 'auswählen',
'choice part' => 'Artikel auswählen',
- 'deliverydate' => 'Lieferdatum',
'ea' => 'St.',
'emailed to' => 'gemailt an',
- 'hr' => 'Stunde',
'list' => 'auflisten',
'number' => 'Nummer',
+ 'prices updated!' => ' Preise aktualisiert!',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
'soldtotal' => 'Verkaufte Anzahl',
'assembly_row' => 'assembly_row',
'check_form' => 'check_form',
'choice' => 'choice',
+ 'confirm_price_update' => 'confirm_price_update',
'continue' => 'continue',
'customer_details' => 'customer_details',
'delete' => 'delete',
'new_item' => 'new_item',
'new_license' => 'new_license',
'order' => 'order',
+ 'parts_language_selection' => 'parts_language_selection',
'parts_subtotal' => 'parts_subtotal',
'post_as_new' => 'post_as_new',
'price_row' => 'price_row',
'save' => 'save',
'save_as_new' => 'save_as_new',
'search' => 'search',
+ 'search_update_prices' => 'search_update_prices',
'section_menu' => 'section_menu',
'select_item' => 'select_item',
'send_email' => 'send_email',
'stock_assembly' => 'stock_assembly',
'top100' => 'top100',
'update' => 'update',
+ 'update_prices' => 'update_prices',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'erfassen' => 'add',
$self{texts} = {
' Date missing!' => ' Datum fehlt!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Request for Quotation' => 'Anfrage erfassen',
'Billing Address' => 'Rechnungsadresse',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
+ 'Bunker Receipt' => 'Bunker Receipt',
'Cc' => 'Cc',
'City' => 'Stadt',
'Company Name' => 'Firmenname',
'Continue' => 'Weiter',
'Copies' => 'Kopien',
'Country' => 'Land',
+ 'Credit Note' => 'Gutschrift',
'Customer Number' => 'Kundennummer',
'Dec' => 'Dez',
'December' => 'Dezember',
'July' => 'Juli',
'Jun' => 'Jun',
'June' => 'Juni',
+ 'L' => 'L',
'License' => 'Lizenz',
'Mar' => 'März',
'March' => 'März',
'Number missing in Row' => 'Nummer fehlt in Zeile',
'Oct' => 'Okt',
'October' => 'Oktober',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
'Pricegroup' => 'Preisgruppe',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
'Project' => 'Projekt',
'Purchase Order' => 'Lieferantenauftrag',
'Qty' => 'Menge',
'Quotation' => 'Angebot',
'Quotation Date missing!' => 'Angebotsdatum fehlt!',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
'Reqdate' => 'Lieferdatum',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Sales Order' => 'Kundenauftrag',
'Screen' => 'Bildschirm',
'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
'Ship' => 'Lagerausgang',
'Ship to' => 'Lieferadresse',
'Shipping Address' => 'Lieferadresse',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'Subject' => 'Betreff',
+ 'Subtotal' => 'Zwischensumme',
'To' => 'An',
'Unit' => 'Einheit',
'Vendor Number' => 'Lieferantennummer',
$self{texts} = {
' Date missing!' => ' Datum fehlt!',
+ ' Payment posted!' => 'Zahlung gebucht!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
'Account' => 'Konto',
'Accounting Menu' => 'Kontoverwaltung',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Billing Address' => 'Rechnungsadresse',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
+ 'Bunker Receipt' => 'Bunker Receipt',
'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!',
+ 'Cannot post payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren',
'Cc' => 'Cc',
'City' => 'Stadt',
'Company Name' => 'Firmenname',
'Copies' => 'Kopien',
'Country' => 'Land',
'Credit Limit' => 'Kreditlimit',
+ 'Credit Note' => 'Gutschrift',
'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',
'July' => 'Juli',
'Jun' => 'Jun',
'June' => 'Juni',
+ 'L' => 'L',
'License' => 'Lizenz',
'Mar' => 'März',
'March' => 'März',
'Number missing in Row' => 'Nummer fehlt in Zeile',
'Oct' => 'Okt',
'October' => 'Oktober',
- 'Order' => 'Auftrag',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
'Phone' => 'Telefon',
'Pick List' => 'Sammelliste',
'Post' => 'Buchen',
- 'Post as new' => 'Neu buchen',
+ 'Post Payment' => 'Zahlung buchen',
'Postscript' => 'Postscript',
'Price' => 'Preis',
'Pricegroup' => 'Preisgruppe',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
'Project' => 'Projekt',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Purchase Order' => 'Lieferantenauftrag',
'Quotation' => 'Angebot',
'Quotation Date missing!' => 'Angebotsdatum fehlt!',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
'Record in' => 'Buchen auf',
'Remaining' => 'Rest',
'Reqdate' => 'Lieferdatum',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Sales Order' => 'Kundenauftrag',
'Screen' => 'Bildschirm',
'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
'Ship to' => 'Lieferadresse',
'Shipping Address' => 'Lieferadresse',
'Source' => 'Beleg',
+ 'Steuersatz' => 'Steuersatz',
+ 'Storno' => 'Storno',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'Subject' => 'Betreff',
'Subtotal' => 'Zwischensumme',
'order' => 'order',
'post' => 'post',
'post_as_new' => 'post_as_new',
+ 'post_payment' => 'post_payment',
'prepare_invoice' => 'prepare_invoice',
'print' => 'print',
'print_form' => 'print_form',
'send_email' => 'send_email',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
+ 'storno' => 'storno',
'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',
+ 'zahlung_buchen' => 'post_payment',
+ 'storno' => 'storno',
'erneuern' => 'update',
'ja' => 'yes',
};
$self{texts} = {
' Date missing!' => ' Datum fehlt!',
+ ' Payment posted!' => 'Zahlung gebucht!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
'Account' => 'Konto',
'Accounting Menu' => 'Kontoverwaltung',
+ 'Add Credit Note' => 'Gutschrift 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 Storno Credit Note' => 'Gutschrift Storno hinzufügen',
'Address' => 'Adresse',
'Amount' => 'Betrag',
'Apr' => 'Apr',
'Billing Address' => 'Rechnungsadresse',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
+ 'Bunker Receipt' => 'Bunker Receipt',
'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!',
+ 'Cannot post payment!' => 'Zahlung kann nicht gebucht werden!',
+ 'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren',
'Cc' => 'Cc',
+ 'Choose Customer' => 'Endkunde wählen:',
+ 'Choose Vendor' => 'Händler wählen',
'City' => 'Stadt',
'Company Name' => 'Firmenname',
'Confirm!' => 'Bestätigen Sie!',
'Copies' => 'Kopien',
'Country' => 'Land',
'Credit Limit' => 'Kreditlimit',
+ 'Credit Limit exceeded!!!' => 'Kreditlimit überschritten!',
+ 'Credit Note' => 'Gutschrift',
+ 'Credit Note Date' => 'Gutschriftdatum',
+ 'Credit Note Number' => 'Gutschriftnummer',
'Currency' => 'Währung',
'Customer' => 'Kunde',
'Customer Number' => 'Kundennummer',
'Date' => 'Datum',
'Dec' => 'Dez',
'December' => 'Dezember',
- 'Delete' => 'Löschen',
'Delivery Date' => 'Lieferdatum',
'Department' => 'Abteilung',
'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
'Due Date' => 'Fälligkeitsdatum',
+ 'Dunning Amount' => 'gemahnter Betrag',
'E-mail' => 'eMail',
'E-mail address missing!' => 'eMailadresse fehlt!',
'E-mailed' => 'eMail gesendet.',
+ 'Edit Credit Note' => 'Gutschrift bearbeiten',
'Edit Sales Invoice' => 'Rechnung bearbeiten',
+ 'Edit Storno Credit Note' => 'Storno Gutschrift bearbeiten',
+ 'Edit Storno Invoice' => 'Stornorechnung bearbeiten',
'Exch' => 'Wechselkurs.',
'Exchangerate' => 'Wechselkurs',
'Exchangerate for payment missing!' => 'Es fehlt der Wechselkurs für die Bezahlung!',
'July' => 'Juli',
'Jun' => 'Jun',
'June' => 'Juni',
+ 'L' => 'L',
'License' => 'Lizenz',
'Mar' => 'März',
'March' => 'März',
+ 'Max. Dunning Level' => 'höchste Mahnstufe',
'May' => 'Mai',
'May ' => 'Mai',
'Memo' => 'Memo',
'Number missing in Row' => 'Nummer fehlt in Zeile',
'Oct' => 'Okt',
'October' => 'Oktober',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order' => 'Auftrag',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
'Part' => 'Ware',
'Part Description' => 'Artikelbeschreibung',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Payment date missing!' => 'Tag der Zahlung fehlt!',
+ 'Payments' => 'Zahlungsausgänge',
'Phone' => 'Telefon',
'Pick List' => 'Sammelliste',
'Post' => 'Buchen',
- 'Post as new' => 'Neu buchen',
+ 'Post Payment' => 'Zahlung buchen',
'Postscript' => 'Postscript',
'Preview' => 'Druckvorschau',
'Price' => 'Preis',
'Print and Post' => 'Drucken und Buchen',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
'Project' => 'Projekt',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Purchase Order' => 'Lieferantenauftrag',
'Quotation Date missing!' => 'Angebotsdatum fehlt!',
'Quotation Number' => 'Angebotsnummer',
'Quotation Number missing!' => 'Angebotsnummer fehlt!',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
'Record in' => 'Buchen auf',
'Remaining' => 'Rest',
'Reqdate' => 'Lieferdatum',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Sales Order' => 'Kundenauftrag',
'Salesperson' => 'Verkäufer',
'Screen' => 'Bildschirm',
'Shipping Address' => 'Lieferadresse',
'Shipping Point' => 'Versandort',
'Source' => 'Beleg',
+ 'Steuersatz' => 'Steuersatz',
+ 'Storno' => 'Storno',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'Subject' => 'Betreff',
'Subtotal' => 'Zwischensumme',
'check_name' => 'check_name',
'check_project' => 'check_project',
'continue' => 'continue',
+ 'credit_note' => 'credit_note',
'customer_details' => 'customer_details',
'delete' => 'delete',
'display' => 'display',
'order' => 'order',
'post' => 'post',
'post_as_new' => 'post_as_new',
+ 'post_payment' => 'post_payment',
'prepare_invoice' => 'prepare_invoice',
'preview' => 'preview',
'print' => 'print',
'send_email' => 'send_email',
'set_pricegroup' => 'set_pricegroup',
'ship_to' => 'ship_to',
+ 'storno' => 'storno',
'update' => 'update',
'validate_items' => 'validate_items',
'vendor_details' => 'vendor_details',
'vendor_invoice' => 'vendor_invoice',
'yes' => 'yes',
'weiter' => 'continue',
- 'löschen' => 'delete',
+ 'gutschrift' => 'credit_note',
'email' => 'e_mail',
'auftrag' => 'order',
'buchen' => 'post',
- 'neu_buchen' => 'post_as_new',
+ 'zahlung_buchen' => 'post_payment',
'druckvorschau' => 'preview',
'drucken' => 'print',
'drucken_und_buchen' => 'print_and_post',
'lieferadresse' => 'ship_to',
+ 'storno' => 'storno',
'erneuern' => 'update',
'ja' => 'yes',
};
$self{texts} = {
+ 'ADR' => 'ADR',
'AP' => 'Einkauf',
'AP Aging' => 'Offene Verbindlichkeiten',
'AR' => 'Verkauf',
'AR Aging' => 'Offene Forderungen',
'Accounting Menu' => 'Kontoverwaltung',
+ 'Add ADR' => 'ADR hinzufügen',
'Add AP Transaction' => 'Kreditorenbuchung',
'Add AR Transaction' => 'Debitorenbuchung',
'Add Account' => 'Konto erfassen',
'Add Assembly' => 'Erzeugnis erfassen',
'Add Business' => 'Kundentyp erfassen',
+ 'Add Credit Note' => 'Gutschrift erfassen',
'Add Customer' => 'Kunde erfassen',
'Add Department' => 'Abteilung erfassen',
+ 'Add Dunning' => 'Mahnung erzeugen',
'Add Group' => 'Warengruppe erfassen',
+ 'Add Language' => 'Sprache hinzufügen',
'Add License' => 'Lizenz erfassen',
'Add Part' => 'Ware erfassen',
+ 'Add Payment Terms' => 'Zahlungskonditionen hinzufügen',
'Add Pricegroup' => 'Preisgruppe erfassen',
+ 'Add Printer' => 'Drucker hinzufügen',
'Add Project' => 'Projekt erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Assemblies' => 'Erzeugnisse',
'Audit Control' => 'Bücherkontrolle',
+ 'BG anzeigen' => 'BG anzeigen',
+ 'BG hinzufügen' => 'BG hinzufügen',
'BWA' => 'BWA',
'Balance Sheet' => 'Bilanz',
'Batch Printing' => 'Druck',
+ 'Buchungsgruppen' => 'Buchungsgruppen',
'Cash' => 'Zahlungsverkehr',
'Chart of Accounts' => 'Kontenübersicht',
'Check' => 'Scheck',
'Checks' => 'Schecks',
+ 'Config' => 'Konfiguration',
+ 'Contacts' => 'Contacts',
+ 'Customer' => 'Kunde',
'Customers' => 'Kunden',
'DATEV - Export Assistent' => 'DATEV-Exportassistent',
'Departments' => 'Abteilungen',
+ 'Dimension units' => 'Maßeinheiten',
+ 'Dunning Process' => 'Mahnwesen',
+ 'Dunnings' => 'Mahnungen',
'General Ledger' => 'Finanzbuchhaltung',
'Groups' => 'Warengruppen',
'HTML Templates' => 'HTML-Vorlagen',
+ 'Import' => 'Import',
'Income Statement' => 'GuV',
'Invoice' => 'Rechnung',
'Invoices' => 'Rechnungen',
'Journal' => 'Buchungsjournal',
'LaTeX Templates' => 'LaTeX-Vorlagen',
+ 'Languages' => 'Sprachen',
'Licenses' => 'Lizenzen',
+ 'List ADR' => 'ADR anzeigen',
'List Accounts' => 'Kontenliste',
'List Businesses' => 'Liste Kundentypen',
'List Departments' => 'Abteilungsliste',
+ 'List Languages' => 'Sprachenliste',
+ 'List Payment Terms' => 'Liste der Zahlungskonditionen',
+ 'List Printer' => 'Drucker anzeigen',
'List SIC' => 'SIC anzeigen',
'Logout' => 'Abmeldung',
'Master Data' => 'Stammdaten',
'Packing Lists' => 'Lieferschein',
'Parts' => 'Waren',
'Payment' => 'Zahlungsausgang',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Payments' => 'Zahlungsausgänge',
'Preferences' => 'Benutzereinstellungen',
'Pricegroups' => 'Preisgruppen',
+ 'Printer' => 'Drucker',
'Programm' => 'Programm',
'Projects' => 'Projekte',
'Projecttransactions' => 'Projektbuchungen',
'Sales Invoices' => 'Kundenrechnung',
'Sales Order' => 'Kundenauftrag',
'Sales Orders' => 'Aufträge',
+ 'Service units' => 'Dienstleistungseinheiten',
'Services' => 'Dienstleistungen',
+ 'Shipto' => 'Shipto',
'Statement' => 'Sammelrechnung',
'Stylesheet' => 'Stilvorlage',
'System' => 'System',
- 'Trial Balance' => 'Saldenbilanz',
+ 'Trial Balance' => 'Vergleichsbilanz',
'Type of Business' => 'Kundentyp',
'UStVA' => 'UStVA',
'UStVA 2004' => 'UStVA 2004',
'UStVA 2006' => 'UStVA 2006',
'UStVa' => 'UStVa',
'UStVa Einstellungen' => 'UStVa Einstellungen',
+ 'Units' => 'Einheiten',
+ 'Update Prices' => 'Preise aktualisieren',
'Vendor Invoices' => 'Einkaufsrechnungen',
'Vendors' => 'Lieferanten',
'Version' => 'Version',
$self{texts} = {
+ 'ADR' => 'ADR',
'AP' => 'Einkauf',
'AP Aging' => 'Offene Verbindlichkeiten',
'AR' => 'Verkauf',
'AR Aging' => 'Offene Forderungen',
+ 'Add ADR' => 'ADR hinzufügen',
'Add AP Transaction' => 'Kreditorenbuchung',
'Add AR Transaction' => 'Debitorenbuchung',
'Add Account' => 'Konto erfassen',
'Add Assembly' => 'Erzeugnis erfassen',
'Add Business' => 'Kundentyp erfassen',
+ 'Add Credit Note' => 'Gutschrift erfassen',
'Add Customer' => 'Kunde erfassen',
'Add Department' => 'Abteilung erfassen',
+ 'Add Dunning' => 'Mahnung erzeugen',
'Add Group' => 'Warengruppe erfassen',
+ 'Add Language' => 'Sprache hinzufügen',
'Add License' => 'Lizenz erfassen',
'Add Part' => 'Ware erfassen',
+ 'Add Payment Terms' => 'Zahlungskonditionen hinzufügen',
'Add Pricegroup' => 'Preisgruppe erfassen',
+ 'Add Printer' => 'Drucker hinzufügen',
'Add Project' => 'Projekt erfassen',
'Add Purchase Order' => 'Lieferantenauftrag erfassen',
'Add Quotation' => 'Angebot erfassen',
'Add Vendor Invoice' => 'Einkaufsrechnung erfassen',
'Assemblies' => 'Erzeugnisse',
'Audit Control' => 'Bücherkontrolle',
+ 'BG anzeigen' => 'BG anzeigen',
+ 'BG hinzufügen' => 'BG hinzufügen',
'BWA' => 'BWA',
'Balance Sheet' => 'Bilanz',
'Batch Printing' => 'Druck',
+ 'Buchungsgruppen' => 'Buchungsgruppen',
'Cash' => 'Zahlungsverkehr',
'Chart of Accounts' => 'Kontenübersicht',
'Check' => 'Scheck',
'Checks' => 'Schecks',
+ 'Config' => 'Konfiguration',
+ 'Contacts' => 'Contacts',
+ 'Customer' => 'Kunde',
'Customers' => 'Kunden',
'DATEV - Export Assistent' => 'DATEV-Exportassistent',
'Departments' => 'Abteilungen',
+ 'Dimension units' => 'Maßeinheiten',
+ 'Dunning Process' => 'Mahnwesen',
+ 'Dunnings' => 'Mahnungen',
'General Ledger' => 'Finanzbuchhaltung',
'Groups' => 'Warengruppen',
'HTML Templates' => 'HTML-Vorlagen',
+ 'Import' => 'Import',
'Income Statement' => 'GuV',
'Invoice' => 'Rechnung',
'Invoices' => 'Rechnungen',
'Journal' => 'Buchungsjournal',
'LaTeX Templates' => 'LaTeX-Vorlagen',
+ 'Languages' => 'Sprachen',
'Licenses' => 'Lizenzen',
+ 'List ADR' => 'ADR anzeigen',
'List Accounts' => 'Kontenliste',
'List Businesses' => 'Liste Kundentypen',
'List Departments' => 'Abteilungsliste',
+ 'List Languages' => 'Sprachenliste',
+ 'List Payment Terms' => 'Liste der Zahlungskonditionen',
+ 'List Printer' => 'Drucker anzeigen',
'List SIC' => 'SIC anzeigen',
'Logout' => 'Abmeldung',
'Master Data' => 'Stammdaten',
'Packing Lists' => 'Lieferschein',
'Parts' => 'Waren',
'Payment' => 'Zahlungsausgang',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Payments' => 'Zahlungsausgänge',
'Preferences' => 'Benutzereinstellungen',
'Pricegroups' => 'Preisgruppen',
+ 'Printer' => 'Drucker',
'Programm' => 'Programm',
'Projects' => 'Projekte',
'Projecttransactions' => 'Projektbuchungen',
'Sales Invoices' => 'Kundenrechnung',
'Sales Order' => 'Kundenauftrag',
'Sales Orders' => 'Aufträge',
+ 'Service units' => 'Dienstleistungseinheiten',
'Services' => 'Dienstleistungen',
+ 'Shipto' => 'Shipto',
'Statement' => 'Sammelrechnung',
'Stylesheet' => 'Stilvorlage',
'System' => 'System',
- 'Trial Balance' => 'Saldenbilanz',
+ 'Trial Balance' => 'Vergleichsbilanz',
'Type of Business' => 'Kundentyp',
'UStVA' => 'UStVA',
'UStVA 2004' => 'UStVA 2004',
'UStVA 2006' => 'UStVA 2006',
'UStVa' => 'UStVa',
'UStVa Einstellungen' => 'UStVa Einstellungen',
+ 'Units' => 'Einheiten',
+ 'Update Prices' => 'Preise aktualisieren',
'Vendor Invoices' => 'Einkaufsrechnungen',
'Vendors' => 'Lieferanten',
'Version' => 'Version',
$self{texts} = {
' Date missing!' => ' Datum fehlt!',
' missing!' => ' fehlt!',
+ '*/' => '*/',
+ 'AGB' => 'AGB',
'Accounting Menu' => 'Kontoverwaltung',
'Add' => 'Erfassen',
'Add Exchangerate' => 'Wechselkurs erfassen',
'Bin' => 'Lagerplatz',
'Bin List' => 'Lagerliste',
'Bis' => 'bis',
+ 'Bunker Receipt' => 'Bunker Receipt',
'Business' => 'Firma',
'C' => 'G',
'Cannot delete order!' => 'Auftrag kann nicht gelöscht werden!',
'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!',
'Cannot save quotation!' => 'Angebot kann nicht gespeichert werden!',
'Cc' => 'Cc',
+ 'Choose Customer' => 'Endkunde wählen:',
+ 'Choose Vendor' => 'Händler wählen',
'City' => 'Stadt',
'Closed' => 'Geschlossen',
'Collective Orders only work for orders from one customer!' => 'Sammelaufträge funktionieren nur für Aufträge von einem Kunden!',
'Could not transfer Inventory!' => 'Konnte Waren nicht umlagern!',
'Country' => 'Land',
'Credit Limit' => 'Kreditlimit',
+ 'Credit Limit exceeded!!!' => 'Kreditlimit überschritten!',
+ 'Credit Note' => 'Gutschrift',
'Curr' => 'Währung',
'Currency' => 'Währung',
'Customer' => 'Kunde',
'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
'Done' => 'Fertig',
+ 'Dunning Amount' => 'gemahnter Betrag',
'E-mail' => 'eMail',
'E-mail address missing!' => 'eMailadresse fehlt!',
'E-mailed' => 'eMail gesendet.',
'July' => 'Juli',
'Jun' => 'Jun',
'June' => 'Juni',
+ 'L' => 'L',
'License' => 'Lizenz',
'Mar' => 'März',
'March' => 'März',
+ 'Max. Dunning Level' => 'höchste Mahnstufe',
'May' => 'Mai',
'May ' => 'Mai',
'Message' => 'Nachricht',
'Oct' => 'Okt',
'October' => 'Oktober',
'Open' => 'Offen',
+ 'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order' => 'Auftrag',
'Order Date' => 'Auftragsdatum',
'Order Date missing!' => 'Auftragsdatum fehlt!',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'Order deleted!' => 'Auftrag gelöscht!',
'PDF' => 'PDF',
+ 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)',
'Packing List' => 'Lieferschein',
'Packing List Date missing!' => 'Datum für Verpackungsliste fehlt!',
'Packing List Number missing!' => 'Verpackungslistennummer fehlt!',
'Part' => 'Ware',
'Part Description' => 'Artikelbeschreibung',
'Part Number' => 'Artikelnummer',
+ 'Payment Terms' => 'Zahlungskonditionen',
'Phone' => 'Telefon',
'Pick List' => 'Sammelliste',
'Postscript' => 'Postscript',
'Print' => 'Drucken',
'Printed' => 'gedruckt.',
'Printer' => 'Drucker',
+ 'Proforma Invoice' => 'Proformarechnung',
'Project' => 'Projekt',
'Project not on file!' => 'Dieses Projekt ist nicht in der Datenbank!',
'Purchase Order' => 'Lieferantenauftrag',
'Quotation deleted!' => 'Angebot wurde gelöscht.',
'Quotations' => 'Angebote',
'RFQ Number' => 'Anfragenummer',
+ 'RMA Confirmation' => 'RMA-Bestätigung',
'Recd' => 'erhalten',
'Receive Merchandise' => 'Waren einlagern',
'Remaining' => 'Rest',
'Request for Quotation' => 'Anfrage',
'Request for Quotations' => 'Anfragen',
'Required by' => 'Lieferdatum',
+ 'Retour List' => 'Retour-Lieferschein',
'Sales Order' => 'Kundenauftrag',
'Sales Orders' => 'Aufträge',
'Salesperson' => 'Verkäufer',
'Save' => 'Speichern',
+ 'Save and Close' => 'Speichern und schließen',
'Save as new' => 'als neu speichern',
'Screen' => 'Bildschirm',
'Select from one of the items below' => 'Wählen Sie einen der untenstehenden Einträge',
'Shipping Date' => 'Lieferdatum',
'Shipping Date missing!' => 'Lieferdatum fehlt.',
'Shipping Point' => 'Versandort',
+ 'Steuersatz' => 'Steuersatz',
+ 'Storno Invoice' => 'Stornorechnung',
+ 'Storno Packing List' => 'Stornolieferschein',
'Street' => 'Straße',
'Subject' => 'Betreff',
'Subtotal' => 'Zwischensumme',
'sales_invoice' => 'sales_invoice',
'sales_order' => 'sales_order',
'save' => 'save',
+ 'save_and_close' => 'save_and_close',
'save_as_new' => 'save_as_new',
'save_exchangerate' => 'save_exchangerate',
'search' => 'search',
'angebot' => 'quotation',
'kundenauftrag' => 'sales_order',
'speichern' => 'save',
+ 'speichern_und_schließen' => 'save_and_close',
'als_neu_speichern' => 'save_as_new',
'lieferadresse' => 'ship_to',
'umlagerung' => 'transfer',
'Select all' => 'Alle auswählen',
'Source' => 'Beleg',
'Statement Balance' => 'Sammelrechnungsbilanz',
- 'Until' => 'Bis',
+ 'To' => 'An',
'Update' => 'Erneuern',
};
'Tax collected' => 'vereinnahmte Steuer',
'Tax paid' => 'Vorsteuer',
'Total' => 'Summe',
- 'Trial Balance' => 'Saldenbilanz',
+ 'Trial Balance' => 'Vergleichsbilanz',
'Vendor' => 'Lieferant',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'YYYY' => 'JJJJ',
'Firma' => 'Firma',
'Help' => 'Hilfe',
'Help:' => 'Hilfe:',
+ 'Hier den Berechnungszeitraum auswählen...' => 'Hier den Berechnungszeitraum auswählen...',
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)',
'Hinweise' => 'Hinweise',
'Impossible to create yearly Tax Report as PDF or PS.<br \> Not yet implemented!' => 'Umsatzsteuer Jahreserklärung als PDF wird noch nicht unterstützt.<br \> Bitte benutzen Sie das Ausgabeformat Vorschau.',
+use Cwd;
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $jscalendar);
# path to user configuration files
# Jscalendar an/aus
$jscalendar = 1;
+
+## Support fuer OpenDocument-Vorlagen
+# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind.
+$opendocument_templates = 1;
+
+# Die folgenden zwei Variablen legen Pfade zu Programmen fest, die benoetigt
+# werden, um OpenDocument-Vorlagen in PDFs umzuwandeln.
+
+# Pfad zu OpenOffice.org writer
+$openofficeorg_writer_bin = "/usr/bin/oowriter";
+
+# Pfad zu einem Script, dass einen "X virtual frame buffer" startet
+# und OpenOffice unter ihm laufen laesst. Lx-Office bringt ein
+# solches Script mit.
+$xvfb_run_bin = getcwd() . "/xvfb-run";
+
+# Das charset, in dem die Daten in der Datenbank abgelegt sind.
+$dbcharset = "ISO-8859-15";
+
+
# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
-# LXDebug::NONE, LXDebug::INFO, LXDebug::DEBUG1, LXDebug::DEBUG2, LXDebug::QUERY
+# LXDebug::NONE, LXDebug::INFO, LXDebug::DEBUG1 und LXDebug::DEBUG2
$LXDebug::global_level = LXDebug::NONE;
$LXDebug::global_trace_subs = 0;
# 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 menunew; do
+for i in ap ar bp ca cp ct cn dn gl ic ir is menu oe pe rc rp datev licenses fa ustva menunew common; 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
+for i in admin am ap ar arap bp ca cp ct cn dn gl ic io ir is login oe pe rc rp datev licenses fa ustva common; do
ln -vsf ../mozilla/$i.pl $i.pl
done
action=add
item=assembly
+[Master Data--Update Prices]
+module=ic.pl
+action=search_update_prices
+
[Master Data--Add Group]
module=pe.pl
action=add
action=search
searchitems=part
+[Master Data--Reports--ADR]
+module=ct.pl
+action=search_adr
+
[Master Data--Reports--Services]
module=ic.pl
action=search
action=add
type=invoice
+[AR--Add Credit Note]
+module=is.pl
+action=add
+type=credit_note
+
[AR--Add Sales Order]
module=oe.pl
action=add
action=search
type=sales_quotation
+[AR--Reports--ADR]
+module=ct.pl
+action=search_adr
+
+[Dunning Process]
+
+[Dunning Process--Add Dunning]
+module=dn.pl
+action=add
+[Dunning Process--Config]
+module=dn.pl
+action=edit_config
+
+[Dunning Process--Reports]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[Dunning Process--Reports--Dunnings]
+module=dn.pl
+action=search
[AP]
module=am.pl
action=list_account
+[System--Units]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Units--Dimension units]
+module=am.pl
+action=edit_units
+unit_type=dimension
+
+[System--Units--Service units]
+module=am.pl
+action=edit_units
+unit_type=service
+
#[System--Warehouses]
#module=menu.pl
#action=acc_menu
module=am.pl
action=list_business
+[System--Languages]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Languages--Add Language]
+module=am.pl
+action=add_language
+
+[System--Languages--List Languages]
+module=am.pl
+action=list_language
+
+
+[System--Buchungsgruppen]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Buchungsgruppen--BG hinzufügen]
+module=am.pl
+action=add_buchungsgruppe
+
+[System--Buchungsgruppen--BG anzeigen]
+module=am.pl
+action=list_buchungsgruppe
+
+[System--Printer]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Printer--Add Printer]
+module=am.pl
+action=add_printer
+
+[System--Printer--List Printer]
+module=am.pl
+action=list_printer
+
+[System--ADR]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--ADR--Add ADR]
+module=am.pl
+action=add_adr
+
+[System--ADR--List ADR]
+module=am.pl
+action=list_adr
+
+[System--Payment Terms]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Payment Terms--Add Payment Terms]
+module=am.pl
+action=add_payment
+
+[System--Payment Terms--List Payment Terms]
+module=am.pl
+action=list_payment
+
+[System--Import]
+module=menu.pl
+action=acc_menu
+target=acc_menu
+submenu=1
+
+[System--Import--Customer]
+module=lxo-import/addressB.php
+
+[System--Import--Contacts]
+module=lxo-import/contactB.php
+
+[System--Import--Shipto]
+module=lxo-import/shiptoB.php
+
[System--SIC]
module=menu.pl
action=acc_menu
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, 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 ('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 ('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, 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);
--- /dev/null
+alter table invoice add column longdescription text;
+alter table orderitems add column longdescription text;
+alter table translation rename column longtext to longdescription;
+
+alter table ar add column storno boolean;
+alter table ar alter column storno set default 'false';
+alter table ap add column storno boolean;
+alter table ap alter column storno set default 'false';
\ No newline at end of file
--- /dev/null
+alter table parts add column not_discountable boolean;
+alter table parts alter column not_discountable set default 'false';
+update parts set not_discountable='false';
\ No newline at end of file
--- /dev/null
+alter table chart add column new_chart_id integer;
+alter table chart add column valid_from date;
+
+create table tax_zones (
+ id integer,
+ description text
+);
+
+insert into tax_zones (id, description) VALUES (0, 'Inland');
+insert into tax_zones (id, description) VALUES (1, 'EU mit USt-ID Nummer');
+insert into tax_zones (id, description) VALUES (2, 'EU ohne USt-ID Nummer');
+insert into tax_zones (id, description) VALUES (3, 'Außerhalb EU');
+
+create table buchungsgruppen (
+ id integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ description text,
+ inventory_accno_id integer,
+ income_accno_id_0 integer,
+ expense_accno_id_0 integer,
+ income_accno_id_1 integer,
+ expense_accno_id_1 integer,
+ income_accno_id_2 integer,
+ expense_accno_id_2 integer,
+ income_accno_id_3 integer,
+ expense_accno_id_3 integer
+);
+
+alter table parts add column buchungsgruppen_id integer;
+
+alter table vendor add column taxzone_id integer;
+alter table customer add column taxzone_id integer;
+
+alter table ar add column taxzone_id integer;
+alter table ap add column taxzone_id integer;
+alter table oe add column taxzone_id integer;
+
+
\ No newline at end of file
--- /dev/null
+alter table oe add column proforma boolean;
+alter table oe alter column proforma set default 'false';
+update oe set proforma='f';
--- /dev/null
+alter table parts add column payment_id integer;
+alter table payment_terms add column ranking integer;
--- /dev/null
+CREATE TABLE "adr" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "adr_description" text,
+ "adr_code" text NOT NULL
+);
+
+ALTER TABLE parts add column adr_id integer;
+
+alter table shipto add column id integer;
+alter table shipto alter column id set default nextval('id'::text);
+update shipto set id=nextval('id'::text);
+
+alter table oe add column shipto_id integer;
+alter table ar add column shipto_id integer;
\ No newline at end of file
--- /dev/null
+alter table defaults add column cnnumber text;
+alter table gl add column type text;
+alter table ar add column type text;
+alter table ap add column type text;
--- /dev/null
+create table dunning_config (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "dunning_level" integer,
+ "dunning_description" text,
+ "active" boolean,
+ "auto" boolean,
+ "email" boolean,
+ "terms" integer,
+ "payment_terms" integer,
+ "fee" numeric(15,5),
+ "interest" numeric(15,5),
+ "email_body" text,
+ "email_subject" text,
+ "email_attachment" boolean,
+ "template" text
+);
+
+create table dunning (
+ id integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ trans_id integer,
+ dunning_id integer,
+ dunning_level integer,
+ transdate date,
+ duedate date,
+ fee numeric(15,5),
+ interest numeric(15,5)
+);
+
+alter table ar add column dunning_id integer;
+
+
+CREATE FUNCTION set_priceupdate_parts() RETURNS opaque AS '
+ BEGIN
+ NEW.priceupdate := ''now'';
+ RETURN NEW;
+ END;
+' LANGUAGE plpgsql;
+
+CREATE TRIGGER priceupdate_parts AFTER UPDATE ON parts
+ FOR EACH ROW EXECUTE PROCEDURE set_priceupdate_parts();
\ No newline at end of file
--- /dev/null
+alter table contacts add column cp_department text;
--- /dev/null
+alter table contacts add column cp_fax text;
+alter table contacts add column cp_mobile1 text;
+alter table contacts add column cp_mobile2 text;
+alter table contacts add column cp_satphone text;
+alter table contacts add column cp_satfax text;
+alter table contacts add column cp_project text;
+alter table contacts add column cp_privatphone text;
+alter table contacts add column cp_privatemail text;
+alter table contacts add column cp_birthday text;
--- /dev/null
+CREATE TABLE "language" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "template_code" text,
+ "article_code" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "payment_terms" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "description_long" text,
+ "terms_netto" integer,
+ "terms_skonto" integer,
+ "percent_skonto" real,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "translation" (
+ "parts_id" integer,
+ "language_id" integer,
+ "translation" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+ALTER TABLE customer ADD column language_id integer;
+ALTER TABLE customer ADD column payment_id integer;
+ALTER TABLE vendor ADD column language_id integer;
+ALTER TABLE vendor ADD column payment_id integer;
+ALTER TABLE ar ADD column language_id integer;
+ALTER TABLE ar ADD column payment_id integer;
+ALTER TABLE ap ADD column language_id integer;
+ALTER TABLE ap ADD column payment_id integer;
+ALTER TABLE oe ADD column language_id integer;
+ALTER TABLE oe ADD column payment_id integer;
+
+ALTER TABLE ar ADD column delivery_customer_id integer;
+ALTER TABLE ar ADD column delivery_vendor_id integer;
+ALTER TABLE oe ADD column delivery_customer_id integer;
+ALTER TABLE oe ADD column delivery_vendor_id integer;
\ No newline at end of file
--- /dev/null
+alter table contacts add column cp_abteilung text;
+update contacts set cp_abteilung=cp_department;
+alter table contacts drop column cp_department;
--- /dev/null
+alter table customer add column greeting text;
+alter table vendor add column greeting text;
+--alter table oe add column language_id integer;
\ No newline at end of file
--- /dev/null
+CREATE TABLE units (
+ name varchar(20) NOT NULL,
+ base_unit varchar(20),
+ factor bigint,
+
+ PRIMARY KEY (name),
+ FOREIGN KEY (base_unit) REFERENCES units (name)
+);
+
+INSERT INTO units (name, base_unit, factor) VALUES ('mg', NULL, NULL);
+INSERT INTO units (name, base_unit, factor) VALUES ('g', 'mg', 1000);
+INSERT INTO units (name, base_unit, factor) VALUES ('kg', 'g', 1000);
+INSERT INTO units (name, base_unit, factor) VALUES ('t', 'kg', 1000);
+INSERT INTO units (name, base_unit, factor) VALUES ('ml', NULL, NULL);
+INSERT INTO units (name, base_unit, factor) VALUES ('L', 'ml', 1000);
+INSERT INTO units (name, base_unit, factor) VALUES ('Stck', NULL, NULL);
+ALTER TABLE units ADD COLUMN active boolean;
+UPDATE units SET active = 't';
+ALTER TABLE units ALTER COLUMN active SET DEFAULT 't';
+ALTER TABLE units ALTER COLUMN active SET NOT NULL;
+
+ALTER TABLE units ADD COLUMN tmp numeric(20, 5);
+UPDATE units SET tmp = factor;
+ALTER TABLE units DROP COLUMN factor;
+ALTER TABLE units RENAME tmp TO factor;
+
+ALTER TABLE units ADD COLUMN type varchar(20);
+UPDATE units SET type = 'dimension';
+ALTER TABLE units ALTER COLUMN type SET NOT NULL;
+
+-- Einheitennamen duerfen 20 Zeichen lang sein.
+
+ALTER TABLE parts ADD COLUMN tmp varchar(20);
+UPDATE parts SET tmp = unit;
+ALTER TABLE parts DROP COLUMN unit;
+ALTER TABLE parts RENAME tmp TO unit;
+
+ALTER TABLE invoice ADD COLUMN tmp varchar(20);
+UPDATE invoice SET tmp = unit;
+ALTER TABLE invoice DROP COLUMN unit;
+ALTER TABLE invoice RENAME tmp TO unit;
+
+ALTER TABLE orderitems ADD COLUMN tmp varchar(20);
+UPDATE orderitems SET tmp = unit;
+ALTER TABLE orderitems DROP COLUMN unit;
+ALTER TABLE orderitems RENAME tmp TO unit;
+
+-- Spalte "active" wird nicht mehr benoetigt, weil Einheiten nicht mehr deaktiviert
+-- werden koennen.
+
+ALTER TABLE units DROP COLUMN active;
+
--- /dev/null
+ALTER table parts add column alu boolean;
+AlTER table parts add column formel text;
\ No newline at end of file
--- /dev/null
+ALTER table invoice add column base_qty real;
+AlTER table orderitems add column base_qty real;
\ No newline at end of file
--- /dev/null
+CREATE TABLE "rma" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "rmanumber" 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,
+ "cusrmanumber" text,
+ "intnotes" text,
+ "delivery_customer_id" integer,
+ "delivery_vendor_id" integer,
+ "language_id" integer,
+ "payment_id" integer,
+ "department_id" integer DEFAULT 0,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "shipvia" text,
+ "cp_id" integer
+);
+
+CREATE TABLE "rmaitems" (
+ "trans_id" integer,
+ "parts_id" integer REFERENCES parts (id),
+ "description" text,
+ "qty" real,
+ "base_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),
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp,
+ "pricegroup_id" integer,
+ "rmanumber" text,
+ "transdate" text,
+ "cusrmanumber" text
+);
+
+alter table defaults add column rmanumber text;
\ No newline at end of file
--- /dev/null
+CREATE TABLE "printers" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "printer_description" text NOT NULL,
+ "printer_command" text,
+ "template_code" text
+);
\ No newline at end of file
--- /dev/null
+alter table shipto add column module text;
+alter table translation add column longtext text;
--- /dev/null
+alter table invoice add column subtotal boolean;
+alter table orderitems add column subtotal boolean;
+alter table invoice alter column subtotal set default 'false';
+alter table orderitems alter column subtotal set default 'false';
\ No newline at end of file
"itime" timestamp DEFAULT now(),
"mtime" timestamp
);
-INSERT INTO defaults (version,audittrail) VALUES ('2.2.0', 't');
+INSERT INTO defaults (version,audittrail) VALUES ('2.2.0.1', 't');
CREATE TABLE audittrail (
"trans_id" int,
"bank_code" varchar(10),
"bank" text,
"language" varchar(5),
+ "language_id" integer,
+ "payment_id" integer,
"datevexport" integer,
"itime" timestamp DEFAULT now(),
"mtime" timestamp,
"bank_code" varchar(10),
"bank" text,
"language" varchar(5),
+ "language_id" integer,
+ "payment_id" integer,
"datevexport" integer,
"itime" timestamp DEFAULT now(),
"mtime" timestamp,
"quonumber" text,
"cusordnumber" text,
"intnotes" text,
+ "language_id" integer,
+ "payment_id" integer,
+ "delivery_customer_id" integer,
+ "delivery_vendor_id" integer,
"department_id" integer DEFAULT 0,
"shipvia" text,
"itime" timestamp DEFAULT now(),
"employee_id" integer,
"quonumber" text,
"intnotes" text,
+ "language_id" integer,
+ "payment_id" integer,
"department_id" integer DEFAULT 0,
"itime" timestamp DEFAULT now(),
"mtime" timestamp,
"mtime" timestamp
);
+CREATE TABLE "translation" (
+ "parts_id" integer,
+ "language_id" integer,
+ "translation" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
CREATE TABLE "oe" (
"id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
"ordnumber" text NOT NULL,
"quonumber" text,
"cusordnumber" text,
"intnotes" text,
+ "delivery_customer_id" integer,
+ "delivery_vendor_id" integer,
+ "language_id" integer,
+ "payment_id" integer,
"department_id" integer DEFAULT 0,
"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 9223372036854775807 minvalue 1 cache 1 cycle;
+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,
"mtime" timestamp
);
+
+CREATE TABLE "language" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "template_code" text,
+ "article_code" text,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
+CREATE TABLE "payment_terms" (
+ "id" integer DEFAULT nextval('id'::text) PRIMARY KEY,
+ "description" text,
+ "description_long" text,
+ "terms_netto" integer,
+ "terms_skonto" integer,
+ "percent_skonto" real,
+ "itime" timestamp DEFAULT now(),
+ "mtime" timestamp
+);
+
CREATE TABLE "sic" (
"code" text,
"sictype" character(1),
\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
+\usepackage{eurosym}
\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}{17cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
+\usepackage{geyger}
\begin{document}
-\newlength{\descrwidth}\setlength{\descrwidth}{9cm}
+\thispagestyle{plain}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
- \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 80 28 37%>
+\end{tabularx}
-<%pagebreak 90 27 48%>
-\end{tabular*}
+\newpage
- \rule{\textwidth}{2pt}
-
- \hfill
- \begin{tabularx}{7cm}{Xr@{}}
- \textbf{Subtotal} & \textbf{<%sumcarriedforward%>} \\
- \end{tabularx}
+\begin{tabularx}{\textwidth}{lrXrr}
+ \hline
+ \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} &
+ \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\
+ \hline
+ <%foreach number%>
+ <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> &
+ FIXME & <%linetotal%>\\
+ <%end number%>
+<%end pagebreak%>
-\newpage
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-\markright{<%company%>\hfill <%invnumber%>}
+\vspace*{1.5cm}
-\vspace*{-12pt}
+\begin{minipage}{8cm}
+ \tiny
+ \underline{GEYGER GbR $\bullet$ Druckereistr. 9 $\bullet$ 05159
+ Leipzig-Stahmeln}
+ \normalsize
-\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%>
+ <%name%>
+ <%street%>
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+ <%zipcode%> <%city%>
-\vspace*{2cm}
+ <%country%>
+\end{minipage}
+\hfill
+\begin{minipage}{6cm}
+ \rightline{\LARGE\textbf{\textit{Rechnung}}}
+ \rightline{\large\textbf{\textit{Nr. <%invnumber%>%
+ }}}
-<%name%>
+ Rechnungsdatum:\hfill <%invdate%>
-<%street%>
+ Auftrag-Nr:\hfill <%ordnumber%>
-<%zipcode%>
+ Telefon:\hfill FIXME <%phone%>
-<%city%>
+ Telefax:\hfill FIXME <%fax%>
-<%country%>
+ Ansprechpartner:\hfill <%employee%>
+\end{minipage}
-\vspace{3.5cm}
+\vspace*{0.5cm}
-\textbf{R E C H N U N G}
+Ihre Bestellung ex <%cusordnumber%> vom <%orddate%>
\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Datum} & <%invdate%> \\
- \textbf{Nummer} & <%invnumber%> \\
- \textbf{Lieferdatum} & <%deliverydate%> \\
-\end{tabular}
+Leipzig-Stahmeln, \today
-\vspace{1cm}
+\vspace*{0.5cm}
-\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*}
+Sehr geehrte Damen und Herren,
+für unsere erbrachten Lieferungen und Leistungen erlauben wir uns,
+folgende Positionen in Rechnung zu stellen.
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
+\vspace{0.5cm}
-\vspace{0.2cm}
+\begin{minipage}[t]{8cm}
+ \underline{Lieferadresse:}
-\hfill
-\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Zwischensumme} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
- <%taxdescription%> auf <%taxbase%> & <%tax%> \\
-<%end tax%>
+ <%dc_name%>
+
+ <%dc_street%>
+
+ <%dc_zipcode%> <%dc_city%>
+
+ <%dc_country%>
+\end{minipage}
+\begin{minipage}[t]{8cm}
+ \underline{Händler}
+
+ <%dv_name%>
+
+ <%dv_street%>
+
+ <%dv_zipcode%> <%dv_city%>
+
+ <%dv_country%>
+
+ Telefon: <%dv_phone%>
+\end{minipage}
+
+\vspace{0.5cm}
+
+\begin{tabularx}{\textwidth}{lrXrr}
\hline
- \textbf{Total} & \textbf{<%invtotal%>} \\
-<%if paid%>
- \textbf{Bezahlt} & <%paid%> \\
-<%end paid%>
-<%if total%>
- \textbf{Bezahlbar} & \textbf{<%total%>} \\
-<%end total%>
+ \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} &
+ \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\
+ \hline
+ <%foreach number%>
+ <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> &
+ FIXME & <%linetotal%>\\
+ <%end number%>
\end{tabularx}
-\vspace{0.3cm}
+\begin{tabularx}{\textwidth}{Xrr}
+ Zwischensumme: & & <%subtotal%>\\
+ abbzüglich der nicht rabattierfähigen Positionen $(*)$ &
+ FIXME & FIXME \\
+ Rabatt bei vereinbarungsgemäßer Bezahlung\hfill
+ FIXME von & FIXME & FIXME\\
+\end{tabularx}
-\hfill
- Alle Preise in \textbf{<%currency%>}.
+\vspace{0.5cm}
-\vspace{12pt}
+Liefertermin: <%deliverydate%>
-<%if notes%>
- <%notes%>
-<%end if%>
+\vspace{0.5cm}
-}
+\hrule
-%\vfill
-%\centerline{\textbf{salute}}
+\hfill
+\begin{tabular}{l@{\hspace*{0.2cm}\euro\hspace*{0.2cm}}r}
+ Nettobetrag & FIXME\\
+ <%foreach tax%>
+ <%taxrate%> <%taxdescription%> & <%tax%>\\
+ <%end tax%>
+ \textbf{Endbetrag} & \textbf{<%invtotal%>%
+ }
+\end{tabular}
+\hrule
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+\vspace{0.2cm}
-\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.
-}
+Zahlbar bis FIXME mit FIXME Skonto (FIXME) = FIXME \euro\\
+Zahlbar bis <%terms%> <%invtotal%> \euro\ ohne Abzüge
\end{document}
-
\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}{17cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
+\usepackage{geyger}
\begin{document}
-\newlength{\descrwidth}\setlength{\descrwidth}{9cm}
+\thispagestyle{plain}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
- \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*}
+<%pagebreak 100 35 37%>
+\end{tabularx}
\newpage
-\markright{<%company%>\hfill <%invnumber%>}
+\begin{tabularx}{\textwidth}{lXr}
+ \hline
+ \textbf{Pos} & \textbf{Bezeichnung} & \textbf{Liefermenge} \\
+ \hline
+<%end pagebreak%>
-\vspace*{-12pt}
+\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}}
- \textbf{Nummer} & \textbf{Artikel} & \textbf{Anz} &
- \textbf{Einh} & \textbf{Steige} \\
-<%end pagebreak%>
+\vspace*{1.5cm}
+\begin{minipage}{8cm}
+ \tiny
+ \underline{GEYGER GbR $\bullet$ Druckereistr. 9 $\bullet$ 05159
+ Leipzig-Stahmeln}
+ \normalsize
-\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+ <%dc_name%>
-\vspace*{2cm}
+ <%dc_street%>
-<%shiptoname%>
+ <%dc_zipcode%> <%dc_city%>
-<%shiptostreet%>
+ <%dc_country%>
+\end{minipage}
+\hfill
+\begin{minipage}{6cm}
+ \rightline{\LARGE\textbf{\textit{Lieferschein}}}
+ \rightline{\large\textbf{\textit{Nr. <%invnumber%>%
+ }}}
-<%shiptozipcode%>
+ Datum:\hfill <%invdate%>
-<%shiptocity%>
+ Auftrag-Nr:\hfill <%ordnumber%>
-<%shiptocountry%>
+ Kunden-Nr:\hfill <%customernumber%>
-\vspace{3.5cm}
+ Ansprechpartner:\hfill <%employee%>
+\end{minipage}
-\textbf{L I E F E R S C H E I N}
+\vspace*{0.5cm}
+Ihre Bestellung ex <%cusordnumber%> vom <%orddate%>
\hfill
-\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
- \textbf{Datum} & <%invdate%> \\
- \textbf{Nummer} & <%invnumber%> \\
-\end{tabular}
+Leipzig-Stahmeln, \today
-\vspace{1cm}
+\vspace*{0.5cm}
-\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*}
+\begin{minipage}[t]{8cm}
+ \underline{Händler}
+ <%dv_name%>
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
+ <%dv_street%>
-\vspace{12pt}
+ <%dv_zipcode%> <%dv_city%>
-<%if notes%>
- <%notes%>
-<%end if%>
+ <%dv_country%>
-}
+ Telefon: <%dv_phone%>
+\end{minipage}
+\begin{minipage}[t]{8cm}
+ \underline{Rechnungsempfänger}
+
+ <%name%>
+
+ <%street%>
+
+ <%zipcode%> <%city%>
+
+ <%country%>
+
+ Telefon: <%phone%>
+\end{minipage}
+
+\vspace{0.5cm}
+
+\begin{tabularx}{\textwidth}{lXr}
+ \hline
+ \textbf{Pos} & \textbf{Bezeichnung} & \textbf{Liefermenge} \\
+ \hline
+<%foreach number%>
+ <%runningnumber%> & \raggedright <%description%> & <%qty%> <%unit%>\\
+<%end number%>
+\end{tabularx}
+
+\vspace{0.5cm}
+
+Liefertermin: <%deliverydate%>
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+\vspace{0.5cm}
-\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.
+Oben angeführte Positionen vollständig und ohne Mängel erhalten:
+\hspace*{0.5cm}
+\parbox[t]{6cm}{
+ \underline{\hspace*{6cm}}\\
+ \centerline{\small Datum / Unterschrift}
}
\end{document}
\documentclass[twoside]{scrartcl}
-\usepackage[frame]{xy}
+\usepackage{eurosym}
\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}{17cm}
-\setlength{\textheight}{24.5cm}
-\setlength{\footskip}{1cm}
-\setlength{\parindent}{0pt}
-\renewcommand{\baselinestretch}{1}
+\usepackage{geyger}
\begin{document}
-\newlength{\descrwidth}\setlength{\descrwidth}{9cm}
+\thispagestyle{plain}
-\newsavebox{\hdr}
-\sbox{\hdr}{
- \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
+\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
- \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}
+<%pagebreak 80 28 37%>
+\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%> \\
+\begin{tabularx}{\textwidth}{lrXrr}
+ \hline
+ \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} &
+ \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\
+ \hline
+ <%foreach number%>
+ <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> &
+ FIXME & <%linetotal%>\\
+ <%end number%>
<%end pagebreak%>
-
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
-\vspace*{2cm}
-
-<%name%>
-
-<%street%>
+\vspace*{1.5cm}
-<%zipcode%>
+\begin{minipage}{8cm}
+ \tiny
+ \underline{GEYGER GbR $\bullet$ Druckereistr. 9 $\bullet$ 05159
+ Leipzig-Stahmeln}
+ \normalsize
-<%city%>
+ <%name%>
-<%country%>
+ <%street%>
-\vspace{3.5cm}
+ <%zipcode%> <%city%>
-\textbf{B E S T E L L U N G}
+ <%country%>
+\end{minipage}
\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}
+\begin{minipage}{6cm}
+ \rightline{\LARGE\textbf{\textit{Auftragsbestätigung}}}
+ \rightline{\large\textbf{\textit{Nr. <%ordnumber%>%
+ }}}
-\vspace{1cm}
+ Datum:\hfill <%orddate%>
-\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*}
+ Kunden-Nr:\hfill <%customernumber%>
+ Telefon:\hfill <%phone%>
-\parbox{\textwidth}{
-\rule{\textwidth}{2pt}
+ Telefax:\hfill FIXME <%fax%>
-\vspace{0.2cm}
+ Ansprechpartner:\hfill <%employee%>
+\end{minipage}
+
+\vspace*{0.5cm}
\hfill
-\begin{tabularx}{7cm}{Xr@{}}
- \textbf{Zwischensumme} & \textbf{<%subtotal%>} \\
-<%foreach tax%>
- <%taxdescription%> auf <%taxbase%> & <%tax%>\\
-<%end tax%>
+Leipzig-Stahmeln, \today
+
+\vspace{0.5cm}
+
+\begin{tabularx}{\textwidth}{lrXrr}
+ \hline
+ \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} &
+ \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\
\hline
- \textbf{Total} & \textbf{<%ordtotal%>}\\
+ <%foreach number%>
+ <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> &
+ FIXME & <%linetotal%>\\
+ <%end number%>
\end{tabularx}
-\vspace{0.3cm}
+\begin{tabularx}{\textwidth}{Xrr}
+ Zwischensumme: & & <%subtotal%>\\
+ abbzüglich der nicht rabattierfähigen Positionen $(*)$ &
+ FIXME & FIXME \\
+ Rabatt bei vereinbarungsgemäßer Bezahlung\hfill
+ FIXME von & FIXME & FIXME\\
+\end{tabularx}
-\hfill
- Alle Preise in \textbf{<%currency%>}.
+\vspace{0.5cm}
+
+Vereinbarter Liefertermin: <%reqdate%>
-\vspace{12pt}
+\vspace{0.5cm}
-<%if notes%>
- <%notes%>
-<%end if%>
+\hrule
-}
+\hfill
+\begin{tabular}{l@{\hspace*{0.2cm}\euro\hspace*{0.2cm}}r}
+ Nettobetrag & FIXME\\
+ <%foreach tax%>
+ <%taxrate%> <%taxdescription%> & <%tax%>\\
+ <%end tax%>
+ \textbf{Endbetrag} & \textbf{<%ordtotal%>%
+ }
+\end{tabular}
+\hrule
+\vspace{0.2cm}
-\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+\textit{Bitte kontrollieren Sie alle Positionen auf Ãœbereinstimmung
+ mit IHrere Bestellung! Abweichungen teilen Sie innerhalb von 3 Tagen
+ mit!}
-\footnotetext[1]{\tiny
-Spezialprodukte werden nicht zurückgenommen. Für alle anderen Waren
-wird eine 10\% Stornogebühr verrechnet.
-}
+Zahlung bar/Scheck am Tage der Lieferung mit 5\% Skonto
\end{document}
--- /dev/null
+<body>
+
+ <TMPL_IF NAME=saved_message>
+ <p><TMPL_VAR NAME=saved_message></p>
+
+ <hr>
+ </TMPL_IF>
+
+ <form method="post" action="<TMPL_VAR NAME=script ESCAPE=HTML>">
+
+ <input type="hidden" name="path" value="<TMPL_VAR NAME=path ESCAPE=HTML>">
+ <input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>">
+ <input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>">
+
+ <input type="hidden" name="type" value="unit">
+ <input type="hidden" name="unit_type" value="<TMPL_VAR NAME=unit_type ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop" colspan="2"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+ </table>
+
+ <p>
+ Einheiten haben entweder keine oder genau eine Basiseinheit, von der
+ sie ein Vielfaches sind. Wenn Sie eine Basiseinheit auswählen,
+ dann müssen Sie auch einen Faktor eingeben. Sie müssen
+ Einheiten als ein Vielfaches einer kleineren Einheit eingeben. So
+ ist die Definition von "kg" mit der Basiseinheit
+ "g" und dem Faktor 1000 zulässig, die Definition von
+ "g" mit der Basiseinheit "kg" und dem Faktor
+ "0,001" hingegen nicht.
+ </p>
+
+ <hr>
+
+ <table width="100%">
+ <tr><th class="listtop">Einheit hinzufügen</th></tr>
+ </table>
+
+ <table>
+ <tr>
+ <th align="right">Einheit</th>
+ <td><input name="new_name" size="20" maxlength="20"></td>
+ </tr>
+ <tr>
+ <th align="right">Basiseinheit</th>
+ <td>
+ <select name="new_base_unit">
+ <TMPL_LOOP NAME=NEW_BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th align="right">Faktor</th>
+ <td><input name="new_factor"></td>
+ </tr>
+ </table>
+
+ <input type="submit" class="submit" name="action" value="Erfassen">
+
+ <hr>
+
+ <table width="100%">
+ <tr><th class="listtop">Einheiten bearbeiten</th></tr>
+ </table>
+
+ <p>
+ Einheiten, die bereits in Benutzung sind (z.B. bei einer
+ Warendefinition, einer Rechnung oder bei einer Lagerbuchung)
+ können nachträglich nicht mehr verändert werden.
+ </p>
+
+ <p>
+ Einheiten, die zum Löschen markiert sind, werden beim Speichern
+ gelöscht.
+ </p>
+
+ <table>
+ <tr>
+ <th class="listheading"> </th>
+ <th class="listheading">Löschen</th>
+ <th class="listheading">Einheit</th>
+ <th class="listheading">Basiseinheit</th>
+ <th class="listheading">Faktor</th>
+ </tr>
+
+ <TMPL_LOOP NAME=UNITS>
+ <tr>
+ <TMPL_IF NAME=in_use>
+ <td><TMPL_VAR NAME=__counter__></td>
+ <td>
+ <input type="hidden" name="unchangeable_<TMPL_VAR NAME=__counter__>" value="1">
+ <input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>">
+ </td>
+
+ <td><TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_IF NAME=base_unit><TMPL_VAR NAME=base_unit ESCAPE=HTML><TMPL_ELSE>---</TMPL_IF></td>
+ <td><TMPL_IF NAME=base_unit><TMPL_VAR NAME=factor ESCAPE=HTML><TMPL_ELSE>---</TMPL_IF></td>
+
+ <TMPL_ELSE>
+
+ <td><TMPL_VAR NAME=__counter__></td>
+ <td align="center"><input type="checkbox" name="delete_<TMPL_VAR NAME=__counter__>"></td>
+ <td>
+ <input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>">
+ <input name="name_<TMPL_VAR NAME=__counter__>" size="20" maxlength="20" value="<TMPL_VAR NAME=name>">
+ </td>
+ <td>
+ <select name="base_unit_<TMPL_VAR NAME=__counter__>">
+ <TMPL_LOOP NAME=BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP>
+ </select>
+ </td>
+ <td><input name="factor_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=factor>"></td>
+
+ </TMPL_IF>
+ </tr>
+
+ <TMPL_IF NAME=__last__><input type="hidden" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF>
+ </TMPL_LOOP>
+ </table>
+
+ <input type="submit" class="submit" name="action" value="Speichern">
+
+ </form>
+
+</body>
+</html>
--- /dev/null
+<body>
+
+ <TMPL_IF NAME=saved_message>
+ <p><TMPL_VAR NAME=saved_message></p>
+
+ <hr>
+ </TMPL_IF>
+
+ <form method="post" action="<TMPL_VAR NAME=script ESCAPE=HTML>">
+
+ <input type="hidden" name="path" value="<TMPL_VAR NAME=path ESCAPE=HTML>">
+ <input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>">
+ <input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>">
+
+ <input type="hidden" name="type" value="unit">
+ <input type="hidden" name="unit_type" value="<TMPL_VAR NAME=unit_type ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop" colspan="2"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+ </table>
+
+ <p>
+ Einheiten haben entweder keine oder genau eine Basiseinheit, von der
+ sie ein Vielfaches sind. Wenn Sie eine Basiseinheit auswählen,
+ dann müssen Sie auch einen Faktor eingeben. Sie müssen
+ Einheiten als ein Vielfaches einer kleineren Einheit eingeben. So
+ ist die Definition von "kg" mit der Basiseinheit
+ "g" und dem Faktor 1000 zulässig, die Definition von
+ "g" mit der Basiseinheit "kg" und dem Faktor
+ "0,001" hingegen nicht.
+ </p>
+
+ <hr>
+
+ <table width="100%">
+ <tr><th class="listtop"><translate>Add unit</translate></th></tr>
+ </table>
+
+ <table>
+ <tr>
+ <th align="right"><translate>Unit</translate></th>
+ <td><input name="new_name" size="20" maxlength="20"></td>
+ </tr>
+ <tr>
+ <th align="right"><translate>Base unit</translate></th>
+ <td>
+ <select name="new_base_unit">
+ <TMPL_LOOP NAME=NEW_BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th align="right"><translate>Factor</translate></th>
+ <td><input name="new_factor"></td>
+ </tr>
+ </table>
+
+ <input type="submit" class="submit" name="action" value="<translate>Add</translate>">
+
+ <hr>
+
+ <table width="100%">
+ <tr><th class="listtop"><translate>Edit units</translate></th></tr>
+ </table>
+
+ <p>
+ Einheiten, die bereits in Benutzung sind (z.B. bei einer
+ Warendefinition, einer Rechnung oder bei einer Lagerbuchung)
+ können nachträglich nicht mehr verändert werden.
+ </p>
+
+ <p>
+ Einheiten, die zum Löschen markiert sind, werden beim Speichern
+ gelöscht.
+ </p>
+
+ <table>
+ <tr>
+ <th class="listheading"> </th>
+ <th class="listheading"><translate>Delete</translate></th>
+ <th class="listheading"><translate>Unit</translate></th>
+ <th class="listheading"><translate>Base unit</translate></th>
+ <th class="listheading"><translate>Factor</translate></th>
+ </tr>
+
+ <TMPL_LOOP NAME=UNITS>
+ <tr>
+ <TMPL_IF NAME=in_use>
+ <td><TMPL_VAR NAME=__counter__></td>
+ <td>
+ <input type="hidden" name="unchangeable_<TMPL_VAR NAME=__counter__>" value="1">
+ <input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>">
+ </td>
+
+ <td><TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_IF NAME=base_unit><TMPL_VAR NAME=base_unit ESCAPE=HTML><TMPL_ELSE>---</TMPL_IF></td>
+ <td><TMPL_IF NAME=base_unit><TMPL_VAR NAME=factor ESCAPE=HTML><TMPL_ELSE>---</TMPL_IF></td>
+
+ <TMPL_ELSE>
+
+ <td><TMPL_VAR NAME=__counter__></td>
+ <td align="center"><input type="checkbox" name="delete_<TMPL_VAR NAME=__counter__>"></td>
+ <td>
+ <input type="hidden" name="old_name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name>">
+ <input name="name_<TMPL_VAR NAME=__counter__>" size="20" maxlength="20" value="<TMPL_VAR NAME=name>">
+ </td>
+ <td>
+ <select name="base_unit_<TMPL_VAR NAME=__counter__>">
+ <TMPL_LOOP NAME=BASE_UNIT_DDBOX><option <TMPL_VAR NAME=selected>><TMPL_VAR NAME=name></option></TMPL_LOOP>
+ </select>
+ </td>
+ <td><input name="factor_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=factor>"></td>
+
+ </TMPL_IF>
+ </tr>
+
+ <TMPL_IF NAME=__last__><input type="hidden" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF>
+ </TMPL_LOOP>
+ </table>
+
+ <input type="submit" class="submit" name="action" value="<translate>Save</translate>">
+
+ </form>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_subject" value="<TMPL_VAR NAME=input_subject ESCAPE=HTML>">
+ <input type="hidden" name="input_body" value="<TMPL_VAR NAME=input_body ESCAPE=HTML>">
+ <input type="hidden" name="input_attachment" value="<TMPL_VAR NAME=input_attachment ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th colspan=2 class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr>
+ <td>Betreff:</td>
+ <td><input id="email_subject" name="email_subject" value="<TMPL_VAR NAME=email_subject ESCAPE=HTML>">
+ </td>
+ </tr>
+ <tr>
+ <td>Text:</td>
+ <td>
+<textarea id="email_body" name="email_body" rows=20 cols=70 wrap=soft><TMPL_VAR NAME=email_body ESCAPE=HTML></textarea>
+
+ </td>
+ </tr>
+ <tr>
+ <td>PDF anhängen</td>
+ <td><input id="email_attachment" type=checkbox name="email_attachment" value=1 "<TMPL_VAR NAME=email_attachment ESCAPE=HTML>">
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="email_updated()">Ãœbernehmen</button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function email_updated() {
+ window.opener.document.getElementsByName(document.Form.input_subject.value)[0].value = document.getElementsByName("email_subject")[0].value;
+ window.opener.document.getElementsByName(document.Form.input_body.value)[0].value = document.getElementsByName("email_body")[0].value;
+ window.opener.document.getElementsByName(document.Form.input_attachment.value)[0].value = document.getElementsByName("email_attachment")[0].value; self.close();
+ }
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_subject" value="<TMPL_VAR NAME=input_subject ESCAPE=HTML>">
+ <input type="hidden" name="input_body" value="<TMPL_VAR NAME=input_body ESCAPE=HTML>">
+ <input type="hidden" name="input_attachment" value="<TMPL_VAR NAME=input_attachment ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th colspan=2 class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr>
+ <td><translate>Subject:</translate></td>
+ <td><input id="email_subject" name="email_subject" value="<TMPL_VAR NAME=email_subject ESCAPE=HTML>">
+ </td>
+ </tr>
+ <tr>
+ <td><translate>Body:</translate></td>
+ <td>
+<textarea id="email_body" name="email_body" rows=20 cols=70 wrap=soft><TMPL_VAR NAME=email_body ESCAPE=HTML></textarea>
+
+ </td>
+ </tr>
+ <tr>
+ <td><translate>Attach PDF:</translate></td>
+ <td><input id="email_attachment" type=checkbox name="email_attachment" value=1 "<TMPL_VAR NAME=email_attachment ESCAPE=HTML>">
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="email_updated()"><translate>Close</translate></button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function email_updated() {
+ window.opener.document.getElementsByName(document.Form.input_subject.value)[0].value = document.getElementsByName("email_subject")[0].value;
+ window.opener.document.getElementsByName(document.Form.input_body.value)[0].value = document.getElementsByName("email_body")[0].value;
+ window.opener.document.getElementsByName(document.Form.input_attachment.value)[0].value = document.getElementsByName("email_attachment")[0].value; self.close();
+ }
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+ <input type="hidden" name="calc_length" value="<TMPL_VAR NAME=calc_length ESCAPE=HTML>">
+ <input type="hidden" name="calc_weight" value="<TMPL_VAR NAME=calc_weight ESCAPE=HTML>">
+ <input type="hidden" name="row" value="<TMPL_VAR NAME=row ESCAPE=HTML>">
+ <input type="hidden" name="description" value="<TMPL_VAR NAME=description ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Menge und Preise unten eingeben</td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr>
+ <th nowrap class="listheading" colspan=2><TMPL_VAR NAME=description ESCAPE=HTML></th>
+ <tr class="listheading">
+ <th nowrap class="listheading">Gesamtlänge des Artikels</th>
+ <th nowrap class="listheading">Gewicht pro Meter</th>
+ </tr>
+
+ <tr class="listrow_1">
+ <td><TMPL_VAR NAME=length ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=weight ESCAPE=HTML></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Preis Alu:</th>
+ <td><input id="price_alu" name="price_alu" value="<TMPL_VAR NAME=price_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Preis Eloxal:</th>
+ <td><input id="price_eloxal" name="price_eloxal" value="<TMPL_VAR NAME=price_eloxal ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Menge Alu:</th>
+ <td><input id="qty_alu" name="qty_alu" value="<TMPL_VAR NAME=qty_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Menge Artikel:</th>
+ <td><input id="qty_article" name="qty_article" value="<TMPL_VAR NAME=qty ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Gesamtpreis:</th>
+ <td><input id="total" name="total" value="<TMPL_VAR NAME=total ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Gesamtpreis Alu:</th>
+ <td><input id="total_alu" name="total_alu" value="<TMPL_VAR NAME=total_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading">Gesamtpreis Eloxal:</th>
+ <td><input id="total_eloxal" name="total_eloxal" value="<TMPL_VAR NAME=total_eloxal ESCAPE=HTML>"></td>
+ </tr></table>
+ <button type="button" onclick="calculate_alu()">Berechnen</button>
+ <button type="button" onclick="alu_close()">Ãœbernehmen</button>
+</form>
+
+ <script type="text/javascript">
+
+ function calculate_alu() {
+ var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
+ var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
+ var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
+ var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
+ var qty_article = Math.ceil(qty_alu / weight_article);
+ qty_alu = qty_article * weight_article;
+ alu = qty_alu * price_alu;
+ var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
+ eloxal = qty_eloxal * price_eloxal;
+
+
+ total = alu + eloxal;
+ alu = number_format(alu, 2, ",", ".");
+ eloxal = number_format(eloxal, 2, ",", ".");
+ total = number_format(total, 2, ",", ".");
+ self.document.getElementsByName("qty_alu")[0].value = qty_alu;
+ self.document.getElementsByName("qty_article")[0].value = qty_article;
+ self.document.getElementsByName("total_alu")[0].value = alu;
+ self.document.getElementsByName("total_eloxal")[0].value = eloxal;
+ self.document.getElementsByName("total")[0].value = total;
+ }
+
+ function alu_close() {
+
+ var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
+ var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
+ var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
+ var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
+ var qty_article = Math.ceil(qty_alu / weight_article);
+ qty_alu = qty_article * weight_article;
+ alu = qty_alu * price_alu;
+ var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
+ eloxal = qty_eloxal * price_eloxal;
+ var sellprice =
+
+
+ total = alu + eloxal;
+ var sellprice = total / qty_article
+ qty_alu = number_format(qty_alu, 2, ",", ".");
+ qty_eloxal = number_format(qty_eloxal, 2, ",", ".");
+ alu = number_format(alu, 2, ",", ".");
+ eloxal = number_format(eloxal, 2, ",", ".");
+ sellprice = number_format(sellprice, 2, ",", ".");
+ var sellprice_index = window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value).length - 1;
+
+
+ var article = document.getElementsByName("description")[0].value + "\r\nAlupreisberechnung:\r\n" + qty_alu + "kg Aluminiumprofil Einzelpreis: " + document.getElementsByName("price_alu")[0].value +" Gesamt: " + alu + "\r\n" + qty_eloxal + "m Eloxal Einzelpreis: " + document.getElementsByName("price_eloxal")[0].value + " Gesamt: " + eloxal;
+ window.opener.document.getElementsByName("qty_" + document.getElementsByName("row")[0].value)[0].value = qty_article;
+ window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value)[sellprice_index].value = sellprice;
+ window.opener.document.getElementsByName("description_" + document.getElementsByName("row")[0].value)[0].value = article;
+ self.close();
+ }
+function /*out: String*/ number_format( /* in: float */ number,
+ /* in: integer */ laenge,
+ /* in: String */ sep,
+ /* in: String */ th_sep ) {
+
+ number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
+ str_number = number+"";
+ arr_int = str_number.split(".");
+ if(!arr_int[0]) arr_int[0] = "0";
+ if(!arr_int[1]) arr_int[1] = "";
+ if(arr_int[1].length < laenge){
+ nachkomma = arr_int[1];
+ for(i=arr_int[1].length+1; i <= laenge; i++){ nachkomma += "0"; }
+ arr_int[1] = nachkomma;
+ }
+ if(th_sep != "" && arr_int[0].length > 3){
+ Begriff = arr_int[0];
+ arr_int[0] = "";
+ for(j = 3; j < Begriff.length ; j+=3){
+ Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
+ arr_int[0] = th_sep + Extrakt + arr_int[0] + "";
+ }
+ str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
+ arr_int[0] = str_first + arr_int[0];
+ }
+ return arr_int[0]+sep+arr_int[1];
+}
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+ <input type="hidden" name="calc_length" value="<TMPL_VAR NAME=calc_length ESCAPE=HTML>">
+ <input type="hidden" name="calc_weight" value="<TMPL_VAR NAME=calc_weight ESCAPE=HTML>">
+ <input type="hidden" name="row" value="<TMPL_VAR NAME=row ESCAPE=HTML>">
+ <input type="hidden" name="description" value="<TMPL_VAR NAME=description ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Insert quantity and prices below.</translate></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr>
+ <th nowrap class="listheading" colspan=2><TMPL_VAR NAME=description ESCAPE=HTML></th>
+ <tr class="listheading">
+ <th nowrap class="listheading"><translate>Total length</translate></th>
+ <th nowrap class="listheading"><translate>Weight/m</translate></th>
+ </tr>
+
+ <tr class="listrow_1">
+ <td><TMPL_VAR NAME=length ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=weight ESCAPE=HTML></td>
+ </tr>
+ </table>
+
+ </td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Price Alu:</translate></th>
+ <td><input id="price_alu" name="price_alu" value="<TMPL_VAR NAME=price_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Price Eloxal:</translate></th>
+ <td><input id="price_eloxal" name="price_eloxal" value="<TMPL_VAR NAME=price_eloxal ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Quantity Alu:</translate></th>
+ <td><input id="qty_alu" name="qty_alu" value="<TMPL_VAR NAME=qty_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Quantity Article:</translate></th>
+ <td><input id="qty_article" name="qty_article" value="<TMPL_VAR NAME=qty ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <td colspan=2><hr size=3 noshade></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Total:</translate></th>
+ <td><input id="total" name="total" value="<TMPL_VAR NAME=total ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Total Alu:</translate></th>
+ <td><input id="total_alu" name="total_alu" value="<TMPL_VAR NAME=total_alu ESCAPE=HTML>"></td>
+ </tr>
+ <tr>
+ <th nowrap class="listheading"><translate>Total Eloxal:</translate></th>
+ <td><input id="total_eloxal" name="total_eloxal" value="<TMPL_VAR NAME=total_eloxal ESCAPE=HTML>"></td>
+ </tr></table>
+ <button type="button" onclick="calculate_alu()"><translate>Calculate</translate></button>
+ <button type="button" onclick="alu_close()"><translate>Close</translate></button>
+</form>
+
+ <script type="text/javascript">
+
+ function calculate_alu() {
+ var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
+ var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
+ var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
+ var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
+ var qty_article = Math.ceil(qty_alu / weight_article);
+ qty_alu = qty_article * weight_article;
+ alu = qty_alu * price_alu;
+ var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
+ eloxal = qty_eloxal * price_eloxal;
+
+
+ total = alu + eloxal;
+ alu = number_format(alu, 2, ",", ".");
+ eloxal = number_format(eloxal, 2, ",", ".");
+ total = number_format(total, 2, ",", ".");
+ self.document.getElementsByName("qty_alu")[0].value = qty_alu;
+ self.document.getElementsByName("qty_article")[0].value = qty_article;
+ self.document.getElementsByName("total_alu")[0].value = alu;
+ self.document.getElementsByName("total_eloxal")[0].value = eloxal;
+ self.document.getElementsByName("total")[0].value = total;
+ }
+
+ function alu_close() {
+
+ var qty_alu = document.getElementsByName("qty_alu")[0].value.replace(/,/g, ".");
+ var price_alu = document.getElementsByName("price_alu")[0].value.replace(/,/g, ".");
+ var price_eloxal = document.getElementsByName("price_eloxal")[0].value.replace(/,/g, ".");
+ var weight_article = document.getElementsByName("calc_weight")[0].value * document.getElementsByName("calc_length")[0].value;
+ var qty_article = Math.ceil(qty_alu / weight_article);
+ qty_alu = qty_article * weight_article;
+ alu = qty_alu * price_alu;
+ var qty_eloxal = qty_article * document.getElementsByName("calc_length")[0].value;
+ eloxal = qty_eloxal * price_eloxal;
+ var sellprice =
+
+
+ total = alu + eloxal;
+ var sellprice = total / qty_article
+ qty_alu = number_format(qty_alu, 2, ",", ".");
+ qty_eloxal = number_format(qty_eloxal, 2, ",", ".");
+ alu = number_format(alu, 2, ",", ".");
+ eloxal = number_format(eloxal, 2, ",", ".");
+ sellprice = number_format(sellprice, 2, ",", ".");
+ var sellprice_index = window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value).length - 1;
+
+
+ var article = document.getElementsByName("description")[0].value + "\r\nAlupreisberechnung:\r\n" + qty_alu + "kg Aluminiumprofil Einzelpreis: " + document.getElementsByName("price_alu")[0].value +" Gesamt: " + alu + "\r\n" + qty_eloxal + "m Eloxal Einzelpreis: " + document.getElementsByName("price_eloxal")[0].value + " Gesamt: " + eloxal;
+ window.opener.document.getElementsByName("qty_" + document.getElementsByName("row")[0].value)[0].value = qty_article;
+ window.opener.document.getElementsByName("sellprice_" + document.getElementsByName("row")[0].value)[sellprice_index].value = sellprice;
+ window.opener.document.getElementsByName("description_" + document.getElementsByName("row")[0].value)[0].value = article;
+ self.close();
+ }
+function /*out: String*/ number_format( /* in: float */ number,
+ /* in: integer */ laenge,
+ /* in: String */ sep,
+ /* in: String */ th_sep ) {
+
+ number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
+ str_number = number+"";
+ arr_int = str_number.split(".");
+ if(!arr_int[0]) arr_int[0] = "0";
+ if(!arr_int[1]) arr_int[1] = "";
+ if(arr_int[1].length < laenge){
+ nachkomma = arr_int[1];
+ for(i=arr_int[1].length+1; i <= laenge; i++){ nachkomma += "0"; }
+ arr_int[1] = nachkomma;
+ }
+ if(th_sep != "" && arr_int[0].length > 3){
+ Begriff = arr_int[0];
+ arr_int[0] = "";
+ for(j = 3; j < Begriff.length ; j+=3){
+ Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
+ arr_int[0] = th_sep + Extrakt + arr_int[0] + "";
+ }
+ str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
+ arr_int[0] = str_first + arr_int[0];
+ }
+ return arr_int[0]+sep+arr_int[1];
+}
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Bitte geben Sie die Abmessungen unten ein</td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=VARIABLES>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><TMPL_VAR NAME=description ESCAPE=HTML>:</td><td><input id="<TMPL_VAR NAME=name>" name="<TMPL_VAR NAME=name>" value=></td>
+ <td><TMPL_VAR NAME=unit ESCAPE=HTML></td>
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="calculate_qty()">Berechnen</button>
+ </form>
+
+ <script type="text/javascript">
+ //<!--
+ function calculate_qty() {
+ <TMPL_LOOP NAME=VARIABLES>
+ var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");
+ </TMPL_LOOP>
+ var result = <TMPL_VAR NAME=formel>;
+ result = number_format(result, 2, ",", ".");
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = result;
+ self.close();
+ }
+ //-->
+
+function /*out: String*/ number_format( /* in: float */ number,
+ /* in: integer */ laenge,
+ /* in: String */ sep,
+ /* in: String */ th_sep ) {
+
+ number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
+ str_number = number+"";
+ arr_int = str_number.split(".");
+ if(!arr_int[0]) arr_int[0] = "0";
+ if(!arr_int[1]) arr_int[1] = "";
+ if(arr_int[1].length < laenge){
+ nachkomma = arr_int[1];
+ for(i=arr_int[1].length+1; i <= laenge; i++){ nachkomma += "0"; }
+ arr_int[1] = nachkomma;
+ }
+ if(th_sep != "" && arr_int[0].length > 3){
+ Begriff = arr_int[0];
+ arr_int[0] = "";
+ for(j = 3; j < Begriff.length ; j+=3){
+ Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
+ arr_int[0] = th_sep + Extrakt + arr_int[0] + "";
+ }
+ str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
+ arr_int[0] = str_first + arr_int[0];
+ }
+ return arr_int[0]+sep+arr_int[1];
+}
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Please insert object dimensions below.</translate></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=VARIABLES>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><TMPL_VAR NAME=description ESCAPE=HTML>:</td><td><input id="<TMPL_VAR NAME=name>" name="<TMPL_VAR NAME=name>" value=></td>
+ <td><TMPL_VAR NAME=unit ESCAPE=HTML></td>
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="calculate_qty()"><translate>Calculate</translate></button>
+ </form>
+
+ <script type="text/javascript">
+ //<!--
+ function calculate_qty() {
+ <TMPL_LOOP NAME=VARIABLES>
+ var <TMPL_VAR NAME=name> = document.getElementsByName("<TMPL_VAR NAME=name>")[0].value.replace(/,/g, ".");
+ </TMPL_LOOP>
+ var result = <TMPL_VAR NAME=formel>;
+ result = number_format(result, 2, ",", ".");
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = result;
+ self.close();
+ }
+ //-->
+
+function /*out: String*/ number_format( /* in: float */ number,
+ /* in: integer */ laenge,
+ /* in: String */ sep,
+ /* in: String */ th_sep ) {
+
+ number = Math.round( number * Math.pow(10, laenge) ) / Math.pow(10, laenge);
+ str_number = number+"";
+ arr_int = str_number.split(".");
+ if(!arr_int[0]) arr_int[0] = "0";
+ if(!arr_int[1]) arr_int[1] = "";
+ if(arr_int[1].length < laenge){
+ nachkomma = arr_int[1];
+ for(i=arr_int[1].length+1; i <= laenge; i++){ nachkomma += "0"; }
+ arr_int[1] = nachkomma;
+ }
+ if(th_sep != "" && arr_int[0].length > 3){
+ Begriff = arr_int[0];
+ arr_int[0] = "";
+ for(j = 3; j < Begriff.length ; j+=3){
+ Extrakt = Begriff.slice(Begriff.length - j, Begriff.length - j + 3);
+ arr_int[0] = th_sep + Extrakt + arr_int[0] + "";
+ }
+ str_first = Begriff.substr(0, (Begriff.length % 3 == 0)?3:(Begriff.length % 3));
+ arr_int[0] = str_first + arr_int[0];
+ }
+ return arr_int[0]+sep+arr_int[1];
+}
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body>
+ <table width=100%>
+ <tr>
+ <th class=listtop><TMPL_VAR NAME=title DEFAULT="Error!"></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><TMPL_VAR NAME=label_error></td></tr>
+ </table>
+
+ <TMPL_VAR NAME=DEBUG>
+
+</body>
+</html>
<body>
<table width=100%>
<tr>
- <th class=listtop><TMPL_VAR NAME=title DEFAULT="Fehler!"></th>
+ <th class=listtop><TMPL_VAR NAME=title DEFAULT="Error!"></th>
</tr>
<tr height="5"></tr>
--- /dev/null
+<body>
+ <table width=100%>
+ <tr>
+ <th class=listtop><TMPL_VAR NAME=title DEFAULT="Information"></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><TMPL_VAR NAME=label_information></td></tr>
+ </table>
+
+ <TMPL_VAR NAME=DEBUG>
+
+</body>
+</html>
--- /dev/null
+<body>
+ <table width=100%>
+ <tr>
+ <th class=listtop><TMPL_VAR NAME=title DEFAULT="<translate>Information</translate>"></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><TMPL_VAR NAME=label_information></td></tr>
+ </table>
+
+ <TMPL_VAR NAME=DEBUG>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=LANGUAGES>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <TMPL_VAR NAME=description ESCAPE=HTML></td>
+
+ <td><input id="translation_<TMPL_VAR NAME=__counter__>" name="translation_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=translation ESCAPE=HTML>"></td>
+
+ </tr>
+ <TMPL_IF NAME=__last__><input type="hidden" id="rowcount" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="languages_updated()">Close</button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function languages_updated() {
+ var languages = "";
+ for (var i = 1; i <= ( document.getElementsByName("rowcount")[0].value); i++) {
+ var id = "id_" + i ;
+ var translation = "translation_" + i ;
+ alert(id);
+ languages = languages + "---+++---" + document.getElementsByName( id )[0].value + "--++--" + document.getElementsByName( translation )[0].value;
+ }
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = languages;
+
+ self.close();
+ }
+ //TESSSSST-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Bitte einen Endkunden aus der Liste auswählen</td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=DELIVERY>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><button type="button" onclick="customer_selected('<TMPL_VAR NAME=__counter__>')">Auswahl</button></td>
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <input type="hidden" id="name_<TMPL_VAR NAME=__counter__>" name="name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name ESCAPE=HTML>">
+ <TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=customernumber ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=address ESCAPE=HTML></td>
+<!-- <td><input type="hidden" id="description_<TMPL_VAR NAME=__counter__>" name="description_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=description ESCAPE=HTML>"> -->
+<!-- <TMPL_VAR NAME=description ESCAPE=HTML></td> -->
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function customer_selected(selected) {
+ var name = document.getElementsByName("name_" + selected)[0].value
+ var id = document.getElementsByName("id_" + selected)[0].value
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
+ if (document.Form.input_id.value != "") {
+ window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
+ }
+ self.close();
+ }
+ //-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Please select a customer from the list below.</translate></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=DELIVERY>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><button type="button" onclick="customer_selected('<TMPL_VAR NAME=__counter__>')">Auswahl</button></td>
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <input type="hidden" id="name_<TMPL_VAR NAME=__counter__>" name="name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name ESCAPE=HTML>">
+ <TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=customernumber ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=address ESCAPE=HTML></td>
+<!-- <td><input type="hidden" id="description_<TMPL_VAR NAME=__counter__>" name="description_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=description ESCAPE=HTML>"> -->
+<!-- <TMPL_VAR NAME=description ESCAPE=HTML></td> -->
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function customer_selected(selected) {
+ var name = document.getElementsByName("name_" + selected)[0].value
+ var id = document.getElementsByName("id_" + selected)[0].value
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
+ if (document.Form.input_id.value != "") {
+ window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
+ }
+ self.close();
+ }
+ //-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Bitte einen Händler aus der Liste auswählen</td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=VENDOR>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><button type="button" onclick="vendor_selected('<TMPL_VAR NAME=__counter__>')">Auswahl</button></td>
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <input type="hidden" id="name_<TMPL_VAR NAME=__counter__>" name="name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name ESCAPE=HTML>">
+ <TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=customernumber ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=address ESCAPE=HTML></td>
+<!-- <td><input type="hidden" id="description_<TMPL_VAR NAME=__counter__>" name="description_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=description ESCAPE=HTML>"> -->
+<!-- <TMPL_VAR NAME=description ESCAPE=HTML></td> -->
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function vendor_selected(selected) {
+ var name = document.getElementsByName("name_" + selected)[0].value
+ var id = document.getElementsByName("id_" + selected)[0].value
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
+ if (document.Form.input_id.value != "") {
+ window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
+ }
+ self.close();
+ }
+ //-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+ <input type="hidden" name="input_id" value="<TMPL_VAR NAME=input_id ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Please select a vendor from the list below.</translate></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=VENDOR>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><button type="button" onclick="vendor_selected('<TMPL_VAR NAME=__counter__>')">Auswahl</button></td>
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <input type="hidden" id="name_<TMPL_VAR NAME=__counter__>" name="name_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=name ESCAPE=HTML>">
+ <TMPL_VAR NAME=name ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=customernumber ESCAPE=HTML></td>
+ <td><TMPL_VAR NAME=address ESCAPE=HTML></td>
+<!-- <td><input type="hidden" id="description_<TMPL_VAR NAME=__counter__>" name="description_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=description ESCAPE=HTML>"> -->
+<!-- <TMPL_VAR NAME=description ESCAPE=HTML></td> -->
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function vendor_selected(selected) {
+ var name = document.getElementsByName("name_" + selected)[0].value
+ var id = document.getElementsByName("id_" + selected)[0].value
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = name;
+ if (document.Form.input_id.value != "") {
+ window.opener.document.getElementsByName(document.Form.input_id.value)[0].value = id;
+ }
+ self.close();
+ }
+ //-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Bitte den Langtext eingeben</td></tr>
+
+ <tr>
+ <td>
+
+<textarea id="longdescription" name="longdescription" rows=4 cols=30 wrap=soft><TMPL_VAR NAME=longdescription ESCAPE=HTML></textarea>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="longdescription_updated()">Ãœbernehmen</button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function longdescription_updated() {
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = document.getElementsByName("longdescription")[0].value;
+
+ self.close();
+ }
+ //TESSSSST-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Please insert your longdescription below</translate></td></tr>
+
+ <tr>
+ <td>
+
+<textarea id="longdescription" name="longdescription" rows=4 cols=30 wrap=soft><TMPL_VAR NAME=longdescription ESCAPE=HTML></textarea>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="longdescription_updated()"><translate>Close</translate></button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function longdescription_updated() {
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = document.getElementsByName("longdescription")[0].value;
+
+ self.close();
+ }
+ //TESSSSST-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td>Bitte die Ãœbersetzungen unten eintragen</td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=LANGUAGES>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <TMPL_VAR NAME=description ESCAPE=HTML></td>
+
+ <td><input id="translation_<TMPL_VAR NAME=__counter__>" name="translation_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=translation ESCAPE=HTML>"></td>
+ <td><input id="longdescription_<TMPL_VAR NAME=__counter__>" name="longdescription_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=longdescription ESCAPE=HTML>"></td>
+
+ </tr>
+ <TMPL_IF NAME=__last__><input type="hidden" id="rowcount" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="languages_updated()">Ãœbernehmen</button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function languages_updated() {
+ var languages = "";
+ for (var i = 1; i <= ( document.getElementsByName("rowcount")[0].value); i++) {
+ var id = "id_" + i ;
+ var translation = "translation_" + i ;
+ var longdescription = "longdescription_" + i;
+ languages = languages + "---+++---" + document.getElementsByName( id )[0].value + "--++--" + document.getElementsByName( translation )[0].value + "--++--" + document.getElementsByName( longdescription )[0].value;
+ }
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = languages;
+
+ self.close();
+ }
+ //TESSSSST-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<body <TMPL_IF NAME=onload>onload="<TMPL_VAR NAME=onload>"</TMPL_IF>>
+
+ <form name="Form">
+
+ <input type="hidden" name="input_name" value="<TMPL_VAR NAME=input_name ESCAPE=HTML>">
+
+ <table width="100%">
+ <tr>
+ <th class="listtop"><TMPL_VAR NAME=title></th>
+ </tr>
+ <tr height="5"></tr>
+
+ <tr><td><translate>Please insert your language values below</translate></td></tr>
+
+ <tr>
+ <td>
+
+ <table>
+ <tr class="listheading">
+ <th class="listheading"> </th>
+ <TMPL_LOOP NAME=HEADER>
+ <th nowrap class="listheading"><a href="<TMPL_VAR NAME=callback ESCAPE=HTML>"><TMPL_VAR NAME=column_title></a></th>
+ </TMPL_LOOP>
+ </tr>
+
+ <TMPL_LOOP NAME=LANGUAGES>
+ <tr class="listrow<TMPL_IF NAME=__odd__>1<TMPL_ELSE>0</TMPL_IF>">
+ <td><input type="hidden" id="id_<TMPL_VAR NAME=__counter__>" name="id_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id ESCAPE=HTML>">
+ <TMPL_VAR NAME=description ESCAPE=HTML></td>
+
+ <td><input id="translation_<TMPL_VAR NAME=__counter__>" name="translation_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=translation ESCAPE=HTML>"></td>
+ <td><input id="longdescription_<TMPL_VAR NAME=__counter__>" name="longdescription_<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=longdescription ESCAPE=HTML>"></td>
+
+ </tr>
+ <TMPL_IF NAME=__last__><input type="hidden" id="rowcount" name="rowcount" value="<TMPL_VAR NAME=__counter__>"></TMPL_IF>
+ </TMPL_LOOP>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+ <button type="button" onclick="languages_updated()"><translate>Close</translate></button></td>
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ function languages_updated() {
+ var languages = "";
+ for (var i = 1; i <= ( document.getElementsByName("rowcount")[0].value); i++) {
+ var id = "id_" + i ;
+ var translation = "translation_" + i ;
+ var longdescription = "longdescription_" + i;
+ languages = languages + "---+++---" + document.getElementsByName( id )[0].value + "--++--" + document.getElementsByName( translation )[0].value + "--++--" + document.getElementsByName( longdescription )[0].value;
+ }
+ window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = languages;
+
+ self.close();
+ }
+ //TESSSSST-->
+ </script>
+
+</body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC *****
+
+Sub Main
+
+End Sub</script:module>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false"/>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Standard" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="Module1"/>
+</library:library>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" xlink:href="$(USER)/basic/Standard/dialog.xlb/" xlink:type="simple" library:link="false"/>
+ <library:library library:name="Launcher" xlink:href="$(INST)/share/basic/Launcher/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+</library:libraries>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
+<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <library:library library:name="Standard" xlink:href="$(USER)/basic/Standard/script.xlb/" xlink:type="simple" library:link="false"/>
+ <library:library library:name="Launcher" xlink:href="$(INST)/share/basic/Launcher/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+ <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/>
+</library:libraries>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:marker-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:marker draw:name="Linienende 1" svg:viewBox="0 0 2132 2132" svg:d="m1066 0 1066 2132h-2132z"/>
+ <draw:marker draw:name="Linienende 2" svg:viewBox="0 0 1599 2132" svg:d="m799 0 800 2132h-1599z"/>
+ <draw:marker draw:name="Linienende 3" svg:viewBox="0 0 1066 2132" svg:d="m533 0 533 2132h-1066z"/>
+ <draw:marker draw:name="Linienende 4" svg:viewBox="0 0 1995 2132" svg:d="m0 0h1995v137h-997l997 1995h-1995l998-1995h-998z"/>
+ <draw:marker draw:name="Linienende 5" svg:viewBox="0 0 1496 2132" svg:d="m0 0h1496v137h-748l748 1995h-1496l748-1995h-748z"/>
+ <draw:marker draw:name="Linienende 6" svg:viewBox="0 0 998 2132" svg:d="m0 0h998v137h-499l499 1995h-998l499-1995h-499z"/>
+ <draw:marker draw:name="Linienende 7" svg:viewBox="0 0 2132 2132" svg:d="m1066 0 1066 2132-712-272h-708l-712 272z"/>
+ <draw:marker draw:name="Linienende 8" svg:viewBox="0 0 1584 2132" svg:d="m792 0 792 2132-529-272h-526l-529 272z"/>
+ <draw:marker draw:name="Linienende 9" svg:viewBox="0 0 1057 2132" svg:d="m529 0 528 2132-353-272h-351l-353 272z"/>
+ <draw:marker draw:name="Linienende 10" svg:viewBox="0 0 2162 2560" svg:d="m1076 0 1066 2132-532-155 552 583-1086-234v0l-1076 229 179-189 179-189 179-191-537 156z"/>
+ <draw:marker draw:name="Linienende 11" svg:viewBox="0 0 2132 1146" svg:d="m1066 0 1066 1146-712-272h-708l-712 272z"/>
+ <draw:marker draw:name="Linienende 12" svg:viewBox="0 0 2132 2132" svg:d="m2132 1066c0-588-478-1066-1066-1066-588 0-1066 478-1066 1066 0 588 478 1066 1066 1066 588 0 1066-478 1066-1066z"/>
+ <draw:marker draw:name="Linienende 13" svg:viewBox="0 0 2116 2116" svg:d="m0 0h705 705 706v705 705 706h-705-705-706v-705-705z"/>
+ <draw:marker draw:name="Linienende 14" svg:viewBox="0 0 2461 2132" svg:d="m0 1066 615 1066h1231l615-1066-615-1066h-1231z"/>
+ <draw:marker draw:name="Linienende 15" svg:viewBox="0 0 1995 137" svg:d="m0 0h1995v137h-1995z"/>
+ <draw:marker draw:name="Linienende 16" svg:viewBox="0 0 1995 282" svg:d="m0 0h1995v282h-1995z"/>
+ <draw:marker draw:name="Linienende 17" svg:viewBox="0 0 1995 506" svg:d="m0 0h1995v506h-1995z"/>
+ <draw:marker draw:name="Linienende 18" svg:viewBox="0 0 966 2566" svg:d="m0 2566v0-303l488-760-485 185 581-1050-453 262 357-900-178 682 440-245-334 893 289-106 261 1044v298z"/>
+ <draw:marker draw:name="Linienende 19" svg:viewBox="0 0 2440 2584" svg:d="m982 2228h469l51-139 51 227 108-361 779 629-611-980 377 33-360-243 511-428-587 109 395-805-596 571-16-295-169 261-175-807-143 682-227-236 18 386-790-302 605 646-344 92 370 185-698 662 739-319-101 293 194-75 33 311 108-218z"/>
+ <draw:marker draw:name="Linienende 20" svg:viewBox="0 0 1169 2584" svg:d="m0 2584v-506l57-669 65 387 52-902 75 645 60-1122 116 1386 83-1803 99 1481 70-1240 47 841 82-1058 29 1725 83-1215 93 829 88-590 70 1269v542z"/>
+ <draw:marker draw:name="Linienende 21" svg:viewBox="0 0 2142 2142" svg:d="m0 1162h855l-607 607 125 123 606-608v858h176v-855l608 605 125-125-604-605h858v-178h-855l599-606-124-126-607 607v-859h-176v859l-609-607-123 125 608 607h-855z"/>
+ <draw:marker draw:name="Linienende 22" svg:viewBox="0 0 2364 2178" svg:d="m0 2065 1182-2065 1182 2063-64 112-1118-716-1118 719z"/>
+ <draw:marker draw:name="Linienende 23" svg:viewBox="0 0 1107 1619" svg:d="m547 1619-546-676-1-942 546 318 560-319 1 942z"/>
+ <draw:marker draw:name="Linienende 24" svg:viewBox="0 0 1108 993" svg:d="m609 992-123 1-486-364 486 153 2-91-488-182 1-46 485 115 2-69-487-196v-52l484 154v-59l-484-196v-159l544 218 560-219 2 159-499 196v57l499-152v52l-496 196-2 69 498-118 1 45-497 192-2 85 497-153z"/>
+</office:marker-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:marker-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:marker draw:name="Arrowhead 1" svg:viewBox="0 0 2132 2132" svg:d="m1066 0 1066 2132h-2132z"/>
+ <draw:marker draw:name="Arrowhead 2" svg:viewBox="0 0 1599 2132" svg:d="m799 0 800 2132h-1599z"/>
+ <draw:marker draw:name="Arrowhead 3" svg:viewBox="0 0 1066 2132" svg:d="m533 0 533 2132h-1066z"/>
+ <draw:marker draw:name="Arrowhead 4" svg:viewBox="0 0 1995 2132" svg:d="m0 0h1995v137h-997l997 1995h-1995l998-1995h-998z"/>
+ <draw:marker draw:name="Arrowhead 5" svg:viewBox="0 0 1496 2132" svg:d="m0 0h1496v137h-748l748 1995h-1496l748-1995h-748z"/>
+ <draw:marker draw:name="Arrowhead 6" svg:viewBox="0 0 998 2132" svg:d="m0 0h998v137h-499l499 1995h-998l499-1995h-499z"/>
+ <draw:marker draw:name="Arrowhead 7" svg:viewBox="0 0 2132 2132" svg:d="m1066 0 1066 2132-712-272h-708l-712 272z"/>
+ <draw:marker draw:name="Arrowhead 8" svg:viewBox="0 0 1584 2132" svg:d="m792 0 792 2132-529-272h-526l-529 272z"/>
+ <draw:marker draw:name="Arrowhead 9" svg:viewBox="0 0 1057 2132" svg:d="m529 0 528 2132-353-272h-351l-353 272z"/>
+ <draw:marker draw:name="Arrowhead 10" svg:viewBox="0 0 2162 2560" svg:d="m1076 0 1066 2132-532-155 552 583-1086-234v0l-1076 229 179-189 179-189 179-191-537 156z"/>
+ <draw:marker draw:name="Arrowhead 11" svg:viewBox="0 0 2132 1146" svg:d="m1066 0 1066 1146-712-272h-708l-712 272z"/>
+ <draw:marker draw:name="Arrowhead 12" svg:viewBox="0 0 2132 2132" svg:d="m2132 1066c0-588-478-1066-1066-1066-588 0-1066 478-1066 1066 0 588 478 1066 1066 1066 588 0 1066-478 1066-1066z"/>
+ <draw:marker draw:name="Arrowhead 13" svg:viewBox="0 0 2116 2116" svg:d="m0 0h705 705 706v705 705 706h-705-705-706v-705-705z"/>
+ <draw:marker draw:name="Arrowhead 14" svg:viewBox="0 0 2461 2132" svg:d="m0 1066 615 1066h1231l615-1066-615-1066h-1231z"/>
+ <draw:marker draw:name="Arrowhead 15" svg:viewBox="0 0 1995 137" svg:d="m0 0h1995v137h-1995z"/>
+ <draw:marker draw:name="Arrowhead 16" svg:viewBox="0 0 1995 282" svg:d="m0 0h1995v282h-1995z"/>
+ <draw:marker draw:name="Arrowhead 17" svg:viewBox="0 0 1995 506" svg:d="m0 0h1995v506h-1995z"/>
+ <draw:marker draw:name="Arrowhead 18" svg:viewBox="0 0 966 2566" svg:d="m0 2566v0-303l488-760-485 185 581-1050-453 262 357-900-178 682 440-245-334 893 289-106 261 1044v298z"/>
+ <draw:marker draw:name="Arrowhead 19" svg:viewBox="0 0 2440 2584" svg:d="m982 2228h469l51-139 51 227 108-361 779 629-611-980 377 33-360-243 511-428-587 109 395-805-596 571-16-295-169 261-175-807-143 682-227-236 18 386-790-302 605 646-344 92 370 185-698 662 739-319-101 293 194-75 33 311 108-218z"/>
+ <draw:marker draw:name="Arrowhead 20" svg:viewBox="0 0 1169 2584" svg:d="m0 2584v-506l57-669 65 387 52-902 75 645 60-1122 116 1386 83-1803 99 1481 70-1240 47 841 82-1058 29 1725 83-1215 93 829 88-590 70 1269v542z"/>
+ <draw:marker draw:name="Arrowhead 21" svg:viewBox="0 0 2142 2142" svg:d="m0 1162h855l-607 607 125 123 606-608v858h176v-855l608 605 125-125-604-605h858v-178h-855l599-606-124-126-607 607v-859h-176v859l-609-607-123 125 608 607h-855z"/>
+ <draw:marker draw:name="Arrowhead 22" svg:viewBox="0 0 2364 2178" svg:d="m0 2065 1182-2065 1182 2063-64 112-1118-716-1118 719z"/>
+ <draw:marker draw:name="Arrowhead 23" svg:viewBox="0 0 1107 1619" svg:d="m547 1619-546-676-1-942 546 318 560-319 1 942z"/>
+ <draw:marker draw:name="Arrowhead 24" svg:viewBox="0 0 1108 993" svg:d="m609 992-123 1-486-364 486 153 2-91-488-182 1-46 485 115 2-69-487-196v-52l484 154v-59l-484-196v-159l544 218 560-219 2 159-499 196v57l499-152v52l-496 196-2 69 498-118 1 45-497 192-2 85 497-153z"/>
+</office:marker-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:gradient-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:gradient draw:name="Vertikal 1" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal 3" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal 4" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 1" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 2" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 3" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 4" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 1r" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 2r" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 3r" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 4r" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 1l" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 2l" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 3l" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 4l" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Von einer Ecke 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Von einer Ecke 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Von einer Ecke 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Von einer Ecke 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte 2" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte 4" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 1" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 2" draw:style="radial" draw:cx="0%" draw:cy="0%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 3" draw:style="radial" draw:cx="100%" draw:cy="0%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 4" draw:style="radial" draw:cx="0%" draw:cy="100%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 5" draw:style="radial" draw:cx="100%" draw:cy="100%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal blau" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal blau" draw:style="axial" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal blau 2" draw:style="axial" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal blau 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau 3" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal blau 6" draw:style="axial" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial blau" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte blau" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte blau 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte blau 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke blau" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke blau 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke blau 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke blau 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal türkis" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal türkis " draw:style="axial" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal türkis 2" draw:style="axial" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal türkis 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis 3" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal türkis 6" draw:style="axial" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial türkis" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte türkis" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte türkis 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte türkis 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke türkis" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke türkis 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke türkis 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke türkis 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal violett" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal violett" draw:style="axial" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal violett 2" draw:style="axial" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal violett 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett 3" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal violett 6" draw:style="axial" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial violett" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte violett" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte violett 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte violett 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke violett" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke violett 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke violett 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke violett 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal orange" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal orange" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal orange 2" draw:style="axial" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal orange 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange 3" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal orange 6" draw:style="axial" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial orange" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte orange" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte orange 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte orange 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke orange" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke orange 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke orange 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke orange 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal grün" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal grün" draw:style="axial" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal grün 2" draw:style="axial" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal grün 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün 3" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal grün 6" draw:style="axial" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial grün" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte grün" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte grün 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte grün 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke grün" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke grün 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke grün 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke grün 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal rot" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal rot" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal rot 2" draw:style="axial" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertikal rot 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot 3" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal rot 6" draw:style="axial" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial rot" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte rot" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte rot 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus der Mitte rot 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke rot" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke rot 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke rot 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Aus einer Ecke rot 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+</office:gradient-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:gradient-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:gradient draw:name="Vertical 1" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical 3" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical 4" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 1" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 2" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 3" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal 4" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 1r" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 2r" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 3r" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 4r" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 1l" draw:style="linear" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 2l" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 3l" draw:style="axial" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal 4l" draw:style="axial" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle 2" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle 4" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 1" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 2" draw:style="radial" draw:cx="0%" draw:cy="0%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 3" draw:style="radial" draw:cx="100%" draw:cy="0%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 4" draw:style="radial" draw:cx="0%" draw:cy="100%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Radial 5" draw:style="radial" draw:cx="100%" draw:cy="100%" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Blue 1" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 1" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Blue 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Blue 2" draw:style="axial" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Blue 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 3" draw:style="linear" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Blue 6" draw:style="axial" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Blue" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Blue 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Blue 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#0000ff" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Blue 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Blue 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Blue 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Blue 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Blue 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Turquoise 1" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 1" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Turquoise 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Turquoise 2" draw:style="axial" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Turquoise 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 3" draw:style="linear" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Turquoise 6" draw:style="axial" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Turquoise" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Turquoise 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Turquoise 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#33a3a3" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Turquoise 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Turquoise 4" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Turquoise 1" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Turquoise 2" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Turquoise 3" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#33a3a3" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Violet 1" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 1" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Violet 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Violet 2" draw:style="axial" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Violet 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 3" draw:style="linear" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Violet 6" draw:style="axial" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Violet" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Violet 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Violet 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Violet 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Violet 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Violet 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Violet 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Violet 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#94006b" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Orange 1" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 1" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Orange 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Orange 2" draw:style="axial" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Orange 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 3" draw:style="linear" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Orange 6" draw:style="axial" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Orange" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Orange 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Orange 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ff9966" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Orange 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Orange 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Orange 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Orange 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Orange 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff9966" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Green 1" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 1" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Green 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Green 2" draw:style="axial" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Green 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 3" draw:style="linear" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Green 6" draw:style="axial" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Green" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Green 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Green 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#00ae00" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Green 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Green 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Green 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Green 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Green 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#00ae00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Red 1" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 1" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="450" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Red 1" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Horizontal Red 2" draw:style="axial" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="900" draw:border="0%"/>
+ <draw:gradient draw:name="Vertical Red 2" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 3" draw:style="linear" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 4" draw:style="linear" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 5" draw:style="axial" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Diagonal Red 6" draw:style="axial" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1350" draw:border="0%"/>
+ <draw:gradient draw:name="Radial Red" draw:style="radial" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Red 1" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Red 2" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#ff0000" draw:end-color="#000000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From the Middle, Red 3" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Red 1" draw:style="square" draw:cx="10%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Red 2" draw:style="square" draw:cx="90%" draw:cy="10%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Red 3" draw:style="square" draw:cx="10%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+ <draw:gradient draw:name="From a Corner, Red 4" draw:style="square" draw:cx="90%" draw:cy="90%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0" draw:border="0%"/>
+</office:gradient-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:color draw:name="0 0 0" draw:color="#ffffff"/>
+ <draw:color draw:name="0 20 0" draw:color="#ffccff"/>
+ <draw:color draw:name="0 40 0" draw:color="#ff99ff"/>
+ <draw:color draw:name="0 60 0" draw:color="#ff66ff"/>
+ <draw:color draw:name="0 80 0" draw:color="#ff33ff"/>
+ <draw:color draw:name="0 100 0" draw:color="#ff00ff"/>
+ <draw:color draw:name="20 0 0" draw:color="#ccffff"/>
+ <draw:color draw:name="20 20 0" draw:color="#ccccff"/>
+ <draw:color draw:name="20 40 0" draw:color="#cc99ff"/>
+ <draw:color draw:name="20 60 0" draw:color="#cc66ff"/>
+ <draw:color draw:name="20 80 0" draw:color="#cc33ff"/>
+ <draw:color draw:name="20 100 0" draw:color="#cc00ff"/>
+ <draw:color draw:name="40 0 0" draw:color="#99ffff"/>
+ <draw:color draw:name="40 20 0" draw:color="#99ccff"/>
+ <draw:color draw:name="40 40 0" draw:color="#9999ff"/>
+ <draw:color draw:name="40 60 0" draw:color="#9966ff"/>
+ <draw:color draw:name="40 80 0" draw:color="#9933ff"/>
+ <draw:color draw:name="40 100 0" draw:color="#9900ff"/>
+ <draw:color draw:name="60 0 0" draw:color="#66ffff"/>
+ <draw:color draw:name="60 20 0" draw:color="#66ccff"/>
+ <draw:color draw:name="60 40 0" draw:color="#6699ff"/>
+ <draw:color draw:name="60 60 0" draw:color="#6666ff"/>
+ <draw:color draw:name="60 80 0" draw:color="#6633ff"/>
+ <draw:color draw:name="60 100 0" draw:color="#6600ff"/>
+ <draw:color draw:name="80 0 0" draw:color="#33ffff"/>
+ <draw:color draw:name="80 20 0" draw:color="#33ccff"/>
+ <draw:color draw:name="80 40 0" draw:color="#3399ff"/>
+ <draw:color draw:name="80 60 0" draw:color="#3366ff"/>
+ <draw:color draw:name="80 80 0" draw:color="#3333ff"/>
+ <draw:color draw:name="80 100 0" draw:color="#3300ff"/>
+ <draw:color draw:name="100 0 0" draw:color="#00ffff"/>
+ <draw:color draw:name="100 20 0" draw:color="#00ccff"/>
+ <draw:color draw:name="100 40 0" draw:color="#0099ff"/>
+ <draw:color draw:name="100 60 0" draw:color="#0066ff"/>
+ <draw:color draw:name="100 80 0" draw:color="#0033ff"/>
+ <draw:color draw:name="100 100 0" draw:color="#0000ff"/>
+ <draw:color draw:name="0 0 20" draw:color="#ffffcc"/>
+ <draw:color draw:name="0 20 20" draw:color="#ffcccc"/>
+ <draw:color draw:name="0 40 20" draw:color="#ff99cc"/>
+ <draw:color draw:name="0 60 20" draw:color="#ff66cc"/>
+ <draw:color draw:name="0 80 20" draw:color="#ff33cc"/>
+ <draw:color draw:name="0 100 20" draw:color="#ff00cc"/>
+ <draw:color draw:name="20 0 20" draw:color="#ccffcc"/>
+ <draw:color draw:name="20 20 20" draw:color="#cccccc"/>
+ <draw:color draw:name="20 40 20" draw:color="#cc99cc"/>
+ <draw:color draw:name="20 60 20" draw:color="#cc66cc"/>
+ <draw:color draw:name="20 80 20" draw:color="#cc33cc"/>
+ <draw:color draw:name="20 100 20" draw:color="#cc00cc"/>
+ <draw:color draw:name="40 0 20" draw:color="#99ffcc"/>
+ <draw:color draw:name="40 20 20" draw:color="#99cccc"/>
+ <draw:color draw:name="40 40 20" draw:color="#9999cc"/>
+ <draw:color draw:name="40 60 20" draw:color="#9966cc"/>
+ <draw:color draw:name="40 80 20" draw:color="#9933cc"/>
+ <draw:color draw:name="40 100 20" draw:color="#9900cc"/>
+ <draw:color draw:name="60 0 20" draw:color="#66ffcc"/>
+ <draw:color draw:name="60 20 20" draw:color="#66cccc"/>
+ <draw:color draw:name="60 40 20" draw:color="#6699cc"/>
+ <draw:color draw:name="60 60 20" draw:color="#6666cc"/>
+ <draw:color draw:name="60 80 20" draw:color="#6633cc"/>
+ <draw:color draw:name="60 100 20" draw:color="#6600cc"/>
+ <draw:color draw:name="80 0 20" draw:color="#33ffcc"/>
+ <draw:color draw:name="80 20 20" draw:color="#33cccc"/>
+ <draw:color draw:name="80 40 20" draw:color="#3399cc"/>
+ <draw:color draw:name="80 60 20" draw:color="#3366cc"/>
+ <draw:color draw:name="80 80 20" draw:color="#3333cc"/>
+ <draw:color draw:name="80 100 20" draw:color="#3300cc"/>
+ <draw:color draw:name="100 0 20" draw:color="#00ffcc"/>
+ <draw:color draw:name="100 20 20" draw:color="#00cccc"/>
+ <draw:color draw:name="100 40 20" draw:color="#0099cc"/>
+ <draw:color draw:name="100 60 20" draw:color="#0066cc"/>
+ <draw:color draw:name="100 80 20" draw:color="#0033cc"/>
+ <draw:color draw:name="100 100 20" draw:color="#0000cc"/>
+ <draw:color draw:name="0 0 40" draw:color="#ffff99"/>
+ <draw:color draw:name="0 20 40" draw:color="#ffcc99"/>
+ <draw:color draw:name="0 40 40" draw:color="#ff9999"/>
+ <draw:color draw:name="0 60 40" draw:color="#ff6699"/>
+ <draw:color draw:name="0 80 40" draw:color="#ff3399"/>
+ <draw:color draw:name="0 100 40" draw:color="#ff0099"/>
+ <draw:color draw:name="20 0 40" draw:color="#ccff99"/>
+ <draw:color draw:name="20 20 40" draw:color="#cccc99"/>
+ <draw:color draw:name="20 40 40" draw:color="#cc9999"/>
+ <draw:color draw:name="20 60 40" draw:color="#cc6699"/>
+ <draw:color draw:name="20 80 40" draw:color="#cc3399"/>
+ <draw:color draw:name="20 100 40" draw:color="#cc0099"/>
+ <draw:color draw:name="40 0 40" draw:color="#99ff99"/>
+ <draw:color draw:name="40 20 40" draw:color="#99cc99"/>
+ <draw:color draw:name="40 40 40" draw:color="#999999"/>
+ <draw:color draw:name="40 60 40" draw:color="#996699"/>
+ <draw:color draw:name="40 80 40" draw:color="#993399"/>
+ <draw:color draw:name="40 100 40" draw:color="#990099"/>
+ <draw:color draw:name="60 0 40" draw:color="#66ff99"/>
+ <draw:color draw:name="60 20 40" draw:color="#66cc99"/>
+ <draw:color draw:name="60 40 40" draw:color="#669999"/>
+ <draw:color draw:name="60 60 40" draw:color="#666699"/>
+ <draw:color draw:name="60 80 40" draw:color="#663399"/>
+ <draw:color draw:name="60 100 40" draw:color="#660099"/>
+ <draw:color draw:name="80 0 40" draw:color="#33ff99"/>
+ <draw:color draw:name="80 20 40" draw:color="#33cc99"/>
+ <draw:color draw:name="80 40 40" draw:color="#339999"/>
+ <draw:color draw:name="80 60 40" draw:color="#336699"/>
+ <draw:color draw:name="80 80 40" draw:color="#333399"/>
+ <draw:color draw:name="80 100 40" draw:color="#330099"/>
+ <draw:color draw:name="100 0 40" draw:color="#00ff99"/>
+ <draw:color draw:name="100 20 40" draw:color="#00cc99"/>
+ <draw:color draw:name="100 40 40" draw:color="#009999"/>
+ <draw:color draw:name="100 60 40" draw:color="#006699"/>
+ <draw:color draw:name="100 80 40" draw:color="#003399"/>
+ <draw:color draw:name="100 100 40" draw:color="#000099"/>
+ <draw:color draw:name="0 0 60" draw:color="#ffff66"/>
+ <draw:color draw:name="0 20 60" draw:color="#ffcc66"/>
+ <draw:color draw:name="0 40 60" draw:color="#ff9966"/>
+ <draw:color draw:name="0 60 60" draw:color="#ff6666"/>
+ <draw:color draw:name="0 80 60" draw:color="#ff3366"/>
+ <draw:color draw:name="0 100 60" draw:color="#ff0066"/>
+ <draw:color draw:name="20 0 60" draw:color="#ccff66"/>
+ <draw:color draw:name="20 20 60" draw:color="#cccc66"/>
+ <draw:color draw:name="20 40 60" draw:color="#cc9966"/>
+ <draw:color draw:name="20 60 60" draw:color="#cc6666"/>
+ <draw:color draw:name="20 80 60" draw:color="#cc3366"/>
+ <draw:color draw:name="20 100 60" draw:color="#cc0066"/>
+ <draw:color draw:name="40 0 60" draw:color="#99ff66"/>
+ <draw:color draw:name="40 20 60" draw:color="#99cc66"/>
+ <draw:color draw:name="40 40 60" draw:color="#999966"/>
+ <draw:color draw:name="40 60 60" draw:color="#996666"/>
+ <draw:color draw:name="40 80 60" draw:color="#993366"/>
+ <draw:color draw:name="40 100 60" draw:color="#990066"/>
+ <draw:color draw:name="60 0 60" draw:color="#66ff66"/>
+ <draw:color draw:name="60 20 60" draw:color="#66cc66"/>
+ <draw:color draw:name="60 40 60" draw:color="#669966"/>
+ <draw:color draw:name="60 60 60" draw:color="#666666"/>
+ <draw:color draw:name="60 80 60" draw:color="#663366"/>
+ <draw:color draw:name="60 100 60" draw:color="#660066"/>
+ <draw:color draw:name="80 0 60" draw:color="#33ff66"/>
+ <draw:color draw:name="80 20 60" draw:color="#33cc66"/>
+ <draw:color draw:name="80 40 60" draw:color="#339966"/>
+ <draw:color draw:name="80 60 60" draw:color="#336666"/>
+ <draw:color draw:name="80 80 60" draw:color="#333366"/>
+ <draw:color draw:name="80 100 60" draw:color="#330066"/>
+ <draw:color draw:name="100 0 60" draw:color="#00ff66"/>
+ <draw:color draw:name="100 20 60" draw:color="#00cc66"/>
+ <draw:color draw:name="100 40 60" draw:color="#009966"/>
+ <draw:color draw:name="100 60 60" draw:color="#006666"/>
+ <draw:color draw:name="100 80 60" draw:color="#003366"/>
+ <draw:color draw:name="100 100 60" draw:color="#000066"/>
+ <draw:color draw:name="0 0 80" draw:color="#ffff33"/>
+ <draw:color draw:name="0 20 80" draw:color="#ffcc33"/>
+ <draw:color draw:name="0 40 80" draw:color="#ff9933"/>
+ <draw:color draw:name="0 60 80" draw:color="#ff6633"/>
+ <draw:color draw:name="0 80 80" draw:color="#ff3333"/>
+ <draw:color draw:name="0 100 80" draw:color="#ff0033"/>
+ <draw:color draw:name="20 0 80" draw:color="#ccff33"/>
+ <draw:color draw:name="20 20 80" draw:color="#cccc33"/>
+ <draw:color draw:name="20 40 80" draw:color="#cc9933"/>
+ <draw:color draw:name="20 60 80" draw:color="#cc6633"/>
+ <draw:color draw:name="20 80 80" draw:color="#cc3333"/>
+ <draw:color draw:name="20 100 80" draw:color="#cc0033"/>
+ <draw:color draw:name="40 0 80" draw:color="#99ff33"/>
+ <draw:color draw:name="40 20 80" draw:color="#99cc33"/>
+ <draw:color draw:name="40 40 80" draw:color="#999933"/>
+ <draw:color draw:name="40 60 80" draw:color="#996633"/>
+ <draw:color draw:name="40 80 80" draw:color="#993333"/>
+ <draw:color draw:name="40 100 80" draw:color="#990033"/>
+ <draw:color draw:name="60 0 80" draw:color="#66ff33"/>
+ <draw:color draw:name="60 20 80" draw:color="#66cc33"/>
+ <draw:color draw:name="60 40 80" draw:color="#669933"/>
+ <draw:color draw:name="60 60 80" draw:color="#666633"/>
+ <draw:color draw:name="60 80 80" draw:color="#663333"/>
+ <draw:color draw:name="60 100 80" draw:color="#660033"/>
+ <draw:color draw:name="80 0 80" draw:color="#33ff33"/>
+ <draw:color draw:name="80 20 80" draw:color="#33cc33"/>
+ <draw:color draw:name="80 40 80" draw:color="#339933"/>
+ <draw:color draw:name="80 60 80" draw:color="#336633"/>
+ <draw:color draw:name="80 80 80" draw:color="#333333"/>
+ <draw:color draw:name="80 100 80" draw:color="#330033"/>
+ <draw:color draw:name="100 0 80" draw:color="#00ff33"/>
+ <draw:color draw:name="100 20 80" draw:color="#00cc33"/>
+ <draw:color draw:name="100 40 80" draw:color="#009933"/>
+ <draw:color draw:name="100 60 80" draw:color="#006633"/>
+ <draw:color draw:name="100 80 80" draw:color="#003333"/>
+ <draw:color draw:name="100 100 80" draw:color="#000033"/>
+ <draw:color draw:name="0 0 100" draw:color="#ffff00"/>
+ <draw:color draw:name="0 20 100" draw:color="#ffcc00"/>
+ <draw:color draw:name="0 40 100" draw:color="#ff9900"/>
+ <draw:color draw:name="0 60 100" draw:color="#ff6600"/>
+ <draw:color draw:name="0 80 100" draw:color="#ff3300"/>
+ <draw:color draw:name="0 100 100" draw:color="#ff0000"/>
+ <draw:color draw:name="20 0 100" draw:color="#ccff00"/>
+ <draw:color draw:name="20 20 100" draw:color="#cccc00"/>
+ <draw:color draw:name="20 40 100" draw:color="#cc9900"/>
+ <draw:color draw:name="20 60 100" draw:color="#cc6600"/>
+ <draw:color draw:name="20 80 100" draw:color="#cc3300"/>
+ <draw:color draw:name="20 100 100" draw:color="#cc0000"/>
+ <draw:color draw:name="40 0 100" draw:color="#99ff00"/>
+ <draw:color draw:name="40 20 100" draw:color="#99cc00"/>
+ <draw:color draw:name="40 40 100" draw:color="#999900"/>
+ <draw:color draw:name="40 60 100" draw:color="#996600"/>
+ <draw:color draw:name="40 80 100" draw:color="#993300"/>
+ <draw:color draw:name="40 100 100" draw:color="#990000"/>
+ <draw:color draw:name="60 0 100" draw:color="#66ff00"/>
+ <draw:color draw:name="60 20 100" draw:color="#66cc00"/>
+ <draw:color draw:name="60 40 100" draw:color="#669900"/>
+ <draw:color draw:name="60 60 100" draw:color="#666600"/>
+ <draw:color draw:name="60 80 100" draw:color="#663300"/>
+ <draw:color draw:name="60 100 100" draw:color="#660000"/>
+ <draw:color draw:name="80 0 100" draw:color="#33ff00"/>
+ <draw:color draw:name="80 20 100" draw:color="#33cc00"/>
+ <draw:color draw:name="80 40 100" draw:color="#339900"/>
+ <draw:color draw:name="80 60 100" draw:color="#336600"/>
+ <draw:color draw:name="80 80 100" draw:color="#333300"/>
+ <draw:color draw:name="80 100 100" draw:color="#330000"/>
+ <draw:color draw:name="100 0 100" draw:color="#00ff00"/>
+ <draw:color draw:name="100 20 100" draw:color="#00cc00"/>
+ <draw:color draw:name="100 40 100" draw:color="#009900"/>
+ <draw:color draw:name="100 60 100" draw:color="#006600"/>
+ <draw:color draw:name="100 80 100" draw:color="#003300"/>
+ <draw:color draw:name="100 100 100" draw:color="#000000"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config">
+ <draw:color draw:name="0-0-0-0" draw:color="#ffffff"/>
+ <draw:color draw:name="0-0-0-10" draw:color="#e5e5e5"/>
+ <draw:color draw:name="0-0-0-20" draw:color="#cccccc"/>
+ <draw:color draw:name="0-0-0-30" draw:color="#b2b2b2"/>
+ <draw:color draw:name="0-0-0-40" draw:color="#999999"/>
+ <draw:color draw:name="0-0-0-50" draw:color="#7f7f7f"/>
+ <draw:color draw:name="0-0-0-60" draw:color="#666666"/>
+ <draw:color draw:name="0-0-0-70" draw:color="#4c4c4c"/>
+ <draw:color draw:name="0-0-0-80" draw:color="#333333"/>
+ <draw:color draw:name="0-0-0-100" draw:color="#000000"/>
+ <draw:color draw:name="0-0-56-0" draw:color="#ffff70"/>
+ <draw:color draw:name="0-3-85-0" draw:color="#fff726"/>
+ <draw:color draw:name="0-13-77-0" draw:color="#ffde3b"/>
+ <draw:color draw:name="0-20-100-0" draw:color="#ffcc00"/>
+ <draw:color draw:name="0-31-84-0" draw:color="#ffb029"/>
+ <draw:color draw:name="0-38-100-0" draw:color="#ff9e00"/>
+ <draw:color draw:name="0-50-100-0" draw:color="#ff7f00"/>
+ <draw:color draw:name="0-100-65-0" draw:color="#ff0059"/>
+ <draw:color draw:name="50-100-65-0" draw:color="#7f0059"/>
+ <draw:color draw:name="0-65-27-0" draw:color="#ff59ba"/>
+ <draw:color draw:name="0-20-0-0" draw:color="#ffccff"/>
+ <draw:color draw:name="0-40-0-0" draw:color="#ff99ff"/>
+ <draw:color draw:name="0-50-0-0" draw:color="#ff7fff"/>
+ <draw:color draw:name="0-66-0-0" draw:color="#ff57ff"/>
+ <draw:color draw:name="27-77-4-0" draw:color="#ba3bf5"/>
+ <draw:color draw:name="54-88-11-0" draw:color="#751fe3"/>
+ <draw:color draw:name="93-100-13-0" draw:color="#1200de"/>
+ <draw:color draw:name="100-90-10-0" draw:color="#0019fc"/>
+ <draw:color draw:name="70-50-0-0" draw:color="#4c7fff"/>
+ <draw:color draw:name="54-44-0-0" draw:color="#758fff"/>
+ <draw:color draw:name="28-25-0-0" draw:color="#b8bfff"/>
+ <draw:color draw:name="28-17-0-0" draw:color="#b8d4ff"/>
+ <draw:color draw:name="11-5-0-0" draw:color="#e3f2ff"/>
+ <draw:color draw:name="23-10-0-0" draw:color="#c4e5ff"/>
+ <draw:color draw:name="52-0-0-0" draw:color="#7affff"/>
+ <draw:color draw:name="61-6-0-0" draw:color="#63f0ff"/>
+ <draw:color draw:name="65-10-0-0" draw:color="#59e5ff"/>
+ <draw:color draw:name="76-25-0-0" draw:color="#3dbfff"/>
+ <draw:color draw:name="87-40-0-0" draw:color="#2199ff"/>
+ <draw:color draw:name="79-45-0-25" draw:color="#004cbf"/>
+ <draw:color draw:name="70-50-0-50" draw:color="#00007f"/>
+ <draw:color draw:name="23-10-0-27" draw:color="#7fa0ba"/>
+ <draw:color draw:name="38-0-42-0" draw:color="#9eff94"/>
+ <draw:color draw:name="68-1-72-0" draw:color="#52fc47"/>
+ <draw:color draw:name="70-11-64-2" draw:color="#47de57"/>
+ <draw:color draw:name="72-23-54-8" draw:color="#33b061"/>
+ <draw:color draw:name="68-1-72-50" draw:color="#007c00"/>
+ <draw:color draw:name="0-3-7-0" draw:color="#fff7ed"/>
+ <draw:color draw:name="0-7-13-0" draw:color="#ffedde"/>
+ <draw:color draw:name="3-6-14-4" draw:color="#ede6d1"/>
+ <draw:color draw:name="0-9-28-3" draw:color="#f7e0b0"/>
+ <draw:color draw:name="0-15-50-0" draw:color="#ffd97f"/>
+ <draw:color draw:name="3-16-24-4" draw:color="#edccb8"/>
+ <draw:color draw:name="0-19-53-11" draw:color="#e3b35c"/>
+ <draw:color draw:name="0-35-76-5" draw:color="#f29930"/>
+ <draw:color draw:name="9-19-46-21" draw:color="#b27f54"/>
+ <draw:color draw:name="0-38-46-49" draw:color="#82210d"/>
+ <draw:color draw:name="51-68-100-5" draw:color="#6e4300"/>
+ <draw:color draw:name="54-60-72-0" draw:color="#756647"/>
+ <draw:color draw:name="9-20-24-15" draw:color="#c2a69c"/>
+ <draw:color draw:name="9-13-16-12" draw:color="#c9bfb7"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:hatch-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:hatch draw:name="Schraffur 1" draw:style="single" draw:color="#000000" draw:distance="0.0394inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 2" draw:style="single" draw:color="#000000" draw:distance="0.0394inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 3" draw:style="single" draw:color="#000000" draw:distance="0.0394inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Schraffur 4" draw:style="single" draw:color="#000000" draw:distance="0.0787inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 5" draw:style="single" draw:color="#000000" draw:distance="0.0787inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 6" draw:style="single" draw:color="#000000" draw:distance="0.0787inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Schraffur 7" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 8" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 9" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Schraffur 10" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="100"/>
+ <draw:hatch draw:name="Schraffur 11" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="200"/>
+ <draw:hatch draw:name="Schraffur 12" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="300"/>
+ <draw:hatch draw:name="Schraffur 13" draw:style="single" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="400"/>
+ <draw:hatch draw:name="Schraffur 14" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 15" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 16" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="150"/>
+ <draw:hatch draw:name="Schraffur 17" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="300"/>
+ <draw:hatch draw:name="Schraffur 18" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 19" draw:style="double" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="110"/>
+ <draw:hatch draw:name="Schraffur 20" draw:style="double" draw:color="#000000" draw:distance="0.1575inch" draw:rotation="260"/>
+ <draw:hatch draw:name="Schraffur 21" draw:style="triple" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 22" draw:style="triple" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 23" draw:style="triple" draw:color="#000000" draw:distance="0.1181inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Schraffur 24" draw:style="triple" draw:color="#000000" draw:distance="0.1575inch" draw:rotation="220"/>
+ <draw:hatch draw:name="Schraffur 25" draw:style="triple" draw:color="#000000" draw:distance="0.1969inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Schraffur 26" draw:style="triple" draw:color="#000000" draw:distance="0.1969inch" draw:rotation="560"/>
+ <draw:hatch draw:name="Schraffur 27" draw:style="single" draw:color="#0000ff" draw:distance="0.1181inch" draw:rotation="560"/>
+ <draw:hatch draw:name="Schraffur 28" draw:style="single" draw:color="#0000ff" draw:distance="0.1181inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Schraffur 29" draw:style="single" draw:color="#0000ff" draw:distance="0.1181inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Schraffur 30" draw:style="single" draw:color="#ff0000" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 31" draw:style="double" draw:color="#ffff00" draw:distance="0.1181inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 32" draw:style="triple" draw:color="#ff00ff" draw:distance="0.1181inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Schraffur 33" draw:style="triple" draw:color="#663300" draw:distance="0.1181inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Schraffur 34" draw:style="triple" draw:color="#ff6633" draw:distance="0.1575inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Schraffur 35" draw:style="double" draw:color="#e6e64c" draw:distance="0.1575inch" draw:rotation="450"/>
+</office:hatch-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:hatch-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:hatch draw:name="Hatching 1" draw:style="single" draw:color="#000000" draw:distance="0.0402inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 2" draw:style="single" draw:color="#000000" draw:distance="0.0402inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 3" draw:style="single" draw:color="#000000" draw:distance="0.0402inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Hatching 4" draw:style="single" draw:color="#000000" draw:distance="0.0799inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 5" draw:style="single" draw:color="#000000" draw:distance="0.0799inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 6" draw:style="single" draw:color="#000000" draw:distance="0.0799inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Hatching 7" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 8" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 9" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Hatching 10" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="100"/>
+ <draw:hatch draw:name="Hatching 11" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="200"/>
+ <draw:hatch draw:name="Hatching 12" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="300"/>
+ <draw:hatch draw:name="Hatching 13" draw:style="single" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="400"/>
+ <draw:hatch draw:name="Hatching 14" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 15" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 16" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="150"/>
+ <draw:hatch draw:name="Hatching 17" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="300"/>
+ <draw:hatch draw:name="Hatching 18" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 19" draw:style="double" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="110"/>
+ <draw:hatch draw:name="Hatching 20" draw:style="double" draw:color="#000000" draw:distance="0.1598inch" draw:rotation="260"/>
+ <draw:hatch draw:name="Hatching 21" draw:style="triple" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 22" draw:style="triple" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 23" draw:style="triple" draw:color="#000000" draw:distance="0.1201inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Hatching 24" draw:style="triple" draw:color="#000000" draw:distance="0.1598inch" draw:rotation="220"/>
+ <draw:hatch draw:name="Hatching 25" draw:style="triple" draw:color="#000000" draw:distance="0.2inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Hatching 26" draw:style="triple" draw:color="#000000" draw:distance="0.2inch" draw:rotation="560"/>
+ <draw:hatch draw:name="Hatching 27" draw:style="single" draw:color="#0000ff" draw:distance="0.1201inch" draw:rotation="560"/>
+ <draw:hatch draw:name="Hatching 28" draw:style="single" draw:color="#0000ff" draw:distance="0.1201inch" draw:rotation="0"/>
+ <draw:hatch draw:name="Hatching 29" draw:style="single" draw:color="#0000ff" draw:distance="0.1201inch" draw:rotation="900"/>
+ <draw:hatch draw:name="Hatching 30" draw:style="single" draw:color="#ff0000" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 31" draw:style="double" draw:color="#ffff00" draw:distance="0.1201inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 32" draw:style="triple" draw:color="#ff00ff" draw:distance="0.1201inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Hatching 33" draw:style="triple" draw:color="#663300" draw:distance="0.1201inch" draw:rotation="650"/>
+ <draw:hatch draw:name="Hatching 34" draw:style="triple" draw:color="#ff6633" draw:distance="0.1614inch" draw:rotation="450"/>
+ <draw:hatch draw:name="Hatching 35" draw:style="double" draw:color="#e6e64c" draw:distance="0.1614inch" draw:rotation="450"/>
+</office:hatch-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:color draw:name="white FFFFFF 255.255.255" draw:color="#ffffff"/>
+ <draw:color draw:name="ghostwhite F8F8FF 248.248.255" draw:color="#f8f8ff"/>
+ <draw:color draw:name="whitesmoke F5F5F5 245.245.245" draw:color="#f5f5f5"/>
+ <draw:color draw:name="snow FFFAFA 255.250.250" draw:color="#fffafa"/>
+ <draw:color draw:name="azure F0FFFF 240.255.255" draw:color="#f0ffff"/>
+ <draw:color draw:name="honeydew F0FFF0 240.255.240" draw:color="#f0fff0"/>
+ <draw:color draw:name="mintcream F5FFFA 245.255.250" draw:color="#f5fffa"/>
+ <draw:color draw:name="lightyellow FFFFE0 255.255.224" draw:color="#ffffe0"/>
+ <draw:color draw:name="floralwhite FFFAF0 255.250.240" draw:color="#fffaf0"/>
+ <draw:color draw:name="ivory FFFFF0 255.255.240" draw:color="#fffff0"/>
+ <draw:color draw:name="linen FAF0E6 250.240.230" draw:color="#faf0e6"/>
+ <draw:color draw:name="oldlace FDF5E6 253.245.230" draw:color="#fdf5e6"/>
+ <draw:color draw:name="seashell FFF5EE 255.245.238" draw:color="#fff5ed"/>
+ <draw:color draw:name="lavenderblush FFF0F5 255.240.245" draw:color="#fff0f5"/>
+ <draw:color draw:name="lavender E6E6FA 230.230.250" draw:color="#e6e6fa"/>
+ <draw:color draw:name="gainsboro DCDCDC 220.220.220" draw:color="#dcdcdc"/>
+ <draw:color draw:name="lightgrey D3D3D3 211.211.211" draw:color="#d3d3d3"/>
+ <draw:color draw:name="silver C0C0C0 192.192.192" draw:color="#c0c0c0"/>
+ <draw:color draw:name="darkgray A9A9A9 169.169.169" draw:color="#a9a9a9"/>
+ <draw:color draw:name="lightslategray 778899 119.136.153" draw:color="#778899"/>
+ <draw:color draw:name="slategray 708090 112.128.144" draw:color="#708090"/>
+ <draw:color draw:name="gray 808080 128.128.128" draw:color="#808080"/>
+ <draw:color draw:name="dimgray 696969 105.105.105" draw:color="#696969"/>
+ <draw:color draw:name="black 000000 0.0.0" draw:color="#000000"/>
+ <draw:color draw:name="bisque FFE4C4 255.228.196" draw:color="#ffe4c4"/>
+ <draw:color draw:name="wheat F5DEB3 245.222.179" draw:color="#f5deb3"/>
+ <draw:color draw:name="moccasin FFE4B5 255.228.181" draw:color="#ffe4b5"/>
+ <draw:color draw:name="peachpuff FFDAB9 255.218.185" draw:color="#ffdab9"/>
+ <draw:color draw:name="mistyrose FFE4E1 255.228.225" draw:color="#ffe4e1"/>
+ <draw:color draw:name="pink FFC0CB 255.192.203" draw:color="#ffc0cb"/>
+ <draw:color draw:name="lightpink FFB6C1 255.182.193" draw:color="#ffb6c1"/>
+ <draw:color draw:name="rosybrown BC8F8F 188.143.143" draw:color="#bc8f8f"/>
+ <draw:color draw:name="coral FF7F50 255.127.80" draw:color="#ff7f50"/>
+ <draw:color draw:name="tomato FF6347 255.99.71" draw:color="#ff6347"/>
+ <draw:color draw:name="orangered FF4500 255.69.0" draw:color="#ff4200"/>
+ <draw:color draw:name="red FF0000 255.0.0" draw:color="#ff0000"/>
+ <draw:color draw:name="crimson DC143C 220.20.60" draw:color="#dc143c"/>
+ <draw:color draw:name="indianred CD5C5C 205.92.92" draw:color="#cd5c5c"/>
+ <draw:color draw:name="firebrick B22222 178.34.34" draw:color="#b22222"/>
+ <draw:color draw:name="darkred 8B0000 139.0.0" draw:color="#8b0000"/>
+ <draw:color draw:name="maroon 800000 128.0.0" draw:color="#800000"/>
+ <draw:color draw:name="brown A52A2A 165.42.42" draw:color="#a52a2a"/>
+ <draw:color draw:name="saddlebrown 8B4513 139.69.19" draw:color="#8b4513"/>
+ <draw:color draw:name="sienna A0522D 160.82.45" draw:color="#a0522d"/>
+ <draw:color draw:name="chocolate D2691E 210.105.30" draw:color="#d2691e"/>
+ <draw:color draw:name="darkorange FF8C00 255.140.0" draw:color="#ff8c00"/>
+ <draw:color draw:name="orange FFA500 255.165.0" draw:color="#ffa500"/>
+ <draw:color draw:name="lightsalmon FFA07A 255.160.122" draw:color="#ffa07a"/>
+ <draw:color draw:name="darksalmon E9967A 233.150.122" draw:color="#e9967a"/>
+ <draw:color draw:name="salmon FA8072 250.128.114" draw:color="#fa8072"/>
+ <draw:color draw:name="sandybrown F4A460 244.164.96" draw:color="#f4a460"/>
+ <draw:color draw:name="navajowhite FFDEAD 255.222.173" draw:color="#ffdead"/>
+ <draw:color draw:name="blanchedalmond FFEBCD 255.235.205" draw:color="#ffebcd"/>
+ <draw:color draw:name="papayawhip FFEFD5 255.239.213" draw:color="#ffefd5"/>
+ <draw:color draw:name="antiquewhite FAEBD7 250.235.215" draw:color="#faebd7"/>
+ <draw:color draw:name="beige F5F5DC 245.245.220" draw:color="#f5f5dc"/>
+ <draw:color draw:name="cornsilk FFF8DC 255.248.220" draw:color="#fff8dc"/>
+ <draw:color draw:name="palegoldenrod EEE8AA 238.232.170" draw:color="#eee8aa"/>
+ <draw:color draw:name="khaki F0E68C 240.230.140" draw:color="#f0e68c"/>
+ <draw:color draw:name="yellow FFFF00 255.255.0" draw:color="#ffff00"/>
+ <draw:color draw:name="gold FFD700 255.215.0" draw:color="#ffd700"/>
+ <draw:color draw:name="darkgoldenrod B8860B 184.134.11" draw:color="#b8860a"/>
+ <draw:color draw:name="peru CD853F 205.133.63" draw:color="#cd853f"/>
+ <draw:color draw:name="goldenrod DAA520 218.165.32" draw:color="#daa520"/>
+ <draw:color draw:name="tan D2B48C 210.180.140" draw:color="#d2b48c"/>
+ <draw:color draw:name="burlywood DEB887 222.184.135" draw:color="#deb887"/>
+ <draw:color draw:name="darkkhaki BDB76B 189.183.107" draw:color="#bdb76b"/>
+ <draw:color draw:name="chartreuse 7FFF00 127.255.0" draw:color="#7fff00"/>
+ <draw:color draw:name="greenyellow ADFF2F 173.255.47" draw:color="#adff2f"/>
+ <draw:color draw:name="lawngreen 7CFC00 124.252.0" draw:color="#7cfc00"/>
+ <draw:color draw:name="lime 00FF00 0.255.0" draw:color="#00ff00"/>
+ <draw:color draw:name="springgreen 00FF7F 0.255.127" draw:color="#00ff7f"/>
+ <draw:color draw:name="palegreen 98FB98 152.251.152" draw:color="#98fb98"/>
+ <draw:color draw:name="mediumspringgreen 00FA9A 0.250.154" draw:color="#00fa9a"/>
+ <draw:color draw:name="limegreen 32CD32 50.205.50" draw:color="#32cd32"/>
+ <draw:color draw:name="mediumseagreen 3CB371 60.179.113" draw:color="#3cb371"/>
+ <draw:color draw:name="yellowgreen/aliceblue 9ACD32 154.205.50" draw:color="#9acd32"/>
+ <draw:color draw:name="mediumaquamarine 66CDAA 102.205.170" draw:color="#66cdaa"/>
+ <draw:color draw:name="darkseagreen 8FBC8F 143.188.143" draw:color="#8fbc8f"/>
+ <draw:color draw:name="forestgreen 228B22 34.139.34" draw:color="#228b22"/>
+ <draw:color draw:name="green 008000 0.128.0" draw:color="#008000"/>
+ <draw:color draw:name="seagreen 2E8B57 46.139.87" draw:color="#2e8b57"/>
+ <draw:color draw:name="olive 808000 128.128.0" draw:color="#808000"/>
+ <draw:color draw:name="olivedrab 6B8E23 107.142.35" draw:color="#6b8e23"/>
+ <draw:color draw:name="darkgreen 006400 0.100.0" draw:color="#006400"/>
+ <draw:color draw:name="darkslategray 2F4F4F 47.79.79" draw:color="#2f4f4f"/>
+ <draw:color draw:name="darkolivegreen 556B2F 85.107.47" draw:color="#556b2f"/>
+ <draw:color draw:name="aquamarine 7FFFD4 127.255.212" draw:color="#7fffd4"/>
+ <draw:color draw:name="aqua/cyan 00FFFF 0.255.255" draw:color="#00ffff"/>
+ <draw:color draw:name="paleturquoise AFEEEE 175.238.238" draw:color="#afeeee"/>
+ <draw:color draw:name="turquoise 40E0D0 64.224.208" draw:color="#40e0d0"/>
+ <draw:color draw:name="mediumturquoise 48D1CC 72.209.204" draw:color="#48d1cc"/>
+ <draw:color draw:name="darkturquoise 00CED1 0.206.209" draw:color="#00ced1"/>
+ <draw:color draw:name="lightseagreen 20B2AA 32.178.170" draw:color="#20b2aa"/>
+ <draw:color draw:name="cadetblue 5F9EA0 95.158.160" draw:color="#5f9ea0"/>
+ <draw:color draw:name="teal 008080 0.128.128" draw:color="#008080"/>
+ <draw:color draw:name="darkcyan 008B8B 0.139.139" draw:color="#008b8b"/>
+ <draw:color draw:name="steelblue 4682B4 70.130.180" draw:color="#4682b4"/>
+ <draw:color draw:name="deepskyblue 00BFFF 0.191.255" draw:color="#00bfff"/>
+ <draw:color draw:name="lightskyblue 87CEFA 135.206.250" draw:color="#87cefa"/>
+ <draw:color draw:name="lightsteelblue B0C4DE 176.196.222" draw:color="#b0c4de"/>
+ <draw:color draw:name="powderblue B0E0E6 176.224.230" draw:color="#b0e0e6"/>
+ <draw:color draw:name="skyblue 87CEEB 135.206.235" draw:color="#87ceeb"/>
+ <draw:color draw:name="cornflowerblue 6495ED 100.149.237" draw:color="#6395ed"/>
+ <draw:color draw:name="dodgerblue 1E90FF 30.144.255" draw:color="#1e90ff"/>
+ <draw:color draw:name="mediumslateblue 7B68EE 123.104.238" draw:color="#7b68ee"/>
+ <draw:color draw:name="slateblue 6A5ACD 106.90.205" draw:color="#6a5acd"/>
+ <draw:color draw:name="royalblue 4169E1 65.105.225" draw:color="#4169e1"/>
+ <draw:color draw:name="blue 0000FF 0.0.255" draw:color="#0000ff"/>
+ <draw:color draw:name="mediumblue 0000CD 0.0.205" draw:color="#0000cd"/>
+ <draw:color draw:name="darkslateblue 483D8B 72.61.139" draw:color="#483d8b"/>
+ <draw:color draw:name="navy 000080 0.0.128" draw:color="#000080"/>
+ <draw:color draw:name="darkblue 00008B 0.0.139" draw:color="#00008b"/>
+ <draw:color draw:name="midnightblue 191970 25.25.112" draw:color="#191970"/>
+ <draw:color draw:name="indigo 4B0082 75.0.130" draw:color="#4b0082"/>
+ <draw:color draw:name="blueviolet 8A2BE2 138.43.226" draw:color="#8a2be2"/>
+ <draw:color draw:name="darkorchid 9932CC 153.50.204" draw:color="#9932cc"/>
+ <draw:color draw:name="darkviolet 9400D3 148.0.211" draw:color="#9400d3"/>
+ <draw:color draw:name="mediumpurple 9370DB 147.112.219" draw:color="#9370db"/>
+ <draw:color draw:name="orchid DA70D6 218.112.214" draw:color="#da70d6"/>
+ <draw:color draw:name="mediumorchid BA55D3 186.85.211" draw:color="#ba55d3"/>
+ <draw:color draw:name="fuchsia/magenta FF00FF 255.0.255" draw:color="#ff00ff"/>
+ <draw:color draw:name="hotpink FF69B4 255.105.180" draw:color="#ff69b4"/>
+ <draw:color draw:name="violet EE82EE 238.130.238" draw:color="#ee82ee"/>
+ <draw:color draw:name="thistle D8BFD8 216.191.216" draw:color="#d8bfd8"/>
+ <draw:color draw:name="plum DDA0DD 221.160.221" draw:color="#dda0dd"/>
+ <draw:color draw:name="palevioletred DB7093 219.112.147" draw:color="#db7093"/>
+ <draw:color draw:name="deeppink FF1493 255.20.147" draw:color="#ff1493"/>
+ <draw:color draw:name="mediumvioletred C71585 199.21.133" draw:color="#c71585"/>
+ <draw:color draw:name="purple 800080 128.0.128" draw:color="#800080"/>
+ <draw:color draw:name="darkmagenta 8B008B 139.0.139" draw:color="#8c008c"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--This is a generated file. Do not alter this file!-->
+<java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<enabled xsi:nil="true"/>
+<userClassPath xsi:nil="true"/>
+<vmParameters xsi:nil="true"/>
+<jreLocations xsi:nil="true"/>
+<javaInfo xsi:nil="false" vendorUpdate="2004-01-30" autoSelect="true">
+<vendor>Sun Microsystems Inc.</vendor>
+<location>file:///usr/local/j2sdk1.4.2_05/jre</location>
+<version>1.4.2_05</version>
+<features>0</features>
+<requirements>1</requirements>
+<vendorData>660069006C0065003A002F002F002F007500730072002F006C006F00630061006C002F006A003200730064006B0031002E0034002E0032005F00300035002F006A00720065002F006C00690062002F0069003300380036002F0063006C00690065006E0074002F006C00690062006A0076006D002E0073006F000A002F007500730072002F006C006F00630061006C002F006A003200730064006B0031002E0034002E0032005F00300035002F006A00720065002F006C00690062002F0069003300380036002F0063006C00690065006E0074003A002F007500730072002F006C006F00630061006C002F006A003200730064006B0031002E0034002E0032005F00300035002F006A00720065002F006C00690062002F0069003300380036002F006E00610074006900760065005F0074006800720065006100640073003A002F007500730072002F006C006F00630061006C002F006A003200730064006B0031002E0034002E0032005F00300035002F006A00720065002F006C00690062002F0069003300380036000A00</vendorData>
+</javaInfo>
+</java>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:gradient-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:gradient draw:name="Farbverlauf 1" draw:style="linear" draw:start-color="#00ff00" draw:end-color="#00ffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="600" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 2" draw:style="linear" draw:start-color="#00ffff" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="600" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 3" draw:style="linear" draw:start-color="#00ffff" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2250" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 4" draw:style="square" draw:cx="40%" draw:cy="50%" draw:start-color="#000080" draw:end-color="#e6e6ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="3290" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 5" draw:style="radial" draw:cx="40%" draw:cy="50%" draw:start-color="#00ffff" draw:end-color="#4700b8" draw:start-intensity="85%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 6" draw:style="radial" draw:cx="70%" draw:cy="65%" draw:start-color="#000080" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 7" draw:style="square" draw:cx="70%" draw:cy="80%" draw:start-color="#280099" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 8" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 9" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 10" draw:style="radial" draw:cx="60%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff6633" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 11" draw:style="square" draw:cx="75%" draw:cy="70%" draw:start-color="#6b6b94" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="70%"/>
+ <draw:gradient draw:name="Farbverlauf 12" draw:style="square" draw:cx="75%" draw:cy="70%" draw:start-color="#fa1e42" draw:end-color="#663300" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 13" draw:style="radial" draw:cx="20%" draw:cy="20%" draw:start-color="#800080" draw:end-color="#000080" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 14" draw:style="ellipsoid" draw:cx="50%" draw:cy="50%" draw:start-color="#004a4a" draw:end-color="#23dcdc" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="20%"/>
+ <draw:gradient draw:name="Farbverlauf 15" draw:style="ellipsoid" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 16" draw:style="radial" draw:cx="40%" draw:cy="80%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="15%"/>
+ <draw:gradient draw:name="Farbverlauf 17" draw:style="radial" draw:cx="75%" draw:cy="80%" draw:start-color="#ffff00" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Farbverlauf 18" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1490" draw:border="15%"/>
+ <draw:gradient draw:name="Farbverlauf 19" draw:style="square" draw:cx="60%" draw:cy="70%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 20" draw:style="radial" draw:cx="40%" draw:cy="80%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="55%" draw:end-intensity="100%" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 21" draw:style="rectangular" draw:cx="20%" draw:cy="60%" draw:start-color="#e12e2e" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="90%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 22" draw:style="axial" draw:start-color="#c0c0c0" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="90%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 23" draw:style="square" draw:cx="20%" draw:cy="60%" draw:start-color="#333333" draw:end-color="#fa1e42" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2090" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 24" draw:style="square" draw:cx="20%" draw:cy="70%" draw:start-color="#0000ff" draw:end-color="#5e11a6" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2090" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 25" draw:style="rectangular" draw:cx="70%" draw:cy="60%" draw:start-color="#0000ff" draw:end-color="#5e11a6" draw:start-intensity="100%" draw:end-intensity="80%" draw:angle="750" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 26" draw:style="rectangular" draw:cx="50%" draw:cy="30%" draw:start-color="#c0c0c0" draw:end-color="#333333" draw:start-intensity="100%" draw:end-intensity="60%" draw:angle="900" draw:border="40%"/>
+ <draw:gradient draw:name="Farbverlauf 27" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#333333" draw:start-intensity="100%" draw:end-intensity="60%" draw:angle="0" draw:border="0%"/>
+</office:gradient-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:gradient-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:gradient draw:name="Gradient 1" draw:style="linear" draw:start-color="#00ff00" draw:end-color="#00ffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="600" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 2" draw:style="linear" draw:start-color="#00ffff" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="600" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 3" draw:style="linear" draw:start-color="#00ffff" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2250" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 4" draw:style="square" draw:cx="40%" draw:cy="50%" draw:start-color="#000080" draw:end-color="#e6e6ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="3290" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 5" draw:style="radial" draw:cx="40%" draw:cy="50%" draw:start-color="#00ffff" draw:end-color="#4700b8" draw:start-intensity="85%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 6" draw:style="radial" draw:cx="70%" draw:cy="65%" draw:start-color="#000080" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 7" draw:style="square" draw:cx="70%" draw:cy="80%" draw:start-color="#280099" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 8" draw:style="rectangular" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 9" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#94006b" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 10" draw:style="radial" draw:cx="60%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#ff6633" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 11" draw:style="square" draw:cx="75%" draw:cy="70%" draw:start-color="#6b6b94" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="70%"/>
+ <draw:gradient draw:name="Gradient 12" draw:style="square" draw:cx="75%" draw:cy="70%" draw:start-color="#fa1e42" draw:end-color="#663300" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 13" draw:style="radial" draw:cx="20%" draw:cy="20%" draw:start-color="#800080" draw:end-color="#000080" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 14" draw:style="ellipsoid" draw:cx="50%" draw:cy="50%" draw:start-color="#004a4a" draw:end-color="#23dcdc" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="20%"/>
+ <draw:gradient draw:name="Gradient 15" draw:style="ellipsoid" draw:cx="50%" draw:cy="50%" draw:start-color="#000000" draw:end-color="#0000ff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1640" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 16" draw:style="radial" draw:cx="40%" draw:cy="80%" draw:start-color="#000000" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="15%"/>
+ <draw:gradient draw:name="Gradient 17" draw:style="radial" draw:cx="75%" draw:cy="80%" draw:start-color="#ffff00" draw:end-color="#ff0000" draw:start-intensity="100%" draw:end-intensity="100%" draw:border="0%"/>
+ <draw:gradient draw:name="Gradient 18" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1490" draw:border="15%"/>
+ <draw:gradient draw:name="Gradient 19" draw:style="square" draw:cx="60%" draw:cy="70%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 20" draw:style="radial" draw:cx="40%" draw:cy="80%" draw:start-color="#b84700" draw:end-color="#ffff00" draw:start-intensity="55%" draw:end-intensity="100%" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 21" draw:style="rectangular" draw:cx="20%" draw:cy="60%" draw:start-color="#e12e2e" draw:end-color="#ffff00" draw:start-intensity="100%" draw:end-intensity="90%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 22" draw:style="axial" draw:start-color="#c0c0c0" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="90%" draw:angle="1490" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 23" draw:style="square" draw:cx="20%" draw:cy="60%" draw:start-color="#333333" draw:end-color="#fa1e42" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2090" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 24" draw:style="square" draw:cx="20%" draw:cy="70%" draw:start-color="#0000ff" draw:end-color="#5e11a6" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="2090" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 25" draw:style="rectangular" draw:cx="70%" draw:cy="60%" draw:start-color="#0000ff" draw:end-color="#5e11a6" draw:start-intensity="100%" draw:end-intensity="80%" draw:angle="750" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 26" draw:style="rectangular" draw:cx="50%" draw:cy="30%" draw:start-color="#c0c0c0" draw:end-color="#333333" draw:start-intensity="100%" draw:end-intensity="60%" draw:angle="900" draw:border="40%"/>
+ <draw:gradient draw:name="Gradient 27" draw:style="square" draw:cx="50%" draw:cy="50%" draw:start-color="#ffffff" draw:end-color="#333333" draw:start-intensity="100%" draw:end-intensity="60%" draw:angle="0" draw:border="0%"/>
+</office:gradient-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:color draw:name="0%0%0%" draw:color="#000000"/>
+ <draw:color draw:name="10%10%10%" draw:color="#191919"/>
+ <draw:color draw:name="20%20%20" draw:color="#333333"/>
+ <draw:color draw:name="30%30%30%" draw:color="#4c4c4c"/>
+ <draw:color draw:name="40%40%40%" draw:color="#666666"/>
+ <draw:color draw:name="50%50%50" draw:color="#808080"/>
+ <draw:color draw:name="60%60%60%" draw:color="#999999"/>
+ <draw:color draw:name="70%70%70%" draw:color="#b3b3b3"/>
+ <draw:color draw:name="0%0%50%" draw:color="#000080"/>
+ <draw:color draw:name="0%50%0%" draw:color="#008000"/>
+ <draw:color draw:name="50%0%0%" draw:color="#800000"/>
+ <draw:color draw:name="100%100%0%" draw:color="#ffff00"/>
+ <draw:color draw:name="100%40%0%" draw:color="#ff6600"/>
+ <draw:color draw:name="100%0%0%" draw:color="#ff0000"/>
+ <draw:color draw:name="86%14%0%" draw:color="#dc2300"/>
+ <draw:color draw:name="72%28%0%" draw:color="#b84700"/>
+ <draw:color draw:name="63%37%0%" draw:color="#946b00"/>
+ <draw:color draw:name="42%58%0%" draw:color="#6b9400"/>
+ <draw:color draw:name="28%72%0%" draw:color="#47b800"/>
+ <draw:color draw:name="14%86%0%" draw:color="#23dc00"/>
+ <draw:color draw:name="0%100%0%" draw:color="#00ff00"/>
+ <draw:color draw:name="86%0%14%" draw:color="#dc0023"/>
+ <draw:color draw:name="86%14%14%" draw:color="#b82323"/>
+ <draw:color draw:name="72%28%14%" draw:color="#b84723"/>
+ <draw:color draw:name="58%42%14% " draw:color="#946b23"/>
+ <draw:color draw:name="42%58%14% " draw:color="#6b9423"/>
+ <draw:color draw:name="28%72%14% " draw:color="#47b823"/>
+ <draw:color draw:name="14%86%14%" draw:color="#23dc23"/>
+ <draw:color draw:name="14%86%14%" draw:color="#23dc23"/>
+ <draw:color draw:name="72%0%28%" draw:color="#b80047"/>
+ <draw:color draw:name="58%14%28%" draw:color="#b82347"/>
+ <draw:color draw:name="72%28%28%" draw:color="#b84747"/>
+ <draw:color draw:name="58%42%28%" draw:color="#946b47"/>
+ <draw:color draw:name="42%58%28%" draw:color="#6b9447"/>
+ <draw:color draw:name="28%72%28%" draw:color="#47b847"/>
+ <draw:color draw:name="14%86%28%" draw:color="#23dc47"/>
+ <draw:color draw:name="28%72%28%" draw:color="#47b847"/>
+ <draw:color draw:name="58%0%42%" draw:color="#94006b"/>
+ <draw:color draw:name="58%14%42%" draw:color="#94236b"/>
+ <draw:color draw:name="58%28%42%" draw:color="#94476b"/>
+ <draw:color draw:name="58%42%42%" draw:color="#946b6b"/>
+ <draw:color draw:name="42%58%42%" draw:color="#6b946b"/>
+ <draw:color draw:name="28%72%42%" draw:color="#47b86b"/>
+ <draw:color draw:name="14%86%42%" draw:color="#23dc6b"/>
+ <draw:color draw:name="42%58%42% 1" draw:color="#6bff6b"/>
+ <draw:color draw:name="42%0%58%" draw:color="#6b0094"/>
+ <draw:color draw:name="42%14%58%" draw:color="#6b2394"/>
+ <draw:color draw:name="42%28%58%" draw:color="#6b4794"/>
+ <draw:color draw:name="42%42%58%" draw:color="#6b6b94"/>
+ <draw:color draw:name="42%58%58%" draw:color="#6b9494"/>
+ <draw:color draw:name="28%72%58%" draw:color="#47b894"/>
+ <draw:color draw:name="14%86%58%" draw:color="#23dc94"/>
+ <draw:color draw:name="58%42%58%" draw:color="#94ff94"/>
+ <draw:color draw:name="28%0%72%" draw:color="#4700b8"/>
+ <draw:color draw:name="28%14%72%" draw:color="#4723b8"/>
+ <draw:color draw:name="28%28%72%" draw:color="#4747b8"/>
+ <draw:color draw:name="28%42%72%" draw:color="#476bb8"/>
+ <draw:color draw:name="28%58%72%" draw:color="#4794b8"/>
+ <draw:color draw:name="28%72%72%" draw:color="#47b8b8"/>
+ <draw:color draw:name="14%86%72%" draw:color="#23dcb8"/>
+ <draw:color draw:name="72%100%72%" draw:color="#b8ffb8"/>
+ <draw:color draw:name="14%0%86%" draw:color="#2300dc"/>
+ <draw:color draw:name="14%14%86%" draw:color="#2323dc"/>
+ <draw:color draw:name="14%28%86%" draw:color="#2347dc"/>
+ <draw:color draw:name="14%42%86%" draw:color="#236bdc"/>
+ <draw:color draw:name="14%58%86%" draw:color="#2394dc"/>
+ <draw:color draw:name="14%72%86%" draw:color="#23b8dc"/>
+ <draw:color draw:name="14%86%86%" draw:color="#23dcdc"/>
+ <draw:color draw:name="86%100%86%" draw:color="#dcffdc"/>
+ <draw:color draw:name="0%0%100%" draw:color="#0000ff"/>
+ <draw:color draw:name="0%14%100%" draw:color="#0023ff"/>
+ <draw:color draw:name="0%28%100%" draw:color="#0047ff"/>
+ <draw:color draw:name="0%42%100%" draw:color="#006bff"/>
+ <draw:color draw:name="0%58%100%" draw:color="#0094ff"/>
+ <draw:color draw:name="0%72%100%" draw:color="#00b8ff"/>
+ <draw:color draw:name="0%86%100%" draw:color="#00dcff"/>
+ <draw:color draw:name="100%100%100%" draw:color="#ffffff"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:color draw:name="0%0%0%" draw:color="#000000"/>
+ <draw:color draw:name="10%10%10%" draw:color="#191919"/>
+ <draw:color draw:name="20%20%20" draw:color="#333333"/>
+ <draw:color draw:name="30%30%30%" draw:color="#4c4c4c"/>
+ <draw:color draw:name="40%40%40%" draw:color="#666666"/>
+ <draw:color draw:name="50%50%50" draw:color="#808080"/>
+ <draw:color draw:name="60%60%60%" draw:color="#999999"/>
+ <draw:color draw:name="70%70%70%" draw:color="#b3b3b3"/>
+ <draw:color draw:name="0%0%50%" draw:color="#000080"/>
+ <draw:color draw:name="0%50%0%" draw:color="#008000"/>
+ <draw:color draw:name="50%0%0%" draw:color="#800000"/>
+ <draw:color draw:name="100%100%0%" draw:color="#ffff00"/>
+ <draw:color draw:name="100%40%0%" draw:color="#ff6600"/>
+ <draw:color draw:name="100%0%0%" draw:color="#ff0000"/>
+ <draw:color draw:name="86%14%0%" draw:color="#dc2300"/>
+ <draw:color draw:name="72%28%0%" draw:color="#b84700"/>
+ <draw:color draw:name="63%37%0%" draw:color="#946b00"/>
+ <draw:color draw:name="42%58%0%" draw:color="#6b9400"/>
+ <draw:color draw:name="28%72%0%" draw:color="#47b800"/>
+ <draw:color draw:name="14%86%0%" draw:color="#23dc00"/>
+ <draw:color draw:name="0%100%0%" draw:color="#00ff00"/>
+ <draw:color draw:name="86%0%14%" draw:color="#dc0023"/>
+ <draw:color draw:name="86%14%14%" draw:color="#b82323"/>
+ <draw:color draw:name="72%28%14%" draw:color="#b84723"/>
+ <draw:color draw:name="58%42%14% " draw:color="#946b23"/>
+ <draw:color draw:name="42%58%14% " draw:color="#6b9423"/>
+ <draw:color draw:name="28%72%14% " draw:color="#47b823"/>
+ <draw:color draw:name="14%86%14%" draw:color="#23dc23"/>
+ <draw:color draw:name="14%86%14%" draw:color="#23dc23"/>
+ <draw:color draw:name="72%0%28%" draw:color="#b80047"/>
+ <draw:color draw:name="58%14%28%" draw:color="#b82347"/>
+ <draw:color draw:name="72%28%28%" draw:color="#b84747"/>
+ <draw:color draw:name="58%42%28%" draw:color="#946b47"/>
+ <draw:color draw:name="42%58%28%" draw:color="#6b9447"/>
+ <draw:color draw:name="28%72%28%" draw:color="#47b847"/>
+ <draw:color draw:name="14%86%28%" draw:color="#23dc47"/>
+ <draw:color draw:name="28%72%28%" draw:color="#47b847"/>
+ <draw:color draw:name="58%0%42%" draw:color="#94006b"/>
+ <draw:color draw:name="58%14%42%" draw:color="#94236b"/>
+ <draw:color draw:name="58%28%42%" draw:color="#94476b"/>
+ <draw:color draw:name="58%42%42%" draw:color="#946b6b"/>
+ <draw:color draw:name="42%58%42%" draw:color="#6b946b"/>
+ <draw:color draw:name="28%72%42%" draw:color="#47b86b"/>
+ <draw:color draw:name="14%86%42%" draw:color="#23dc6b"/>
+ <draw:color draw:name="42%58%42% 1" draw:color="#6bff6b"/>
+ <draw:color draw:name="42%0%58%" draw:color="#6b0094"/>
+ <draw:color draw:name="42%14%58%" draw:color="#6b2394"/>
+ <draw:color draw:name="42%28%58%" draw:color="#6b4794"/>
+ <draw:color draw:name="42%42%58%" draw:color="#6b6b94"/>
+ <draw:color draw:name="42%58%58%" draw:color="#6b9494"/>
+ <draw:color draw:name="28%72%58%" draw:color="#47b894"/>
+ <draw:color draw:name="14%86%58%" draw:color="#23dc94"/>
+ <draw:color draw:name="58%42%58%" draw:color="#94ff94"/>
+ <draw:color draw:name="28%0%72%" draw:color="#4700b8"/>
+ <draw:color draw:name="28%14%72%" draw:color="#4723b8"/>
+ <draw:color draw:name="28%28%72%" draw:color="#4747b8"/>
+ <draw:color draw:name="28%42%72%" draw:color="#476bb8"/>
+ <draw:color draw:name="28%58%72%" draw:color="#4794b8"/>
+ <draw:color draw:name="28%72%72%" draw:color="#47b8b8"/>
+ <draw:color draw:name="14%86%72%" draw:color="#23dcb8"/>
+ <draw:color draw:name="72%100%72%" draw:color="#b8ffb8"/>
+ <draw:color draw:name="14%0%86%" draw:color="#2300dc"/>
+ <draw:color draw:name="14%14%86%" draw:color="#2323dc"/>
+ <draw:color draw:name="14%28%86%" draw:color="#2347dc"/>
+ <draw:color draw:name="14%42%86%" draw:color="#236bdc"/>
+ <draw:color draw:name="14%58%86%" draw:color="#2394dc"/>
+ <draw:color draw:name="14%72%86%" draw:color="#23b8dc"/>
+ <draw:color draw:name="14%86%86%" draw:color="#23dcdc"/>
+ <draw:color draw:name="86%100%86%" draw:color="#dcffdc"/>
+ <draw:color draw:name="0%0%100%" draw:color="#0000ff"/>
+ <draw:color draw:name="0%14%100%" draw:color="#0023ff"/>
+ <draw:color draw:name="0%28%100%" draw:color="#0047ff"/>
+ <draw:color draw:name="0%42%100%" draw:color="#006bff"/>
+ <draw:color draw:name="0%58%100%" draw:color="#0094ff"/>
+ <draw:color draw:name="0%72%100%" draw:color="#00b8ff"/>
+ <draw:color draw:name="0%86%100%" draw:color="#00dcff"/>
+ <draw:color draw:name="100%100%100%" draw:color="#ffffff"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
+ <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
+ <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
+ <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
+ <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
+ <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
+ <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
+ <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
+ <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
+ <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
+ <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
+ <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
+ <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
+ <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
+ <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
+ <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
+ <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
+ <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
+ <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
+ <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
+ <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
+ <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
+ <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
+ <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
+ <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
+</accel:acceleratorlist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <accel:item accel:code="KEY_F11" xlink:href=".uno:DesignerDialog"/>
+ <accel:item accel:code="KEY_F11" accel:shift="true" xlink:href=".uno:StyleNewByExample"/>
+ <accel:item accel:code="KEY_F11" accel:shift="true" accel:mod1="true" xlink:href=".uno:StyleUpdateByExample"/>
+ <accel:item accel:code="KEY_F11" accel:mod1="true" xlink:href=".uno:StyleCatalog"/>
+ <accel:item accel:code="KEY_Y" accel:mod1="true" xlink:href=".uno:Redo"/>
+ <accel:item accel:code="KEY_Z" accel:mod1="true" xlink:href=".uno:Undo"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:mod2="true" xlink:href=".uno:Undo"/>
+ <accel:item accel:code="KEY_UNDO" xlink:href=".uno:Undo"/>
+ <accel:item accel:code="KEY_REPEAT" xlink:href=".uno:Repeat"/>
+ <accel:item accel:code="KEY_I" accel:mod1="true" xlink:href=".uno:Italic"/>
+ <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:Bold"/>
+ <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:Underline"/>
+ <accel:item accel:code="KEY_L" accel:mod1="true" xlink:href=".uno:LeftPara"/>
+ <accel:item accel:code="KEY_R" accel:mod1="true" xlink:href=".uno:RightPara"/>
+ <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:CenterPara"/>
+ <accel:item accel:code="KEY_J" accel:mod1="true" xlink:href=".uno:JustifyPara"/>
+ <accel:item accel:code="KEY_5" accel:mod1="true" xlink:href=".uno:SpacePara15"/>
+ <accel:item accel:code="KEY_INSERT" xlink:href=".uno:InsertMode"/>
+ <accel:item accel:code="KEY_F5" xlink:href=".uno:Navigator"/>
+ <accel:item accel:code="KEY_A" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaLeftToRight"/>
+ <accel:item accel:code="KEY_D" accel:shift="true" accel:mod1="true" xlink:href=".uno:ParaRightToLeft"/>
+ <accel:item accel:code="KEY_V" accel:shift="true" accel:mod1="true" xlink:href=".uno:PasteSpecial"/>
+ <accel:item accel:code="KEY_F9" xlink:href=".uno:UpdateFields"/>
+ <accel:item accel:code="KEY_MULTIPLY" accel:mod1="true" xlink:href=".uno:ExecuteMacroField"/>
+ <accel:item accel:code="KEY_F2" xlink:href=".uno:InsertFormula"/>
+ <accel:item accel:code="KEY_F9" accel:shift="true" xlink:href=".uno:Calc"/>
+ <accel:item accel:code="KEY_UP" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveUp"/>
+ <accel:item accel:code="KEY_UP" accel:mod1="true" xlink:href=".uno:MoveUp"/>
+ <accel:item accel:code="KEY_DOWN" accel:mod1="true" accel:mod2="true" xlink:href=".uno:MoveDown"/>
+ <accel:item accel:code="KEY_DOWN" accel:mod1="true" xlink:href=".uno:MoveDown"/>
+ <accel:item accel:code="KEY_F12" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveBullets"/>
+ <accel:item accel:code="KEY_F12" accel:shift="true" xlink:href=".uno:DefaultBullet"/>
+ <accel:item accel:code="KEY_F9" accel:shift="true" accel:mod1="true" xlink:href=".uno:UpdateInputFields"/>
+ <accel:item accel:code="KEY_F12" xlink:href=".uno:DefaultNumbering"/>
+ <accel:item accel:code="KEY_F" accel:shift="true" accel:mod1="true" xlink:href=".uno:RepeatSearch"/>
+ <accel:item accel:code="KEY_R" accel:shift="true" accel:mod1="true" xlink:href=".uno:RefreshView"/>
+ <accel:item accel:code="KEY_F10" accel:mod1="true" xlink:href=".uno:ControlCodes"/>
+ <accel:item accel:code="KEY_F8" accel:mod1="true" xlink:href=".uno:Marks"/>
+ <accel:item accel:code="KEY_F9" accel:mod1="true" xlink:href=".uno:Fieldnames"/>
+ <accel:item accel:code="KEY_RETURN" xlink:href=".uno:InsertPara"/>
+ <accel:item accel:code="KEY_RETURN" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertColumnBreak"/>
+ <accel:item accel:code="KEY_F2" accel:mod1="true" xlink:href=".uno:InsertField"/>
+ <accel:item accel:code="KEY_RETURN" accel:shift="true" xlink:href=".uno:InsertLinebreak"/>
+ <accel:item accel:code="KEY_RETURN" accel:mod1="true" xlink:href=".uno:InsertPagebreak"/>
+ <accel:item accel:code="KEY_F12" accel:mod1="true" xlink:href=".uno:InsertTable"/>
+ <accel:item accel:code="KEY_SUBTRACT" accel:mod1="true" xlink:href=".uno:InsertSoftHyphen"/>
+ <accel:item accel:code="KEY_SPACE" accel:mod1="true" xlink:href=".uno:InsertNonBreakingSpace"/>
+ <accel:item accel:code="KEY_SUBTRACT" accel:shift="true" accel:mod1="true" xlink:href=".uno:InsertHardHyphen"/>
+ <accel:item accel:code="KEY_D" accel:mod1="true" xlink:href=".uno:UnderlineDouble"/>
+ <accel:item accel:code="KEY_P" accel:shift="true" accel:mod1="true" xlink:href=".uno:SuperScript"/>
+ <accel:item accel:code="KEY_B" accel:shift="true" accel:mod1="true" xlink:href=".uno:SubScript"/>
+ <accel:item accel:code="KEY_T" accel:shift="true" accel:mod1="true" xlink:href=".uno:ResetTableProtection"/>
+ <accel:item accel:code="KEY_F7" accel:mod1="true" xlink:href=".uno:ThesaurusDialog"/>
+ <accel:item accel:code="KEY_ADD" accel:mod1="true" xlink:href=".uno:CalculateSel"/>
+ <accel:item accel:code="KEY_F3" accel:mod1="true" xlink:href=".uno:EditGlossary"/>
+ <accel:item accel:code="KEY_F7" xlink:href=".uno:SpellDialog"/>
+ <accel:item accel:code="KEY_F3" xlink:href=".uno:ExpandGlossary"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" accel:mod1="true" xlink:href=".uno:GotoPage"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" xlink:href=".uno:CharLeftSel"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" xlink:href=".uno:CharRightSel"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" xlink:href=".uno:LineUpSel"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" xlink:href=".uno:LineDownSel"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" xlink:href=".uno:StartOfLineSel"/>
+ <accel:item accel:code="KEY_END" accel:shift="true" xlink:href=".uno:EndOfLineSel"/>
+ <accel:item accel:code="KEY_HOME" accel:shift="true" accel:mod1="true" xlink:href=".uno:StartOfDocumentSel"/>
+ <accel:item accel:code="KEY_END" accel:shift="true" accel:mod1="true" xlink:href=".uno:EndOfDocumentSel"/>
+ <accel:item accel:code="KEY_RIGHT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordRightSel"/>
+ <accel:item accel:code="KEY_LEFT" accel:shift="true" accel:mod1="true" xlink:href=".uno:WordLeftSel"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:shift="true" xlink:href=".uno:PageUpSel"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" xlink:href=".uno:PageDownSel"/>
+ <accel:item accel:code="KEY_LEFT" xlink:href=".uno:GoLeft"/>
+ <accel:item accel:code="KEY_RIGHT" xlink:href=".uno:GoRight"/>
+ <accel:item accel:code="KEY_UP" xlink:href=".uno:GoUp"/>
+ <accel:item accel:code="KEY_DOWN" xlink:href=".uno:GoDown"/>
+ <accel:item accel:code="KEY_HOME" xlink:href=".uno:GoToStartOfLine"/>
+ <accel:item accel:code="KEY_END" xlink:href=".uno:GoToEndOfLine"/>
+ <accel:item accel:code="KEY_HOME" accel:mod1="true" xlink:href=".uno:GoToStartOfDoc"/>
+ <accel:item accel:code="KEY_END" accel:mod1="true" xlink:href=".uno:GoToEndOfDoc"/>
+ <accel:item accel:code="KEY_RIGHT" accel:mod1="true" xlink:href=".uno:GoToNextWord"/>
+ <accel:item accel:code="KEY_LEFT" accel:mod1="true" xlink:href=".uno:GoToPrevWord"/>
+ <accel:item accel:code="KEY_BACKSPACE" xlink:href=".uno:SwBackspace"/>
+ <accel:item accel:code="KEY_DELETE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToEndOfSentence"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" accel:mod1="true" xlink:href=".uno:DelToStartOfSentence"/>
+ <accel:item accel:code="KEY_DELETE" accel:mod1="true" xlink:href=".uno:DelToEndOfWord"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:mod1="true" xlink:href=".uno:DelToStartOfWord"/>
+ <accel:item accel:code="KEY_PAGEUP" xlink:href=".uno:PageUp"/>
+ <accel:item accel:code="KEY_PAGEDOWN" xlink:href=".uno:PageDown"/>
+ <accel:item accel:code="KEY_F8" accel:shift="true" xlink:href=".uno:SetMultiSelection"/>
+ <accel:item accel:code="KEY_F8" xlink:href=".uno:SetExtSelection"/>
+ <accel:item accel:code="KEY_ESCAPE" xlink:href=".uno:Escape"/>
+ <accel:item accel:code="KEY_BACKSPACE" accel:shift="true" xlink:href=".uno:ShiftBackspace"/>
+ <accel:item accel:code="KEY_UP" accel:shift="true" accel:mod1="true" xlink:href=".uno:GoToStartOfTable"/>
+ <accel:item accel:code="KEY_DOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:GoToEnd"/>
+ <accel:item accel:code="KEY_F4" accel:shift="true" xlink:href=".uno:JumpToNextFrame"/>
+ <accel:item accel:code="KEY_F5" accel:shift="true" xlink:href=".uno:RestoreEditingView"/>
+ <accel:item accel:code="KEY_PAGEUP" accel:mod1="true" xlink:href=".uno:JumpToHeader"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:mod1="true" xlink:href=".uno:JumpToFooter"/>
+ <accel:item accel:code="KEY_PAGEDOWN" accel:shift="true" accel:mod1="true" xlink:href=".uno:JumpToFootnoteArea"/>
+ <accel:item accel:code="KEY_I" accel:shift="true" accel:mod1="true" xlink:href=".uno:SelectTextMode"/>
+ <accel:item accel:code="KEY_0" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Standard&FamilyName:string=ParagraphStyles"/>
+ <accel:item accel:code="KEY_1" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 1&FamilyName:string=ParagraphStyles"/>
+ <accel:item accel:code="KEY_2" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 2&FamilyName:string=ParagraphStyles"/>
+ <accel:item accel:code="KEY_3" accel:mod1="true" xlink:href=".uno:StyleApply?Style:string=Heading 3&FamilyName:string=ParagraphStyles"/>
+ <accel:item accel:code="KEY_SPACE" accel:mod1="true" accel:shift="true" xlink:href=".uno:ResetAttributes"/>
+ <accel:item accel:code="KEY_J" accel:shift="true" accel:mod1="true" xlink:href=".uno:FullScreen"/>
+ <accel:item accel:code="KEY_X" accel:shift="true" accel:mod1="true" xlink:href=".uno:RemoveDirectCharFormats"/>
+ <accel:item accel:code="KEY_DIVIDE" accel:mod1="true" xlink:href=".uno:InsertZWSP"/>
+</accel:acceleratorlist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:dash-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:stroke-dash draw:name="Linienstil 1" draw:style="rect" draw:dots1="1" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Linienstil 2" draw:style="rect" draw:dots1="1" draw:dots1-length="230%" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Linienstil 3" draw:style="rect" draw:dots1="1" draw:dots1-length="360%" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Linienstil 4" draw:style="rect" draw:dots1="1" draw:dots1-length="360%" draw:dots2="1" draw:dots2-length="250%" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Linienstil 5" draw:style="rect" draw:dots1="1" draw:dots1-length="360%" draw:dots2="1" draw:dots2-length="360%" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Linienstil 6" draw:style="rect" draw:dots1="1" draw:dots1-length="250%" draw:dots2="1" draw:dots2-length="250%" draw:distance="100%"/>
+</office:dash-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:dash-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:stroke-dash draw:name="Line Style 1" draw:style="rect" draw:dots1="1" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Line Style 2" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Line Style 3" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:dots2="1" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Line Style 4" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:dots2="1" draw:dots2-length="197%" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Line Style 5" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:dots2="1" draw:dots2-length="197%" draw:distance="100%"/>
+ <draw:stroke-dash draw:name="Line Style 6" draw:style="rect" draw:dots1="1" draw:dots1-length="197%" draw:dots2="1" draw:dots2-length="197%" draw:distance="100%"/>
+</office:dash-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config">\r
+ <draw:color draw:name=" White" draw:color="#ffffff"/>\r
+ <draw:color draw:name=" Light Grey" draw:color="#cccccc"/>\r
+ <draw:color draw:name=" Grey" draw:color="#999999"/>\r
+ <draw:color draw:name=" Dark Grey" draw:color="#666666"/>\r
+ <draw:color draw:name=" Charcoal Grey" draw:color="#333333"/>\r
+ <draw:color draw:name=" Black" draw:color="#000000"/>\r
+ <draw:color draw:name=" Dark Sun Blue" draw:color="#333366"/>\r
+ <draw:color draw:name=" Sun Blue" draw:color="#666699"/>\r
+ <draw:color draw:name=" Light Sun Blue" draw:color="#9999cc"/>\r
+ <draw:color draw:name=" Blue Tint" draw:color="#ccccff"/>\r
+ <draw:color draw:name=" Dark Blue" draw:color="#003366"/>\r
+ <draw:color draw:name=" Cold Blue" draw:color="#336699"/>\r
+ <draw:color draw:name=" Blue" draw:color="#6699cc"/>\r
+ <draw:color draw:name=" Light Blue" draw:color="#99ccff"/>\r
+ <draw:color draw:name=" Azure" draw:color="#99ffff"/>\r
+ <draw:color draw:name=" Ice Blue" draw:color="#ccffff"/>\r
+ <draw:color draw:name=" Bottle Green" draw:color="#003333"/>\r
+ <draw:color draw:name=" Dark Turquoise" draw:color="#336666"/>\r
+ <draw:color draw:name=" Turquoise" draw:color="#669999"/>\r
+ <draw:color draw:name=" Light Turquoise" draw:color="#99cccc"/>\r
+ <draw:color draw:name=" Dark Green" draw:color="#003300"/>\r
+ <draw:color draw:name=" Fir Green" draw:color="#336633"/>\r
+ <draw:color draw:name=" Green" draw:color="#669966"/>\r
+ <draw:color draw:name=" Light Green" draw:color="#99cc99"/>\r
+ <draw:color draw:name=" Pale Green" draw:color="#ccffcc"/>\r
+ <draw:color draw:name=" Umbra" draw:color="#333300"/>\r
+ <draw:color draw:name=" Olive Green" draw:color="#666633"/>\r
+ <draw:color draw:name=" Light Olive Green" draw:color="#999966"/>\r
+ <draw:color draw:name=" Khaki" draw:color="#cccc99"/>\r
+ <draw:color draw:name=" Sand" draw:color="#e1e1cc"/>\r
+ <draw:color draw:name=" Gold Ochre" draw:color="#cc9900"/>\r
+ <draw:color draw:name=" Lemon Green" draw:color="#cccc00"/>\r
+ <draw:color draw:name=" Greenish Yellow" draw:color="#cccc33"/>\r
+ <draw:color draw:name=" Light Lemon Green" draw:color="#cccc66"/>\r
+ <draw:color draw:name=" Burnt Umber" draw:color="#330000"/>\r
+ <draw:color draw:name=" Brown" draw:color="#663300"/>\r
+ <draw:color draw:name=" Coffee" draw:color="#996633"/>\r
+ <draw:color draw:name=" Beige" draw:color="#cc9966"/>\r
+ <draw:color draw:name=" Burnt Sienna" draw:color="#660000"/>\r
+ <draw:color draw:name=" Reddish Brown" draw:color="#993300"/>\r
+ <draw:color draw:name=" Sienna" draw:color="#cc6600"/>\r
+ <draw:color draw:name=" Orange" draw:color="#ff9900"/>\r
+ <draw:color draw:name=" Yellow" draw:color="#ffff00"/>\r
+ <draw:color draw:name=" Russet" draw:color="#990000"/>\r
+ <draw:color draw:name=" Java Red" draw:color="#cc3333"/>\r
+ <draw:color draw:name=" Buy Red" draw:color="#ff0000"/>\r
+ <draw:color draw:name=" Red" draw:color="#ff3333"/>\r
+ <draw:color draw:name=" Light Red" draw:color="#ff6666"/>\r
+ <draw:color draw:name=" Rose" draw:color="#ff9999"/>\r
+ <draw:color draw:name=" Crimson" draw:color="#cc0033"/>\r
+ <draw:color draw:name=" Bordeux" draw:color="#990033"/>\r
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:color-table xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script">
+ <draw:color draw:name="0 0 0" draw:color="#000000"/>
+ <draw:color draw:name="0 0 128" draw:color="#000080"/>
+ <draw:color draw:name="0 128 0" draw:color="#008000"/>
+ <draw:color draw:name="0 128 128" draw:color="#008080"/>
+ <draw:color draw:name="128 0 0" draw:color="#800000"/>
+ <draw:color draw:name="128 0 128" draw:color="#800080"/>
+ <draw:color draw:name="128 128 0" draw:color="#808000"/>
+ <draw:color draw:name="128 128 128" draw:color="#808080"/>
+ <draw:color draw:name="192 192 192" draw:color="#bfbfbf"/>
+ <draw:color draw:name="0 0 255" draw:color="#0000ff"/>
+ <draw:color draw:name="0 255 0" draw:color="#00ff00"/>
+ <draw:color draw:name="0 255 255" draw:color="#00ffff"/>
+ <draw:color draw:name="255 0 0" draw:color="#ff0000"/>
+ <draw:color draw:name="255 0 255" draw:color="#ff00ff"/>
+ <draw:color draw:name="255 255 0" draw:color="#ffff00"/>
+ <draw:color draw:name="255 255 255" draw:color="#ffffff"/>
+ <draw:color draw:name="0 0 0 " draw:color="#333333"/>
+ <draw:color draw:name="51 0 0" draw:color="#330000"/>
+ <draw:color draw:name="102 0 0" draw:color="#660000"/>
+ <draw:color draw:name="153 0 0" draw:color="#990000"/>
+ <draw:color draw:name="204 0 0" draw:color="#cc0000"/>
+ <draw:color draw:name="255 0 0 " draw:color="#ff0000"/>
+ <draw:color draw:name="0 51 0" draw:color="#003300"/>
+ <draw:color draw:name="51 51 0" draw:color="#333300"/>
+ <draw:color draw:name="102 51 0" draw:color="#663300"/>
+ <draw:color draw:name="153 51 0" draw:color="#993300"/>
+ <draw:color draw:name="204 51 0" draw:color="#cc3300"/>
+ <draw:color draw:name="255 51 0" draw:color="#ff3300"/>
+ <draw:color draw:name="0 102 0" draw:color="#006600"/>
+ <draw:color draw:name="51 102 0" draw:color="#336600"/>
+ <draw:color draw:name="102 102 0" draw:color="#666600"/>
+ <draw:color draw:name="153 102 0" draw:color="#996600"/>
+ <draw:color draw:name="204 102 0" draw:color="#cc6600"/>
+ <draw:color draw:name="255 102 0" draw:color="#ff6600"/>
+ <draw:color draw:name="0 153 0" draw:color="#009900"/>
+ <draw:color draw:name="51 153 0" draw:color="#339900"/>
+ <draw:color draw:name="102 153 0" draw:color="#669900"/>
+ <draw:color draw:name="153 153 0" draw:color="#999900"/>
+ <draw:color draw:name="204 153 0" draw:color="#cc9900"/>
+ <draw:color draw:name="255 153 0" draw:color="#ff9900"/>
+ <draw:color draw:name="0 204 0" draw:color="#00cc00"/>
+ <draw:color draw:name="51 204 0" draw:color="#33cc00"/>
+ <draw:color draw:name="102 204 0" draw:color="#66cc00"/>
+ <draw:color draw:name="153 204 0" draw:color="#99cc00"/>
+ <draw:color draw:name="204 204 0" draw:color="#cccc00"/>
+ <draw:color draw:name="255 204 0" draw:color="#ffcc00"/>
+ <draw:color draw:name="0 255 0 " draw:color="#00ff00"/>
+ <draw:color draw:name="51 255 0" draw:color="#33ff00"/>
+ <draw:color draw:name="102 255 0" draw:color="#66ff00"/>
+ <draw:color draw:name="153 255 0" draw:color="#99ff00"/>
+ <draw:color draw:name="204 255 0" draw:color="#ccff00"/>
+ <draw:color draw:name="255 255 0 " draw:color="#ffff00"/>
+ <draw:color draw:name="0 0 51" draw:color="#000033"/>
+ <draw:color draw:name="51 0 51" draw:color="#330033"/>
+ <draw:color draw:name="102 0 51" draw:color="#660033"/>
+ <draw:color draw:name="153 0 51" draw:color="#990033"/>
+ <draw:color draw:name="204 0 51" draw:color="#cc0033"/>
+ <draw:color draw:name="255 0 51" draw:color="#ff0033"/>
+ <draw:color draw:name="0 51 51" draw:color="#003333"/>
+ <draw:color draw:name="51 51 51" draw:color="#333333"/>
+ <draw:color draw:name="102 51 51" draw:color="#663333"/>
+ <draw:color draw:name="153 51 51" draw:color="#993333"/>
+ <draw:color draw:name="204 51 51" draw:color="#cc3333"/>
+ <draw:color draw:name="255 51 51" draw:color="#ff3333"/>
+ <draw:color draw:name="0 102 51" draw:color="#006633"/>
+ <draw:color draw:name="51 102 51" draw:color="#336633"/>
+ <draw:color draw:name="102 102 51" draw:color="#666633"/>
+ <draw:color draw:name="153 102 51" draw:color="#996633"/>
+ <draw:color draw:name="204 102 51" draw:color="#cc6633"/>
+ <draw:color draw:name="255 102 51" draw:color="#ff6633"/>
+ <draw:color draw:name="0 153 51" draw:color="#009933"/>
+ <draw:color draw:name="51 153 51" draw:color="#339933"/>
+ <draw:color draw:name="102 153 51" draw:color="#669933"/>
+ <draw:color draw:name="153 153 51" draw:color="#999933"/>
+ <draw:color draw:name="204 153 51" draw:color="#cc9933"/>
+ <draw:color draw:name="255 153 51" draw:color="#ff9933"/>
+ <draw:color draw:name="0 204 51" draw:color="#00cc33"/>
+ <draw:color draw:name="51 204 51" draw:color="#33cc33"/>
+ <draw:color draw:name="102 204 51" draw:color="#66cc33"/>
+ <draw:color draw:name="153 204 51" draw:color="#99cc33"/>
+ <draw:color draw:name="204 204 51" draw:color="#cccc33"/>
+ <draw:color draw:name="255 204 51" draw:color="#ffcc82"/>
+ <draw:color draw:name="0 255 51" draw:color="#00ff33"/>
+ <draw:color draw:name="51 255 51" draw:color="#33ff33"/>
+ <draw:color draw:name="102 255 51" draw:color="#66ff33"/>
+ <draw:color draw:name="153 255 51" draw:color="#99ff33"/>
+ <draw:color draw:name="204 255 51" draw:color="#ccff33"/>
+ <draw:color draw:name="255 255 51" draw:color="#ffff33"/>
+ <draw:color draw:name="0 0 102" draw:color="#000066"/>
+ <draw:color draw:name="51 0 102" draw:color="#330066"/>
+ <draw:color draw:name="102 0 102" draw:color="#660066"/>
+ <draw:color draw:name="153 0 102" draw:color="#990066"/>
+ <draw:color draw:name="204 0 102" draw:color="#cc0066"/>
+ <draw:color draw:name="255 0 102" draw:color="#ff0066"/>
+ <draw:color draw:name="0 51 102" draw:color="#003366"/>
+ <draw:color draw:name="51 51 102" draw:color="#333366"/>
+ <draw:color draw:name="102 51 102" draw:color="#663366"/>
+ <draw:color draw:name="153 51 102" draw:color="#993366"/>
+ <draw:color draw:name="204 51 102" draw:color="#cc3366"/>
+ <draw:color draw:name="255 51 102" draw:color="#ff3366"/>
+ <draw:color draw:name="0 102 102" draw:color="#006666"/>
+ <draw:color draw:name="51 102 102" draw:color="#336666"/>
+ <draw:color draw:name="102 102 102" draw:color="#666666"/>
+ <draw:color draw:name="153 102 102" draw:color="#996666"/>
+ <draw:color draw:name="204 102 102" draw:color="#cc6666"/>
+ <draw:color draw:name="255 102 102" draw:color="#ff6666"/>
+ <draw:color draw:name="0 153 102" draw:color="#009966"/>
+ <draw:color draw:name="51 153 102" draw:color="#339966"/>
+ <draw:color draw:name="102 153 102" draw:color="#669966"/>
+ <draw:color draw:name="153 153 102" draw:color="#999966"/>
+ <draw:color draw:name="204 153 102" draw:color="#cc9966"/>
+ <draw:color draw:name="255 153 102" draw:color="#ff9966"/>
+ <draw:color draw:name="0 204 102" draw:color="#00cc66"/>
+ <draw:color draw:name="51 204 102" draw:color="#33cc66"/>
+ <draw:color draw:name="102 204 102" draw:color="#66cc66"/>
+ <draw:color draw:name="153 204 102" draw:color="#99cc66"/>
+ <draw:color draw:name="204 204 102" draw:color="#cccc66"/>
+ <draw:color draw:name="255 204 102" draw:color="#ffcc66"/>
+ <draw:color draw:name="0 255 102" draw:color="#00ff66"/>
+ <draw:color draw:name="51 255 102" draw:color="#33ff66"/>
+ <draw:color draw:name="102 255 102" draw:color="#66ff66"/>
+ <draw:color draw:name="153 255 102" draw:color="#99ff66"/>
+ <draw:color draw:name="204 255 102" draw:color="#ccff66"/>
+ <draw:color draw:name="255 255 102" draw:color="#ffff66"/>
+ <draw:color draw:name="0 0 153" draw:color="#000099"/>
+ <draw:color draw:name="51 0 153" draw:color="#330099"/>
+ <draw:color draw:name="102 0 153" draw:color="#660099"/>
+ <draw:color draw:name="153 0 153" draw:color="#990099"/>
+ <draw:color draw:name="204 0 153" draw:color="#cc0099"/>
+ <draw:color draw:name="255 0 153" draw:color="#ff0099"/>
+ <draw:color draw:name="0 51 153" draw:color="#003399"/>
+ <draw:color draw:name="51 51 153" draw:color="#333399"/>
+ <draw:color draw:name="102 51 153" draw:color="#663399"/>
+ <draw:color draw:name="153 51 153" draw:color="#993399"/>
+ <draw:color draw:name="204 51 153" draw:color="#cc3399"/>
+ <draw:color draw:name="255 51 153" draw:color="#ff3399"/>
+ <draw:color draw:name="0 102 153" draw:color="#006699"/>
+ <draw:color draw:name="51 102 153" draw:color="#336699"/>
+ <draw:color draw:name="102 102 153" draw:color="#666699"/>
+ <draw:color draw:name="153 102 153" draw:color="#996699"/>
+ <draw:color draw:name="204 102 153" draw:color="#cc6699"/>
+ <draw:color draw:name="255 102 153" draw:color="#ff6699"/>
+ <draw:color draw:name="0 153 153" draw:color="#009999"/>
+ <draw:color draw:name="51 153 153" draw:color="#339999"/>
+ <draw:color draw:name="102 153 153" draw:color="#669999"/>
+ <draw:color draw:name="153 153 153" draw:color="#999999"/>
+ <draw:color draw:name="204 153 153" draw:color="#cc9999"/>
+ <draw:color draw:name="255 153 153" draw:color="#ff9999"/>
+ <draw:color draw:name="0 204 153" draw:color="#00cc99"/>
+ <draw:color draw:name="51 204 153" draw:color="#33cc99"/>
+ <draw:color draw:name="102 204 153" draw:color="#66cc99"/>
+ <draw:color draw:name="153 204 153" draw:color="#99cc99"/>
+ <draw:color draw:name="204 204 153" draw:color="#cccc99"/>
+ <draw:color draw:name="255 204 153" draw:color="#ffcc99"/>
+ <draw:color draw:name="0 255 153" draw:color="#00ff99"/>
+ <draw:color draw:name="51 255 153" draw:color="#33ff99"/>
+ <draw:color draw:name="102 255 153" draw:color="#66ff99"/>
+ <draw:color draw:name="153 255 153" draw:color="#99ff99"/>
+ <draw:color draw:name="204 255 153" draw:color="#ccff99"/>
+ <draw:color draw:name="255 255 153" draw:color="#ffff99"/>
+ <draw:color draw:name="0 0 204" draw:color="#0000cc"/>
+ <draw:color draw:name="51 0 204" draw:color="#3300cc"/>
+ <draw:color draw:name="102 0 204" draw:color="#6600cc"/>
+ <draw:color draw:name="153 0 204" draw:color="#9900cc"/>
+ <draw:color draw:name="204 0 204" draw:color="#cc00cc"/>
+ <draw:color draw:name="255 0 204" draw:color="#ff00cc"/>
+ <draw:color draw:name="0 51 204" draw:color="#0033cc"/>
+ <draw:color draw:name="51 51 204" draw:color="#3333cc"/>
+ <draw:color draw:name="102 51 204" draw:color="#6633cc"/>
+ <draw:color draw:name="153 51 204" draw:color="#9933cc"/>
+ <draw:color draw:name="204 51 204" draw:color="#cc33cc"/>
+ <draw:color draw:name="255 51 204" draw:color="#ff33cc"/>
+ <draw:color draw:name="0 102 204" draw:color="#0066cc"/>
+ <draw:color draw:name="51 102 204" draw:color="#3366cc"/>
+ <draw:color draw:name="102 102 204" draw:color="#6666cc"/>
+ <draw:color draw:name="153 102 204" draw:color="#9966cc"/>
+ <draw:color draw:name="204 102 204" draw:color="#cc66cc"/>
+ <draw:color draw:name="255 102 204" draw:color="#ff66cc"/>
+ <draw:color draw:name="0 153 204" draw:color="#0099cc"/>
+ <draw:color draw:name="51 153 204" draw:color="#3399cc"/>
+ <draw:color draw:name="102 153 204" draw:color="#6699cc"/>
+ <draw:color draw:name="153 153 204" draw:color="#9999cc"/>
+ <draw:color draw:name="204 153 204" draw:color="#cc99cc"/>
+ <draw:color draw:name="255 153 204" draw:color="#ff99cc"/>
+ <draw:color draw:name="0 204 204" draw:color="#00cccc"/>
+ <draw:color draw:name="51 204 204" draw:color="#33cccc"/>
+ <draw:color draw:name="102 204 204" draw:color="#66cccc"/>
+ <draw:color draw:name="153 204 204" draw:color="#99cccc"/>
+ <draw:color draw:name="204 204 204" draw:color="#cccccc"/>
+ <draw:color draw:name="255 204 204" draw:color="#ffcccc"/>
+ <draw:color draw:name="0 255 204" draw:color="#00ffcc"/>
+ <draw:color draw:name="51 255 204" draw:color="#33ffcc"/>
+ <draw:color draw:name="102 255 204" draw:color="#66ffcc"/>
+ <draw:color draw:name="153 255 204" draw:color="#99ffcc"/>
+ <draw:color draw:name="204 255 204" draw:color="#ccffcc"/>
+ <draw:color draw:name="255 255 204" draw:color="#ffffcc"/>
+ <draw:color draw:name="0 0 255 " draw:color="#0000ff"/>
+ <draw:color draw:name="51 0 255 " draw:color="#3300ff"/>
+ <draw:color draw:name="102 0 255 " draw:color="#6600ff"/>
+ <draw:color draw:name="153 0 255 " draw:color="#9900ff"/>
+ <draw:color draw:name="204 0 255 " draw:color="#cc00ff"/>
+ <draw:color draw:name="255 0 255 " draw:color="#ff00ff"/>
+ <draw:color draw:name="0 51 255 " draw:color="#0033ff"/>
+ <draw:color draw:name="51 51 255 " draw:color="#3333ff"/>
+ <draw:color draw:name="102 51 255 " draw:color="#6633ff"/>
+ <draw:color draw:name="153 51 255 " draw:color="#9933ff"/>
+ <draw:color draw:name="204 51 255 " draw:color="#cc33ff"/>
+ <draw:color draw:name="255 51 255 " draw:color="#ff33ff"/>
+ <draw:color draw:name="0 102 255 " draw:color="#0066ff"/>
+ <draw:color draw:name="51 102 255 " draw:color="#3366ff"/>
+ <draw:color draw:name="102 102 255 " draw:color="#6666ff"/>
+ <draw:color draw:name="153 102 255 " draw:color="#9966ff"/>
+ <draw:color draw:name="204 102 255 " draw:color="#cc66ff"/>
+ <draw:color draw:name="255 102 255 " draw:color="#ff66ff"/>
+ <draw:color draw:name="0 153 255 " draw:color="#0099ff"/>
+ <draw:color draw:name="51 153 255 " draw:color="#3399ff"/>
+ <draw:color draw:name="102 153 255 " draw:color="#6699ff"/>
+ <draw:color draw:name="153 153 255 " draw:color="#9999ff"/>
+ <draw:color draw:name="204 153 255 " draw:color="#cc99ff"/>
+ <draw:color draw:name="255 153 255 " draw:color="#ff99ff"/>
+ <draw:color draw:name="0 204 255 " draw:color="#00ccff"/>
+ <draw:color draw:name="51 204 255 " draw:color="#33ccff"/>
+ <draw:color draw:name="102 204 255 " draw:color="#66ccff"/>
+ <draw:color draw:name="153 204 255 " draw:color="#99ccff"/>
+ <draw:color draw:name="204 204 255 " draw:color="#ccccff"/>
+ <draw:color draw:name="255 204 255 " draw:color="#ffccff"/>
+ <draw:color draw:name="0 255 255 " draw:color="#00ffff"/>
+ <draw:color draw:name="51 255 255 " draw:color="#33ffff"/>
+ <draw:color draw:name="102 255 255 " draw:color="#66ffff"/>
+ <draw:color draw:name="153 255 255 " draw:color="#99ffff"/>
+ <draw:color draw:name="204 255 255 " draw:color="#ccffff"/>
+ <draw:color draw:name="255 255 255 " draw:color="#ffffff"/>
+</office:color-table>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Common" oor:package="org.openoffice.Office">
+ <node oor:name="Misc">
+ <prop oor:name="FirstRun" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="Internal">
+ <prop oor:name="CurrentTempURL" oor:type="xs:string">
+ <value/>
+ </prop>
+ </node>
+ <node oor:name="Security">
+ <node oor:name="Scripting">
+ <prop oor:name="MacroSecurityLevel" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ </node>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Linguistic" oor:package="org.openoffice.Office">
+ <node oor:name="General">
+ <prop oor:name="DefaultLocale" oor:type="xs:string">
+ <value>en-US</value>
+ </prop>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Recovery" oor:package="org.openoffice.Office">
+ <node oor:name="RecoveryList">
+ <node oor:name="recovery_item_1" oor:op="remove"/>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI">
+ <node oor:name="UIElements">
+ <node oor:name="States">
+ <node oor:name="private:resource/statusbar/statusbar" oor:op="replace">
+ <prop oor:name="ContextActive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="ContextSensitive" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="DockPos" oor:type="xs:string">
+ <value>2147483647,2147483647</value>
+ </prop>
+ <prop oor:name="DockSize" oor:type="xs:string">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <prop oor:name="DockingArea" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="InternalState" oor:type="xs:int">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="Locked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="NoClose" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Pos" oor:type="xs:string">
+ <value>2147483647,2147483647</value>
+ </prop>
+ <prop oor:name="Size" oor:type="xs:string">
+ <value>0,0</value>
+ </prop>
+ <prop oor:name="SoftClose" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="Style" oor:type="xs:int">
+ <value>0</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US"/>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Views" oor:package="org.openoffice.Office">
+ <node oor:name="Dialogs">
+ <node oor:name="16615" oor:op="replace">
+ <prop oor:name="WindowState" oor:type="xs:string">
+ <value>95,211,,;;,,,;</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="Windows">
+ <node oor:name="SplitWindow0" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="WindowState" oor:type="xs:string">
+ <value xsi:nil="true"/>
+ </prop>
+ <node oor:name="UserData">
+ <prop oor:name="UserItem" oor:op="replace" oor:type="xs:string">
+ <value>V1,2,0</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="SplitWindow2" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="WindowState" oor:type="xs:string">
+ <value xsi:nil="true"/>
+ </prop>
+ <node oor:name="UserData">
+ <prop oor:name="UserItem" oor:op="replace" oor:type="xs:string">
+ <value>V1,2,0</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="SplitWindow1" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="WindowState" oor:type="xs:string">
+ <value xsi:nil="true"/>
+ </prop>
+ <node oor:name="UserData">
+ <prop oor:name="UserItem" oor:op="replace" oor:type="xs:string">
+ <value>V1,2,0</value>
+ </prop>
+ </node>
+ </node>
+ <node oor:name="SplitWindow3" oor:op="replace">
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value xsi:nil="true"/>
+ </prop>
+ <prop oor:name="WindowState" oor:type="xs:string">
+ <value xsi:nil="true"/>
+ </prop>
+ <node oor:name="UserData">
+ <prop oor:name="UserItem" oor:op="replace" oor:type="xs:string">
+ <value>V1,2,0</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Setup" oor:package="org.openoffice">
+ <node oor:name="L10N">
+ <prop oor:name="ooLocale" oor:type="xs:string">
+ <value>en-US</value>
+ </prop>
+ </node>
+ <node oor:name="Office">
+ <prop oor:name="ooSetupInstCompleted" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ <node oor:name="Factories">
+ <node oor:name="com.sun.star.text.TextDocument">
+ <prop oor:name="ooSetupFactoryWindowAttributes" oor:type="xs:string">
+ <value>0,0,920,630;1;0,0,0,0;</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+# This script starts an instance of Xvfb, the "fake" X server, runs a command
+# with that server available, and kills the X server when done. The return
+# value of the command becomes the return value of this script.
+
+# This is a stripped-down version of the 'xvfb-run' script provided by
+# Debian's 'xvfb' package which itself is licensed under the GPL, just as
+# Lx-Office is. It is unclear who wrote the original script, but the
+# CVS Id tag mentioned 'branden'.
+
+set -e
+
+PROGNAME=xvfb-run
+SERVERNUM=99
+AUTHFILE=
+ERRORFILE=/dev/null
+STARTWAIT=3
+XVFBARGS="-screen 0 640x480x8"
+LISTENTCP="-nolisten tcp"
+XAUTHPROTO=.
+
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user. This is used only as a fallback in the event
+# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the
+# script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
+ DEFCOLUMNS=80
+fi
+
+# Display a message, wrapping lines at the terminal width.
+message () {
+ echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
+}
+
+# Display an error message.
+error () {
+ message "error: $*" >&2
+}
+
+# Find a free server number by looking at .X*-lock files in /tmp.
+find_free_servernum() {
+ # Sadly, the "local" keyword is not POSIX. Leave the next line commented in
+ # the hope Debian Policy eventually changes to allow it in /bin/sh scripts
+ # anyway.
+ #local i
+
+ i=$SERVERNUM
+ while [ -f /tmp/.X$i-lock ]; do
+ i=$(($i + 1))
+ done
+ echo $i
+}
+
+SERVERNUM=$(find_free_servernum)
+
+PATH=$PATH:/usr/bin/x11:/usr/X11R6/bin
+
+if ! which xauth >/dev/null; then
+ error "xauth command not found"
+ exit 3
+fi
+
+# If the user did not specify an X authorization file to use, set up a temporary
+# directory to house one.
+XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$"
+if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then
+ error "temporary directory $XVFB_RUN_TMPDIR already exists"
+ exit 4
+fi
+AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority")
+
+# Start Xvfb.
+MCOOKIE=$(mcookie)
+XAUTHORITY=$AUTHFILE xauth add ":$SERVERNUM" "$XAUTHPROTO" "$MCOOKIE" \
+ >"$ERRORFILE" 2>&1
+XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >"$ERRORFILE" \
+ 2>&1 &
+XVFBPID=$!
+sleep "$STARTWAIT"
+
+# Start the command and save its exit status.
+set +e
+DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
+RETVAL=$?
+set -e
+
+# Kill Xvfb now that the command has exited.
+kill $XVFBPID
+
+# Clean up.
+XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1
+if [ -n "$XVFB_RUN_TMPDIR" ]; then
+ if ! rm -r "$XVFB_RUN_TMPDIR"; then
+ error "problem while cleaning up temporary directory"
+ exit 5
+ fi
+fi
+
+# Return the executed command's exit status.
+exit $RETVAL